@pixeasy/customizer 0.0.30-beta.uat → 0.0.32-beta.stage
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.
|
@@ -2,7 +2,7 @@ var P4=Object.defineProperty,A4=Object.defineProperties;var O4=Object.getOwnProp
|
|
|
2
2
|
${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(`
|
|
3
3
|
`)}`:"",this.name="UnsubscriptionError",this.errors=t});function ph(i,e){if(i){let t=i.indexOf(e);0<=t&&i.splice(t,1)}}var Ui=class i{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let o of t)o.remove(this);else t.remove(this);let{initialTeardown:n}=this;if(Ft(n))try{n()}catch(o){e=o instanceof Qm?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{HD(o)}catch(s){e=e??[],s instanceof Qm?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Qm(e)}}add(e){var t;if(e&&e!==this)if(this.closed)HD(e);else{if(e instanceof i){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&ph(t,e)}remove(e){let{_finalizers:t}=this;t&&ph(t,e),e instanceof i&&e._removeParent(this)}};Ui.EMPTY=(()=>{let i=new Ui;return i.closed=!0,i})();var K_=Ui.EMPTY;function eg(i){return i instanceof Ui||i&&"closed"in i&&Ft(i.remove)&&Ft(i.add)&&Ft(i.unsubscribe)}function HD(i){Ft(i)?i():i.unsubscribe()}var wo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Yd={setTimeout(i,e,...t){let{delegate:n}=Yd;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=Yd;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function tg(i){Yd.setTimeout(()=>{let{onUnhandledError:e}=wo;if(e)e(i);else throw i})}function Z_(){}var jD=J_("C",void 0,void 0);function WD(i){return J_("E",void 0,i)}function $D(i){return J_("N",i,void 0)}function J_(i,e,t){return{kind:i,value:e,error:t}}var lc=null;function qd(i){if(wo.useDeprecatedSynchronousErrorHandling){let e=!lc;if(e&&(lc={errorThrown:!1,error:null}),i(),e){let{errorThrown:t,error:n}=lc;if(lc=null,t)throw n}}else i()}function XD(i){wo.useDeprecatedSynchronousErrorHandling&&lc&&(lc.errorThrown=!0,lc.error=i)}var cc=class extends Ui{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,eg(e)&&e.add(this)):this.destination=H4}static create(e,t,n){return new za(e,t,n)}next(e){this.isStopped?eS($D(e),this):this._next(e)}error(e){this.isStopped?eS(WD(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?eS(jD,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},V4=Function.prototype.bind;function Q_(i,e){return V4.call(i,e)}var tS=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){ng(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){ng(n)}else ng(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){ng(t)}}},za=class extends cc{constructor(e,t,n){super();let r;if(Ft(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&wo.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Q_(e.next,o),error:e.error&&Q_(e.error,o),complete:e.complete&&Q_(e.complete,o)}):r=e}this.destination=new tS(r)}};function ng(i){wo.useDeprecatedSynchronousErrorHandling?XD(i):tg(i)}function G4(i){throw i}function eS(i,e){let{onStoppedNotification:t}=wo;t&&Yd.setTimeout(()=>t(i,e))}var H4={closed:!0,next:Z_,error:G4,complete:Z_};var Kd=typeof Symbol=="function"&&Symbol.observable||"@@observable";function ig(i){return i}function YD(i){return i.length===0?ig:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var En=(()=>{class i{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new i;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=W4(t)?t:new za(t,n,r);return qd(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return n=qD(n),new n((r,o)=>{let s=new za({next:a=>{try{t(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[Kd](){return this}pipe(...t){return YD(t)(this)}toPromise(t){return t=qD(t),new t((n,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>n(o))})}}return i.create=e=>new i(e),i})();function qD(i){var e;return(e=i??wo.Promise)!==null&&e!==void 0?e:Promise}function j4(i){return i&&Ft(i.next)&&Ft(i.error)&&Ft(i.complete)}function W4(i){return i&&i instanceof cc||j4(i)&&eg(i)}function $4(i){return Ft(i?.lift)}function ai(i){return e=>{if($4(e))return e.lift(function(t){try{return i(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function li(i,e,t,n,r){return new nS(i,e,t,n,r)}var nS=class extends cc{constructor(e,t,n,r,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};var KD=Xd(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Eo=(()=>{class i extends En{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new rg(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new KD}next(t){qd(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){qd(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){qd(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){let{hasError:n,isStopped:r,observers:o}=this;return n||r?K_:(this.currentObservers=null,o.push(t),new Ui(()=>{this.currentObservers=null,ph(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new En;return t.source=this,t}}return i.create=(e,t)=>new rg(e,t),i})(),rg=class extends Eo{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:K_}};var mh=class extends Eo{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};function ZD(i){return i&&Ft(i.schedule)}function JD(i){return i[i.length-1]}function QD(i){return Ft(JD(i))?i.pop():void 0}function eI(i){return ZD(JD(i))?i.pop():void 0}function nI(i,e,t,n){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,e||[])).next())})}function tI(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],n=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&n>=i.length&&(i=void 0),{value:i&&i[n++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function dc(i){return this instanceof dc?(this.v=i,this):new dc(i)}function iI(i,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(i,e||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(h){return function(p){return Promise.resolve(p).then(h,u)}}function a(h,p){n[h]&&(r[h]=function(v){return new Promise(function(g,m){o.push([h,v,g,m])>1||l(h,v)})},p&&(r[h]=p(r[h])))}function l(h,p){try{c(n[h](p))}catch(v){f(o[0][3],v)}}function c(h){h.value instanceof dc?Promise.resolve(h.value.v).then(d,u):f(o[0][2],h)}function d(h){l("next",h)}function u(h){l("throw",h)}function f(h,p){h(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}function rI(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof tI=="function"?tI(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var og=i=>i&&typeof i.length=="number"&&typeof i!="function";function sg(i){return Ft(i?.then)}function ag(i){return Ft(i[Kd])}function lg(i){return Symbol.asyncIterator&&Ft(i?.[Symbol.asyncIterator])}function cg(i){return new TypeError(`You provided ${i!==null&&typeof i=="object"?"an invalid object":`'${i}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function X4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var dg=X4();function ug(i){return Ft(i?.[dg])}function fg(i){return iI(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield dc(t.read());if(r)return yield dc(void 0);yield yield dc(n)}}finally{t.releaseLock()}})}function hg(i){return Ft(i?.getReader)}function Ei(i){if(i instanceof En)return i;if(i!=null){if(ag(i))return Y4(i);if(og(i))return q4(i);if(sg(i))return K4(i);if(lg(i))return oI(i);if(ug(i))return Z4(i);if(hg(i))return J4(i)}throw cg(i)}function Y4(i){return new En(e=>{let t=i[Kd]();if(Ft(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function q4(i){return new En(e=>{for(let t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()})}function K4(i){return new En(e=>{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,tg)})}function Z4(i){return new En(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function oI(i){return new En(e=>{Q4(i,e).catch(t=>e.error(t))})}function J4(i){return oI(fg(i))}function Q4(i,e){var t,n,r,o;return nI(this,void 0,void 0,function*(){try{for(t=rI(i);n=yield t.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{n&&!n.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function Kr(i,e,t,n=0,r=!1){let o=e.schedule(function(){t(),r?i.add(this.schedule(null,n)):this.unsubscribe()},n);if(i.add(o),!r)return o}function pg(i,e=0){return ai((t,n)=>{t.subscribe(li(n,r=>Kr(n,i,()=>n.next(r),e),()=>Kr(n,i,()=>n.complete(),e),r=>Kr(n,i,()=>n.error(r),e)))})}function mg(i,e=0){return ai((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function sI(i,e){return Ei(i).pipe(mg(e),pg(e))}function aI(i,e){return Ei(i).pipe(mg(e),pg(e))}function lI(i,e){return new En(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function cI(i,e){return new En(t=>{let n;return Kr(t,e,()=>{n=i[dg](),Kr(t,e,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>Ft(n?.return)&&n.return()})}function gg(i,e){if(!i)throw new Error("Iterable cannot be null");return new En(t=>{Kr(t,e,()=>{let n=i[Symbol.asyncIterator]();Kr(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function dI(i,e){return gg(fg(i),e)}function uI(i,e){if(i!=null){if(ag(i))return sI(i,e);if(og(i))return lI(i,e);if(sg(i))return aI(i,e);if(lg(i))return gg(i,e);if(ug(i))return cI(i,e);if(hg(i))return dI(i,e)}throw cg(i)}function gh(i,e){return e?uI(i,e):Ei(i)}function ss(...i){let e=eI(i);return gh(i,e)}function Va(i,e){let t=Ft(i)?i:()=>i,n=r=>r.error(t());return new En(e?r=>e.schedule(n,0,r):n)}var fI=Xd(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function uc(i,e){let t=typeof e=="object";return new Promise((n,r)=>{let o=new za({next:s=>{n(s),o.unsubscribe()},error:r,complete:()=>{t?n(e.defaultValue):r(new fI)}});i.subscribe(o)})}function rr(i,e){return ai((t,n)=>{let r=0;t.subscribe(li(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:e5}=Array;function t5(i,e){return e5(e)?i(...e):i(e)}function hI(i){return rr(e=>t5(i,e))}var{isArray:n5}=Array,{getPrototypeOf:i5,prototype:r5,keys:o5}=Object;function pI(i){if(i.length===1){let e=i[0];if(n5(e))return{args:e,keys:null};if(s5(e)){let t=o5(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function s5(i){return i&&typeof i=="object"&&i5(i)===r5}function mI(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function gI(i,e,t,n,r,o,s,a){let l=[],c=0,d=0,u=!1,f=()=>{u&&!l.length&&!c&&e.complete()},h=v=>c<n?p(v):l.push(v),p=v=>{o&&e.next(v),c++;let g=!1;Ei(t(v,d++)).subscribe(li(e,m=>{r?.(m),o?h(m):e.next(m)},()=>{g=!0},void 0,()=>{if(g)try{for(c--;l.length&&c<n;){let m=l.shift();s?Kr(e,s,()=>p(m)):p(m)}f()}catch(m){e.error(m)}}))};return i.subscribe(li(e,h,()=>{u=!0,f()})),()=>{a?.()}}function vg(i,e,t=1/0){return Ft(e)?vg((n,r)=>rr((o,s)=>e(n,o,r,s))(Ei(i(n,r))),t):(typeof e=="number"&&(t=e),ai((n,r)=>gI(n,r,i,t)))}function iS(...i){let e=QD(i),{args:t,keys:n}=pI(i),r=new En(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let d=0;d<s;d++){let u=!1;Ei(t[d]).subscribe(li(o,f=>{u||(u=!0,c--),a[d]=f},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?mI(n,a):a),o.complete())}))}});return e?r.pipe(hI(e)):r}function rS(i,e){return ai((t,n)=>{let r=0;t.subscribe(li(n,o=>i.call(e,o,r++)&&n.next(o)))})}function fc(i){return ai((e,t)=>{let n=null,r=!1,o;n=e.subscribe(li(t,void 0,void 0,s=>{o=Ei(i(s,fc(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function oS(i,e){return Ft(e)?vg(i,e,1):vg(i,1)}function vh(i){return ai((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function sS(i,e){return ai((t,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();t.subscribe(li(n,l=>{r?.unsubscribe();let c=0,d=o++;Ei(i(l,d)).subscribe(r=li(n,u=>n.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function aS(i,e,t){let n=Ft(i)||e||t?{next:i,error:e,complete:t}:i;return n?ai((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(li(o,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),o.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},l=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,l),o.error(l)},()=>{var l,c;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):ig}var lS;function bg(){return lS}function as(i){let e=lS;return lS=i,e}var vI=Symbol("NotFound");function Zd(i){return i===vI||i?.name==="\u0275NotFound"}function bI(i){let e=lt(null);try{return i()}finally{lt(e)}}var Eg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Ke=class extends Error{code;constructor(e,t){super(Ks(e,t)),this.code=e}};function a5(i){return`NG0${Math.abs(i)}`}function Ks(i,e){return`${a5(i)}${e?": "+e:""}`}var Jr=globalThis;function fn(i){for(let e in i)if(i[e]===fn)return e;throw Error("")}function CI(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function Mg(i){if(typeof i=="string")return i;if(Array.isArray(i))return`[${i.map(Mg).join(", ")}]`;if(i==null)return""+i;let e=i.overriddenName||i.name;if(e)return`${e}`;let t=i.toString();if(t==null)return""+t;let n=t.indexOf(`
|
|
4
4
|
`);return n>=0?t.slice(0,n):t}function Tg(i,e){return i?e?`${i} ${e}`:i:e||""}var l5=fn({__forward_ref__:fn});function zi(i){return i.__forward_ref__=zi,i}function yi(i){return _S(i)?i():i}function _S(i){return typeof i=="function"&&i.hasOwnProperty(l5)&&i.__forward_ref__===zi}function _e(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function cs(i){return{providers:i.providers||[],imports:i.imports||[]}}function Dg(i){return c5(i,Ig)}function c5(i,e){return i.hasOwnProperty(e)&&i[e]||null}function d5(i){let e=i?.[Ig]??null;return e||null}function dS(i){return i&&i.hasOwnProperty(xg)?i[xg]:null}var Ig=fn({\u0275prov:fn}),xg=fn({\u0275inj:fn}),qe=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=_e({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function SS(i){return i&&!!i.\u0275providers}var CS=fn({\u0275cmp:fn}),wS=fn({\u0275dir:fn}),ES=fn({\u0275pipe:fn});var yh=fn({\u0275fac:fn}),vc=fn({__NG_ELEMENT_ID__:fn}),yI=fn({__NG_ENV_ID__:fn});function Zs(i){return TS(i,"@Component"),i[CS]||null}function Pg(i){return TS(i,"@Directive"),i[wS]||null}function MS(i){return TS(i,"@Pipe"),i[ES]||null}function TS(i,e){if(i==null)throw new Ke(-919,!1)}function wh(i){return typeof i=="string"?i:i==null?"":String(i)}var wI=fn({ngErrorCode:fn}),u5=fn({ngErrorMessage:fn}),f5=fn({ngTokenPath:fn});function DS(i,e){return EI("",-200,e)}function Ag(i,e){throw new Ke(-201,!1)}function EI(i,e,t){let n=new Ke(e,i);return n[wI]=e,n[u5]=i,t&&(n[f5]=t),n}function h5(i){return i[wI]}var uS;function MI(){return uS}function Bi(i){let e=uS;return uS=i,e}function IS(i,e,t){let n=Dg(i);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(t&8)return null;if(e!==void 0)return e;Ag(i,"")}var p5={},hc=p5,m5="__NG_DI_FLAG__",fS=class{injector;constructor(e){this.injector=e}retrieve(e,t){let n=pc(t)||0;try{return this.injector.get(e,n&8?null:hc,n)}catch(r){if(Zd(r))return r;throw r}}};function g5(i,e=0){let t=bg();if(t===void 0)throw new Ke(-203,!1);if(t===null)return IS(i,void 0,e);{let n=v5(e),r=t.retrieve(i,n);if(Zd(r)){if(n.optional)return null;throw r}return r}}function Xe(i,e=0){return(MI()||g5)(yi(i),e)}function Q(i,e){return Xe(i,pc(e))}function pc(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function v5(i){return{optional:!!(i&8),host:!!(i&1),self:!!(i&2),skipSelf:!!(i&4)}}function hS(i){let e=[];for(let t=0;t<i.length;t++){let n=yi(i[t]);if(Array.isArray(n)){if(n.length===0)throw new Ke(900,!1);let r,o=0;for(let s=0;s<n.length;s++){let a=n[s],l=b5(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(Xe(r,o))}else e.push(Xe(n))}return e}function b5(i){return i[m5]}function Ga(i,e){let t=i.hasOwnProperty(yh);return t?i[yh]:null}function TI(i,e,t){if(i.length!==e.length)return!1;for(let n=0;n<i.length;n++){let r=i[n],o=e[n];if(t&&(r=t(r),o=t(o)),o!==r)return!1}return!0}function DI(i){return i.flat(Number.POSITIVE_INFINITY)}function Og(i,e){i.forEach(t=>Array.isArray(t)?Og(t,e):e(t))}function PS(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function Eh(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function II(i,e){let t=[];for(let n=0;n<i;n++)t.push(e);return t}function PI(i,e,t,n){let r=i.length;if(r==e)i.push(t,n);else if(r===1)i.push(n,i[0]),i[0]=t;else{for(r--,i.push(i[r-1],i[r]);r>e;){let o=r-2;i[r]=i[o],r--}i[e]=t,i[e+1]=n}}function Rg(i,e,t){let n=Qd(i,e);return n>=0?i[n|1]=t:(n=~n,PI(i,n,e,t)),n}function kg(i,e){let t=Qd(i,e);if(t>=0)return i[t|1]}function Qd(i,e){return y5(i,e,1)}function y5(i,e,t){let n=0,r=i.length>>t;for(;r!==n;){let o=n+(r-n>>1),s=i[o<<t];if(e===s)return o<<t;s>e?r=o:n=o+1}return~(r<<t)}var Wa={},Mi=[],Js=new qe(""),AS=new qe("",-1),OS=new qe(""),xh=class{get(e,t=hc){if(t===hc){let r=EI("",-201);throw r.name="\u0275NotFound",r}return t}};function Qs(i){return{\u0275providers:i}}function AI(i){return Qs([{provide:Js,multi:!0,useValue:i}])}function OI(...i){return{\u0275providers:Fg(!0,i),\u0275fromNgModule:!0}}function Fg(i,...e){let t=[],n=new Set,r,o=s=>{t.push(s)};return Og(e,s=>{let a=s;_g(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&RI(r,o),t}function RI(i,e){for(let t=0;t<i.length;t++){let{ngModule:n,providers:r}=i[t];RS(r,o=>{e(o,n)})}}function _g(i,e,t,n){if(i=yi(i),!i)return!1;let r=null,o=dS(i),s=!o&&Zs(i);if(!o&&!s){let l=i.ngModule;if(o=dS(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=i}let a=n.has(r);if(s){if(a)return!1;if(n.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)_g(c,e,t,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;Og(o.imports,d=>{_g(d,e,t,n)&&(c||=[],c.push(d))}),c!==void 0&&RI(c,e)}if(!a){let c=Ga(r)||(()=>new r);e({provide:r,useFactory:c,deps:Mi},r),e({provide:OS,useValue:r,multi:!0},r),e({provide:Js,useValue:()=>Xe(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=i;RS(l,d=>{e(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function RS(i,e){for(let t of i)SS(t)&&(t=t.\u0275providers),Array.isArray(t)?RS(t,e):e(t)}var x5=fn({provide:String,useValue:fn});function kI(i){return i!==null&&typeof i=="object"&&x5 in i}function _5(i){return!!(i&&i.useExisting)}function S5(i){return!!(i&&i.useFactory)}function mc(i){return typeof i=="function"}function FI(i){return!!i.useClass}var Mh=new qe(""),yg={},xI={},cS;function eu(){return cS===void 0&&(cS=new xh),cS}var Ti=class{},gc=class extends Ti{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,mS(e,s=>this.processProvider(s)),this.records.set(AS,Jd(void 0,this)),r.has("environment")&&this.records.set(Ti,Jd(void 0,this));let o=this.records.get(Mh);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(OS,Mi,{self:!0}))}retrieve(e,t){let n=pc(t)||0;try{return this.get(e,hc,n)}catch(r){if(Zd(r))return r;throw r}}destroy(){bh(this),this._destroyed=!0;let e=lt(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),lt(e)}}onDestroy(e){return bh(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){bh(this);let t=as(this),n=Bi(void 0),r;try{return e()}finally{as(t),Bi(n)}}get(e,t=hc,n){if(bh(this),e.hasOwnProperty(yI))return e[yI](this);let r=pc(n),o,s=as(this),a=Bi(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let d=T5(e)&&Dg(e);d&&this.injectableDefInScope(d)?c=Jd(pS(e),yg):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?eu():this.parent;return t=r&8&&t===hc?null:t,l.get(e,t)}catch(l){let c=h5(l);throw c===-200||c===-201?new Ke(c,null):l}finally{Bi(a),as(s)}}resolveInjectorInitializers(){let e=lt(null),t=as(this),n=Bi(void 0),r;try{let o=this.get(Js,Mi,{self:!0});for(let s of o)s()}finally{as(t),Bi(n),lt(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=yi(e);let t=mc(e)?e:yi(e&&e.provide),n=w5(e);if(!mc(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Jd(void 0,yg,!0),r.factory=()=>hS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t,n){let r=lt(null);try{if(t.value===xI)throw DS("");return t.value===yg&&(t.value=xI,t.value=t.factory(void 0,n)),typeof t.value=="object"&&t.value&&M5(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{lt(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=yi(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function pS(i){let e=Dg(i),t=e!==null?e.factory:Ga(i);if(t!==null)return t;if(i instanceof qe)throw new Ke(-204,!1);if(i instanceof Function)return C5(i);throw new Ke(-204,!1)}function C5(i){if(i.length>0)throw new Ke(-204,!1);let t=d5(i);return t!==null?()=>t.factory(i):()=>new i}function w5(i){if(kI(i))return Jd(void 0,i.useValue);{let e=kS(i);return Jd(e,yg)}}function kS(i,e,t){let n;if(mc(i)){let r=yi(i);return Ga(r)||pS(r)}else if(kI(i))n=()=>yi(i.useValue);else if(S5(i))n=()=>i.useFactory(...hS(i.deps||[]));else if(_5(i))n=(r,o)=>Xe(yi(i.useExisting),o!==void 0&&o&8?8:void 0);else{let r=yi(i&&(i.useClass||i.provide));if(E5(i))n=()=>new r(...hS(i.deps));else return Ga(r)||pS(r)}return n}function bh(i){if(i.destroyed)throw new Ke(-205,!1)}function Jd(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function E5(i){return!!i.deps}function M5(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function T5(i){return typeof i=="function"||typeof i=="object"&&i.ngMetadataName==="InjectionToken"}function mS(i,e){for(let t of i)Array.isArray(t)?mS(t,e):t&&SS(t)?mS(t.\u0275providers,e):e(t)}function tu(i,e){let t;i instanceof gc?(bh(i),t=i):t=new fS(i);let n,r=as(t),o=Bi(void 0);try{return e()}finally{as(r),Bi(o)}}function NI(){return MI()!==void 0||bg()!=null}var Vi=0,tt=1,wt=2,Vn=3,Qr=4,Gi=5,Hi=6,nu=7,kn=8,xr=9,Mo=10,Zt=11,iu=12,FS=13,bc=14,ci=15,$a=16,yc=17,ds=18,ea=19,NS=20,qs=21,Ng=22,Ha=23,_r=24,xc=25,Xa=26,Xt=27,LI=1,To=6,us=7,Th=8,_c=9,Dn=10;function eo(i){return Array.isArray(i)&&typeof i[LI]=="object"}function Sr(i){return Array.isArray(i)&&i[LI]===!0}function LS(i){return(i.flags&4)!==0}function fs(i){return i.componentOffset>-1}function ru(i){return(i.flags&1)===1}function hs(i){return!!i.template}function Sc(i){return(i[wt]&512)!==0}function Ya(i){return(i[wt]&256)===256}var US="svg",UI="math";function Cr(i){for(;Array.isArray(i);)i=i[Vi];return i}function BS(i,e){return Cr(e[i])}function to(i,e){return Cr(e[i.index])}function ou(i,e){return i.data[e]}function Lg(i,e){return i[e]}function zS(i,e,t,n){t>=i.data.length&&(i.data[t]=null,i.blueprint[t]=null),e[t]=n}function no(i,e){let t=e[i];return eo(t)?t:t[Vi]}function Ug(i){return(i[wt]&128)===128}function BI(i){return Sr(i[Vn])}function io(i,e){return e==null?null:i[e]}function VS(i){i[yc]=0}function GS(i){i[wt]&1024||(i[wt]|=1024,Ug(i)&&Cc(i))}function zI(i,e){for(;i>0;)e=e[bc],i--;return e}function Dh(i){return!!(i[wt]&9216||i[_r]?.dirty)}function Bg(i){i[Mo].changeDetectionScheduler?.notify(8),i[wt]&64&&(i[wt]|=1024),Dh(i)&&Cc(i)}function Cc(i){i[Mo].changeDetectionScheduler?.notify(0);let e=ja(i);for(;e!==null&&!(e[wt]&8192||(e[wt]|=8192,!Ug(e)));)e=ja(e)}function HS(i,e){if(Ya(i))throw new Ke(911,!1);i[qs]===null&&(i[qs]=[]),i[qs].push(e)}function VI(i,e){if(i[qs]===null)return;let t=i[qs].indexOf(e);t!==-1&&i[qs].splice(t,1)}function ja(i){let e=i[Vn];return Sr(e)?e[Vn]:e}function jS(i){return i[nu]??=[]}function WS(i){return i.cleanup??=[]}function GI(i,e,t,n){let r=jS(e);r.push(t),i.firstCreatePass&&WS(i).push(n,r.length-1)}var Pt={lFrame:t2(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var gS=!1;function HI(){return Pt.lFrame.elementDepthCount}function jI(){Pt.lFrame.elementDepthCount++}function $S(){Pt.lFrame.elementDepthCount--}function zg(){return Pt.bindingsEnabled}function Vg(){return Pt.skipHydrationRootTNode!==null}function XS(i){return Pt.skipHydrationRootTNode===i}function WI(i){Pt.skipHydrationRootTNode=i}function YS(){Pt.skipHydrationRootTNode=null}function mt(){return Pt.lFrame.lView}function In(){return Pt.lFrame.tView}function Z(i){return Pt.lFrame.contextLView=i,i[kn]}function J(i){return Pt.lFrame.contextLView=null,i}function xi(){let i=qS();for(;i!==null&&i.type===64;)i=i.parent;return i}function qS(){return Pt.lFrame.currentTNode}function $I(){let i=Pt.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function su(i,e){let t=Pt.lFrame;t.currentTNode=i,t.isParent=e}function KS(){return Pt.lFrame.isParent}function ZS(){Pt.lFrame.isParent=!1}function XI(){return Pt.lFrame.contextLView}function JS(){return gS}function _h(i){let e=gS;return gS=i,e}function au(){let i=Pt.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function YI(i){return Pt.lFrame.bindingIndex=i}function qa(){return Pt.lFrame.bindingIndex++}function QS(i){let e=Pt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function qI(){return Pt.lFrame.inI18n}function KI(i,e){let t=Pt.lFrame;t.bindingIndex=t.bindingRootIndex=i,Gg(e)}function ZI(){return Pt.lFrame.currentDirectiveIndex}function Gg(i){Pt.lFrame.currentDirectiveIndex=i}function JI(i){let e=Pt.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function QI(){return Pt.lFrame.currentQueryIndex}function Hg(i){Pt.lFrame.currentQueryIndex=i}function D5(i){let e=i[tt];return e.type===2?e.declTNode:e.type===1?i[Gi]:null}function e1(i,e,t){if(t&4){let r=e,o=i;for(;r=r.parent,r===null&&!(t&1);)if(r=D5(o),r===null||(o=o[bc],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=Pt.lFrame=e2();return n.currentTNode=e,n.lView=i,!0}function jg(i){let e=e2(),t=i[tt];Pt.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function e2(){let i=Pt.lFrame,e=i===null?null:i.child;return e===null?t2(i):e}function t2(i){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:i,child:null,inI18n:!1};return i!==null&&(i.child=e),e}function n2(){let i=Pt.lFrame;return Pt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var t1=n2;function Wg(){let i=n2();i.isParent=!0,i.tView=null,i.selectedIndex=-1,i.contextLView=null,i.elementDepthCount=0,i.currentDirectiveIndex=-1,i.currentNamespace=null,i.bindingRootIndex=-1,i.bindingIndex=-1,i.currentQueryIndex=0}function i2(i){return(Pt.lFrame.contextLView=zI(i,Pt.lFrame.contextLView))[kn]}function ta(){return Pt.lFrame.selectedIndex}function Ka(i){Pt.lFrame.selectedIndex=i}function Ih(){let i=Pt.lFrame;return ou(i.tView,i.selectedIndex)}function Za(){Pt.lFrame.currentNamespace=US}function lu(){I5()}function I5(){Pt.lFrame.currentNamespace=null}function n1(){return Pt.lFrame.currentNamespace}var r2=!0;function $g(){return r2}function na(i){r2=i}function vS(i,e=null,t=null,n){let r=o2(i,e,t,n);return r.resolveInjectorInitializers(),r}function o2(i,e=null,t=null,n,r=new Set){let o=[t||Mi,OI(i)],s;return new gc(o,e||eu(),s||null,r)}var Di=class i{static THROW_IF_NOT_FOUND=hc;static NULL=new xh;static create(e,t){if(Array.isArray(e))return vS({name:""},t,e,"");{let n=e.name??"";return vS({name:n},e.parent,e.providers,n)}}static \u0275prov=_e({token:i,providedIn:"any",factory:()=>Xe(AS)});static __NG_ELEMENT_ID__=-1},wn=new qe(""),sr=(()=>{class i{static __NG_ELEMENT_ID__=P5;static __NG_ENV_ID__=t=>t}return i})(),Sg=class extends sr{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Ya(this._lView)}onDestroy(e){let t=this._lView;return HS(t,e),()=>VI(t,e)}};function P5(){return new Sg(mt())}var s2=!1,a2=new qe(""),Ja=(()=>{class i{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new mh(!1);debugTaskTracker=Q(a2,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new En(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),this.debugTaskTracker?.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),this.debugTaskTracker?.remove(t),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),bS=class extends Eo{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,NI()&&(this.destroyRef=Q(sr,{optional:!0})??void 0,this.pendingTasks=Q(Ja,{optional:!0})??void 0)}emit(e){let t=lt(null);try{super.next(e)}finally{lt(t)}}subscribe(e,t,n){let r=e,o=t||(()=>null),s=n;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return e instanceof Ui&&e.add(a),a}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{n!==void 0&&this.pendingTasks?.remove(n)}})}}},yr=bS;function Cg(...i){}function i1(i){let e,t;function n(){i=Cg;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{i(),n()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{i(),n()})),()=>n()}function l2(i){return queueMicrotask(()=>i()),()=>{i=Cg}}var r1="isAngularZone",Sh=r1+"_ID",A5=0,or=class i{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yr(!1);onMicrotaskEmpty=new yr(!1);onStable=new yr(!1);onError=new yr(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=s2}=e;if(typeof Zone>"u")throw new Ke(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&n,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,k5(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(r1)===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new Ke(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new Ke(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,O5,Cg,Cg);try{return o.runTask(s,t,n)}finally{o.cancelTask(s)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},O5={};function o1(i){if(i._nesting==0&&!i.hasPendingMicrotasks&&!i.isStable)try{i._nesting++,i.onMicrotaskEmpty.emit(null)}finally{if(i._nesting--,!i.hasPendingMicrotasks)try{i.runOutsideAngular(()=>i.onStable.emit(null))}finally{i.isStable=!0}}}function R5(i){if(i.isCheckStableRunning||i.callbackScheduled)return;i.callbackScheduled=!0;function e(){i1(()=>{i.callbackScheduled=!1,yS(i),i.isCheckStableRunning=!0,o1(i),i.isCheckStableRunning=!1})}i.scheduleInRootZone?Zone.root.run(()=>{e()}):i._outer.run(()=>{e()}),yS(i)}function k5(i){let e=()=>{R5(i)},t=A5++;i._inner=i._inner.fork({name:"angular",properties:{[r1]:!0,[Sh]:t,[Sh+t]:!0},onInvokeTask:(n,r,o,s,a,l)=>{if(F5(l))return n.invokeTask(o,s,a,l);try{return _I(i),n.invokeTask(o,s,a,l)}finally{(i.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),SI(i)}},onInvoke:(n,r,o,s,a,l,c)=>{try{return _I(i),n.invoke(o,s,a,l,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!N5(l)&&e(),SI(i)}},onHasTask:(n,r,o,s)=>{n.hasTask(o,s),r===o&&(s.change=="microTask"?(i._hasPendingMicrotasks=s.microTask,yS(i),o1(i)):s.change=="macroTask"&&(i.hasPendingMacrotasks=s.macroTask))},onHandleError:(n,r,o,s)=>(n.handleError(o,s),i.runOutsideAngular(()=>i.onError.emit(s)),!1)})}function yS(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function _I(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function SI(i){i._nesting--,o1(i)}var Ch=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yr;onMicrotaskEmpty=new yr;onStable=new yr;onError=new yr;run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function F5(i){return c2(i,"__ignore_ng_zone__")}function N5(i){return c2(i,"__scheduler_tick__")}function c2(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var Zr=class{_console=console;handleError(e){this._console.error("ERROR",e)}},ia=new qe("",{factory:()=>{let i=Q(or),e=Q(Ti),t;return n=>{i.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw n}):(t??=e.get(Zr),t.handleError(n))})}}}),d2={provide:Js,useValue:()=>{let i=Q(Zr,{optional:!0})},multi:!0},L5=new qe("",{factory:()=>{let i=Q(wn).defaultView;if(!i)return;let e=Q(ia),t=o=>{e(o.reason),o.preventDefault()},n=o=>{o.error?e(o.error):e(new Error(o.message,{cause:o})),o.preventDefault()},r=()=>{i.addEventListener("unhandledrejection",t),i.addEventListener("error",n)};typeof Zone<"u"?Zone.root.run(r):r(),Q(sr).onDestroy(()=>{i.removeEventListener("error",n),i.removeEventListener("unhandledrejection",t)})}});function s1(){return Qs([AI(()=>{Q(L5)})])}function N(i,e){let[t,n,r]=$_(i,e?.equal),o=t,s=o[Qn];return o.set=n,o.update=r,o.asReadonly=Xg.bind(o),o}function Xg(){let i=this[Qn];if(i.readonlyFn===void 0){let e=()=>this();e[Qn]=i,i.readonlyFn=e}return i.readonlyFn}var Ph=(()=>{class i{view;node;constructor(t,n){this.view=t,this.node=n}static __NG_ELEMENT_ID__=U5}return i})();function U5(){return new Ph(mt(),xi())}var ls=class{},Ah=new qe("",{factory:()=>!0});var a1=new qe(""),cu=(()=>{class i{internalPendingTasks=Q(Ja);scheduler=Q(ls);errorHandler=Q(ia);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let n=this.add();t().catch(this.errorHandler).finally(n)}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),Yg=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new xS})}return i})(),xS=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,n=this.queues.get(t);n.has(e)&&(n.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||n.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,n]of this.queues)t===null?e||=this.flushQueue(n):e||=t.run(()=>this.flushQueue(n));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let n of e)n.dirty&&(this.dirtyEffectCount--,t=!0,n.run());return t}},wg=class{[Qn];constructor(e){this[Qn]=e}destroy(){this[Qn].destroy()}};function Yt(i,e){let t=e?.injector??Q(Di),n=e?.manualCleanup!==!0?t.get(sr):null,r,o=t.get(Ph,null,{optional:!0}),s=t.get(ls);return o!==null?(r=V5(o.view,s,i),n instanceof Sg&&n._lView===o.view&&(n=null)):r=G5(i,t.get(Yg),s),r.injector=t,n!==null&&(r.onDestroyFns=[n.onDestroy(()=>r.destroy())]),new wg(r)}var u2=ue(R({},Y_),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let i=_h(!1);try{q_(this)}finally{_h(i)}},cleanup(){if(!this.cleanupFns?.length)return;let i=lt(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],lt(i)}}}),B5=ue(R({},u2),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(sc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.scheduler.remove(this)}}),z5=ue(R({},u2),{consumerMarkedDirty(){this.view[wt]|=8192,Cc(this.view),this.notifier.notify(13)},destroy(){if(sc(this),this.onDestroyFns!==null)for(let i of this.onDestroyFns)i();this.cleanup(),this.view[Ha]?.delete(this)}});function V5(i,e,t){let n=Object.create(z5);return n.view=i,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=e,n.fn=f2(n,t),i[Ha]??=new Set,i[Ha].add(n),n.consumerMarkedDirty(n),n}function G5(i,e,t){let n=Object.create(B5);return n.fn=f2(n,i),n.scheduler=e,n.notifier=t,n.zone=typeof Zone<"u"?Zone.current:null,n.scheduler.add(n),n.notifier.notify(12),n}function f2(i,e){return()=>{e(t=>(i.cleanupFns??=[]).push(t))}}var qg={JSACTION:"jsaction"};function jh(i){return{toString:i}.toString()}function K5(i){return typeof i=="function"}function tP(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}var a0=class{previousValue;currentValue;firstChange;constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}},yu=(()=>{let i=()=>nP;return i.ngInherit=!0,i})();function nP(i){return i.type.prototype.ngOnChanges&&(i.setInput=J5),Z5}function Z5(){let i=rP(this),e=i?.current;if(e){let t=i.previous;if(t===Wa)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function J5(i,e,t,n,r){let o=this.declaredInputs[n],s=rP(i)||Q5(i,{previous:Wa,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new a0(c&&c.currentValue,t,l===Wa),tP(i,e,r,t)}var iP="__ngSimpleChanges__";function rP(i){return i[iP]||null}function Q5(i,e){return i[iP]=e}var h2=[];var tn=function(i,e=null,t){for(let n=0;n<h2.length;n++){let r=h2[n];r(i,e,t)}},Wt=(function(i){return i[i.TemplateCreateStart=0]="TemplateCreateStart",i[i.TemplateCreateEnd=1]="TemplateCreateEnd",i[i.TemplateUpdateStart=2]="TemplateUpdateStart",i[i.TemplateUpdateEnd=3]="TemplateUpdateEnd",i[i.LifecycleHookStart=4]="LifecycleHookStart",i[i.LifecycleHookEnd=5]="LifecycleHookEnd",i[i.OutputStart=6]="OutputStart",i[i.OutputEnd=7]="OutputEnd",i[i.BootstrapApplicationStart=8]="BootstrapApplicationStart",i[i.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",i[i.BootstrapComponentStart=10]="BootstrapComponentStart",i[i.BootstrapComponentEnd=11]="BootstrapComponentEnd",i[i.ChangeDetectionStart=12]="ChangeDetectionStart",i[i.ChangeDetectionEnd=13]="ChangeDetectionEnd",i[i.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",i[i.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",i[i.AfterRenderHooksStart=16]="AfterRenderHooksStart",i[i.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",i[i.ComponentStart=18]="ComponentStart",i[i.ComponentEnd=19]="ComponentEnd",i[i.DeferBlockStateStart=20]="DeferBlockStateStart",i[i.DeferBlockStateEnd=21]="DeferBlockStateEnd",i[i.DynamicComponentStart=22]="DynamicComponentStart",i[i.DynamicComponentEnd=23]="DynamicComponentEnd",i[i.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",i[i.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",i})(Wt||{});function ez(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let s=nP(e);(t.preOrderHooks??=[]).push(i,s),(t.preOrderCheckHooks??=[]).push(i,s)}r&&(t.preOrderHooks??=[]).push(0-i,r),o&&((t.preOrderHooks??=[]).push(i,o),(t.preOrderCheckHooks??=[]).push(i,o))}function oP(i,e){for(let t=e.directiveStart,n=e.directiveEnd;t<n;t++){let o=i.data[t].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:d}=o;s&&(i.contentHooks??=[]).push(-t,s),a&&((i.contentHooks??=[]).push(t,a),(i.contentCheckHooks??=[]).push(t,a)),l&&(i.viewHooks??=[]).push(-t,l),c&&((i.viewHooks??=[]).push(t,c),(i.viewCheckHooks??=[]).push(t,c)),d!=null&&(i.destroyHooks??=[]).push(t,d)}}function e0(i,e,t){sP(i,e,3,t)}function t0(i,e,t,n){(i[wt]&3)===t&&sP(i,e,t,n)}function l1(i,e){let t=i[wt];(t&3)===e&&(t&=16383,t+=1,i[wt]=t)}function sP(i,e,t,n){let r=n!==void 0?i[yc]&65535:0,o=n??-1,s=e.length-1,a=0;for(let l=r;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],n!=null&&a>=n)break}else e[l]<0&&(i[yc]+=65536),(a<o||o==-1)&&(tz(i,t,e,l),i[yc]=(i[yc]&4294901760)+l+2),l++}function p2(i,e){tn(Wt.LifecycleHookStart,i,e);let t=lt(null);try{e.call(i)}finally{lt(t),tn(Wt.LifecycleHookEnd,i,e)}}function tz(i,e,t,n){let r=t[n]<0,o=t[n+1],s=r?-t[n]:t[n],a=i[s];r?i[wt]>>14<i[yc]>>16&&(i[wt]&3)===e&&(i[wt]+=16384,p2(a,o)):p2(a,o)}var uu=-1,Mc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,n,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=n}};function nz(i){return(i.flags&8)!==0}function iz(i){return(i.flags&16)!==0}function rz(i,e,t){let n=0;for(;n<t.length;){let r=t[n];if(typeof r=="number"){if(r!==0)break;n++;let o=t[n++],s=t[n++],a=t[n++];i.setAttribute(e,s,a,o)}else{let o=r,s=t[++n];sz(o)?i.setProperty(e,o,s):i.setAttribute(e,o,s),n++}}return n}function oz(i){return i===3||i===4||i===6}function sz(i){return i.charCodeAt(0)===64}function pu(i,e){if(!(e===null||e.length===0))if(i===null||i.length===0)i=e.slice();else{let t=-1;for(let n=0;n<e.length;n++){let r=e[n];typeof r=="number"?t=r:t===0||(t===-1||t===2?m2(i,t,r,null,e[++n]):m2(i,t,r,null,null))}}return i}function m2(i,e,t,n,r){let o=0,s=i.length;if(e===-1)s=-1;else for(;o<i.length;){let a=i[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<i.length;){let a=i[o];if(typeof a=="number")break;if(a===t){r!==null&&(i[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(i.splice(s,0,e),o=s+1),i.splice(o++,0,t),r!==null&&i.splice(o++,0,r)}function aP(i){return i!==uu}function l0(i){return i&32767}function az(i){return i>>16}function c0(i,e){let t=az(i),n=e;for(;t>0;)n=n[bc],t--;return n}var S1=!0;function d0(i){let e=S1;return S1=i,e}var lz=256,lP=lz-1,cP=5,cz=0,ps={};function dz(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(vc)&&(n=t[vc]),n==null&&(n=t[vc]=cz++);let r=n&lP,o=1<<r;e.data[i+(r>>cP)]|=o}function u0(i,e){let t=dP(i,e);if(t!==-1)return t;let n=e[tt];n.firstCreatePass&&(i.injectorIndex=e.length,c1(n.data,i),c1(e,null),c1(n.blueprint,null));let r=cC(i,e),o=i.injectorIndex;if(aP(r)){let s=l0(r),a=c0(r,e),l=a[tt].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function c1(i,e){i.push(0,0,0,0,0,0,0,0,e)}function dP(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function cC(i,e){if(i.parent&&i.parent.injectorIndex!==-1)return i.parent.injectorIndex;let t=0,n=null,r=e;for(;r!==null;){if(n=mP(r),n===null)return uu;if(t++,r=r[bc],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return uu}function C1(i,e,t){dz(i,e,t)}function uP(i,e,t){if(t&8||i!==void 0)return i;Ag(e,"NodeInjector")}function fP(i,e,t,n){if(t&8&&n===void 0&&(n=null),(t&3)===0){let r=i[xr],o=Bi(void 0);try{return r?r.get(e,n,t&8):IS(e,n,t&8)}finally{Bi(o)}}return uP(n,e,t)}function hP(i,e,t,n=0,r){if(i!==null){if(e[wt]&2048&&!(n&2)){let s=pz(i,e,t,n,ps);if(s!==ps)return s}let o=pP(i,e,t,n,ps);if(o!==ps)return o}return fP(e,t,n,r)}function pP(i,e,t,n,r){let o=fz(t);if(typeof o=="function"){if(!e1(e,i,n))return n&1?uP(r,t,n):fP(e,t,n,r);try{let s;if(s=o(n),s==null&&!(n&8))Ag(t);else return s}finally{t1()}}else if(typeof o=="number"){let s=null,a=dP(i,e),l=uu,c=n&1?e[ci][Gi]:null;for((a===-1||n&4)&&(l=a===-1?cC(i,e):e[a+8],l===uu||!v2(n,!1)?a=-1:(s=e[tt],a=l0(l),e=c0(l,e)));a!==-1;){let d=e[tt];if(g2(o,a,d.data)){let u=uz(a,e,t,s,n,c);if(u!==ps)return u}l=e[a+8],l!==uu&&v2(n,e[tt].data[a+8]===c)&&g2(o,a,e)?(s=d,a=l0(l),e=c0(l,e)):a=-1}}return r}function uz(i,e,t,n,r,o){let s=e[tt],a=s.data[i+8],l=n==null?fs(a)&&S1:n!=s&&(a.type&3)!==0,c=r&1&&o===a,d=n0(a,s,t,l,c);return d!==null?Fh(e,s,d,a,r):ps}function n0(i,e,t,n,r){let o=i.providerIndexes,s=e.data,a=o&1048575,l=i.directiveStart,c=i.directiveEnd,d=o>>20,u=n?a:a+d,f=r?a+d:c;for(let h=u;h<f;h++){let p=s[h];if(h<l&&t===p||h>=l&&p.type===t)return h}if(r){let h=s[l];if(h&&hs(h)&&h.type===t)return l}return null}function Fh(i,e,t,n,r){let o=i[t],s=e.data;if(o instanceof Mc){let a=o;if(a.resolving)throw DS("");let l=d0(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],d,u=a.injectImpl?Bi(a.injectImpl):null,f=e1(i,n,0);try{o=i[t]=a.factory(void 0,r,s,i,n),e.firstCreatePass&&t>=n.directiveStart&&ez(t,s[t],e)}finally{u!==null&&Bi(u),d0(l),a.resolving=!1,t1()}}return o}function fz(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(vc)?i[vc]:void 0;return typeof e=="number"?e>=0?e&lP:hz:e}function g2(i,e,t){let n=1<<i;return!!(t[e+(i>>cP)]&n)}function v2(i,e){return!(i&2)&&!(i&1&&e)}var Ec=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return hP(this._tNode,this._lView,e,pc(n),t)}};function hz(){return new Ec(xi(),mt())}function oa(i){return jh(()=>{let e=i.prototype.constructor,t=e[yh]||w1(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[yh]||w1(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function w1(i){return _S(i)?()=>{let e=w1(yi(i));return e&&e()}:Ga(i)}function pz(i,e,t,n,r){let o=i,s=e;for(;o!==null&&s!==null&&s[wt]&2048&&!Sc(s);){let a=pP(o,s,t,n|2,ps);if(a!==ps)return a;let l=o.parent;if(!l){let c=s[NS];if(c){let d=c.get(t,ps,n&-5);if(d!==ps)return d}l=mP(s),s=s[bc]}o=l}return r}function mP(i){let e=i[tt],t=e.type;return t===2?e.declTNode:t===1?i[Gi]:null}function mz(){return xu(xi(),mt())}function xu(i,e){return new Mr(to(i,e))}var Mr=(()=>{class i{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=mz}return i})();function gz(i){return i instanceof Mr?i.nativeElement:i}function vz(){return this._results[Symbol.iterator]()}var f0=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Eo}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let n=DI(e);(this._changesDetected=!TI(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=vz},gP="ngSkipHydration",bz="ngskiphydration";function vP(i){let e=i.mergedAttrs;if(e===null)return!1;for(let t=0;t<e.length;t+=2){let n=e[t];if(typeof n=="number")return!1;if(typeof n=="string"&&n.toLowerCase()===bz)return!0}return!1}function bP(i){return i.hasAttribute(gP)}function h0(i){return(i.flags&128)===128}function yP(i){if(h0(i))return!0;let e=i.parent;for(;e;){if(h0(i)||vP(e))return!0;e=e.parent}return!1}var dC=(function(i){return i[i.OnPush=0]="OnPush",i[i.Eager=1]="Eager",i[i.Default=1]="Default",i})(dC||{}),xP=new Map,yz=0;function xz(){return yz++}function _z(i){xP.set(i[ea],i)}function E1(i){xP.delete(i[ea])}var b2="__ngContext__";function mu(i,e){eo(e)?(i[b2]=e[ea],_z(e)):i[b2]=e}function _P(i){return CP(i[iu])}function SP(i){return CP(i[Qr])}function CP(i){for(;i!==null&&!Sr(i);)i=i[Qr];return i}var M1;function uC(i){M1=i}function fC(){if(M1!==void 0)return M1;if(typeof document<"u")return document;throw new Ke(210,!1)}var gs=new qe("",{factory:()=>Sz}),Sz="ng";var S0=new qe(""),Wh=new qe("",{providedIn:"platform",factory:()=>"unknown"});var C0=new qe("",{factory:()=>Q(wn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var _u=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>{let t=new i;return t.store=Cz(Q(wn),Q(gs)),t}});store={};onSerializeCallbacks={};get(t,n){return this.store[t]!==void 0?this.store[t]:n}set(t,n){this.store[t]=n}remove(t){delete this.store[t]}hasKey(t){return this.store.hasOwnProperty(t)}get isEmpty(){return Object.keys(this.store).length===0}onSerialize(t,n){this.onSerializeCallbacks[t]=n}toJson(){for(let t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(n){console.warn("Exception in onSerialize callback: ",n)}return JSON.stringify(this.store).replace(/</g,"\\u003C")}}return i})();function Cz(i,e){let t=i.getElementById(e+"-state");if(t?.textContent)try{return JSON.parse(t.textContent)}catch(n){console.warn("Exception while restoring TransferState for app "+e,n)}return{}}var wP="h",EP="b",wz="f",Ez="n",MP="e",TP="t",w0="c",hC="x",Nh="r",DP="i",IP="n",pC="d";var PP="di",AP="s",OP="p";var $h=new qe(""),RP=!1,mC=new qe("",{factory:()=>RP});var gC=new qe(""),kP=!1,FP=new qe("",{factory:()=>[]}),NP=new qe(""),vC=new qe("",{factory:()=>new Map});var Xh="ngb";var LP=(i,e,t)=>{let n=i,r=n.__jsaction_fns??new Map,o=r.get(e)??[];o.push(t),r.set(e,o),n.__jsaction_fns=r},UP=(i,e)=>{let t=i,n=t.getAttribute(Xh)??"",r=e.get(n)??new Set;r.has(t)||r.add(t),e.set(n,r)};var BP=i=>{i.removeAttribute(qg.JSACTION),i.removeAttribute(Xh),i.__jsaction_fns=void 0},zP=new qe("",{factory:()=>({})});function bC(i,e){let t=e?.__jsaction_fns?.get(i.type);if(!(!t||!e?.isConnected))for(let n of t)n(i)}var T1=new Map;function VP(i,e){return T1.set(i,e),()=>T1.delete(i)}var y2=!1,GP=(i,e,t,n)=>{};function Mz(i,e,t,n){GP(i,e,t,n)}function HP(){y2||(GP=(i,e,t,n)=>{let r=i[xr].get(gs);T1.get(r)?.(e,t,n)},y2=!0)}var E0=new qe("");function Yh(i){return(i.flags&32)===32}var Tz="__nghData__",yC=Tz,Dz="__nghDeferData__",jP=Dz;var i0="ngh",WP="nghm",$P=()=>null;function Iz(i,e,t=!1){let n=i.getAttribute(i0);if(n==null)return null;let[r,o]=n.split("|");if(n=t?o:r,!n)return null;let s=o?`|${o}`:"",a=t?r:s,l={};if(n!==""){let d=e.get(_u,null,{optional:!0});d!==null&&(l=d.get(yC,[])[Number(n)])}let c={data:l,firstChild:i.firstChild??null};return t&&(c.firstChild=i,M0(c,0,i.nextSibling)),a?i.setAttribute(i0,a):i.removeAttribute(i0),c}function XP(){$P=Iz}function YP(i,e,t=!1){return $P(i,e,t)}function qP(i){let e=i._lView;return e[tt].type===2?null:(Sc(e)&&(e=e[Xt]),e)}function Pz(i){return i.textContent?.replace(/\s/gm,"")}function Az(i){let e=fC(),t=e.createNodeIterator(i,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=Pz(o);return s==="ngetn"||s==="ngtns"?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),n,r=[];for(;n=t.nextNode();)r.push(n);for(let o of r)o.textContent==="ngetn"?o.replaceWith(e.createTextNode("")):o.remove()}function M0(i,e,t){i.segmentHeads??={},i.segmentHeads[e]=t}function D1(i,e){return i.segmentHeads?.[e]??null}function KP(i){return i.get(NP,!1,{optional:!0})}function Oz(i,e){let t=i.data,n=t[MP]?.[e]??null;return n===null&&t[w0]?.[e]&&(n=xC(i,e)),n}function ZP(i,e){return i.data[w0]?.[e]??null}function xC(i,e){let t=ZP(i,e)??[],n=0;for(let r of t)n+=r[Nh]*(r[hC]??1);return n}function Rz(i){if(typeof i.disconnectedNodes>"u"){let e=i.data[pC];i.disconnectedNodes=e?new Set(e):null}return i.disconnectedNodes}function JP(i,e){if(typeof i.disconnectedNodes>"u"){let t=i.data[pC];i.disconnectedNodes=t?new Set(t):null}return!!Rz(i)?.has(e)}function T0(i,e){let t=i[Hi];return t!==null&&!Vg()&&!Yh(e)&&!JP(t,e.index-Xt)}function kz(i,e){let t=e.get(E0),r=e.get(_u).get(jP,{}),o=!1,s=i,a=null,l=[];for(;!o&&s;){o=t.has(s);let c=t.hydrating.get(s);if(a===null&&c!=null){a=c.promise;break}l.unshift(s),s=r[s][OP]}return{parentBlockPromise:a,hydrationQueue:l}}function d1(i){return!!i&&i.nodeType===Node.COMMENT_NODE&&i.textContent?.trim()===WP}function x2(i){for(;i&&i.nodeType===Node.TEXT_NODE;)i=i.previousSibling;return i}function QP(i){for(let n of i.body.childNodes)if(d1(n))return;let e=x2(i.body.previousSibling);if(d1(e))return;let t=x2(i.head.lastChild);if(!d1(t))throw new Ke(-507,!1)}function eA(i,e){let t=i.contentQueries;if(t!==null){let n=lt(null);try{for(let r=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s!==-1){let a=i.data[s];Hg(o),a.contentQueries(2,e[s],s)}}}finally{lt(n)}}}function I1(i,e,t){Hg(0);let n=lt(null);try{e(i,t)}finally{lt(n)}}function _C(i,e,t){if(LS(e)){let n=lt(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;s<o;s++){let a=i.data[s];if(a.contentQueries){let l=t[s];a.contentQueries(1,l,s)}}}finally{lt(n)}}}var Po=(function(i){return i[i.Emulated=0]="Emulated",i[i.None=2]="None",i[i.ShadowDom=3]="ShadowDom",i[i.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",i})(Po||{});var Kg;function Fz(){if(Kg===void 0&&(Kg=null,Jr.trustedTypes))try{Kg=Jr.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Kg}function D0(i){return Fz()?.createHTML(i)||i}var Zg;function Nz(){if(Zg===void 0&&(Zg=null,Jr.trustedTypes))try{Zg=Jr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Zg}function _2(i){return Nz()?.createHTML(i)||i}var ra=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Eg})`}},P1=class extends ra{getTypeName(){return"HTML"}},A1=class extends ra{getTypeName(){return"Style"}},O1=class extends ra{getTypeName(){return"Script"}},R1=class extends ra{getTypeName(){return"URL"}},k1=class extends ra{getTypeName(){return"ResourceURL"}};function Ao(i){return i instanceof ra?i.changingThisBreaksApplicationSecurity:i}function sa(i,e){let t=tA(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Eg})`)}return t===e}function tA(i){return i instanceof ra&&i.getTypeName()||null}function SC(i){return new P1(i)}function CC(i){return new A1(i)}function wC(i){return new O1(i)}function EC(i){return new R1(i)}function MC(i){return new k1(i)}function Lz(i){let e=new N1(i);return Uz()?new F1(e):e}var F1=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(D0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},N1=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=D0(e),t}};function Uz(){try{return!!new window.DOMParser().parseFromString(D0(""),"text/html")}catch{return!1}}var Bz=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function qh(i){return i=String(i),i.match(Bz)?i:"unsafe:"+i}function aa(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function Kh(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var nA=aa("area,br,col,hr,img,wbr"),iA=aa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),rA=aa("rp,rt"),zz=Kh(rA,iA),Vz=Kh(iA,aa("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Gz=Kh(rA,aa("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),S2=Kh(nA,Vz,Gz,zz),oA=aa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Hz=aa("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),jz=aa("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),Wz=Kh(oA,Hz,jz),$z=aa("script,style,template");var L1=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=qz(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=Yz(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=C2(e).toLowerCase();if(!S2.hasOwnProperty(t))return this.sanitizedSomething=!0,!$z.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r<n.length;r++){let o=n.item(r),s=o.name,a=s.toLowerCase();if(!Wz.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;oA[a]&&(l=qh(l)),this.buf.push(" ",s,'="',w2(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=C2(e).toLowerCase();S2.hasOwnProperty(t)&&!nA.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(w2(e))}};function Xz(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function Yz(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw sA(e);return e}function qz(i){let e=i.firstChild;if(e&&Xz(i,e))throw sA(e);return e}function C2(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function sA(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var Kz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Zz=/([^\#-~ |!])/g;function w2(i){return i.replace(/&/g,"&").replace(Kz,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(Zz,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var Jg;function I0(i,e){let t=null;try{Jg=Jg||Lz(i);let n=e?String(e):"";t=Jg.getInertBodyElement(n);let r=5,o=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=o,o=t.innerHTML,t=Jg.getInertBodyElement(n)}while(n!==o);let a=new L1().sanitizeChildren(E2(t)||t);return D0(a)}finally{if(t){let n=E2(t)||t;for(;n.firstChild;)n.firstChild.remove()}}}function E2(i){return"content"in i&&Jz(i)?i.content:null}function Jz(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var Qz=/^>|^->|<!--|-->|--!>|<!-$/g,eV=/(<|>)/g,tV="\u200B$1\u200B";function nV(i){return i.replace(Qz,e=>e.replace(eV,tV))}function aA(i,e){return i.createText(e)}function iV(i,e,t){i.setValue(e,t)}function lA(i,e){return i.createComment(nV(e))}function TC(i,e,t){return i.createElement(e,t)}function p0(i,e,t,n,r){i.insertBefore(e,t,n,r)}function cA(i,e,t){i.appendChild(e,t)}function M2(i,e,t,n,r){n!==null?p0(i,e,t,n,r):cA(i,e,t)}function DC(i,e,t,n){i.removeChild(null,e,t,n)}function dA(i){i.textContent=""}function rV(i,e,t){i.setAttribute(e,"style",t)}function oV(i,e,t){t===""?i.removeAttribute(e,"class"):i.setAttribute(e,"class",t)}function uA(i,e,t){let{mergedAttrs:n,classes:r,styles:o}=t;n!==null&&rz(i,e,n),r!==null&&oV(i,e,r),o!==null&&rV(i,e,o)}var Oo=(function(i){return i[i.NONE=0]="NONE",i[i.HTML=1]="HTML",i[i.STYLE=2]="STYLE",i[i.SCRIPT=3]="SCRIPT",i[i.URL=4]="URL",i[i.RESOURCE_URL=5]="RESOURCE_URL",i})(Oo||{});function P0(i){let e=fA();return e?_2(e.sanitize(Oo.HTML,i)||""):sa(i,"HTML")?_2(Ao(i)):I0(fC(),wh(i))}function ji(i){let e=fA();return e?e.sanitize(Oo.URL,i)||"":sa(i,"URL")?Ao(i):qh(wh(i))}function fA(){let i=mt();return i&&i[Mo].sanitizer}function IC(i){return i.ownerDocument.defaultView}function PC(i){return i.ownerDocument}function hA(i){return i.ownerDocument.body}function sV(i,e,t){let n=i.length;for(;;){let r=i.indexOf(e,t);if(r===-1)return r;if(r===0||i.charCodeAt(r-1)<=32){let o=e.length;if(r+o===n||i.charCodeAt(r+o)<=32)return r}t=r+1}}var pA="ng-template";function aV(i,e,t,n){let r=0;if(n){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&sV(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(AC(i))return!1;if(r=e.indexOf(1,r),r>-1){let o;for(;++r<e.length&&typeof(o=e[r])=="string";)if(o.toLowerCase()===t)return!0}return!1}function AC(i){return i.type===4&&i.value!==pA}function lV(i,e,t){let n=i.type===4&&!t?pA:i.value;return e===n}function cV(i,e,t){let n=4,r=i.attrs,o=r!==null?fV(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!Do(n)&&!Do(l))return!1;if(s&&Do(l))continue;s=!1,n=l|n&1;continue}if(!s)if(n&4){if(n=2|n&1,l!==""&&!lV(i,l,t)||l===""&&e.length===1){if(Do(n))return!1;s=!0}}else if(n&8){if(r===null||!aV(i,r,l,t)){if(Do(n))return!1;s=!0}}else{let c=e[++a],d=dV(l,r,AC(i),t);if(d===-1){if(Do(n))return!1;s=!0;continue}if(c!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(Do(n))return!1;s=!0}}}}return Do(n)||s}function Do(i){return(i&1)===0}function dV(i,e,t,n){if(e===null)return-1;let r=0;if(n||!t){let o=!1;for(;r<e.length;){let s=e[r];if(s===i)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++r];for(;typeof a=="string";)a=e[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return hV(e,i)}function mA(i,e,t=!1){for(let n=0;n<e.length;n++)if(cV(i,e[n],t))return!0;return!1}function uV(i){let e=i.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function fV(i){for(let e=0;e<i.length;e++){let t=i[e];if(oz(t))return e}return i.length}function hV(i,e){let t=i.indexOf(4);if(t>-1)for(t++;t<i.length;){let n=i[t];if(typeof n=="number")return-1;if(n===e)return t;t++}return-1}function pV(i,e){e:for(let t=0;t<e.length;t++){let n=e[t];if(i.length===n.length){for(let r=0;r<i.length;r++)if(i[r]!==n[r])continue e;return!0}}return!1}function T2(i,e){return i?":not("+e.trim()+")":e}function mV(i){let e=i[0],t=1,n=2,r="",o=!1;for(;t<i.length;){let s=i[t];if(typeof s=="string")if(n&2){let a=i[++t];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);else r!==""&&!Do(s)&&(e+=T2(o,r),r=""),n=s,o=o||!Do(n);t++}return r!==""&&(e+=T2(o,r)),e}function gV(i){return i.map(mV).join(",")}function vV(i){let e=[],t=[],n=1,r=2;for(;n<i.length;){let o=i[n];if(typeof o=="string")r===2?o!==""&&e.push(o,i[++n]):r===8&&t.push(o);else{if(!Do(r))break;r=o}n++}return t.length&&e.push(1,...t),e}var Tr={};function OC(i,e,t,n,r,o,s,a,l,c,d){let u=Xt+n,f=u+r,h=bV(u,f),p=typeof c=="function"?c():c;return h[tt]={type:i,blueprint:h,template:t,queries:null,viewQuery:a,declTNode:e,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:p,incompleteFirstPass:!1,ssrId:d}}function bV(i,e){let t=[];for(let n=0;n<e;n++)t.push(n<i?null:Tr);return t}function yV(i){let e=i.tView;return e===null||e.incompleteFirstPass?i.tView=OC(1,null,i.template,i.decls,i.vars,i.directiveDefs,i.pipeDefs,i.viewQuery,i.schemas,i.consts,i.id):e}function RC(i,e,t,n,r,o,s,a,l,c,d){let u=e.blueprint.slice();return u[Vi]=r,u[wt]=n|4|128|8|64|1024,(c!==null||i&&i[wt]&2048)&&(u[wt]|=2048),VS(u),u[Vn]=u[bc]=i,u[kn]=t,u[Mo]=s||i&&i[Mo],u[Zt]=a||i&&i[Zt],u[xr]=l||i&&i[xr]||null,u[Gi]=o,u[ea]=xz(),u[Hi]=d,u[NS]=c,u[ci]=e.type==2?i[ci]:u,u}function xV(i,e,t){let n=to(e,i),r=yV(t),o=i[Mo].rendererFactory,s=kC(i,RC(i,r,null,gA(t),n,e,null,o.createRenderer(n,t),null,null,null));return i[e.index]=s}function gA(i){let e=16;return i.signals?e=4096:i.onPush&&(e=64),e}function vA(i,e,t,n){if(t===0)return-1;let r=e.length;for(let o=0;o<t;o++)e.push(n),i.blueprint.push(n),i.data.push(null);return r}function kC(i,e){return i[iu]?i[FS][Qr]=e:i[iu]=e,i[FS]=e,e}function P(i=1){bA(In(),mt(),ta()+i,!1)}function bA(i,e,t,n){if(!n)if((e[wt]&3)===3){let o=i.preOrderCheckHooks;o!==null&&e0(e,o,t)}else{let o=i.preOrderHooks;o!==null&&t0(e,o,0,t)}Ka(t)}var A0=(function(i){return i[i.None=0]="None",i[i.SignalBased=1]="SignalBased",i[i.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",i})(A0||{});function U1(i,e,t,n){let r=lt(null);try{let[o,s,a]=i.inputs[t],l=null;(s&A0.SignalBased)!==0&&(l=e[o][Qn]),l!==null&&l.transformFn!==void 0?n=l.transformFn(n):a!==null&&(n=a.call(e,n)),i.setInput!==null?i.setInput(e,l,n,t,o):tP(e,l,o,n)}finally{lt(r)}}var ms=(function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i})(ms||{}),_V;function FC(i,e){return _V(i,e)}var tfe=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var B1=new WeakMap,z1=new WeakSet;function SV(i,e){let t=B1.get(i);if(!t||t.length===0)return;let n=e.parentNode,r=e.previousSibling;for(let o=t.length-1;o>=0;o--){let s=t[o],a=s.parentNode;s===e?(t.splice(o,1),z1.add(s),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))):(r&&s===r||a&&n&&a!==n)&&(t.splice(o,1),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),s.parentNode?.removeChild(s))}}function CV(i,e){let t=B1.get(i);t?t.includes(e)||t.push(e):B1.set(i,[e])}var Tc=new Set,O0=(function(i){return i[i.CHANGE_DETECTION=0]="CHANGE_DETECTION",i[i.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",i})(O0||{}),vs=new qe(""),D2=new Set;function Ro(i){D2.has(i)||(D2.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}var NC=(()=>{class i{impl=null;execute(){this.impl?.execute()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),yA=[0,1,2,3],xA=(()=>{class i{ngZone=Q(or);scheduler=Q(ls);errorHandler=Q(Zr,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Q(vs,{optional:!0})}execute(){let t=this.sequences.size>0;t&&tn(Wt.AfterRenderHooksStart),this.executing=!0;for(let n of yA)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[n]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[n];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let n of this.sequences)n.afterRun(),n.once&&(this.sequences.delete(n),n.destroy());for(let n of this.deferredRegistrations)this.sequences.add(n);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&tn(Wt.AfterRenderHooksEnd)}register(t){let{view:n}=t;n!==void 0?((n[xc]??=[]).push(t),Cc(n),n[wt]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,n){return n?n.run(O0.AFTER_NEXT_RENDER,t):t()}static \u0275prov=_e({token:i,providedIn:"root",factory:()=>new i})}return i})(),m0=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,n,r,o,s=null){this.impl=e,this.hooks=t,this.view=n,this.once=r,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[xc];e&&(this.view[xc]=e.filter(t=>t!==this))}};function R0(i,e){let t=e?.injector??Q(Di);return Ro("NgAfterNextRender"),EV(i,t,e,!0)}function wV(i){return i instanceof Function?[void 0,void 0,i,void 0]:[i.earlyRead,i.write,i.mixedReadWrite,i.read]}function EV(i,e,t,n){let r=e.get(NC);r.impl??=e.get(xA);let o=e.get(vs,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(sr):null,a=e.get(Ph,null,{optional:!0}),l=new m0(r.impl,wV(i),a?.view,n,s,o?.snapshot(null));return r.impl.register(l),l}var _A=new qe("",{factory:()=>({queue:new Set,isScheduled:!1,scheduler:null,injector:Q(Ti)})});function SA(i,e,t){let n=i.get(_A);if(Array.isArray(e))for(let r of e)n.queue.add(r),t?.detachedLeaveAnimationFns?.push(r);else n.queue.add(e),t?.detachedLeaveAnimationFns?.push(e);n.scheduler&&n.scheduler(i)}function MV(i,e){let t=i.get(_A);if(e.detachedLeaveAnimationFns){for(let n of e.detachedLeaveAnimationFns)t.queue.delete(n);e.detachedLeaveAnimationFns=void 0}}function TV(i,e){for(let[t,n]of e)SA(i,n.animateFns)}function I2(i,e,t,n){let r=i?.[Xa]?.enter;e!==null&&r&&r.has(t.index)&&TV(n,r)}function du(i,e,t,n,r,o,s,a){if(r!=null){let l,c=!1;Sr(r)?l=r:eo(r)&&(c=!0,r=r[Vi]);let d=Cr(r);i===0&&n!==null?(I2(a,n,o,t),s==null?cA(e,n,d):p0(e,n,d,s||null,!0)):i===1&&n!==null?(I2(a,n,o,t),p0(e,n,d,s||null,!0),SV(o,d)):i===2?(a?.[Xa]?.leave?.has(o.index)&&CV(o,d),P2(a,o,t,u=>{if(z1.has(d)){z1.delete(d);return}DC(e,d,c,u)})):i===3&&P2(a,o,t,()=>{e.destroyNode(d)}),l!=null&&UV(e,i,t,l,o,n,s)}}function DV(i,e){CA(i,e),e[Vi]=null,e[Gi]=null}function IV(i,e,t,n,r,o){n[Vi]=r,n[Gi]=e,F0(i,n,t,1,r,o)}function CA(i,e){e[Mo].changeDetectionScheduler?.notify(9),F0(i,e,e[Zt],2,null,null)}function PV(i){let e=i[iu];if(!e)return u1(i[tt],i);for(;e;){let t=null;if(eo(e))t=e[iu];else{let n=e[Dn];n&&(t=n)}if(!t){for(;e&&!e[Qr]&&e!==i;)eo(e)&&u1(e[tt],e),e=e[Vn];e===null&&(e=i),eo(e)&&u1(e[tt],e),t=e&&e[Qr]}e=t}}function LC(i,e){let t=i[_c],n=t.indexOf(e);t.splice(n,1)}function k0(i,e){if(Ya(e))return;let t=e[Zt];t.destroyNode&&F0(i,e,t,3,null,null),PV(e)}function u1(i,e){if(Ya(e))return;let t=lt(null);try{e[wt]&=-129,e[wt]|=256,e[_r]&&sc(e[_r]),RV(i,e),OV(i,e),e[tt].type===1&&e[Zt].destroy();let n=e[$a];if(n!==null&&Sr(e[Vn])){n!==e[Vn]&&LC(n,e);let r=e[ds];r!==null&&r.detachView(i)}E1(e)}finally{lt(t)}}function P2(i,e,t,n){let r=i?.[Xa];if(r==null||r.leave==null||!r.leave.has(e.index))return n(!1);i&&Tc.add(i[ea]),SA(t,()=>{if(r.leave&&r.leave.has(e.index)){let s=r.leave.get(e.index),a=[];if(s){for(let l=0;l<s.animateFns.length;l++){let c=s.animateFns[l],{promise:d}=c();a.push(d)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(a),AV(i,n)}else i&&Tc.delete(i[ea]),n(!1)},r)}function AV(i,e){let t=i[Xa]?.running;if(t){t.then(()=>{i[Xa].running=void 0,Tc.delete(i[ea]),e(!0)});return}e(!1)}function OV(i,e){let t=i.cleanup,n=e[nu];if(t!==null)for(let s=0;s<t.length-1;s+=2)if(typeof t[s]=="string"){let a=t[s+3];a>=0?n[a]():n[-a].unsubscribe(),s+=2}else{let a=n[t[s+1]];t[s].call(a)}n!==null&&(e[nu]=null);let r=e[qs];if(r!==null){e[qs]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[Ha];if(o!==null){e[Ha]=null;for(let s of o)s.destroy()}}function RV(i,e){let t;if(i!=null&&(t=i.destroyHooks)!=null)for(let n=0;n<t.length;n+=2){let r=e[t[n]];if(!(r instanceof Mc)){let o=t[n+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];tn(Wt.LifecycleHookStart,a,l);try{l.call(a)}finally{tn(Wt.LifecycleHookEnd,a,l)}}else{tn(Wt.LifecycleHookStart,r,o);try{o.call(r)}finally{tn(Wt.LifecycleHookEnd,r,o)}}}}}function wA(i,e,t){return kV(i,e.parent,t)}function kV(i,e,t){let n=e;for(;n!==null&&n.type&168;)e=n,n=e.parent;if(n===null)return t[Vi];if(fs(n)){let{encapsulation:r}=i.data[n.directiveStart+n.componentOffset];if(r===Po.None||r===Po.Emulated)return null}return to(n,t)}function EA(i,e,t){return NV(i,e,t)}function FV(i,e,t){return i.type&40?to(i,t):null}var NV=FV,A2;function UC(i,e,t,n){let r=wA(i,n,e),o=e[Zt],s=n.parent||e[Gi],a=EA(s,n,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)M2(o,r,t[l],a,!1);else M2(o,r,t,a,!1);A2!==void 0&&A2(o,n,e,t,r)}function Rh(i,e){if(e!==null){let t=e.type;if(t&3)return to(e,i);if(t&4)return V1(-1,i[e.index]);if(t&8){let n=e.child;if(n!==null)return Rh(i,n);{let r=i[e.index];return Sr(r)?V1(-1,r):Cr(r)}}else{if(t&128)return Rh(i,e.next);if(t&32)return FC(e,i)()||Cr(i[e.index]);{let n=MA(i,e);if(n!==null){if(Array.isArray(n))return n[0];let r=ja(i[ci]);return Rh(r,n)}else return Rh(i,e.next)}}}return null}function MA(i,e){if(e!==null){let n=i[ci][Gi],r=e.projection;return n.projection[r]}return null}function V1(i,e){let t=Dn+i+1;if(t<e.length){let n=e[t],r=n[tt].firstChild;if(r!==null)return Rh(n,r)}return e[us]}function BC(i,e,t,n,r,o,s){for(;t!=null;){let a=n[xr];if(t.type===128){t=t.next;continue}let l=n[t.index],c=t.type;if(s&&e===0&&(l&&mu(Cr(l),n),t.flags|=2),!Yh(t))if(c&8)BC(i,e,t.child,n,r,o,!1),du(e,i,a,r,l,t,o,n);else if(c&32){let d=FC(t,n),u;for(;u=d();)du(e,i,a,r,u,t,o,n);du(e,i,a,r,l,t,o,n)}else c&16?TA(i,e,n,t,r,o):du(e,i,a,r,l,t,o,n);t=s?t.projectionNext:t.next}}function F0(i,e,t,n,r,o){BC(t,n,i.firstChild,e,r,o,!1)}function LV(i,e,t){let n=e[Zt],r=wA(i,t,e),o=t.parent||e[Gi],s=EA(o,t,e);TA(n,0,e,t,r,s)}function TA(i,e,t,n,r,o){let s=t[ci],l=s[Gi].projection[n.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];du(e,i,t[xr],r,d,n,o,t)}else{let c=l,d=s[Vn];h0(n)&&(c.flags|=128),BC(i,e,c,d,r,o,!0)}}function UV(i,e,t,n,r,o,s){let a=n[us],l=Cr(n);a!==l&&du(e,i,t,o,a,r,s);for(let c=Dn;c<n.length;c++){let d=n[c];F0(d[tt],d,i,e,o,a)}}function BV(i,e,t,n,r){if(e)r?i.addClass(t,n):i.removeClass(t,n);else{let o=n.indexOf("-")===-1?void 0:ms.DashCase;r==null?i.removeStyle(t,n,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=ms.Important),i.setStyle(t,n,r,o))}}function DA(i,e,t,n,r){let o=ta(),s=n&2;try{Ka(-1),s&&e.length>Xt&&bA(i,e,Xt,!1);let a=s?Wt.TemplateUpdateStart:Wt.TemplateCreateStart;tn(a,r,t),t(n,r)}finally{Ka(o);let a=s?Wt.TemplateUpdateEnd:Wt.TemplateCreateEnd;tn(a,r,t)}}function N0(i,e,t){WV(i,e,t),(t.flags&64)===64&&$V(i,e,t)}function Zh(i,e,t=to){let n=e.localNames;if(n!==null){let r=e.index+1;for(let o=0;o<n.length;o+=2){let s=n[o+1],a=s===-1?t(e,i):i[s];i[r++]=a}}}function zV(i,e,t,n){let o=n.get(mC,RP)||t===Po.ShadowDom||t===Po.ExperimentalIsolatedShadowDom,s=i.selectRootElement(e,o);return VV(s),s}function VV(i){IA(i)}var IA=()=>null;function GV(i){bP(i)?dA(i):Az(i)}function PA(){IA=GV}function HV(i){return i==="class"?"className":i==="for"?"htmlFor":i==="formaction"?"formAction":i==="innerHtml"?"innerHTML":i==="readonly"?"readOnly":i==="tabindex"?"tabIndex":i}function AA(i,e,t,n,r,o){let s=e[tt];if(jC(i,s,e,t,n)){fs(i)&&jV(e,i.index);return}i.type&3&&(t=HV(t)),OA(i,e,t,n,r,o)}function OA(i,e,t,n,r,o){if(i.type&3){let s=to(i,e);n=o!=null?o(n,i.value||"",t):n,r.setProperty(s,t,n)}else i.type&12}function jV(i,e){let t=no(e,i);t[wt]&16||(t[wt]|=64)}function WV(i,e,t){let n=t.directiveStart,r=t.directiveEnd;fs(t)&&xV(e,t,i.data[n+t.componentOffset]),i.firstCreatePass||u0(t,e);let o=t.initialInputs;for(let s=n;s<r;s++){let a=i.data[s],l=Fh(e,i,s,t);if(mu(l,e),o!==null&&KV(e,s-n,l,a,t,o),hs(a)){let c=no(t.index,e);c[kn]=Fh(e,i,s,t)}}}function $V(i,e,t){let n=t.directiveStart,r=t.directiveEnd,o=t.index,s=ZI();try{Ka(o);for(let a=n;a<r;a++){let l=i.data[a],c=e[a];Gg(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&XV(l,c)}}finally{Ka(-1),Gg(s)}}function XV(i,e){i.hostBindings!==null&&i.hostBindings(1,e)}function zC(i,e){let t=i.directiveRegistry,n=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];mA(e,o.selectors,!1)&&(n??=[],hs(o)?n.unshift(o):n.push(o))}return n}function YV(i,e,t,n,r,o){let s=to(i,e);qV(e[Zt],s,o,i.value,t,n,r)}function qV(i,e,t,n,r,o,s){if(o==null)i.removeAttribute(e,r,t);else{let a=s==null?wh(o):s(o,n||"",r);i.setAttribute(e,r,a,t)}}function KV(i,e,t,n,r,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],c=s[a+1];U1(n,t,l,c)}}function VC(i,e,t,n,r){let o=Xt+t,s=e[tt],a=r(s,e,i,n,t);e[o]=a,su(i,!0);let l=i.type===2;return l?(uA(e[Zt],a,i),(HI()===0||ru(i))&&mu(a,e),jI()):mu(a,e),$g()&&(!l||!Yh(i))&&UC(s,e,a,i),i}function GC(i){let e=i;return KS()?ZS():(e=e.parent,su(e,!1)),e}function HC(i,e){let t=i[xr];if(!t)return;let n;try{n=t.get(ia,null)}catch{n=null}n?.(e)}function jC(i,e,t,n,r){let o=i.inputs?.[n],s=i.hostDirectiveInputs?.[n],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],d=s[l+1],u=e.data[c];U1(u,t[c],d,r),a=!0}if(o)for(let l of o){let c=t[l],d=e.data[l];U1(d,c,n,r),a=!0}return a}function ZV(i,e){let t=no(e,i),n=t[tt];JV(n,t);let r=t[Vi];r!==null&&t[Hi]===null&&(t[Hi]=YP(r,t[xr])),tn(Wt.ComponentStart);try{WC(n,t,t[kn])}finally{tn(Wt.ComponentEnd,t[kn])}}function JV(i,e){for(let t=e.length;t<i.blueprint.length;t++)e.push(i.blueprint[t])}function WC(i,e,t){jg(e);try{let n=i.viewQuery;n!==null&&I1(1,n,t);let r=i.template;r!==null&&DA(i,e,r,1,t),i.firstCreatePass&&(i.firstCreatePass=!1),e[ds]?.finishViewCreation(i),i.staticContentQueries&&eA(i,e),i.staticViewQueries&&I1(2,i.viewQuery,t);let o=i.components;o!==null&&QV(e,o)}catch(n){throw i.firstCreatePass&&(i.incompleteFirstPass=!0,i.firstCreatePass=!1),n}finally{e[wt]&=-5,Wg()}}function QV(i,e){for(let t=0;t<e.length;t++)ZV(i,e[t])}function Su(i,e,t,n){let r=lt(null);try{let o=e.tView,a=i[wt]&4096?4096:16,l=RC(i,o,t,a,null,e,null,null,n?.injector??null,n?.embeddedViewInjector??null,n?.dehydratedView??null),c=i[e.index];l[$a]=c;let d=i[ds];return d!==null&&(l[ds]=d.createEmbeddedView(o)),WC(o,l,t),l}finally{lt(r)}}function Dc(i,e){return!e||e.firstChild===null||h0(i)}function Lh(i,e,t,n,r=!1){for(;t!==null;){if(t.type===128){t=r?t.projectionNext:t.next;continue}let o=e[t.index];o!==null&&n.push(Cr(o)),Sr(o)&&RA(o,n);let s=t.type;if(s&8)Lh(i,e,t.child,n);else if(s&32){let a=FC(t,e),l;for(;l=a();)n.push(l)}else if(s&16){let a=MA(e,t);if(Array.isArray(a))n.push(...a);else{let l=ja(e[ci]);Lh(l[tt],l,a,n,!0)}}t=r?t.projectionNext:t.next}return n}function RA(i,e){for(let t=Dn;t<i.length;t++){let n=i[t],r=n[tt].firstChild;r!==null&&Lh(n[tt],n,r,e)}i[us]!==i[Vi]&&e.push(i[us])}function kA(i){if(i[xc]!==null){for(let e of i[xc])e.impl.addSequence(e);i[xc].length=0}}var FA=[];function eG(i){return i[_r]??tG(i)}function tG(i){let e=FA.pop()??Object.create(iG);return e.lView=i,e}function nG(i){i.lView[_r]!==i&&(i.lView=null,FA.push(i))}var iG=ue(R({},ic),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{Cc(i.lView)},consumerOnSignalRead(){this.lView[_r]=this}});function rG(i){let e=i[_r]??Object.create(oG);return e.lView=i,e}var oG=ue(R({},ic),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:i=>{let e=ja(i.lView);for(;e&&!NA(e[tt]);)e=ja(e);e&&GS(e)},consumerOnSignalRead(){this.lView[_r]=this}});function NA(i){return i.type!==2}function LA(i){if(i[Ha]===null)return;let e=!0;for(;e;){let t=!1;for(let n of i[Ha])n.dirty&&(t=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));e=t&&!!(i[wt]&8192)}}var sG=100;function UA(i,e=0){let n=i[Mo].rendererFactory,r=!1;r||n.begin?.();try{aG(i,e)}finally{r||n.end?.()}}function aG(i,e){let t=JS();try{_h(!0),G1(i,e);let n=0;for(;Dh(i);){if(n===sG)throw new Ke(103,!1);n++,G1(i,1)}}finally{_h(t)}}function lG(i,e,t,n){if(Ya(e))return;let r=e[wt],o=!1,s=!1;jg(e);let a=!0,l=null,c=null;o||(NA(i)?(c=eG(e),l=oc(c)):Ym()===null?(a=!1,c=rG(e),l=oc(c)):e[_r]&&(sc(e[_r]),e[_r]=null));try{VS(e),YI(i.bindingStartIndex),t!==null&&DA(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let h=i.preOrderCheckHooks;h!==null&&e0(e,h,null)}else{let h=i.preOrderHooks;h!==null&&t0(e,h,0,null),l1(e,0)}if(s||cG(e),LA(e),BA(e,0),i.contentQueries!==null&&eA(i,e),!o)if(d){let h=i.contentCheckHooks;h!==null&&e0(e,h)}else{let h=i.contentHooks;h!==null&&t0(e,h,1),l1(e,1)}uG(i,e);let u=i.components;u!==null&&VA(e,u,0);let f=i.viewQuery;if(f!==null&&I1(2,f,n),!o)if(d){let h=i.viewCheckHooks;h!==null&&e0(e,h)}else{let h=i.viewHooks;h!==null&&t0(e,h,2),l1(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[Ng]){for(let h of e[Ng])h();e[Ng]=null}o||(kA(e),e[wt]&=-73)}catch(d){throw o||Cc(e),d}finally{c!==null&&(Wd(c,l),a&&nG(c)),Wg()}}function BA(i,e){for(let t=_P(i);t!==null;t=SP(t))for(let n=Dn;n<t.length;n++){let r=t[n];zA(r,e)}}function cG(i){for(let e=_P(i);e!==null;e=SP(e)){if(!(e[wt]&2))continue;let t=e[_c];for(let n=0;n<t.length;n++){let r=t[n];GS(r)}}}function dG(i,e,t){tn(Wt.ComponentStart);let n=no(e,i);try{zA(n,t)}finally{tn(Wt.ComponentEnd,n[kn])}}function zA(i,e){Ug(i)&&G1(i,e)}function G1(i,e){let n=i[tt],r=i[wt],o=i[_r],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&fh(o)),s||=!1,o&&(o.dirty=!1),i[wt]&=-9217,s)lG(n,i,n.template,i[kn]);else if(r&8192){let a=lt(null);try{LA(i),BA(i,1);let l=n.components;l!==null&&VA(i,l,1),kA(i)}finally{lt(a)}}}function VA(i,e,t){for(let n=0;n<e.length;n++)dG(i,e[n],t)}function uG(i,e){let t=i.hostBindingOpCodes;if(t!==null)try{for(let n=0;n<t.length;n++){let r=t[n];if(r<0)Ka(~r);else{let o=r,s=t[++n],a=t[++n];KI(s,o);let l=e[o];tn(Wt.HostBindingsUpdateStart,l);try{a(2,l)}finally{tn(Wt.HostBindingsUpdateEnd,l)}}}}finally{Ka(-1)}}function L0(i,e){let t=JS()?64:1088;for(i[Mo].changeDetectionScheduler?.notify(e);i;){i[wt]|=t;let n=ja(i);if(Sc(i)&&!n)return i;i=n}return null}function GA(i,e,t,n){return[i,!0,0,e,null,n,null,t,null,null]}function HA(i,e){let t=Dn+e;if(t<i.length)return i[t]}function Cu(i,e,t,n=!0){let r=e[tt];if(fG(r,e,i,t),n){let s=V1(t,i),a=e[Zt],l=a.parentNode(i[us]);l!==null&&IV(r,i[Gi],a,e,l,s)}let o=e[Hi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function $C(i,e){let t=Uh(i,e);return t!==void 0&&k0(t[tt],t),t}function Uh(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t];if(n){let r=n[$a];r!==null&&r!==i&&LC(r,n),e>0&&(i[t-1][Qr]=n[Qr]);let o=Eh(i,Dn+e);DV(n[tt],n);let s=o[ds];s!==null&&s.detachView(o[tt]),n[Vn]=null,n[Qr]=null,n[wt]&=-129}return n}function fG(i,e,t,n){let r=Dn+n,o=t.length;n>0&&(t[r-1][Qr]=e),n<o-Dn?(e[Qr]=t[r],PS(t,Dn+n,e)):(t.push(e),e[Qr]=null),e[Vn]=t;let s=e[$a];s!==null&&t!==s&&jA(s,e);let a=e[ds];a!==null&&a.insertView(i),Bg(e),e[wt]|=128}function jA(i,e){let t=i[_c],n=e[Vn];if(eo(n))i[wt]|=2;else{let r=n[Vn][ci];e[ci]!==r&&(i[wt]|=2)}t===null?i[_c]=[e]:t.push(e)}var Qa=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[tt];return Lh(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[kn]}set context(e){this._lView[kn]=e}get destroyed(){return Ya(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Vn];if(Sr(e)){let t=e[Th],n=t?t.indexOf(this):-1;n>-1&&(Uh(e,n),Eh(t,n))}this._attachedToViewContainer=!1}k0(this._lView[tt],this._lView)}onDestroy(e){HS(this._lView,e)}markForCheck(){L0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[wt]&=-129}reattach(){Bg(this._lView),this._lView[wt]|=128}detectChanges(){this._lView[wt]|=1024,UA(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ke(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Sc(this._lView),t=this._lView[$a];t!==null&&!e&&LC(t,this._lView),CA(this._lView[tt],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Ke(902,!1);this._appRef=e;let t=Sc(this._lView),n=this._lView[$a];n!==null&&!t&&jA(n,this._lView),Bg(this._lView)}};var gu=(()=>{class i{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=hG;constructor(t,n,r){this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){let o=Su(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new Qa(o)}}return i})();function hG(){return U0(xi(),mt())}function U0(i,e){return i.type&4?new gu(e,i,xu(i,e)):null}function wu(i,e,t,n,r){let o=i.data[e];if(o===null)o=pG(i,e,t,n,r),qI()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=n,o.attrs=r;let s=$I();o.injectorIndex=s===null?-1:s.injectorIndex}return su(o,!0),o}function pG(i,e,t,n,r){let o=qS(),s=KS(),a=s?o:o&&o.parent,l=i.data[e]=gG(i,a,t,e,n,r);return mG(i,l,o,s),l}function mG(i,e,t,n){i.firstChild===null&&(i.firstChild=e),t!==null&&(n?t.child==null&&e.parent!==null&&(t.child=e):t.next===null&&(t.next=e,e.prev=t))}function gG(i,e,t,n,r,o){let s=e?e.injectorIndex:-1,a=0;return Vg()&&(a|=128),{type:t,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var vG=new RegExp(`^(\\d+)*(${EP}|${wP})*(.*)`);function bG(i){let e=i.match(vG),[t,n,r,o]=e,s=n?parseInt(n,10):r,a=[];for(let[l,c,d]of o.matchAll(/(f|n)(\d*)/g)){let u=parseInt(d,10)||1;a.push(c,u)}return[s,...a]}function yG(i){return!i.prev&&i.parent?.type===8}function f1(i){return i.index-Xt}function xG(i,e){let t=i.i18nNodes;if(t)return t.get(e)}function B0(i,e,t,n){let r=f1(n),o=xG(i,r);if(o===void 0){let s=i.data[IP];if(s?.[r])o=SG(s[r],t);else if(e.firstChild===n)o=i.firstChild;else{let a=n.prev===null,l=n.prev??n.parent;if(yG(n)){let c=f1(n.parent);o=D1(i,c)}else{let c=to(l,t);if(a)o=c.firstChild;else{let d=f1(l),u=D1(i,d);if(l.type===2&&u){let h=xC(i,d)+1;o=z0(h,u)}else o=c.nextSibling}}}}return o}function z0(i,e){let t=e;for(let n=0;n<i;n++)t=t.nextSibling;return t}function _G(i,e){let t=i;for(let n=0;n<e.length;n+=2){let r=e[n],o=e[n+1];for(let s=0;s<o;s++)switch(r){case wz:t=t.firstChild;break;case Ez:t=t.nextSibling;break}}return t}function SG(i,e){let[t,...n]=bG(i),r;if(t===wP)r=e[ci][Vi];else if(t===EP)r=hA(e[ci][Vi]);else{let o=Number(t);r=Cr(e[o+Xt])}return _G(r,n)}var CG=!1;function WA(i){CG=i}function wG(i){let e=i[Hi];if(e){let{i18nNodes:t,dehydratedIcuData:n}=e;if(t&&n){let r=i[Zt];for(let o of n.values())EG(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function EG(i,e,t){for(let n of t.node.cases[t.case]){let r=e.get(n.index-Xt);r&&DC(i,r,!1)}}function V0(i){let e=i[To]??[],n=i[Vn][Zt],r=[];for(let o of e)o.data[PP]!==void 0?r.push(o):$A(o,n);i[To]=r}function MG(i){let{lContainer:e}=i,t=e[To];if(t===null)return;let r=e[Vn][Zt];for(let o of t)$A(o,r)}function $A(i,e){let t=0,n=i.firstChild;if(n){let r=i.data[Nh];for(;t<r;){let o=n.nextSibling;DC(e,n,!1),n=o,t++}}}function G0(i){V0(i);let e=i[Vi];eo(e)&&g0(e);for(let t=Dn;t<i.length;t++)g0(i[t])}function g0(i){wG(i);let e=i[tt];for(let t=Xt;t<e.bindingStartIndex;t++)if(Sr(i[t])){let n=i[t];G0(n)}else eo(i[t])&&g0(i[t])}function XC(i){let e=i._views;for(let t of e){let n=qP(t);n!==null&&n[Vi]!==null&&(eo(n)?g0(n):G0(n))}}function TG(i,e,t,n){i!==null&&(t.cleanup(e),G0(i.lContainer),XC(n))}function DG(i,e){let t=[];for(let n of e)for(let r=0;r<(n[hC]??1);r++){let o={data:n,firstChild:null};n[Nh]>0&&(o.firstChild=i,i=z0(n[Nh],i)),t.push(o)}return[i,t]}var XA=()=>null,YA=()=>null;function qA(){XA=IG,YA=PG}function IG(i,e){return ZA(i,e)?i[To].shift():(V0(i),null)}function Bh(i,e){return XA(i,e)}function PG(i,e,t){if(e.tView.ssrId===null)return null;let n=Bh(i,e.tView.ssrId);return t[tt].firstUpdatePass&&n===null&&AG(t,e),n}function KA(i,e,t){return YA(i,e,t)}function AG(i,e){let t=e;for(;t;){if(O2(i,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(O2(i,t))return;t=t.next}}function ZA(i,e){let t=i[To];return!e||t===null||t.length===0?!1:t[0].data[DP]===e}function O2(i,e){let t=e.tView?.ssrId;if(t==null)return!1;let n=i[e.index];return Sr(n)&&ZA(n,t)?(V0(n),!0):!1}var JA=class{},H0=class{},H1=class{resolveComponentFactory(e){throw new Ke(917,!1)}},j0=class{static NULL=new H1},Ic=class{},la=(()=>{class i{destroyNode=null;static __NG_ELEMENT_ID__=()=>OG()}return i})();function OG(){let i=mt(),e=xi(),t=no(e.index,i);return(eo(t)?t:i)[Zt]}var QA=(()=>{class i{static \u0275prov=_e({token:i,providedIn:"root",factory:()=>null})}return i})();var r0={},fu=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){let r=this.injector.get(e,r0,n);return r!==r0||t===r0?r:this.parentInjector.get(e,t,n)}};function v0(i,e,t){let n=t?i.styles:null,r=t?i.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)r=Tg(r,a);else if(o==2){let l=a,c=e[++s];n=Tg(n,l+": "+c+";")}}t?i.styles=n:i.stylesWithoutHost=n,t?i.classes=r:i.classesWithoutHost=r}function $t(i,e=0){let t=mt();if(t===null)return Xe(i,e);let n=xi();return hP(n,t,yi(i),e)}function eO(i,e,t,n,r){let o=n===null?null:{"":-1},s=r(i,t);if(s!==null){let a=s,l=null,c=null;for(let d of s)if(d.resolveHostDirectives!==null){[a,l,c]=d.resolveHostDirectives(s);break}FG(i,e,t,a,o,l,c)}o!==null&&n!==null&&RG(t,n,o)}function RG(i,e,t){let n=i.localNames=[];for(let r=0;r<e.length;r+=2){let o=t[e[r+1]];if(o==null)throw new Ke(-301,!1);n.push(e[r],o)}}function kG(i,e,t){e.componentOffset=t,(i.components??=[]).push(e.index)}function FG(i,e,t,n,r,o,s){let a=n.length,l=null;for(let f=0;f<a;f++){let h=n[f];l===null&&hs(h)&&(l=h,kG(i,t,f)),C1(u0(t,e),i,h.type)}VG(t,i.data.length,a),l?.viewProvidersResolver&&l.viewProvidersResolver(l);for(let f=0;f<a;f++){let h=n[f];h.providersResolver&&h.providersResolver(h)}let c=!1,d=!1,u=vA(i,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let f=0;f<a;f++){let h=n[f];if(t.mergedAttrs=pu(t.mergedAttrs,h.hostAttrs),LG(i,t,e,u,h),zG(u,h,r),s!==null&&s.has(h)){let[v,g]=s.get(h);t.directiveToIndex.set(h.type,[u,v+t.directiveStart,g+t.directiveStart])}else(o===null||!o.has(h))&&t.directiveToIndex.set(h.type,u);h.contentQueries!==null&&(t.flags|=4),(h.hostBindings!==null||h.hostAttrs!==null||h.hostVars!==0)&&(t.flags|=64);let p=h.type.prototype;!c&&(p.ngOnChanges||p.ngOnInit||p.ngDoCheck)&&((i.preOrderHooks??=[]).push(t.index),c=!0),!d&&(p.ngOnChanges||p.ngDoCheck)&&((i.preOrderCheckHooks??=[]).push(t.index),d=!0),u++}NG(i,t,o)}function NG(i,e,t){for(let n=e.directiveStart;n<e.directiveEnd;n++){let r=i.data[n];if(t===null||!t.has(r))R2(0,e,r,n),R2(1,e,r,n),F2(e,n,!1);else{let o=t.get(r);k2(0,e,o,n),k2(1,e,o,n),F2(e,n,!0)}}}function R2(i,e,t,n){let r=i===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;i===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(n),tO(e,o)}}function k2(i,e,t,n){let r=i===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;i===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(n,o),tO(e,s)}}function tO(i,e){e==="class"?i.flags|=8:e==="style"&&(i.flags|=16)}function F2(i,e,t){let{attrs:n,inputs:r,hostDirectiveInputs:o}=i;if(n===null||!t&&r===null||t&&o===null||AC(i)){i.initialInputs??=[],i.initialInputs.push(null);return}let s=null,a=0;for(;a<n.length;){let l=n[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!t&&r.hasOwnProperty(l)){let c=r[l];for(let d of c)if(d===e){s??=[],s.push(l,n[a+1]);break}}else if(t&&o.hasOwnProperty(l)){let c=o[l];for(let d=0;d<c.length;d+=2)if(c[d]===e){s??=[],s.push(c[d+1],n[a+1]);break}}a+=2}i.initialInputs??=[],i.initialInputs.push(s)}function LG(i,e,t,n,r){i.data[n]=r;let o=r.factory||(r.factory=Ga(r.type,!0)),s=new Mc(o,hs(r),$t,null);i.blueprint[n]=s,t[n]=s,UG(i,e,n,vA(i,t,r.hostVars,Tr),r)}function UG(i,e,t,n,r){let o=r.hostBindings;if(o){let s=i.hostBindingOpCodes;s===null&&(s=i.hostBindingOpCodes=[]);let a=~e.index;BG(s)!=a&&s.push(a),s.push(t,n,o)}}function BG(i){let e=i.length;for(;e>0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function zG(i,e,t){if(t){if(e.exportAs)for(let n=0;n<e.exportAs.length;n++)t[e.exportAs[n]]=i;hs(e)&&(t[""]=i)}}function VG(i,e,t){i.flags|=1,i.directiveStart=e,i.directiveEnd=e+t,i.providerIndexes=e}function YC(i,e,t,n,r,o,s,a){let l=e[tt],c=l.consts,d=io(c,s),u=wu(l,i,t,n,d);return o&&eO(l,e,u,io(c,a),r),u.mergedAttrs=pu(u.mergedAttrs,u.attrs),u.attrs!==null&&v0(u,u.attrs,!1),u.mergedAttrs!==null&&v0(u,u.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,u),u}function qC(i,e){oP(i,e),LS(e)&&i.queries.elementEnd(e)}function GG(i,e,t,n,r,o){let s=e.consts,a=io(s,r),l=wu(e,i,t,n,a);if(l.mergedAttrs=pu(l.mergedAttrs,l.attrs),o!=null){let c=io(s,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&v0(l,l.attrs,!1),l.mergedAttrs!==null&&v0(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function W0(i,e,t){return i[e]=t}function HG(i,e){return i[e]}function Er(i,e,t){if(t===Tr)return!1;let n=i[e];return Object.is(n,t)?!1:(i[e]=t,!0)}function nO(i,e,t,n){let r=Er(i,e,t);return Er(i,e+1,n)||r}function jG(i,e,t,n,r){let o=nO(i,e,t,n);return Er(i,e+2,r)||o}function o0(i,e,t){return function n(r){let o=fs(i)?no(i.index,e):e;L0(o,5);let s=e[kn],a=N2(e,s,t,r),l=n.__ngNextListenerFn__;for(;l;)a=N2(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function N2(i,e,t,n){let r=lt(null);try{return tn(Wt.OutputStart,e,t),t(n)!==!1}catch(o){return HC(i,o),!1}finally{tn(Wt.OutputEnd,e,t),lt(r)}}function iO(i,e,t,n,r,o,s,a){let l=ru(i),c=!1,d=null;if(!n&&l&&(d=$G(e,t,o,i.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,c=!0}else{let u=to(i,t),f=n?n(u):u;Mz(t,f,o,a);let h=r.listen(f,o,a);if(!WG(o)){let p=n?v=>n(Cr(v[i.index])):i.index;rO(p,e,t,o,a,h,!1)}}return c}function WG(i){return i.startsWith("animation")||i.startsWith("transition")}function $G(i,e,t,n){let r=i.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===t&&r[o+1]===n){let a=e[nu],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function rO(i,e,t,n,r,o,s){let a=e.firstCreatePass?WS(e):null,l=jS(t),c=l.length;l.push(r,o),a&&a.push(n,i,c,(c+1)*(s?-1:1))}function L2(i,e,t,n,r,o){let s=e[t],a=e[tt],c=a.data[t].outputs[n],u=s[c].subscribe(o);rO(i.index,a,e,r,o,u,!0)}var j1=Symbol("BINDING");function oO(i){return i.debugInfo?.className||i.type.name||null}var W1=class extends j0{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=Zs(e);return new vu(t,this.ngModule)}};function XG(i){return Object.keys(i).map(e=>{let[t,n,r]=i[e],o={propName:t,templateName:e,isSignal:(n&A0.SignalBased)!==0};return r&&(o.transform=r),o})}function YG(i){return Object.keys(i).map(e=>({propName:i[e],templateName:e}))}function qG(i,e,t){let n=e instanceof Ti?e:e?.injector;return n&&i.getStandaloneInjector!==null&&(n=i.getStandaloneInjector(n)||n),n?new fu(t,n):t}function KG(i){let e=i.get(Ic,null);if(e===null)throw new Ke(407,!1);let t=i.get(QA,null),n=i.get(ls,null),r=i.get(vs,null,{optional:!0});return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:n,ngReflect:!1,tracingService:r}}function ZG(i,e){let t=sO(i);return TC(e,t,t==="svg"?US:t==="math"?UI:null)}function sO(i){return(i.selectors[0][0]||"div").toLowerCase()}var vu=class extends H0{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=XG(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=YG(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=gV(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,n,r,o,s){tn(Wt.DynamicComponentStart);let a=lt(null);try{let l=this.componentDef,c=qG(l,r||this.ngModule,e),d=KG(c),u=d.tracingService;return u&&u.componentCreate?u.componentCreate(oO(l),()=>this.createComponentRef(d,c,t,n,o,s)):this.createComponentRef(d,c,t,n,o,s)}finally{lt(a)}}createComponentRef(e,t,n,r,o,s){let a=this.componentDef,l=JG(r,a,s,o),c=e.rendererFactory.createRenderer(null,a),d=r?zV(c,r,a.encapsulation,t):ZG(a,c),u=s?.some(U2)||o?.some(p=>typeof p!="function"&&p.bindings.some(U2)),f=RC(null,l,null,512|gA(a),null,null,e,c,t,null,YP(d,t,!0));f[Xt]=d,jg(f);let h=null;try{let p=YC(Xt,f,2,"#host",()=>l.directiveRegistry,!0,0);uA(c,d,p),mu(d,f),N0(l,f,p),_C(l,p,f),qC(l,p),n!==void 0&&eH(p,this.ngContentSelectors,n),h=no(p.index,f),f[kn]=h[kn],WC(l,f,null)}catch(p){throw h!==null&&E1(h),E1(f),p}finally{tn(Wt.DynamicComponentEnd),Wg()}return new b0(this.componentType,f,!!u)}};function JG(i,e,t,n){let r=i?["ng-version","21.2.4"]:vV(e.selectors[0]),o=null,s=null,a=0;if(t)for(let d of t)a+=d[j1].requiredVars,d.create&&(d.targetIdx=0,(o??=[]).push(d)),d.update&&(d.targetIdx=0,(s??=[]).push(d));if(n)for(let d=0;d<n.length;d++){let u=n[d];if(typeof u!="function")for(let f of u.bindings){a+=f[j1].requiredVars;let h=d+1;f.create&&(f.targetIdx=h,(o??=[]).push(f)),f.update&&(f.targetIdx=h,(s??=[]).push(f))}}let l=[e];if(n)for(let d of n){let u=typeof d=="function"?d:d.type,f=Pg(u);l.push(f)}return OC(0,null,QG(o,s),1,a,l,null,null,null,[r],null)}function QG(i,e){return!i&&!e?null:t=>{if(t&1&&i)for(let n of i)n.create();if(t&2&&e)for(let n of e)n.update()}}function U2(i){let e=i[j1].kind;return e==="input"||e==="twoWay"}var b0=class extends JA{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,n){super(),this._rootLView=t,this._hasInputBindings=n,this._tNode=ou(t[tt],Xt),this.location=xu(this._tNode,t),this.instance=no(this._tNode.index,t)[kn],this.hostView=this.changeDetectorRef=new Qa(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let n=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,o=jC(n,r[tt],r,e,t);this.previousInputValues.set(e,t);let s=no(n.index,r);L0(s,1)}get injector(){return new Ec(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function eH(i,e,t){let n=i.projection=[];for(let r=0;r<e.length;r++){let o=t[r];n.push(o!=null&&o.length?Array.from(o):null)}}var Eu=(()=>{class i{static __NG_ELEMENT_ID__=tH}return i})();function tH(){let i=xi();return aO(i,mt())}var $1=class i extends Eu{_lContainer;_hostTNode;_hostLView;constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return xu(this._hostTNode,this._hostLView)}get injector(){return new Ec(this._hostTNode,this._hostLView)}get parentInjector(){let e=cC(this._hostTNode,this._hostLView);if(aP(e)){let t=c0(e,this._hostLView),n=l0(e),r=t[tt].data[n+8];return new Ec(r,t)}else return new Ec(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=B2(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Dn}createEmbeddedView(e,t,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let s=Bh(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Dc(this._hostTNode,s)),a}createComponent(e,t,n,r,o,s,a){let l=e&&!K5(e),c;if(l)c=t;else{let g=t||{};c=g.index,n=g.injector,r=g.projectableNodes,o=g.environmentInjector||g.ngModuleRef,s=g.directives,a=g.bindings}let d=l?e:new vu(Zs(e)),u=n||this.parentInjector;if(!o&&d.ngModule==null){let m=(l?u:this.parentInjector).get(Ti,null);m&&(o=m)}let f=Zs(d.componentType??{}),h=Bh(this._lContainer,f?.id??null),p=h?.firstChild??null,v=d.create(u,r,p,o,s,a);return this.insertImpl(v.hostView,c,Dc(this._hostTNode,h)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if(BI(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[Vn],c=new i(l,l[Gi],l[Vn]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return Cu(s,r,o,n),e.attachToViewContainerRef(),PS(h1(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=B2(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Uh(this._lContainer,t);n&&(Eh(h1(this._lContainer),t),k0(n[tt],n))}detach(e){let t=this._adjustIndex(e,-1),n=Uh(this._lContainer,t);return n&&Eh(h1(this._lContainer),t)!=null?new Qa(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function B2(i){return i[Th]}function h1(i){return i[Th]||(i[Th]=[])}function aO(i,e){let t,n=e[i.index];return Sr(n)?t=n:(t=GA(n,e,null,i),e[i.index]=t,kC(e,t)),lO(t,e,i,n),new $1(t,i,e)}function nH(i,e){let t=i[Zt],n=t.createComment(""),r=to(e,i),o=t.parentNode(r);return p0(t,o,n,t.nextSibling(r),!1),n}var lO=cO,KC=()=>!1;function iH(i,e,t){return KC(i,e,t)}function cO(i,e,t,n){if(i[us])return;let r;t.type&8?r=Cr(n):r=nH(e,t),i[us]=r}function rH(i,e,t){if(i[us]&&i[To])return!0;let n=t[Hi],r=e.index-Xt;if(!n||yP(e)||JP(n,r))return!1;let s=D1(n,r),a=n.data[w0]?.[r],[l,c]=DG(s,a);return i[us]=l,i[To]=c,!0}function oH(i,e,t,n){KC(i,t,e)||cO(i,e,t,n)}function dO(){lO=oH,KC=rH}var X1=class i{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},Y1=class i{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let n=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o<n;o++){let s=t.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new i(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)hO(e,t).matches!==null&&this.queries[t].setDirty()}},q1=class{flags;read;predicate;constructor(e,t,n=null){this.flags=t,this.read=n,typeof e=="string"?this.predicate=fH(e):this.predicate=e}},K1=class i{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let n=0;n<this.length;n++){let r=t!==null?t.length:0,o=this.getByIndex(n).embeddedTView(e,r);o&&(o.indexInDeclarationView=n,t!==null?t.push(o):t=[o])}return t!==null?new i(t):null}template(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},Z1=class i{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,t=-1){this.metadata=e,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new i(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let t=this._declarationNodeIndex,n=e.parent;for(;n!==null&&n.type&8&&n.index!==t;)n=n.parent;return t===(n!==null?n.index:-1)}return this._appliesToNextNode}matchTNode(e,t){let n=this.metadata.predicate;if(Array.isArray(n))for(let r=0;r<n.length;r++){let o=n[r];this.matchTNodeWithReadOption(e,t,sH(t,o)),this.matchTNodeWithReadOption(e,t,n0(t,e,o,!1,!1))}else n===gu?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,n0(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(n!==null){let r=this.metadata.read;if(r!==null)if(r===Mr||r===Eu||r===gu&&t.type&4)this.addMatch(t.index,-2);else{let o=n0(t,e,r,!1,!1);o!==null&&this.addMatch(t.index,o)}else this.addMatch(t.index,n)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function sH(i,e){let t=i.localNames;if(t!==null){for(let n=0;n<t.length;n+=2)if(t[n]===e)return t[n+1]}return null}function aH(i,e){return i.type&11?xu(i,e):i.type&4?U0(i,e):null}function lH(i,e,t,n){return t===-1?aH(e,i):t===-2?cH(i,e,n):Fh(i,i[tt],t,e)}function cH(i,e,t){if(t===Mr)return xu(e,i);if(t===gu)return U0(e,i);if(t===Eu)return aO(e,i)}function uO(i,e,t,n){let r=e[ds].queries[n];if(r.matches===null){let o=i.data,s=t.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let d=o[c];a.push(lH(e,d,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function J1(i,e,t,n){let r=i.queries.getByIndex(t),o=r.matches;if(o!==null){let s=uO(i,e,r,t);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)n.push(s[a/2]);else{let c=o[a+1],d=e[-l];for(let u=Dn;u<d.length;u++){let f=d[u];f[$a]===f[Vn]&&J1(f[tt],f,c,n)}if(d[_c]!==null){let u=d[_c];for(let f=0;f<u.length;f++){let h=u[f];J1(h[tt],h,c,n)}}}}}return n}function fO(i,e){return i[ds].queries[e].queryList}function dH(i,e,t){let n=new f0((t&4)===4);return GI(i,e,n,n.destroy),(e[ds]??=new Y1).queries.push(new X1(n))-1}function uH(i,e,t){let n=In();return n.firstCreatePass&&(hH(n,new q1(i,e,t),-1),(e&2)===2&&(n.staticViewQueries=!0)),dH(n,mt(),e)}function fH(i){return i.split(",").map(e=>e.trim())}function hH(i,e,t){i.queries===null&&(i.queries=new K1),i.queries.track(new Z1(e,t))}function hO(i,e){return i.queries.getByIndex(e)}function pH(i,e){let t=i[tt],n=hO(t,e);return n.crossesNgTemplate?J1(t,i,e,[]):uO(t,i,n,e)}function pO(i,e,t){let n,r=hh(()=>{n._dirtyCounter();let o=gH(n,i);if(e&&o===void 0)throw new Ke(-951,!1);return o});return n=r[Qn],n._dirtyCounter=N(0),n._flatValue=void 0,r}function mO(i){return pO(!0,!1,i)}function gO(i){return pO(!0,!0,i)}function mH(i,e){let t=i[Qn];t._lView=mt(),t._queryIndex=e,t._queryList=fO(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function gH(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[wt]&4)return e?void 0:Mi;let r=fO(t,n),o=pH(t,n);return r.reset(o,gz),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}var zh=class{};var Vh=class extends zh{injector;componentFactoryResolver=new W1(this);instance=null;constructor(e){super();let t=new gc([...e.providers,{provide:zh,useValue:this},{provide:j0,useValue:this.componentFactoryResolver}],e.parent||eu(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function ZC(i,e,t=null){return new Vh({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var vH=(()=>{class i{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let n=Fg(!1,t.type),r=n.length>0?ZC([n],this._injector,""):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=_e({token:i,providedIn:"environment",factory:()=>new i(Xe(Ti))})}return i})();function at(i){return jh(()=>{let e=vO(i),t=ue(R({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===dC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(vH).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||Po.Emulated,styles:i.styles||Mi,_:null,schemas:i.schemas||null,tView:null,id:""});e.standalone&&Ro("NgStandalone"),bO(t);let n=i.dependencies;return t.directiveDefs=z2(n,bH),t.pipeDefs=z2(n,MS),t.id=_H(t),t})}function bH(i){return Zs(i)||Pg(i)}function ca(i){return jh(()=>({type:i.type,bootstrap:i.bootstrap||Mi,declarations:i.declarations||Mi,imports:i.imports||Mi,exports:i.exports||Mi,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function yH(i,e){if(i==null)return Wa;let t={};for(let n in i)if(i.hasOwnProperty(n)){let r=i[n],o,s,a,l;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o,l=r[3]||null):(o=r,s=r,a=A0.None,l=null),t[o]=[n,a,l],e[o]=s}return t}function xH(i){if(i==null)return Wa;let e={};for(let t in i)i.hasOwnProperty(t)&&(e[i[t]]=t);return e}function Zn(i){return jh(()=>{let e=vO(i);return bO(e),e})}function $0(i){return{type:i.type,name:i.name,factory:null,pure:i.pure!==!1,standalone:i.standalone??!0,onDestroy:i.type.prototype.ngOnDestroy||null}}function vO(i){let e={};return{type:i.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:e,inputConfig:i.inputs||Wa,exportAs:i.exportAs||null,standalone:i.standalone??!0,signals:i.signals===!0,selectors:i.selectors||Mi,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:yH(i.inputs,e),outputs:xH(i.outputs),debugInfo:null}}function bO(i){i.features?.forEach(e=>e(i))}function z2(i,e){return i?()=>{let t=typeof i=="function"?i():i,n=[];for(let r of t){let o=e(r);o!==null&&n.push(o)}return n}:null}function _H(i){let e=0,t=typeof i.consts=="function"?"":i.consts,n=[i.selectors,i.ngContentSelectors,i.hostVars,i.hostAttrs,t,i.vars,i.decls,i.encapsulation,i.standalone,i.signals,i.exportAs,JSON.stringify(i.inputs),JSON.stringify(i.outputs),Object.getOwnPropertyNames(i.type.prototype),!!i.contentQueries,!!i.viewQuery];for(let o of n.join("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function SH(i){return Object.getPrototypeOf(i.prototype).constructor}function Dr(i){let e=SH(i.type),t=!0,n=[i];for(;e;){let r;if(hs(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Ke(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let s=i;s.inputs=p1(i.inputs),s.declaredInputs=p1(i.declaredInputs),s.outputs=p1(i.outputs);let a=r.hostBindings;a&&TH(i,a);let l=r.viewQuery,c=r.contentQueries;if(l&&EH(i,l),c&&MH(i,c),CH(i,r),CI(i.outputs,r.outputs),hs(r)&&r.data.animation){let d=i.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(i),a===Dr&&(t=!1)}}e=Object.getPrototypeOf(e)}wH(n)}function CH(i,e){for(let t in e.inputs){if(!e.inputs.hasOwnProperty(t)||i.inputs.hasOwnProperty(t))continue;let n=e.inputs[t];n!==void 0&&(i.inputs[t]=n,i.declaredInputs[t]=e.declaredInputs[t])}}function wH(i){let e=0,t=null;for(let n=i.length-1;n>=0;n--){let r=i[n];r.hostVars=e+=r.hostVars,r.hostAttrs=pu(r.hostAttrs,t=pu(t,r.hostAttrs))}}function p1(i){return i===Wa?{}:i===Mi?[]:i}function EH(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function MH(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function TH(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function yO(i,e,t,n,r,o,s,a){if(t.firstCreatePass){i.mergedAttrs=pu(i.mergedAttrs,i.attrs);let d=i.tView=OC(2,i,r,o,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,i),d.queries=t.queries.embeddedTView(i))}a&&(i.flags|=a),su(i,!1);let l=xO(t,e,i,n);$g()&&UC(t,e,l,i),mu(l,e);let c=GA(l,e,l,i);e[n+Xt]=c,kC(e,c),iH(c,i,e)}function DH(i,e,t,n,r,o,s,a,l,c,d){let u=t+Xt,f;return e.firstCreatePass?(f=wu(e,u,4,s||null,a||null),zg()&&eO(e,i,f,io(e.consts,c),zC),oP(e,f)):f=e.data[u],yO(f,i,e,t,n,r,o,l),ru(f)&&N0(e,i,f),c!=null&&Zh(i,f,d),f}function Gh(i,e,t,n,r,o,s,a,l,c,d){let u=t+Xt,f;if(e.firstCreatePass){if(f=wu(e,u,4,s||null,a||null),c!=null){let h=io(e.consts,c);f.localNames=[];for(let p=0;p<h.length;p+=2)f.localNames.push(h[p],-1)}}else f=e.data[u];return yO(f,i,e,t,n,r,o,l),c!=null&&Zh(i,f,d),f}function el(i,e,t,n,r,o,s,a){let l=mt(),c=In(),d=io(c.consts,o);return DH(l,c,i,e,t,n,r,d,void 0,s,a),el}var xO=_O;function _O(i,e,t,n){return na(!0),e[Zt].createComment("")}function IH(i,e,t,n){let r=!T0(e,t);na(r);let o=e[Hi]?.data[TP]?.[n]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return _O(i,e);let s=e[Hi],a=B0(s,i,e,t);M0(s,n,a);let l=xC(s,n);return z0(l,a)}function SO(){xO=IH}var wr=(function(i){return i[i.NOT_STARTED=0]="NOT_STARTED",i[i.IN_PROGRESS=1]="IN_PROGRESS",i[i.COMPLETE=2]="COMPLETE",i[i.FAILED=3]="FAILED",i})(wr||{}),V2=0,PH=1,Kn=(function(i){return i[i.Placeholder=0]="Placeholder",i[i.Loading=1]="Loading",i[i.Complete=2]="Complete",i[i.Error=3]="Error",i})(Kn||{});var AH=0,Jh=1;var OH=4,RH=5;var kH=7,hu=8,FH=9,JC=(function(i){return i[i.Manual=0]="Manual",i[i.Playthrough=1]="Playthrough",i})(JC||{});function s0(i,e){let t=LH(i),n=e[t];if(n!==null){for(let r of n)r();e[t]=null}}function NH(i){s0(1,i),s0(0,i),s0(2,i)}function LH(i){let e=OH;return i===1?e=RH:i===2&&(e=FH),e}function CO(i){return i+1}function Mu(i,e){let t=i[tt],n=CO(e.index);return i[n]}function Qh(i,e){let t=CO(e.index);return i.data[t]}function UH(i,e,t){let n=e[tt],r=Qh(n,t);switch(i){case Kn.Complete:return r.primaryTmplIndex;case Kn.Loading:return r.loadingTmplIndex;case Kn.Error:return r.errorTmplIndex;case Kn.Placeholder:return r.placeholderTmplIndex;default:return null}}function G2(i,e){return e===Kn.Placeholder?i.placeholderBlockConfig?.[V2]??null:e===Kn.Loading?i.loadingBlockConfig?.[V2]??null:null}function BH(i){return i.loadingBlockConfig?.[PH]??null}function H2(i,e){if(!i||i.length===0)return e;let t=new Set(i);for(let n of e)t.add(n);return i.length===t.size?i:Array.from(t)}function zH(i,e){let t=e.primaryTmplIndex+Xt;return ou(i,t)}var VH=(()=>{class i{cachedInjectors=new Map;getOrCreateInjector(t,n,r,o){if(!this.cachedInjectors.has(t)){let s=r.length>0?ZC(r,n,o):null;this.cachedInjectors.set(t,s)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=_e({token:i,providedIn:"environment",factory:()=>new i})}return i})();var wO=new qe("");function m1(i,e,t){return i.get(VH).getOrCreateInjector(e,i,t,"")}function GH(i,e,t){if(i instanceof fu){let r=i.injector,o=i.parentInjector,s=m1(o,e,t);return new fu(r,s)}let n=i.get(Ti);if(n!==i){let r=m1(n,e,t);return new fu(i,r)}return m1(i,e,t)}function wc(i,e,t,n=!1){let r=t[Vn],o=r[tt];if(Ya(r))return;let s=Mu(r,e),a=s[Jh],l=s[kH];if(!(l!==null&&i<l)&&j2(a,i)&&j2(s[AH]??-1,i)){let c=Qh(o,e),u=!n&&!0&&(BH(c)!==null||G2(c,Kn.Loading)!==null||G2(c,Kn.Placeholder))?WH:jH;try{u(i,s,t,e,r)}catch(f){HC(r,f)}}}function HH(i,e){let t=i[To]?.findIndex(r=>r.data[AP]===e[Jh])??-1;return{dehydratedView:t>-1?i[To][t]:null,dehydratedViewIx:t}}function jH(i,e,t,n,r){tn(Wt.DeferBlockStateStart);let o=UH(i,r,n);if(o!==null){e[Jh]=i;let s=r[tt],a=o+Xt,l=ou(s,a),c=0;$C(t,c);let d;if(i===Kn.Complete){let p=Qh(s,n),v=p.providers;v&&v.length>0&&(d=GH(r[xr],p,v))}let{dehydratedView:u,dehydratedViewIx:f}=HH(t,e),h=Su(r,l,null,{injector:d,dehydratedView:u});if(Cu(t,h,c,Dc(l,u)),L0(h,2),f>-1&&t[To]?.splice(f,1),(i===Kn.Complete||i===Kn.Error)&&Array.isArray(e[hu])){for(let p of e[hu])p();e[hu]=null}}tn(Wt.DeferBlockStateEnd)}function j2(i,e){return i<e}function W2(i,e,t){i.loadingPromise.then(()=>{i.loadingState===wr.COMPLETE?wc(Kn.Complete,e,t):i.loadingState===wr.FAILED&&wc(Kn.Error,e,t)})}var WH=null;function QC(i){return typeof i=="function"&&i[Qn]!==void 0}function ew(i){return QC(i)&&typeof i.set=="function"}var tw=new qe("");function Tu(i){return!!i&&typeof i.then=="function"}function nw(i){return!!i&&typeof i.subscribe=="function"}var EO=new qe("");var iw=(()=>{class i{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n});appInits=Q(EO,{optional:!0})??[];injector=Q(Di);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=tu(this.injector,r);if(Tu(o))t.push(o);else if(nw(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});t.push(s)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{n()}).catch(r=>{this.reject(r)}),t.length===0&&n(),this.initialized=!0}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),Du=new qe("");function MO(){W_(()=>{let i="";throw new Ke(600,i)})}function TO(i){return i.isBoundToModule}var $H=10;var Ir=(()=>{class i{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Q(ia);afterRenderManager=Q(NC);zonelessEnabled=Q(Ah);rootEffectScheduler=Q(Yg);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Eo;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=Q(Ja);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(rr(t=>!t))}constructor(){Q(vs,{optional:!0})}whenStable(){let t;return new Promise(n=>{t=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{t.unsubscribe()})}_injector=Q(Ti);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,n){return this.bootstrapImpl(t,n)}bootstrapImpl(t,n,r=Di.NULL){return this._injector.get(or).run(()=>{tn(Wt.BootstrapComponentStart);let s=t instanceof H0;if(!this._injector.get(iw).done){let p="";throw new Ke(405,p)}let l;s?l=t:l=this._injector.get(j0).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=TO(l)?void 0:this._injector.get(zh),d=n||l.selector,u=l.create(r,[],d,c),f=u.location.nativeElement,h=u.injector.get(tw,null);return h?.registerApplication(f),u.onDestroy(()=>{this.detachView(u.hostView),kh(this.components,u),h?.unregisterApplication(f)}),this._loadComponent(u),tn(Wt.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){tn(Wt.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(O0.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw tn(Wt.ChangeDetectionEnd),new Ke(101,!1);let t=lt(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,lt(t),this.afterTick.next(),tn(Wt.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Ic,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<$H;){tn(Wt.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{tn(Wt.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let t=!1;if(this.dirtyFlags&7){let n=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!n&&!Dh(r))continue;let o=n&&!this.zonelessEnabled?0:1;UA(r,o),t=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}t||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:t})=>Dh(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let n=t;this._views.push(n),n.attachToAppRef(this)}detachView(t){let n=t;kh(this._views,n),n.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(t),this._injector.get(Du,[]).forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>kh(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new Ke(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function kh(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function DO(){let i,e;return{promise:new Promise((n,r)=>{i=n,e=r}),resolve:i,reject:e}}function IO(i,e,t){let n=e[xr],r=e[tt];if(i.loadingState!==wr.NOT_STARTED)return i.loadingPromise??Promise.resolve();let o=Mu(e,t),s=zH(r,i);i.loadingState=wr.IN_PROGRESS,s0(1,o);let a=i.dependencyResolverFn,l=n.get(cu).add();return a?(i.loadingPromise=Promise.allSettled(a()).then(c=>{let d=!1,u=[],f=[];for(let h of c)if(h.status==="fulfilled"){let p=h.value,v=Zs(p)||Pg(p);if(v)u.push(v);else{let g=MS(p);g&&f.push(g)}}else{d=!0;break}if(d){if(i.loadingState=wr.FAILED,i.errorTmplIndex===null){let p=new Ke(-750,!1);HC(e,p)}}else{i.loadingState=wr.COMPLETE;let h=s.tView;if(u.length>0){h.directiveRegistry=H2(h.directiveRegistry,u);let p=u.map(g=>g.type),v=Fg(!1,...p);i.providers=v}f.length>0&&(h.pipeRegistry=H2(h.pipeRegistry,f))}}),i.loadingPromise.finally(()=>{i.loadingPromise=null,l()})):(i.loadingPromise=Promise.resolve().then(()=>{i.loadingPromise=null,i.loadingState=wr.COMPLETE,l()}),i.loadingPromise)}function XH(i,e){return e[xr].get(wO,null,{optional:!0})?.behavior!==JC.Manual}function YH(i,e,t){let n=e[tt],r=e[t.index];if(!XH(i,e))return;let o=Mu(e,t),s=Qh(n,t);switch(NH(o),s.loadingState){case wr.NOT_STARTED:wc(Kn.Loading,t,r),IO(s,e,t),s.loadingState===wr.IN_PROGRESS&&W2(s,t,r);break;case wr.IN_PROGRESS:wc(Kn.Loading,t,r),W2(s,t,r);break;case wr.COMPLETE:wc(Kn.Complete,t,r);break;case wr.FAILED:wc(Kn.Error,t,r);break;default:}}async function PO(i,e,t){let n=i.get(E0);if(n.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:s}=kz(e,i);if(s.length===0)return;o!==null&&s.shift(),ZH(n,s),o!==null&&await o;let a=s[0];n.has(a)?await $2(i,s,t):n.awaitParentBlock(a,async()=>await $2(i,s,t))}async function $2(i,e,t){let n=i.get(E0),r=n.hydrating,o=i.get(Ja),s=o.add();for(let l=0;l<e.length;l++){let c=e[l],d=n.get(c);if(d!=null){if(await QH(d),await JH(i),qH(d)){MG(d),X2(e.slice(l),n);break}r.get(c).resolve()}else{KH(l,e,n),X2(e.slice(l),n);break}}let a=e[e.length-1];await r.get(a)?.promise,o.remove(s),t&&t(e),TG(n.get(a),e,n,i.get(Ir))}function qH(i){return Mu(i.lView,i.tNode)[Jh]===Kn.Error}function KH(i,e,t){let n=i-1,r=n>-1?t.get(e[n]):null;r&&G0(r.lContainer)}function X2(i,e){let t=e.hydrating;for(let n in i)t.get(n)?.reject();e.cleanup(i)}function ZH(i,e){for(let t of e)i.hydrating.set(t,DO())}function JH(i){return new Promise(e=>R0(e,{injector:i}))}async function QH(i){let{tNode:e,lView:t}=i,n=Mu(t,e);return new Promise(r=>{e6(n,r),YH(2,t,e)})}function e6(i,e){Array.isArray(i[hu])||(i[hu]=[]),i[hu].push(e)}function Pn(i,e,t,n){let r=mt(),o=qa();if(Er(r,o,e)){let s=In(),a=Ih();YV(a,r,i,e,t,n)}return Pn}function tl(){return mt()[ci][kn]}var Q1=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,o),this.attach(r,s)}else this.attach(n,o)}move(e,t){this.attach(t,this.detach(e))}};function g1(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function t6(i,e,t,n){let r,o,s=0,a=i.length-1,l=void 0;if(Array.isArray(e)){lt(n);let c=e.length-1;for(lt(null);s<=a&&s<=c;){let d=i.at(s),u=e[s],f=g1(s,d,s,u,t);if(f!==0){f<0&&i.updateValue(s,u),s++;continue}let h=i.at(a),p=e[c],v=g1(a,h,c,p,t);if(v!==0){v<0&&i.updateValue(a,p),a--,c--;continue}let g=t(s,d),m=t(a,h),b=t(s,u);if(Object.is(b,m)){let y=t(c,p);Object.is(y,g)?(i.swap(s,a),i.updateValue(a,p),c--,a--):i.move(a,s),i.updateValue(s,u),s++;continue}if(r??=new y0,o??=q2(i,s,a,t),eC(i,r,s,b))i.updateValue(s,u),s++,a++;else if(o.has(b))r.set(g,i.detach(s)),a--;else{let y=i.create(s,e[s]);i.attach(s,y),s++,a++}}for(;s<=c;)Y2(i,r,t,s,e[s]),s++}else if(e!=null){lt(n);let c=e[Symbol.iterator]();lt(null);let d=c.next();for(;!d.done&&s<=a;){let u=i.at(s),f=d.value,h=g1(s,u,s,f,t);if(h!==0)h<0&&i.updateValue(s,f),s++,d=c.next();else{r??=new y0,o??=q2(i,s,a,t);let p=t(s,f);if(eC(i,r,s,p))i.updateValue(s,f),s++,a++,d=c.next();else if(!o.has(p))i.attach(s,i.create(s,f)),s++,a++,d=c.next();else{let v=t(s,u);r.set(v,i.detach(s)),a--}}}for(;!d.done;)Y2(i,r,t,i.length,d.value),d=c.next()}for(;s<=a;)i.destroy(i.detach(a--));r?.forEach(c=>{i.destroy(c)})}function eC(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function Y2(i,e,t,n,r){if(eC(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function q2(i,e,t,n){let r=new Set;for(let o=e;o<=t;o++)r.add(n(o,i.at(o)));return r}var y0=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function pe(i,e,t,n,r,o,s,a){Ro("NgControlFlow");let l=mt(),c=In(),d=io(c.consts,o);return Gh(l,c,i,e,t,n,r,d,256,s,a),rw}function rw(i,e,t,n,r,o,s,a){Ro("NgControlFlow");let l=mt(),c=In(),d=io(c.consts,o);return Gh(l,c,i,e,t,n,r,d,512,s,a),rw}function me(i,e){Ro("NgControlFlow");let t=mt(),n=qa(),r=t[n]!==Tr?t[n]:-1,o=r!==-1?x0(t,Xt+r):void 0,s=0;if(Er(t,n,i)){let a=lt(null);try{if(o!==void 0&&$C(o,s),i!==-1){let l=Xt+i,c=x0(t,l),d=rC(t[tt],l),u=KA(c,d,t),f=Su(t,d,e,{dehydratedView:u});Cu(c,f,s,Dc(d,u))}}finally{lt(a)}}else if(o!==void 0){let a=HA(o,s);a!==void 0&&(a[kn]=e)}}var tC=class{lContainer;$implicit;$index;constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Dn}};function Iu(i){return i}function ow(i,e){return e}var nC=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function Dt(i,e,t,n,r,o,s,a,l,c,d,u,f){Ro("NgControlFlow");let h=mt(),p=In(),v=l!==void 0,g=mt(),m=a?s.bind(g[ci][kn]):s,b=new nC(v,m);g[Xt+i]=b,Gh(h,p,i+1,e,t,n,r,io(p.consts,o),256),v&&Gh(h,p,i+2,l,c,d,u,io(p.consts,f),512)}var iC=class extends Q1{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n}get length(){return this.lContainer.length-Dn}at(e){return this.getLView(e)[kn].$implicit}attach(e,t){let n=t[Hi];this.needsIndexUpdate||=e!==this.length,Cu(this.lContainer,t,e,Dc(this.templateTNode,n)),n6(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,i6(this.lContainer,e),r6(this.lContainer,e)}create(e,t){let n=Bh(this.lContainer,this.templateTNode.tView.ssrId);return Su(this.hostLView,this.templateTNode,new tC(this.lContainer,t,e),{dehydratedView:n})}destroy(e){k0(e[tt],e)}updateValue(e,t){this.getLView(e)[kn].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[kn].$index=e}getLView(e){return o6(this.lContainer,e)}};function It(i){let e=lt(null),t=ta();try{let n=mt(),r=n[tt],o=n[t],s=t+1,a=x0(n,s);if(o.liveCollection===void 0){let c=rC(r,s);o.liveCollection=new iC(a,n,c)}else o.liveCollection.reset();let l=o.liveCollection;if(t6(l,i,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=qa(),d=l.length===0;if(Er(n,c,d)){let u=t+2,f=x0(n,u);if(d){let h=rC(r,u),p=KA(f,h,n),v=Su(n,h,void 0,{dehydratedView:p});Cu(f,v,0,Dc(h,p))}else r.firstUpdatePass&&V0(f),$C(f,0)}}}finally{lt(e)}}function x0(i,e){return i[e]}function n6(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t],r=n?n[Xa]:void 0;if(n&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=n[xr];MV(o,r),Tc.delete(n[ea]),r.detachedLeaveAnimationFns=void 0}}function i6(i,e){if(i.length<=Dn)return;let t=Dn+e,n=i[t],r=n?n[Xa]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function r6(i,e){return Uh(i,e)}function o6(i,e){return HA(i,e)}function rC(i,e){return ou(i,e)}function ne(i,e,t){let n=mt(),r=qa();if(Er(n,r,e)){let o=In(),s=Ih();AA(s,n,i,e,n[Zt],t)}return ne}function oC(i,e,t,n,r){jC(e,i,t,r?"class":"style",n)}function w(i,e,t,n){let r=mt(),o=r[tt],s=i+Xt,a=o.firstCreatePass?YC(s,r,2,e,zC,zg(),t,n):o.data[s];if(fs(a)){let l=r[Mo].tracingService;if(l&&l.componentCreate){let c=o.data[a.directiveStart+a.componentOffset];return l.componentCreate(oO(c),()=>(K2(i,e,r,a,n),w))}}return K2(i,e,r,a,n),w}function K2(i,e,t,n,r){if(VC(n,t,i,e,sw),ru(n)){let o=t[tt];N0(o,t,n),_C(o,n,t)}r!=null&&Zh(t,n)}function T(){let i=In(),e=xi(),t=GC(e);return i.firstCreatePass&&qC(i,t),XS(t)&&YS(),$S(),t.classesWithoutHost!=null&&nz(t)&&oC(i,t,mt(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&iz(t)&&oC(i,t,mt(),t.stylesWithoutHost,!1),T}function Y(i,e,t,n){return w(i,e,t,n),T(),Y}function re(i,e,t,n){let r=mt(),o=r[tt],s=i+Xt,a=o.firstCreatePass?GG(s,o,2,e,t,n):o.data[s];return VC(a,r,i,e,sw),n!=null&&Zh(r,a),re}function he(){let i=xi(),e=GC(i);return XS(e)&&YS(),$S(),he}function bt(i,e,t,n){return re(i,e,t,n),he(),bt}var sw=(i,e,t,n,r)=>(na(!0),TC(e[Zt],n,n1()));function s6(i,e,t,n,r){let o=!T0(e,t);if(na(o),o)return TC(e[Zt],n,n1());let s=e[Hi],a=B0(s,i,e,t);return ZP(s,r)&&M0(s,r,a.nextSibling),s&&(vP(t)||bP(a))&&fs(t)&&(WI(t),dA(a)),a}function AO(){sw=s6}function aw(i,e,t){let n=mt(),r=n[tt],o=i+Xt,s=r.firstCreatePass?YC(o,n,8,"ng-container",zC,zg(),e,t):r.data[o];if(VC(s,n,i,"ng-container",OO),ru(s)){let a=n[tt];N0(a,n,s),_C(a,s,n)}return t!=null&&Zh(n,s),aw}function lw(){let i=In(),e=xi(),t=GC(e);return i.firstCreatePass&&qC(i,t),lw}function Pr(i,e,t){return aw(i,e,t),lw(),Pr}var OO=(i,e,t,n,r)=>(na(!0),lA(e[Zt],""));function a6(i,e,t,n,r){let o,s=!T0(e,t);if(na(s),s)return lA(e[Zt],"");let a=e[Hi],l=B0(a,i,e,t),c=Oz(a,r);return M0(a,r,l),o=z0(c,l),o}function RO(){OO=a6}function Ne(){return mt()}function di(i,e,t){let n=mt(),r=qa();if(Er(n,r,e)){let o=In(),s=Ih();OA(s,n,i,e,n[Zt],t)}return di}var Oh=void 0;function l6(i){let e=Math.floor(Math.abs(i)),t=i.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var c6=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Oh,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Oh,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",Oh,Oh,Oh],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",l6],v1={};function X0(i){let e=d6(i),t=Z2(e);if(t)return t;let n=e.split("-")[0];if(t=Z2(n),t)return t;if(n==="en")return c6;throw new Ke(701,!1)}function Z2(i){return i in v1||(v1[i]=Jr.ng&&Jr.ng.common&&Jr.ng.common.locales&&Jr.ng.common.locales[i]),v1[i]}var Ac=(function(i){return i[i.LocaleId=0]="LocaleId",i[i.DayPeriodsFormat=1]="DayPeriodsFormat",i[i.DayPeriodsStandalone=2]="DayPeriodsStandalone",i[i.DaysFormat=3]="DaysFormat",i[i.DaysStandalone=4]="DaysStandalone",i[i.MonthsFormat=5]="MonthsFormat",i[i.MonthsStandalone=6]="MonthsStandalone",i[i.Eras=7]="Eras",i[i.FirstDayOfWeek=8]="FirstDayOfWeek",i[i.WeekendRange=9]="WeekendRange",i[i.DateFormat=10]="DateFormat",i[i.TimeFormat=11]="TimeFormat",i[i.DateTimeFormat=12]="DateTimeFormat",i[i.NumberSymbols=13]="NumberSymbols",i[i.NumberFormats=14]="NumberFormats",i[i.CurrencyCode=15]="CurrencyCode",i[i.CurrencySymbol=16]="CurrencySymbol",i[i.CurrencyName=17]="CurrencyName",i[i.Currencies=18]="Currencies",i[i.Directionality=19]="Directionality",i[i.PluralCase=20]="PluralCase",i[i.ExtraData=21]="ExtraData",i})(Ac||{});function d6(i){return i.toLowerCase().replace(/_/g,"-")}var ep="en-US";var u6=ep;function kO(i){typeof i=="string"&&(u6=i.toLowerCase().replace(/_/g,"-"))}function ie(i,e,t){let n=mt(),r=In(),o=xi();return FO(r,n,n[Zt],o,i,e,t),ie}function Gn(i,e,t){let n=mt(),r=In(),o=xi();return(o.type&3||t)&&iO(o,r,n,t,n[Zt],i,e,o0(o,n,e)),Gn}function FO(i,e,t,n,r,o,s){let a=!0,l=null;if((n.type&3||s)&&(l??=o0(n,e,o),iO(n,i,e,s,t,r,o,l)&&(a=!1)),a){let c=n.outputs?.[r],d=n.hostDirectiveOutputs?.[r];if(d&&d.length)for(let u=0;u<d.length;u+=2){let f=d[u],h=d[u+1];l??=o0(n,e,o),L2(n,e,f,h,r,l)}if(c&&c.length)for(let u of c)l??=o0(n,e,o),L2(n,e,u,r,r,l)}}function M(i=1){return i2(i)}function f6(i,e){let t=null,n=uV(i);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(n===null?mA(i,o,!0):pV(n,o))return r}return t}function _i(i){let e=mt()[ci][Gi];if(!e.projection){let t=i?i.length:1,n=e.projection=II(t,null),r=n.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=i?f6(o,i):0;s!==null&&(r[s]?r[s].projectionNext=o:n[s]=o,r[s]=o)}o=o.next}}}function Si(i,e=0,t,n,r,o){let s=mt(),a=In(),l=n?i+1:null;l!==null&&Gh(s,a,l,n,r,o,null,t);let c=wu(a,Xt+i,16,null,t||null);c.projection===null&&(c.projection=e),ZS();let u=!s[Hi]||Vg();s[ci][Gi].projection[c.projection]===null&&l!==null?h6(s,a,l):u&&!Yh(c)&&LV(a,s,c)}function h6(i,e,t){let n=Xt+t,r=e.data[n],o=i[n],s=Bh(o,r.tView.ssrId),a=Su(i,r,void 0,{dehydratedView:s});Cu(o,a,0,Dc(r,s))}function nl(i,e,t,n){return mH(i,uH(e,t,n)),nl}function Oc(i=1){Hg(QI()+i)}function ro(i){let e=XI();return Lg(e,Xt+i)}function Qg(i,e){return i<<17|e<<2}function Pc(i){return i>>17&32767}function p6(i){return(i&2)==2}function m6(i,e){return i&131071|e<<17}function sC(i){return i|2}function bu(i){return(i&131068)>>2}function b1(i,e){return i&-131069|e<<2}function g6(i){return(i&1)===1}function aC(i){return i|1}function v6(i,e,t,n,r,o){let s=o?e.classBindings:e.styleBindings,a=Pc(s),l=bu(s);i[n]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||Qd(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let f=Pc(i[a+1]);i[n+1]=Qg(f,a),f!==0&&(i[f+1]=b1(i[f+1],n)),i[a+1]=m6(i[a+1],n)}else i[n+1]=Qg(a,0),a!==0&&(i[a+1]=b1(i[a+1],n)),a=n;else i[n+1]=Qg(l,0),a===0?a=n:i[l+1]=b1(i[l+1],n),l=n;c&&(i[n+1]=sC(i[n+1])),J2(i,d,n,!0),J2(i,d,n,!1),b6(e,d,i,n,o),s=Qg(a,l),o?e.classBindings=s:e.styleBindings=s}function b6(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&Qd(o,e)>=0&&(t[n+1]=aC(t[n+1]))}function J2(i,e,t,n){let r=i[t+1],o=e===null,s=n?Pc(r):bu(r),a=!1;for(;s!==0&&(a===!1||o);){let l=i[s],c=i[s+1];y6(l,e)&&(a=!0,i[s+1]=n?aC(c):sC(c)),s=n?Pc(c):bu(c)}a&&(i[t+1]=n?sC(r):aC(r))}function y6(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?Qd(i,e)>=0:!1}var Io={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function x6(i){return i.substring(Io.key,Io.keyEnd)}function _6(i){return S6(i),NO(i,LO(i,0,Io.textEnd))}function NO(i,e){let t=Io.textEnd;return t===e?-1:(e=Io.keyEnd=C6(i,Io.key=e,t),LO(i,e,t))}function S6(i){Io.key=0,Io.keyEnd=0,Io.value=0,Io.valueEnd=0,Io.textEnd=i.length}function LO(i,e,t){for(;e<t&&i.charCodeAt(e)<=32;)e++;return e}function C6(i,e,t){for(;e<t&&i.charCodeAt(e)>32;)e++;return e}function oo(i,e,t){return UO(i,e,t,!1),oo}function pt(i,e){return UO(i,e,null,!0),pt}function so(i){E6(A6,w6,i,!0)}function w6(i,e){for(let t=_6(e);t>=0;t=NO(e,t))Rg(i,x6(e),!0)}function UO(i,e,t,n){let r=mt(),o=In(),s=QS(2);if(o.firstUpdatePass&&zO(o,i,s,n),e!==Tr&&Er(r,s,e)){let a=o.data[ta()];VO(o,a,r,r[Zt],i,r[s+1]=R6(e,t),n,s)}}function E6(i,e,t,n){let r=In(),o=QS(2);r.firstUpdatePass&&zO(r,null,o,n);let s=mt();if(t!==Tr&&Er(s,o,t)){let a=r.data[ta()];if(GO(a,n)&&!BO(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=Tg(l,t||"")),oC(r,a,s,t,n)}else O6(r,a,s,s[Zt],s[o+1],s[o+1]=P6(i,e,t),n,o)}}function BO(i,e){return e>=i.expandoStartIndex}function zO(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[ta()],s=BO(i,t);GO(o,n)&&e===null&&!s&&(e=!1),e=M6(r,o,e,n),v6(r,o,e,t,s,n)}}function M6(i,e,t,n){let r=JI(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=y1(null,i,e,t,n),t=Hh(t,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||i[s]!==r)if(t=y1(r,i,e,t,n),o===null){let l=T6(i,e,n);l!==void 0&&Array.isArray(l)&&(l=y1(null,i,e,l[1],n),l=Hh(l,e.attrs,n),D6(i,e,n,l))}else o=I6(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function T6(i,e,t){let n=t?e.classBindings:e.styleBindings;if(bu(n)!==0)return i[Pc(n)]}function D6(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[Pc(r)]=n}function I6(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=i[o].hostAttrs;n=Hh(n,s,t)}return Hh(n,e.attrs,t)}function y1(i,e,t,n,r){let o=null,s=t.directiveEnd,a=t.directiveStylingLast;for(a===-1?a=t.directiveStart:a++;a<s&&(o=e[a],n=Hh(n,o.hostAttrs,r),o!==i);)a++;return i!==null&&(t.directiveStylingLast=a),n}function Hh(i,e,t){let n=t?1:2,r=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?r=s:r===n&&(Array.isArray(i)||(i=i===void 0?[]:["",i]),Rg(i,s,t?!0:e[++o]))}return i===void 0?null:i}function P6(i,e,t){if(t==null||t==="")return Mi;let n=[],r=Ao(t);if(Array.isArray(r))for(let o=0;o<r.length;o++)i(n,r[o],!0);else if(r instanceof Set)for(let o of r)i(n,o,!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&i(n,o,r[o]);else typeof r=="string"&&e(n,r);return n}function A6(i,e,t){let n=String(e);n!==""&&!n.includes(" ")&&Rg(i,n,t)}function O6(i,e,t,n,r,o,s,a){r===Tr&&(r=Mi);let l=0,c=0,d=0<r.length?r[0]:null,u=0<o.length?o[0]:null;for(;d!==null||u!==null;){let f=l<r.length?r[l+1]:void 0,h=c<o.length?o[c+1]:void 0,p=null,v;d===u?(l+=2,c+=2,f!==h&&(p=u,v=h)):u===null||d!==null&&d<u?(l+=2,p=d):(c+=2,p=u,v=h),p!==null&&VO(i,e,t,n,p,v,s,a),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}function VO(i,e,t,n,r,o,s,a){if(!(e.type&3))return;let l=i.data,c=l[a+1],d=g6(c)?Q2(l,e,t,r,bu(c),s):void 0;if(!_0(d)){_0(o)||p6(c)&&(o=Q2(l,null,t,r,a,s));let u=BS(ta(),t);BV(n,s,u,r,o)}}function Q2(i,e,t,n,r,o){let s=e===null,a;for(;r>0;){let l=i[r],c=Array.isArray(l),d=c?l[1]:l,u=d===null,f=t[r+1];f===Tr&&(f=u?Mi:void 0);let h=u?kg(f,n):d===n?f:void 0;if(c&&!_0(h)&&(h=kg(l,n)),_0(h)&&(a=h,s))return a;let p=i[r+1];r=s?Pc(p):bu(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=kg(l,n))}return a}function _0(i){return i!==void 0}function R6(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=Mg(Ao(i)))),i}function GO(i,e){return(i.flags&(e?8:16))!==0}function k(i,e=""){let t=mt(),n=In(),r=i+Xt,o=n.firstCreatePass?wu(n,r,1,e,null):n.data[r],s=HO(n,t,o,e);t[r]=s,$g()&&UC(n,t,s,o),su(o,!1)}var HO=(i,e,t,n)=>(na(!0),aA(e[Zt],n));function k6(i,e,t,n){let r=!T0(e,t);if(na(r),r)return aA(e[Zt],n);let o=e[Hi];return B0(o,i,e,t)}function jO(){HO=k6}function WO(i,e,t,n=""){return Er(i,qa(),t)?e+wh(t)+n:Tr}function Ye(i){return zt("",i),Ye}function zt(i,e,t){let n=mt(),r=WO(n,i,e,t);return r!==Tr&&F6(n,ta(),r),zt}function F6(i,e,t){let n=BS(e,i);iV(i[Zt],n,t)}function Rc(i,e,t){ew(e)&&(e=e());let n=mt(),r=qa();if(Er(n,r,e)){let o=In(),s=Ih();AA(s,n,i,e,n[Zt],t)}return Rc}function bs(i,e){let t=ew(i);return t&&i.set(e),t}function tp(i,e){let t=mt(),n=In(),r=xi();return FO(n,t,t[Zt],r,i,e),tp}function Y0(i,e,t=""){return WO(mt(),i,e,t)}function eP(i,e,t){let n=In();n.firstCreatePass&&$O(e,n.data,n.blueprint,hs(i),t)}function $O(i,e,t,n,r){if(i=yi(i),Array.isArray(i))for(let o=0;o<i.length;o++)$O(i[o],e,t,n,r);else{let o=In(),s=mt(),a=xi(),l=mc(i)?i:yi(i.provide),c=kS(i),d=a.providerIndexes&1048575,u=a.directiveStart,f=a.providerIndexes>>20;if(mc(i)||!i.multi){let h=new Mc(c,r,$t,null),p=_1(l,e,r?d:d+f,u);p===-1?(C1(u0(a,s),o,l),x1(o,i,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(h),s.push(h)):(t[p]=h,s[p]=h)}else{let h=_1(l,e,d+f,u),p=_1(l,e,d,d+f),v=h>=0&&t[h],g=p>=0&&t[p];if(r&&!g||!r&&!v){C1(u0(a,s),o,l);let m=U6(r?L6:N6,t.length,r,n,c,i);!r&&g&&(t[p].providerFactory=m),x1(o,i,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(m),s.push(m)}else{let m=XO(t[r?p:h],c,!r&&n);x1(o,i,h>-1?h:p,m)}!r&&n&&g&&t[p].componentProviders++}}}function x1(i,e,t,n){let r=mc(e),o=FI(e);if(r||o){let l=(o?yi(e.useClass):e).prototype.ngOnDestroy;if(l){let c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&e.multi){let d=c.indexOf(t);d===-1?c.push(t,[n,l]):c[d+1].push(n,l)}else c.push(t,l)}}}function XO(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function _1(i,e,t,n){for(let r=t;r<n;r++)if(e[r]===i)return r;return-1}function N6(i,e,t,n,r){return lC(this.multi,[])}function L6(i,e,t,n,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Fh(n,n[tt],this.providerFactory.index,r);s=l.slice(0,a),lC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],lC(o,s);return s}function lC(i,e){for(let t=0;t<i.length;t++){let n=i[t];e.push(n())}return e}function U6(i,e,t,n,r,o){let s=new Mc(i,t,$t,null);return s.multi=[],s.index=e,s.componentProviders=0,XO(s,r,n&&!t),s}function ao(i,e){return t=>{t.providersResolver=(n,r)=>eP(n,r?r(i):i,!1),e&&(t.viewProvidersResolver=(n,r)=>eP(n,r?r(e):e,!0))}}function cw(i,e){let t=au()+i,n=mt();return n[t]===Tr?W0(n,t,e()):HG(n,t)}function ys(i,e,t){return B6(mt(),au(),i,e,t)}function q0(i,e,t,n){return YO(mt(),au(),i,e,t,n)}function dw(i,e){let t=i[e];return t===Tr?void 0:t}function B6(i,e,t,n,r,o){let s=e+t;return Er(i,s,r)?W0(i,s+1,o?n.call(o,r):n(r)):dw(i,s+1)}function YO(i,e,t,n,r,o,s){let a=e+t;return nO(i,a,r,o)?W0(i,a+2,s?n.call(s,r,o):n(r,o)):dw(i,a+2)}function z6(i,e,t,n,r,o,s,a){let l=e+t;return jG(i,l,r,o,s)?W0(i,l+3,a?n.call(a,r,o,s):n(r,o,s)):dw(i,l+3)}function Ii(i,e){let t=In(),n,r=i+Xt;t.firstCreatePass?(n=V6(e,t.pipeRegistry),t.data[r]=n,n.onDestroy&&(t.destroyHooks??=[]).push(r,n.onDestroy)):n=t.data[r];let o=n.factory||(n.factory=Ga(n.type,!0)),s,a=Bi($t);try{let l=d0(!1),c=o();return d0(l),zS(t,mt(),r,c),c}finally{Bi(a)}}function V6(i,e){if(e)for(let t=e.length-1;t>=0;t--){let n=e[t];if(i===n.name)return n}}function Wi(i,e,t,n){let r=i+Xt,o=mt(),s=Lg(o,r);return qO(o,r)?YO(o,au(),e,s.transform,t,n,s):s.transform(t,n)}function uw(i,e,t,n,r){let o=i+Xt,s=mt(),a=Lg(s,o);return qO(s,o)?z6(s,au(),e,a.transform,t,n,r,a):a.transform(t,n,r)}function qO(i,e){return i[tt].data[e].pure}function il(i,e){return U0(i,e)}var KO=(()=>{class i{applicationErrorHandler=Q(ia);appRef=Q(Ir);taskService=Q(Ja);ngZone=Q(or);zonelessEnabled=Q(Ah);tracing=Q(vs,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ui;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(Sh):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Q(a1,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let t=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(t);return}this.switchToMicrotaskScheduler(),this.taskService.remove(t)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let t=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})})}notify(t){if(!this.zonelessEnabled&&t===5)return;switch(t){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let n=this.useMicrotaskScheduler?l2:i1;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>n(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>n(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(Sh+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){this.applicationErrorHandler(n)}finally{this.taskService.remove(t),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function ZO(){return[{provide:ls,useExisting:KO},{provide:or,useClass:Ch},{provide:Ah,useValue:!0}]}function G6(){return typeof $localize<"u"&&$localize.locale||ep}var np=new qe("",{factory:()=>Q(np,{optional:!0,skipSelf:!0})||G6()});var ip=class{destroyed=!1;listeners=null;errorHandler=Q(Zr,{optional:!0});destroyRef=Q(sr);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new Ke(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?.indexOf(e);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(e){if(this.destroyed){console.warn(Ks(953,!1));return}if(this.listeners===null)return;let t=lt(null);try{for(let n of this.listeners)try{n(e)}catch(r){this.errorHandler?.handleError(r)}}finally{lt(t)}}};function gn(i){return bI(i)}function De(i,e){return hh(i,e?.equal)}var gw={JSACTION:"__jsaction",OWNER:"__owner"},tR={};function H6(i){return i[gw.JSACTION]}function JO(i,e){i[gw.JSACTION]=e}function j6(i){return tR[i]}function W6(i,e){tR[i]=e}var ft={AUXCLICK:"auxclick",CHANGE:"change",CLICK:"click",CLICKMOD:"clickmod",CLICKONLY:"clickonly",DBLCLICK:"dblclick",FOCUS:"focus",FOCUSIN:"focusin",BLUR:"blur",FOCUSOUT:"focusout",SUBMIT:"submit",KEYDOWN:"keydown",KEYPRESS:"keypress",KEYUP:"keyup",MOUSEUP:"mouseup",MOUSEDOWN:"mousedown",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",MOUSEMOVE:"mousemove",POINTERUP:"pointerup",POINTERDOWN:"pointerdown",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERMOVE:"pointermove",POINTERCANCEL:"pointercancel",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",ERROR:"error",LOAD:"load",UNLOAD:"unload",TOUCHSTART:"touchstart",TOUCHEND:"touchend",TOUCHMOVE:"touchmove",INPUT:"input",SCROLL:"scroll",TOGGLE:"toggle",CUSTOM:"_custom"},$6=[ft.MOUSEENTER,ft.MOUSELEAVE,"pointerenter","pointerleave"],vfe=[ft.CLICK,ft.DBLCLICK,ft.FOCUSIN,ft.FOCUSOUT,ft.KEYDOWN,ft.KEYUP,ft.KEYPRESS,ft.MOUSEOVER,ft.MOUSEOUT,ft.SUBMIT,ft.TOUCHSTART,ft.TOUCHEND,ft.TOUCHMOVE,"touchcancel","auxclick","change","compositionstart","compositionupdate","compositionend","beforeinput","input","select","copy","cut","paste","mousedown","mouseup","wheel","contextmenu","dragover","dragenter","dragleave","drop","dragstart","dragend","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","gotpointercapture","lostpointercapture","ended","loadedmetadata","pagehide","pageshow","visibilitychange","beforematch"],X6=[ft.FOCUS,ft.BLUR,ft.ERROR,ft.LOAD,ft.TOGGLE],vw=i=>X6.indexOf(i)>=0;function Y6(i){return i===ft.MOUSEENTER?ft.MOUSEOVER:i===ft.MOUSELEAVE?ft.MOUSEOUT:i===ft.POINTERENTER?ft.POINTEROVER:i===ft.POINTERLEAVE?ft.POINTEROUT:i}function q6(i,e,t,n){let r=!1;vw(e)&&(r=!0);let o=typeof n=="boolean"?{capture:r,passive:n}:r;return i.addEventListener(e,t,o),{eventType:e,handler:t,capture:r,passive:n}}function K6(i,e){if(i.removeEventListener){let t=typeof e.passive=="boolean"?{capture:e.capture}:e.capture;i.removeEventListener(e.eventType,e.handler,t)}else i.detachEvent&&i.detachEvent(`on${e.eventType}`,e.handler)}function Z6(i){i.preventDefault?i.preventDefault():i.returnValue=!1}var QO=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function J6(i){return i.which===2||i.which==null&&i.button===4}function Q6(i){return QO&&i.metaKey||!QO&&i.ctrlKey||J6(i)||i.shiftKey}function e8(i,e,t){let n=i.relatedTarget;return(i.type===ft.MOUSEOVER&&e===ft.MOUSEENTER||i.type===ft.MOUSEOUT&&e===ft.MOUSELEAVE||i.type===ft.POINTEROVER&&e===ft.POINTERENTER||i.type===ft.POINTEROUT&&e===ft.POINTERLEAVE)&&(!n||n!==t&&!t.contains(n))}function t8(i,e){let t={};for(let n in i){if(n==="srcElement"||n==="target")continue;let r=n,o=i[r];typeof o!="function"&&(t[r]=o)}return i.type===ft.MOUSEOVER?t.type=ft.MOUSEENTER:i.type===ft.MOUSEOUT?t.type=ft.MOUSELEAVE:i.type===ft.POINTEROVER?t.type=ft.POINTERENTER:t.type=ft.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=i,t}var n8=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),Q0=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,n){n8&&(this.element.style.cursor="pointer"),this.handlerInfos.push(q6(this.element,e,t(this.element),n))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)K6(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},i8={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function rl(i){return i.eventType}function bw(i,e){i.eventType=e}function Z0(i){return i.event}function nR(i,e){i.event=e}function iR(i){return i.targetElement}function rR(i,e){i.targetElement=e}function oR(i){return i.eic}function r8(i,e){i.eic=e}function o8(i){return i.timeStamp}function s8(i,e){i.timeStamp=e}function J0(i){return i.eia}function sR(i,e,t){i.eia=[e,t]}function fw(i){i.eia=void 0}function K0(i){return i[1]}function a8(i){return i.eirp}function aR(i,e){i.eirp=e}function lR(i){return i.eir}function cR(i,e){i.eir=e}function dR(i){return{eventType:i.eventType,event:i.event,targetElement:i.targetElement,eic:i.eic,eia:i.eia,timeStamp:i.timeStamp,eirp:i.eirp,eiack:i.eiack,eir:i.eir}}function l8(i,e,t,n,r,o,s,a){return{eventType:i,event:e,targetElement:t,eic:n,timeStamp:r,eia:o,eirp:s,eiack:a}}var hw=class i{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return rl(this.eventInfo)}setEventType(e){bw(this.eventInfo,e)}getEvent(){return Z0(this.eventInfo)}setEvent(e){nR(this.eventInfo,e)}getTargetElement(){return iR(this.eventInfo)}setTargetElement(e){rR(this.eventInfo,e)}getContainer(){return oR(this.eventInfo)}setContainer(e){r8(this.eventInfo,e)}getTimestamp(){return o8(this.eventInfo)}setTimestamp(e){s8(this.eventInfo,e)}getAction(){let e=J0(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){fw(this.eventInfo);return}sR(this.eventInfo,e.name,e.element)}getIsReplay(){return a8(this.eventInfo)}setIsReplay(e){aR(this.eventInfo,e)}getResolved(){return lR(this.eventInfo)}setResolved(e){cR(this.eventInfo,e)}clone(){return new i(dR(this.eventInfo))}},c8={},d8=/\s*;\s*/,u8=ft.CLICK,pw=class{a11yClickSupport=!1;clickModSupport=!0;syntheticMouseEventSupport;updateEventInfoForA11yClick=void 0;preventDefaultForA11yClick=void 0;populateClickOnlyAction=void 0;constructor({syntheticMouseEventSupport:e=!1,clickModSupport:t=!0}={}){this.syntheticMouseEventSupport=e,this.clickModSupport=t}resolveEventType(e){this.clickModSupport&&rl(e)===ft.CLICK&&Q6(Z0(e))?bw(e,ft.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){lR(e)||(this.populateAction(e,iR(e)),cR(e,!0))}resolveParentAction(e){let t=J0(e),n=t&&K0(t);fw(e);let r=n&&this.getParentNode(n);r&&this.populateAction(e,r)}populateAction(e,t){let n=t;for(;n&&n!==oR(e)&&(n.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(n,e),!J0(e));)n=this.getParentNode(n);let r=J0(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(rl(e)===ft.MOUSEENTER||rl(e)===ft.MOUSELEAVE||rl(e)===ft.POINTERENTER||rl(e)===ft.POINTERLEAVE)))if(e8(Z0(e),rl(e),K0(r))){let o=t8(Z0(e),K0(r));nR(e,o),rR(e,K0(r))}else fw(e)}getParentNode(e){let t=e[gw.OWNER];if(t)return t;let n=e.parentNode;return n?.nodeName==="#document-fragment"?n?.host??null:n}populateActionOnElement(e,t){let n=this.parseActions(e),r=n[rl(t)];r!==void 0&&sR(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,n)}parseActions(e){let t=H6(e);if(!t){let n=e.getAttribute(qg.JSACTION);if(!n)t=c8,JO(e,t);else{if(t=j6(n),!t){t={};let r=n.split(d8);for(let o=0;o<r.length;o++){let s=r[o];if(!s)continue;let a=s.indexOf(i8.EVENT_ACTION_SEPARATOR),l=a!==-1,c=l?s.substr(0,a).trim():u8,d=l?s.substr(a+1).trim():s;t[c]=d}W6(n,t)}JO(e,t)}}return t}addA11yClickSupport(e,t,n){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=n}},uR=(function(i){return i[i.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",i})(uR||{}),mw=class{dispatchDelegate;actionResolver;eventReplayer;eventReplayScheduled=!1;replayEventInfoWrappers=[];constructor(e,{actionResolver:t,eventReplayer:n}={}){this.dispatchDelegate=e,this.actionResolver=t,this.eventReplayer=n}dispatch(e){let t=new hw(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let n=t.getAction();if(n&&f8(n.element,t)&&Z6(t.getEvent()),this.eventReplayer&&t.getIsReplay()){this.scheduleEventInfoWrapperReplay(t);return}this.dispatchDelegate(t)}scheduleEventInfoWrapperReplay(e){this.replayEventInfoWrappers.push(e),!this.eventReplayScheduled&&(this.eventReplayScheduled=!0,Promise.resolve().then(()=>{this.eventReplayScheduled=!1,this.eventReplayer(this.replayEventInfoWrappers)}))}};function f8(i,e){return i.tagName==="A"&&(e.getEventType()===ft.CLICK||e.getEventType()===ft.CLICKMOD)}var fR=Symbol.for("propagationStopped"),yw={REPLAY:101};var h8="`preventDefault` called during event replay.";var p8="`composedPath` called during event replay.",ev=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new pw({clickModSupport:t}),this.dispatcher=new mw(n=>{this.dispatchToDelegate(n)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&v8(e),m8(e);e.getAction();){if(b8(e),vw(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),g8(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function m8(i){let e=i.getEvent(),t=i.getEvent().stopPropagation.bind(e),n=()=>{e[fR]=!0,t()};kc(e,"stopPropagation",n),kc(e,"stopImmediatePropagation",n)}function g8(i){return!!i.getEvent()[fR]}function v8(i){let e=i.getEvent(),t=i.getTargetElement(),n=e.preventDefault.bind(e);kc(e,"target",t),kc(e,"eventPhase",yw.REPLAY),kc(e,"preventDefault",()=>{throw n(),new Error(h8+"")}),kc(e,"composedPath",()=>{throw new Error(p8+"")})}function b8(i){let e=i.getEvent(),t=i.getAction()?.element;t&&kc(e,"currentTarget",t,{configurable:!0})}function kc(i,e,t,{configurable:n=!1}={}){Object.defineProperty(i,e,{value:t,configurable:n})}function hR(i,e){i.ecrd(t=>{e.dispatch(t)},uR.I_AM_THE_JSACTION_FRAMEWORK)}function y8(i){return i?.q??[]}function x8(i){i&&(eR(i.c,i.et,i.h),eR(i.c,i.etc,i.h,!0))}function eR(i,e,t,n){for(let r=0;r<e.length;r++)i.removeEventListener(e[r],t,n)}var _8=!1,pR=(()=>{class i{static MOUSE_SPECIAL_SUPPORT=_8;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,n,r){let o=l8(t,n,n.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){aR(t,!0),this.queuedEventInfos?.push(t);return}this.dispatcher(t)}addEvent(t,n,r){if(t in this.eventHandlers||!this.containerManager||!i.MOUSE_SPECIAL_SUPPORT&&$6.indexOf(t)>=0)return;let o=(a,l,c)=>{this.handleEvent(a,l,c)};this.eventHandlers[t]=o;let s=Y6(n||t);if(s!==t){let a=this.browserEventTypeToExtraEventTypes[s]||[];a.push(t),this.browserEventTypeToExtraEventTypes[s]=a}this.containerManager.addEventListener(s,a=>l=>{o(t,l,a)},r)}replayEarlyEvents(t=window._ejsa){t&&(this.replayEarlyEventInfos(t.q),x8(t),delete window._ejsa)}replayEarlyEventInfos(t){for(let n=0;n<t.length;n++){let r=t[n],o=this.getEventTypesForBrowserEventType(r.eventType);for(let s=0;s<o.length;s++){let a=dR(r);bw(a,o[s]),this.handleEventInfo(a)}}}getEventTypesForBrowserEventType(t){let n=[];return this.eventHandlers[t]&&n.push(t),this.browserEventTypeToExtraEventTypes[t]&&n.push(...this.browserEventTypeToExtraEventTypes[t]),n}handler(t){return this.eventHandlers[t]}cleanUp(){this.containerManager?.cleanUp(),this.containerManager=null,this.eventHandlers={},this.browserEventTypeToExtraEventTypes={},this.dispatcher=null,this.queuedEventInfos=[]}registerDispatcher(t,n){this.ecrd(t,n)}ecrd(t,n){if(this.dispatcher=t,this.queuedEventInfos?.length){for(let r=0;r<this.queuedEventInfos.length;r++)this.handleEventInfo(this.queuedEventInfos[r]);this.queuedEventInfos=null}}}return i})();function mR(i,e=window){return y8(e._ejsas?.[i])}function xw(i,e=window){e._ejsas&&(e._ejsas[i]=void 0)}var iv=Symbol("InputSignalNode#UNSET"),wR=ue(R({},Jm),{transformFn:void 0,applyValueToInputSignal(i,e){ac(i,e)}});function ER(i,e){let t=Object.create(wR);t.value=i,t.transformFn=e?.transform;function n(){if(rc(t),t.value===iv){let r=null;throw new Ke(-950,r)}return t.value}return n[Qn]=t,n}function kt(i){return new ip}function gR(i,e){return ER(i,e)}function B8(i){return ER(iv,i)}var Me=(gR.required=B8,gR);function vR(i,e){return mO(e)}function z8(i,e){return gO(e)}var Pu=(vR.required=z8,vR);function MR(i,e){let t=Object.create(wR),n=new ip;t.value=i;function r(){return rc(t),bR(t.value),t.value}return r[Qn]=t,r.asReadonly=Xg.bind(r),r.set=o=>{t.equal(t.value,o)||(ac(t,o),n.emit(o))},r.update=o=>{bR(t.value),r.set(o(t.value))},r.subscribe=n.subscribe.bind(n),r.destroyRef=n.destroyRef,r}function bR(i){if(i===iv)throw new Ke(952,!1)}function yR(i,e){return MR(i,e)}function V8(i){return MR(iv,i)}var xs=(yR.required=V8,yR);var _w=new qe(""),G8=new qe("");function rp(i){return!i.moduleRef}function H8(i){let e=rp(i)?i.r3Injector:i.moduleRef.injector,t=e.get(or);return t.run(()=>{rp(i)?i.r3Injector.resolveInjectorInitializers():i.moduleRef.resolveInjectorInitializers();let n=e.get(ia),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:n})}),rp(i)){let o=()=>e.destroy(),s=i.platformInjector.get(_w);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>i.moduleRef.destroy(),s=i.platformInjector.get(_w);s.add(o),i.moduleRef.onDestroy(()=>{kh(i.allPlatformModules,i.moduleRef),r.unsubscribe(),s.delete(o)})}return W8(n,t,()=>{let o=e.get(Ja),s=o.add(),a=e.get(iw);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(np,ep);if(kO(l||ep),!e.get(G8,!0))return rp(i)?e.get(Ir):(i.allPlatformModules.push(i.moduleRef),i.moduleRef);if(rp(i)){let d=e.get(Ir);return i.rootComponent!==void 0&&d.bootstrap(i.rootComponent),d}else return j8?.(i.moduleRef,i.allPlatformModules),i.moduleRef}).finally(()=>{o.remove(s)})})})}var j8;function W8(i,e,t){try{let n=t();return Tu(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i(n)),n}}var nv=null;function $8(i=[],e){return Di.create({name:e,providers:[{provide:Mh,useValue:"platform"},{provide:_w,useValue:new Set([()=>nv=null])},...i]})}function X8(i=[]){if(nv)return nv;let e=$8(i);return nv=e,MO(),Y8(e),e}function Y8(i){let e=i.get(S0,null);tu(i,()=>{e?.forEach(t=>t())})}var tv=new WeakSet,xR="";function _R(i){return i.get(gC,kP)}function TR(){let i=[{provide:gC,useFactory:()=>{let e=!0;{let t=Q(gs);e=!!window._ejsas?.[t]}return e&&Ro("NgEventReplay"),e}}];return i.push({provide:Js,useValue:()=>{let e=Q(Ir),{injector:t}=e;if(!tv.has(e)){let n=Q(vC);if(_R(t)){HP();let r=t.get(gs),o=VP(r,(s,a,l)=>{s.nodeType===Node.ELEMENT_NODE&&(LP(s,a,l),UP(s,n))});e.onDestroy(o)}}},multi:!0},{provide:Du,useFactory:()=>{let e=Q(Ir),{injector:t}=e;return()=>{if(!_R(t)||tv.has(e))return;tv.add(e);let n=t.get(gs);e.onDestroy(()=>{tv.delete(e),xw(n)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(zP);q8(r,t);let o=t.get(vC);o.get(xR)?.forEach(BP),o.delete(xR);let s=r.instance;KP(t)?e.onDestroy(()=>s.cleanUp()):s.cleanUp()})}},multi:!0}),i}var q8=(i,e)=>{let t=e.get(gs),n=window._ejsas[t],r=i.instance=new pR(new Q0(n.c));for(let a of n.et)r.addEvent(a);for(let a of n.etc)r.addEvent(a);let o=mR(t);r.replayEarlyEventInfos(o),xw(t);let s=new ev(a=>{K8(e,a,a.currentTarget)});hR(r,s)};function K8(i,e,t){let n=(t&&t.getAttribute(Xh))??"";/d\d+/.test(n)?Z8(n,i,e,t):e.eventPhase===yw.REPLAY&&bC(e,t)}function Z8(i,e,t,n){let r=e.get(FP);r.push({event:t,currentTarget:n}),PO(e,i,J8(r))}function J8(i){return e=>{let t=new Set(e),n=[];for(let{event:r,currentTarget:o}of i){let s=o.getAttribute(Xh);t.has(s)?bC(r,o):n.push({event:r,currentTarget:o})}i.length=0,i.push(...n)}}var SR=!1;var Q8=1e4;function ej(){SR||(SR=!0,XP(),AO(),jO(),RO(),SO(),dO(),qA(),PA())}function tj(i){return i.whenStable()}function DR(){let i=[{provide:$h,useFactory:()=>{let e=!0;return e=!!Q(_u,{optional:!0})?.get(yC,null),e&&Ro("NgHydration"),e}},{provide:Js,useValue:()=>{WA(!1);let e=Q(wn);Q($h)&&(QP(e),ej())},multi:!0}];return i.push({provide:mC,useFactory:()=>Q($h)},{provide:Du,useFactory:()=>{let e=Q(ls);if(Q($h)){let t=Q(Ir);return()=>{tj(t).then(()=>{t.destroyed||(XC(t),e.notify(7))})}}return()=>{}},multi:!0}),Qs(i)}var d0e=Q8-1e3;var rv=(()=>{class i{static __NG_ELEMENT_ID__=nj}return i})();function nj(i){return ij(xi(),mt(),(i&16)===16)}function ij(i,e,t){if(fs(i)&&!t){let n=no(i.index,e);return new Qa(n,n)}else if(i.type&175){let n=e[ci];return new Qa(n,e)}return null}function IR(i){let{rootComponent:e,appProviders:t,platformProviders:n,platformRef:r}=i;tn(Wt.BootstrapApplicationStart);try{let o=r?.injector??X8(n),s=[ZO(),d2,...t||[]],a=new Vh({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return H8({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{tn(Wt.BootstrapApplicationEnd)}}function ov(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function PR(i,e){let t=Zs(i),n=e.elementInjector||eu();return new vu(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var AR=null;function lo(){return AR}function Sw(i){AR??=i}var op=class{},sv=(()=>{class i{historyGo(t){throw new Error("")}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>Q(OR),providedIn:"platform"})}return i})();var OR=(()=>{class i extends sv{_location;_history;_doc=Q(wn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return lo().getBaseHref(this._doc)}onPopState(t){let n=lo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){let n=lo().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",t,!1),()=>n.removeEventListener("hashchange",t)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:()=>new i,providedIn:"platform"})}return i})();var Ew=(function(i){return i[i.Decimal=0]="Decimal",i[i.Percent=1]="Percent",i[i.Currency=2]="Currency",i[i.Scientific=3]="Scientific",i})(Ew||{});var _s={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Au(i,e){let t=X0(i),n=t[Ac.NumberSymbols][e];if(typeof n>"u"){if(e===_s.CurrencyDecimal)return t[Ac.NumberSymbols][_s.Decimal];if(e===_s.CurrencyGroup)return t[Ac.NumberSymbols][_s.Group]}return n}function kR(i,e){return X0(i)[Ac.NumberFormats][e]}var rj=/^(\d+)?\.((\d+)(-(\d+))?)?$/,RR=22,av=".",sp="0",oj=";",sj=",",Cw="#";function aj(i,e,t,n,r,o,s=!1){let a="",l=!1;if(!isFinite(i))a=Au(t,_s.Infinity);else{let c=dj(i);s&&(c=cj(c));let d=e.minInt,u=e.minFrac,f=e.maxFrac;if(o){let b=o.match(rj);if(b===null)throw new Ke(2306,!1);let y=b[1],x=b[3],_=b[5];y!=null&&(d=ww(y)),x!=null&&(u=ww(x)),_!=null?f=ww(_):x!=null&&u>f&&(f=u)}uj(c,u,f);let h=c.digits,p=c.integerLen,v=c.exponent,g=[];for(l=h.every(b=>!b);p<d;p++)h.unshift(0);for(;p<0;p++)h.unshift(0);p>0?g=h.splice(p,h.length):(g=h,h=[0]);let m=[];for(h.length>=e.lgSize&&m.unshift(h.splice(-e.lgSize,h.length).join(""));h.length>e.gSize;)m.unshift(h.splice(-e.gSize,h.length).join(""));h.length&&m.unshift(h.join("")),a=m.join(Au(t,n)),g.length&&(a+=Au(t,r)+g.join("")),v&&(a+=Au(t,_s.Exponential)+"+"+v)}return i<0&&!l?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function FR(i,e,t){let n=kR(e,Ew.Decimal),r=lj(n,Au(e,_s.MinusSign));return aj(i,r,e,_s.Group,_s.Decimal,t)}function lj(i,e="-"){let t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=i.split(oj),r=n[0],o=n[1],s=r.indexOf(av)!==-1?r.split(av):[r.substring(0,r.lastIndexOf(sp)+1),r.substring(r.lastIndexOf(sp)+1)],a=s[0],l=s[1]||"";t.posPre=a.substring(0,a.indexOf(Cw));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===sp?t.minFrac=t.maxFrac=d+1:u===Cw?t.maxFrac=d+1:t.posSuf+=u}let c=a.split(sj);if(t.gSize=c[1]?c[1].length:0,t.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,o){let d=r.length-t.posPre.length-t.posSuf.length,u=o.indexOf(Cw);t.negPre=o.substring(0,u).replace(/'/g,""),t.negSuf=o.slice(u+d).replace(/'/g,"")}else t.negPre=e+t.posPre,t.negSuf=t.posSuf;return t}function cj(i){if(i.digits[0]===0)return i;let e=i.digits.length-i.integerLen;return i.exponent?i.exponent+=2:(e===0?i.digits.push(0,0):e===1&&i.digits.push(0),i.integerLen+=2),i}function dj(i){let e=Math.abs(i)+"",t=0,n,r,o,s,a;for((r=e.indexOf(av))>-1&&(e=e.replace(av,"")),(o=e.search(/e/i))>0?(r<0&&(r=o),r+=+e.slice(o+1),e=e.substring(0,o)):r<0&&(r=e.length),o=0;e.charAt(o)===sp;o++);if(o===(a=e.length))n=[0],r=1;else{for(a--;e.charAt(a)===sp;)a--;for(r-=o,n=[],s=0;o<=a;o++,s++)n[s]=Number(e.charAt(o))}return r>RR&&(n=n.splice(0,RR-1),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}function uj(i,e,t){if(e>t)throw new Ke(2307,!1);let n=i.digits,r=n.length-i.integerLen,o=Math.min(Math.max(e,r),t),s=o+i.integerLen,a=n[s];if(s>0){n.splice(Math.max(i.integerLen,s));for(let u=s;u<n.length;u++)n[u]=0}else{r=Math.max(0,r),i.integerLen=1,n.length=Math.max(1,s=o+1),n[0]=0;for(let u=1;u<s;u++)n[u]=0}if(a>=5)if(s-1<0){for(let u=0;u>s;u--)n.unshift(0),i.integerLen++;n.unshift(1),i.integerLen++}else n[s-1]++;for(;r<Math.max(0,o);r++)n.push(0);let l=o!==0,c=e+i.integerLen,d=n.reduceRight(function(u,f,h,p){return f=f+u,p[h]=f<10?f:f-10,l&&(p[h]===0&&h>=c?p.pop():l=!1),f>=10?1:0},0);d&&(n.unshift(d),i.integerLen++)}function ww(i){let e=parseInt(i);if(isNaN(e))throw new Ke(2305,!1);return e}var Fc=(()=>{class i{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=Q(Di);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static \u0275fac=function(n){return new(n||i)($t(Eu))};static \u0275dir=Zn({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[yu]})}return i})();function NR(i,e){return new Ke(2100,!1)}var Nc=(()=>{class i{_locale;constructor(t){this._locale=t}transform(t,n,r){if(!fj(t))return null;r||=this._locale;try{let o=hj(t);return FR(o,r,n)}catch(o){throw NR(i,o.message)}}static \u0275fac=function(n){return new(n||i)($t(np,16))};static \u0275pipe=$0({name:"number",type:i,pure:!0})}return i})();function fj(i){return!(i==null||i===""||i!==i)}function hj(i){if(typeof i=="string"&&!isNaN(Number(i)-parseFloat(i)))return Number(i);if(typeof i!="number")throw new Ke(2309,!1);return i}var Mw=(()=>{class i{transform(t,n,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw NR(i,t);return t.slice(n,r)}static \u0275fac=function(n){return new(n||i)};static \u0275pipe=$0({name:"slice",type:i,pure:!1})}return i})();var qt=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({})}return i})();function ap(i,e){e=encodeURIComponent(e);for(let t of i.split(";")){let n=t.indexOf("="),[r,o]=n==-1?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var Lc=class{};var LR="browser";var lp=class{_doc;constructor(e){this._doc=e}manager},cv=(()=>{class i extends lp{constructor(t){super(t)}supports(t){return!0}addEventListener(t,n,r,o){return t.addEventListener(n,r,o),()=>this.removeEventListener(t,n,r,o)}removeEventListener(t,n,r,o){return t.removeEventListener(n,r,o)}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),fv=new qe(""),Pw=(()=>{class i{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,n){this._zone=n,t.forEach(s=>{s.manager=this});let r=t.filter(s=>!(s instanceof cv));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof cv);o&&this._plugins.push(o)}addEventListener(t,n,r,o){return this._findPluginFor(n).addEventListener(t,n,r,o)}getZone(){return this._zone}_findPluginFor(t){let n=this._eventNameToPlugin.get(t);if(n)return n;if(n=this._plugins.find(o=>o.supports(t)),!n)throw new Ke(5101,!1);return this._eventNameToPlugin.set(t,n),n}static \u0275fac=function(n){return new(n||i)(Xe(fv),Xe(or))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Tw="ng-app-id";function UR(i){for(let e of i)e.remove()}function BR(i,e){let t=e.createElement("style");return t.textContent=i,t}function mj(i,e,t,n){let r=i.head?.querySelectorAll(`style[${Tw}="${e}"],link[${Tw}="${e}"]`);if(r)for(let o of r)o.removeAttribute(Tw),o instanceof HTMLLinkElement?n.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&t.set(o.textContent,{usage:0,elements:[o]})}function Iw(i,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",i),t}var Aw=(()=>{class i{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,n,r,o={}){this.doc=t,this.appId=n,this.nonce=r,mj(t,n,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,n){for(let r of t)this.addUsage(r,this.inline,BR);n?.forEach(r=>this.addUsage(r,this.external,Iw))}removeStyles(t,n){for(let r of t)this.removeUsage(r,this.inline);n?.forEach(r=>this.removeUsage(r,this.external))}addUsage(t,n,r){let o=n.get(t);o?o.usage++:n.set(t,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(t,this.doc)))})}removeUsage(t,n){let r=n.get(t);r&&(r.usage--,r.usage<=0&&(UR(r.elements),n.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])UR(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(t,BR(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(t,Iw(n,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,n){return this.nonce&&n.setAttribute("nonce",this.nonce),t.appendChild(n)}static \u0275fac=function(n){return new(n||i)(Xe(wn),Xe(gs),Xe(C0,8),Xe(Wh))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),Dw={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Ow=/%COMP%/g;var VR="%COMP%",gj=`_nghost-${VR}`,vj=`_ngcontent-${VR}`,bj=!0,yj=new qe("",{factory:()=>bj});function xj(i){return vj.replace(Ow,i)}function _j(i){return gj.replace(Ow,i)}function GR(i,e){return e.map(t=>t.replace(Ow,i))}var Rw=(()=>{class i{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(t,n,r,o,s,a,l=null,c=null){this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=c,this.defaultRenderer=new cp(t,s,a,this.tracingService)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,n);return r instanceof uv?r.applyToHost(t):r instanceof dp&&r.applyStyles(),r}getOrCreateRenderer(t,n){let r=this.rendererByCompId,o=r.get(n.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.tracingService;switch(n.encapsulation){case Po.Emulated:o=new uv(l,c,n,this.appId,d,s,a,u);break;case Po.ShadowDom:return new dv(l,t,n,s,a,this.nonce,u,c);case Po.ExperimentalIsolatedShadowDom:return new dv(l,t,n,s,a,this.nonce,u);default:o=new dp(l,c,n,d,s,a,u);break}r.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(n){return new(n||i)(Xe(Pw),Xe(Aw),Xe(gs),Xe(yj),Xe(wn),Xe(or),Xe(C0),Xe(vs,8))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),cp=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,n,r){this.eventManager=e,this.doc=t,this.ngZone=n,this.tracingService=r}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Dw[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(zR(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(zR(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){t.remove()}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new Ke(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let o=Dw[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=Dw[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(ms.DashCase|ms.Important)?e.style.setProperty(t,n,r&ms.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&ms.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n,r){if(typeof e=="string"&&(e=lo().getGlobalEventTarget(this.doc,e),!e))throw new Ke(5102,!1);let o=this.decoratePreventDefault(n);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,t,o)),this.eventManager.addEventListener(e,t,o,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;e(t)===!1&&t.preventDefault()}}};function zR(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var dv=class extends cp{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,n,r,o,s,a,l){super(e,r,o,a),this.hostEl=t,this.sharedStylesHost=l,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let c=n.styles;c=GR(n.id,c);for(let u of c){let f=document.createElement("style");s&&f.setAttribute("nonce",s),f.textContent=u,this.shadowRoot.appendChild(f)}let d=n.getExternalStyles?.();if(d)for(let u of d){let f=Iw(u,r);s&&f.setAttribute("nonce",s),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},dp=class extends cp{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,n,r,o,s,a,l){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=n.styles;this.styles=l?GR(l,c):c,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Tc.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},uv=class extends dp{contentAttr;hostAttr;constructor(e,t,n,r,o,s,a,l){let c=r+"-"+n.id;super(e,t,n,o,s,a,l,c),this.contentAttr=xj(c),this.hostAttr=_j(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}};var hv=class i extends op{supportsDOMEvents=!0;static makeCurrent(){Sw(new i)}onAndCancel(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t=t||this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=Sj();return t==null?null:Cj(t)}resetBaseElement(){up=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return ap(document.cookie,e)}},up=null;function Sj(){return up=up||document.head.querySelector("base"),up?up.getAttribute("href"):null}function Cj(i){return new URL(i,document.baseURI).pathname}var wj=(()=>{class i{build(){return new XMLHttpRequest}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})(),HR=["alt","control","meta","shift"],Ej={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Mj={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},jR=(()=>{class i extends lp{constructor(t){super(t)}supports(t){return i.parseEventName(t)!=null}addEventListener(t,n,r,o){let s=i.parseEventName(n),a=i.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>lo().onAndCancel(t,s.domEventName,a,o))}static parseEventName(t){let n=t.toLowerCase().split("."),r=n.shift();if(n.length===0||!(r==="keydown"||r==="keyup"))return null;let o=i._normalizeKey(n.pop()),s="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),s="code."),HR.forEach(c=>{let d=n.indexOf(c);d>-1&&(n.splice(d,1),s+=c+".")}),s+=o,n.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(t,n){let r=Ej[t.key]||t.key,o="";return n.indexOf("code.")>-1&&(r=t.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),HR.forEach(s=>{if(s!==r){let a=Mj[s];a(t)&&(o+=s+".")}}),o+=r,o===n)}static eventCallback(t,n,r){return o=>{i.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>n(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac})}return i})();async function kw(i,e){return IR(Tj(i,e))}function Tj(i,e){return{platformRef:e?.platformRef,appProviders:[...Oj,...i?.providers??[]],platformProviders:Aj}}function Dj(){hv.makeCurrent()}function Ij(){return new Zr}function Pj(){return uC(document),document}var Aj=[{provide:Wh,useValue:LR},{provide:S0,useValue:Dj,multi:!0},{provide:wn,useFactory:Pj}];var Oj=[{provide:Mh,useValue:"root"},{provide:Zr,useFactory:Ij},{provide:fv,useClass:cv,multi:!0},{provide:fv,useClass:jR,multi:!0},Rw,Aw,Pw,{provide:Ic,useExisting:Rw},{provide:Lc,useClass:wj},[]];var uo=class i{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
|
|
5
|
-
`).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=t.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var mv=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}},gv=class{encodeKey(e){return WR(e)}encodeValue(e){return WR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Rj(i,e){let t=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var kj=/%(\d[a-f0-9])/gi,Fj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function WR(i){return encodeURIComponent(i).replace(kj,(e,t)=>Fj[t]??e)}function pv(i){return`${i}`}var co=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new gv,e.fromString){if(e.fromObject)throw new Ke(2805,!1);this.map=Rj(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(pv):[pv(n)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{t.push({param:n,value:o,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(pv(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(pv(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function Nj(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function $R(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function XR(i){return typeof Blob<"u"&&i instanceof Blob}function YR(i){return typeof FormData<"u"&&i instanceof FormData}function Lj(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var qR="Content-Type",KR="Accept",ZR="text/plain",JR="application/json",Uj=`${JR}, ${ZR}, */*`,Ou=class i{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,n,r){this.url=t,this.method=e.toUpperCase();let o;if(Nj(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new Ke(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new uo,this.context??=new mv,!this.params)this.params=new co,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||$R(this.body)||XR(this.body)||YR(this.body)||Lj(this.body)?this.body:this.body instanceof co?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||YR(this.body)?null:XR(this.body)?this.body.type||null:$R(this.body)?null:typeof this.body=="string"?ZR:this.body instanceof co?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?JR:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((E,D)=>E.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((E,D)=>E.set(D,e.setParams[D]),x)),new i(t,n,g,{params:x,headers:y,context:_,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Uc=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(Uc||{}),Ru=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new uo,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},vv=class i extends Ru{constructor(e={}){super(e)}type=Uc.ResponseHeader;clone(e={}){return new i({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},ku=class i extends Ru{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Uc.Response;clone(e={}){return new i({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},ol=class extends Ru{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},Bj=200,zj=204;var Vj=new qe("");var Gj=/^\)\]\}',?\n/;var Nw=(()=>{class i{xhrFactory;tracingService=Q(vs,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new Ke(-2800,!1);let n=this.xhrFactory;return ss(null).pipe(sS(()=>new En(o=>{let s=n.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(KR)||s.setRequestHeader(KR,Uj),!t.headers.has(qR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(qR,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new uo(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new vv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),x=null;m!==zj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Bj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let E=x;x=x.replace(Gj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=E,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new ku({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new ol({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ol({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(b)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ol({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(b)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let m={type:Uc.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),t.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),o.next(m)}),v=this.maybePropagateTrace(g=>{let m={type:Uc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",f),s.addEventListener("abort",u),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:Uc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(n){return new(n||i)(Xe(Lc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Hj(i,e){return e(i)}function jj(i,e,t){return(n,r)=>tu(t,()=>e(n,o=>i(o,r)))}var Lw=new qe("",{factory:()=>[]}),Uw=new qe(""),QR=new qe("",{factory:()=>!0});var Bw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(Nw),r},providedIn:"root"})}return i})();var bv=(()=>{class i{backend;injector;chain=null;pendingTasks=Q(cu);contributeToStability=Q(QR);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(Lw),...this.injector.get(Uw,[])]));this.chain=n.reduceRight((r,o)=>jj(r,o,this.injector),Hj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(vh(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(Xe(Bw),Xe(Ti))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(bv),r},providedIn:"root"})}return i})();function Fw(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,credentials:i.credentials,transferCache:i.transferCache,timeout:i.timeout,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,integrity:i.integrity,referrer:i.referrer,referrerPolicy:i.referrerPolicy}}var yv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Ou)o=t;else{let l;r.headers instanceof uo?l=r.headers:l=new uo(r.headers);let c;r.params&&(r.params instanceof co?c=r.params:c=new co({fromObject:r.params})),o=new Ou(t,n,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let s=ss(o).pipe(oS(l=>this.handler.handle(l)));if(t instanceof Ou||r.observe==="events")return s;let a=s.pipe(rS(l=>l instanceof ku));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Ke(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ke(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ke(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ke(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new co().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,Fw(r,n))}post(t,n,r={}){return this.request("POST",t,Fw(r,n))}put(t,n,r={}){return this.request("PUT",t,Fw(r,n))}static \u0275fac=function(n){return new(n||i)(Xe(zw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Wj=new qe("",{factory:()=>!0}),$j="XSRF-TOKEN",Xj=new qe("",{factory:()=>$j}),Yj="X-XSRF-TOKEN",qj=new qe("",{factory:()=>Yj}),Kj=(()=>{class i{cookieName=Q(Xj);doc=Q(wn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ap(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ek=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(Kj),r},providedIn:"root"})}return i})();function Zj(i,e){if(!Q(Wj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Q(sv).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Q(ek).getToken(),n=Q(qj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Vw=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i})(Vw||{});function Jj(i,e){return{\u0275kind:i,\u0275providers:e}}function Gw(...i){let e=[yv,bv,{provide:zw,useExisting:bv},{provide:Bw,useFactory:()=>Q(Vj,{optional:!0})??Q(Nw)},{provide:Lw,useValue:Zj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Qs(e)}function Hw(i){return Jj(Vw.Interceptors,i.map(e=>({provide:Lw,useValue:e,multi:!0})))}var Qj=new qe(""),eW="b",tW="h",nW="s",iW="st",rW="u",oW="rt",jw=new qe(""),sW=["GET","HEAD"];function ik(i,e){let s=e,{isCacheActive:t}=s,n=en(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!sW.includes(o)||!n.includeRequestsWithAuthHeaders&&cW(i)||n.filter?.(i)===!1)}function rk(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function aW(i,e,t,n){let{transferCache:r}=i;if(!ik(i,e))return null;if(n)throw new Ke(2803,!1);let o=i.url,s=ok(i,o),a=t.get(s,null),l=rk(e,r);if(a){let{[eW]:c,[oW]:d,[tW]:u,[nW]:f,[iW]:h,[rW]:p}=a,v=c;switch(d){case"arraybuffer":v=nk(c);break;case"blob":v=new Blob([nk(c)]);break}let g=new uo(u);return new ku({body:v,headers:g,status:f,statusText:h,url:p})}return null}function lW(i,e){let t=Q(jw),n=Q(_u),r=Q(Qj,{optional:!0}),o=aW(i,t,n,r);if(o)return ss(o);let{transferCache:s}=i,a=rk(t,s),l=i.url,c=ok(i,l);return ik(i,t),e(i)}function cW(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function tk(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function ok(i,e){let{params:t,method:n,responseType:r}=i,o=tk(t),s=i.serializeBody();s instanceof URLSearchParams?s=tk(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=dW(a);return l}function dW(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function nk(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function sk(i){return[{provide:jw,useFactory:()=>(Ro("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:Uw,useValue:lW,multi:!0},{provide:Du,multi:!0,useFactory:()=>{let e=Q(Ir),t=Q(jw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var fp=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(uW),r},providedIn:"root"})}return i})(),uW=(()=>{class i extends fp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Oo.NONE:return n;case Oo.HTML:return sa(n,"HTML")?Ao(n):I0(this._doc,String(n)).toString();case Oo.STYLE:return sa(n,"Style")?Ao(n):n;case Oo.SCRIPT:if(sa(n,"Script"))return Ao(n);throw new Ke(5200,!1);case Oo.URL:return sa(n,"URL")?Ao(n):qh(String(n));case Oo.RESOURCE_URL:if(sa(n,"ResourceURL"))return Ao(n);throw new Ke(5201,!1);default:throw new Ke(5202,!1)}}bypassSecurityTrustHtml(t){return SC(t)}bypassSecurityTrustStyle(t){return CC(t)}bypassSecurityTrustScript(t){return wC(t)}bypassSecurityTrustUrl(t){return EC(t)}bypassSecurityTrustResourceUrl(t){return MC(t)}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),xv=(function(i){return i[i.NoHttpTransferCache=0]="NoHttpTransferCache",i[i.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",i[i.I18nSupport=2]="I18nSupport",i[i.EventReplay=3]="EventReplay",i[i.IncrementalHydration=4]="IncrementalHydration",i})(xv||{});function fW(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function ak(){return fW(xv.EventReplay,TR())}function lk(...i){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of i)t.add(o),r.length&&e.push(r);let n=t.has(xv.HttpTransferCacheOptions);return Qs([[],[],DR(),t.has(xv.NoHttpTransferCache)||n?[]:sk({}),e])}var Fu=class i{loadingCount=N(0);isLoading=De(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function _v(i){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!i)return"Unhandled error";let t=i?.error,n=e(t?.errors);if(n)return n;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(i)&&i.length>0)return e(i)||"Unhandled error";let o=e(i?.messages);if(o)return o;if(typeof i?.messages=="string"&&i.messages.trim())return i.messages;if(typeof i?.message=="string"&&i.message.trim())return i.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let s=[];for(let a in t.errors)Object.prototype.hasOwnProperty.call(t.errors,a)&&s.push(...t.errors[a]??[]);if(s.length)return s.join(", ")}return i?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var da=class i{toastsSignal=N([]);toasts=De(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${n}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var hp=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof ol&&this.showError(e)}showError(e){return this.toasterService.showError(_v(e)),Va(()=>e)}static \u0275fac=function(t){return new(t||i)(Xe(da))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var ck=(i,e)=>{let t=Q(hp),n=Q(Fu),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(fc(s=>(r||t.handleError(s),r?ss(null):Va(()=>s))),vh(()=>{o&&n.hide()}))};var dk=[ck];var uk={apiUrl:"https://pixeasy-api-esaca7hvgdfxgmcn.westus3-01.azurewebsites.net/api/"};var Sv=new qe("ENV"),Cye=new qe("LOADER_DELAY");var fk={provide:Sv,useValue:uk};function hk(){return[s1(),lk(ak()),Gw(Hw(dk)),fk,Fu]}var Ck=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)($t(la),$t(Mr))};static \u0275dir=Zn({type:i})}return i})(),yp=(()=>{class i extends Ck{static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Dr]})}return i})(),sl=new qe(""),mW={provide:sl,useExisting:zi(()=>Kw),multi:!0},Kw=(()=>{class i extends yp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([mW]),Dr]})}return i})(),gW={provide:sl,useExisting:zi(()=>Uu),multi:!0};function vW(){let i=lo()?lo().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var bW=new qe(""),Uu=(()=>{class i extends Ck{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!vW())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)($t(la),$t(Mr),$t(bW,8))};static \u0275dir=Zn({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[ao([gW]),Dr]})}return i})();var Zw=new qe(""),yW=new qe("");function xW(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function _W(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function pk(i){return null}function wk(i){return i!=null}function Ek(i){return Tu(i)?gh(i):i}function Mk(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function Tk(i,e){return e.map(t=>t(i))}function SW(i){return!i.validate}function Dk(i){return i.map(e=>SW(e)?e:t=>e.validate(t))}function CW(i){if(!i)return null;let e=i.filter(wk);return e.length==0?null:function(t){return Mk(Tk(t,e))}}function Ik(i){return i!=null?CW(Dk(i)):null}function wW(i){if(!i)return null;let e=i.filter(wk);return e.length==0?null:function(t){let n=Tk(t,e).map(Ek);return iS(n).pipe(rr(Mk))}}function Pk(i){return i!=null?wW(Dk(i)):null}function mk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function EW(i){return i._rawValidators}function MW(i){return i._rawAsyncValidators}function Ww(i){return i?Array.isArray(i)?i:[i]:[]}function wv(i,e){return Array.isArray(i)?i.includes(e):i===e}function gk(i,e){let t=Ww(e);return Ww(i).forEach(r=>{wv(t,r)||t.push(r)}),t}function vk(i,e){return Ww(e).filter(t=>!wv(i,t))}var Ev=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Ik(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Pk(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},$w=class extends Ev{name;get formDirective(){return null}get path(){return null}},bp=class extends Ev{_parent=null;name=null;valueAccessor=null},Xw=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var al=(()=>{class i extends Xw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)($t(bp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&pt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[Dr]})}return i})();var pp="VALID",Cv="INVALID",Nu="PENDING",mp="DISABLED",Bc=class{},Mv=class extends Bc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},gp=class extends Bc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},vp=class extends Bc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Lu=class extends Bc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Yw=class extends Bc{source;constructor(e){super(),this.source=e}};function TW(i){return(Tv(i)?i.validators:i)||null}function DW(i){return Array.isArray(i)?Ik(i):i||null}function IW(i,e){return(Tv(e)?e.asyncValidators:i)||null}function PW(i){return Array.isArray(i)?Pk(i):i||null}function Tv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var qw=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return gn(this.statusReactive)}set status(e){gn(()=>this.statusReactive.set(e))}_status=De(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===pp}get invalid(){return this.status===Cv}get pending(){return this.status==Nu}get disabled(){return this.status===mp}get enabled(){return this.status!==mp}errors;get pristine(){return gn(this.pristineReactive)}set pristine(e){gn(()=>this.pristineReactive.set(e))}_pristine=De(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return gn(this.touchedReactive)}set touched(e){gn(()=>this.touchedReactive.set(e))}_touched=De(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new Eo;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(gk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(gk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(vk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(vk(e,this._rawAsyncValidators))}hasValidator(e){return wv(this._rawValidators,e)}hasAsyncValidator(e){return wv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new vp(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new vp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new gp(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new gp(!0,n))}markAsPending(e={}){this.status=Nu;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Lu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=mp,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Mv(this.value,n)),this._events.next(new Lu(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=pp,this._forEachChild(n=>{n.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pp||this.status===Nu)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Mv(this.value,t)),this._events.next(new Lu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?mp:pp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Nu,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=Ek(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Lu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new yr,this.statusChanges=new yr}_calculateStatus(){return this._allControlsDisabled()?mp:this.errors?Cv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Nu)?Nu:this._anyControlsHaveStatus(Cv)?Cv:pp}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new gp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new vp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Tv(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=DW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=PW(this._rawAsyncValidators)}};var Ak=new qe("",{factory:()=>Jw}),Jw="always";function AW(i,e){return[...e.path,i]}function OW(i,e,t=Jw){kW(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),FW(i,e),LW(i,e),NW(i,e),RW(i,e)}function bk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function RW(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function kW(i,e){let t=EW(i);e.validator!==null?i.setValidators(mk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=MW(i);e.asyncValidator!==null?i.setAsyncValidators(mk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();bk(e._rawValidators,r),bk(e._rawAsyncValidators,r)}function FW(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Ok(i,e)})}function NW(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Ok(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Ok(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function LW(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function UW(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function BW(i){return Object.getPrototypeOf(i.constructor)===yp}function zW(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Uu?t=o:BW(o)?n=o:r=o}),r||n||t||null}function yk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function xk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var VW=class extends qw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(TW(t),IW(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Tv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(xk(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new Yw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){yk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){yk(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){xk(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var GW={provide:bp,useExisting:zi(()=>ua)},_k=Promise.resolve(),ua=(()=>{class i extends bp{_changeDetectorRef;callSetDisabledState;control=new VW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yr;constructor(t,n,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=zW(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),UW(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){OW(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){_k.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&ov(n);_k.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?AW(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)($t($w,9),$t(Zw,10),$t(yW,10),$t(sl,10),$t(rv,8),$t(Ak,8))};static \u0275dir=Zn({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ao([GW]),Dr,yu]})}return i})();var HW={provide:sl,useExisting:zi(()=>xp),multi:!0},xp=(()=>{class i extends yp{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([HW]),Dr]})}return i})();var jW={provide:sl,useExisting:zi(()=>Dv),multi:!0};function Rk(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function WW(i){return i.split(":")[0]}var Dv=(()=>{class i extends yp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Q(Ir).injector;destroyRef=Q(sr);cdr=Q(rv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,R0({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let n=this._getOptionId(t),r=Rk(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=WW(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([jW]),Dr]})}return i})(),kk=(()=>{class i{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(Rk(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(n){return new(n||i)($t(Mr),$t(la),$t(Dv,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),$W={provide:sl,useExisting:zi(()=>Fk),multi:!0};function Sk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function XW(i){return i.split(":")[0]}var Fk=(()=>{class i extends yp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));n=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else n=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],o=n.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let l=s[a],c=this._getOptionValue(l.value);r.push(c)}}else{let s=n.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=XW(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([$W]),Dr]})}return i})(),Nk=(()=>{class i{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(Sk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Sk(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)($t(Mr),$t(la),$t(Fk,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function Lk(i){return typeof i=="number"?i:parseFloat(i)}var Uk=(()=>{class i{_validator=pk;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):pk,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||i)};static \u0275dir=Zn({type:i,features:[yu]})}return i})(),YW={provide:Zw,useExisting:zi(()=>_p),multi:!0},_p=(()=>{class i extends Uk{max;inputName="max";normalizeInput=t=>Lk(t);createValidator=t=>_W(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[ao([YW]),Dr]})}return i})(),qW={provide:Zw,useExisting:zi(()=>Sp),multi:!0},Sp=(()=>{class i extends Uk{min;inputName="min";normalizeInput=t=>Lk(t);createValidator=t=>xW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[ao([qW]),Dr]})}return i})();var KW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({})}return i})();var fo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Ak,useValue:t.callSetDisabledState??Jw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({imports:[KW]})}return i})();var _l={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Sl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},hF=0,kE=1,pF=2;var Xp=1,mF=2,gf=3,Xi=0,Ki=1,Es=2,Ms=0,Wc=1,FE=2,NE=3,LE=4,gF=5,ml=100,vF=101,bF=102,yF=103,xF=104,_F=200,SF=201,CF=202,wF=203,Qv=204,eb=205,EF=206,MF=207,TF=208,DF=209,IF=210,PF=211,AF=212,OF=213,RF=214,Eb=0,Mb=1,Tb=2,$c=3,Db=4,Ib=5,Pb=6,Ab=7,Ob=0,kF=1,FF=2,Bo=0,UE=1,BE=2,zE=3,td=4,VE=5,GE=6,HE=7;var SE=300,Cl=301,nd=302,Rb=303,kb=304,Yp=306,tf=1e3,Oi=1001,tb=1002,hi=1003,NF=1004;var qp=1005;var jn=1006,Fb=1007;var go=1008;var lr=1009,jE=1010,WE=1011,vf=1012,Nb=1013,zo=1014,Vo=1015,Ts=1016,Lb=1017,Ub=1018,bf=1020,$E=35902,XE=35899,YE=1021,qE=1022,vo=1023,Ss=1026,wl=1027,KE=1028,Bb=1029,id=1030,zb=1031;var Vb=1033,Kp=33776,Zp=33777,Jp=33778,Qp=33779,Gb=35840,Hb=35841,jb=35842,Wb=35843,$b=36196,Xb=37492,Yb=37496,qb=37488,Kb=37489,Zb=37490,Jb=37491,Qb=37808,ey=37809,ty=37810,ny=37811,iy=37812,ry=37813,oy=37814,sy=37815,ay=37816,ly=37817,cy=37818,dy=37819,uy=37820,fy=37821,hy=36492,py=36494,my=36495,gy=36283,vy=36284,by=36285,yy=36286;var Pp=2300,nb=2301,Jv=2302,CE=2400,wE=2401,EE=2402;var LF=3200;var xy=0,UF=1,wa="",bn="srgb",Xc="srgb-linear",Ap="linear",on="srgb";var jc=7680;var ME=519,BF=512,zF=513,VF=514,_y=515,GF=516,HF=517,Sy=518,jF=519,TE=35044;var ZE="300 es",Lo=2e3,Op=2001;function JE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function ZW(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function nf(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function WF(){let i=nf("canvas");return i.style.display="block",i}var Bk={},rf=null;function QE(...i){let e="THREE."+i.shift();rf?rf("log",e,...i):console.log(e,...i)}function ht(...i){let e="THREE."+i.shift();rf?rf("warn",e,...i):console.warn(e,...i)}function yt(...i){let e="THREE."+i.shift();rf?rf("error",e,...i):console.error(e,...i)}function of(...i){let e=i.join(" ");e in Bk||(Bk[e]=!0,ht(...i))}function $F(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var Cs=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Pi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],zk=1234567,Dp=Math.PI/180,sf=180/Math.PI;function yf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Pi[i&255]+Pi[i>>8&255]+Pi[i>>16&255]+Pi[i>>24&255]+"-"+Pi[e&255]+Pi[e>>8&255]+"-"+Pi[e>>16&15|64]+Pi[e>>24&255]+"-"+Pi[t&63|128]+Pi[t>>8&255]+"-"+Pi[t>>16&255]+Pi[t>>24&255]+Pi[n&255]+Pi[n>>8&255]+Pi[n>>16&255]+Pi[n>>24&255]).toLowerCase()}function Ht(i,e,t){return Math.max(e,Math.min(t,i))}function eM(i,e){return(i%e+e)%e}function JW(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function QW(i,e,t){return i!==e?(t-i)/(e-i):0}function Ip(i,e,t){return(1-t)*i+t*e}function e9(i,e,t,n){return Ip(i,e,1-Math.exp(-t*n))}function t9(i,e=1){return e-Math.abs(eM(i,e*2)-e)}function n9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function i9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function r9(i,e){return i+Math.floor(Math.random()*(e-i+1))}function o9(i,e){return i+Math.random()*(e-i)}function s9(i){return i*(.5-Math.random())}function a9(i){i!==void 0&&(zk=i);let e=zk+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function l9(i){return i*Dp}function c9(i){return i*sf}function d9(i){return(i&i-1)===0&&i!==0}function u9(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function f9(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function h9(i,e,t,n,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+n)/2),d=s((e+n)/2),u=o((e-n)/2),f=s((e-n)/2),h=o((n-e)/2),p=s((n-e)/2);switch(r){case"XYX":i.set(a*d,l*u,l*f,a*c);break;case"YZY":i.set(l*f,a*d,l*u,a*c);break;case"ZXZ":i.set(l*u,l*f,a*d,a*c);break;case"XZX":i.set(a*d,l*p,l*h,a*c);break;case"YXY":i.set(l*h,a*d,l*p,a*c);break;case"ZYZ":i.set(l*p,l*h,a*d,a*c);break;default:ht("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Ju(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function $i(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var nn={DEG2RAD:Dp,RAD2DEG:sf,generateUUID:yf,clamp:Ht,euclideanModulo:eM,mapLinear:JW,inverseLerp:QW,lerp:Ip,damp:e9,pingpong:t9,smoothstep:n9,smootherstep:i9,randInt:r9,randFloat:o9,randFloatSpread:s9,seededRandom:a9,degToRad:l9,radToDeg:c9,isPowerOfTwo:d9,ceilPowerOfTwo:u9,floorPowerOfTwo:f9,setQuaternionFromProperEuler:h9,normalize:$i,denormalize:Ju},gt=class i{constructor(e=0,t=0){i.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ht(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*r+e.x,this.y=o*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},mo=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,s,a){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[s+0],h=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,s){let a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[s],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(r/2),u=a(o/2),f=l(n/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:ht("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=n+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(n>a&&n>u){let h=2*Math.sqrt(1+n-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-n-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ht(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-n*c,this._z=o*d+s*c+n*l-r*a,this._w=s*d-n*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(n=-n,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},G=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Vk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Vk.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*n),d=2*(a*t-o*r),u=2*(o*n-s*t);return this.x=t+l*c+s*u-a*d,this.y=n+l*d+a*c-o*u,this.z=r+l*u+o*d-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-n*l,this.z=n*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Qw.copy(this).projectOnVector(e),this.sub(Qw)}reflect(e){return this.sub(Qw.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ht(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},Qw=new G,Vk=new mo,At=class i{constructor(e,t,n,r,o,s,a,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c)}set(e,t,n,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],c=n[1],d=n[4],u=n[7],f=n[2],h=n[5],p=n[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],x=r[7],_=r[2],E=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*E,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*E,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*E,o[8]=f*m+h*x+p*D,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-n*o*d+n*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,f=a*l-d*o,h=c*o-s*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*n)*v,e[2]=(a*n-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(n*l-c*t)*v,e[8]=(s*t-n*o)*v,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(eE.makeScale(e,t)),this}rotate(e){return this.premultiply(eE.makeRotation(-e)),this}translate(e,t){return this.premultiply(eE.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},eE=new At,Gk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Hk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function p9(){let i={enabled:!0,workingColorSpace:Xc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ya(r.r),r.g=ya(r.g),r.b=ya(r.b)),this.spaces[o].primaries!==this.spaces[s].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===on&&(r.r=Qu(r.r),r.g=Qu(r.g),r.b=Qu(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===wa?Ap:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,s){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return of("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return of("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[Xc]:{primaries:e,whitePoint:n,transfer:Ap,toXYZ:Gk,fromXYZ:Hk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:bn},outputColorSpaceConfig:{drawingBufferColorSpace:bn}},[bn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Gk,fromXYZ:Hk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:bn}}}),i}var Gt=p9();function ya(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Qu(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Bu,ib=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Bu===void 0&&(Bu=nf("canvas")),Bu.width=e.width,Bu.height=e.height;let r=Bu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Bu}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=nf("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=ya(o[s]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(ya(t[n]/255)*255):t[n]=ya(t[n]);return{data:t,width:e.width,height:e.height}}else return ht("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},m9=0,af=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:m9++}),this.uuid=yf(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)r[s].isDataTexture?o.push(tE(r[s].image)):o.push(tE(r[s]))}else o=tE(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function tE(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?ib.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ht("Texture: Unable to serialize Texture."),{})}var g9=0,nE=new G,Go=(()=>{class i extends Cs{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Oi,o=Oi,s=jn,a=go,l=vo,c=lr,d=i.DEFAULT_ANISOTROPY,u=wa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:g9++}),this.uuid=yf(),this.name="",this.source=new af(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new gt(0,0),this.repeat=new gt(1,1),this.center=new gt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new At,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(nE).x}get height(){return this.source.getSize(nE).y}get depth(){return this.source.getSize(nE).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,n){this.updateRanges.push({start:t,count:n})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let n in t){let r=t[n];if(r===void 0){ht(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ht(`Texture.setValues(): property '${n}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[n]=r}}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==SE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case tf:t.x=t.x-Math.floor(t.x);break;case Oi:t.x=t.x<0?0:1;break;case tb:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case tf:t.y=t.y-Math.floor(t.y);break;case Oi:t.y=t.y<0?0:1;break;case tb:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=SE,i.DEFAULT_ANISOTROPY=1,i})(),An=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*n+s[11]*r+s[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,x=(h+1)/2,_=(m+1)/2,E=(d+f)/4,D=(u+v)/4,A=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=E/n,o=D/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=E/r,o=A/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=D/o,r=A/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this.w=Ht(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this.w=Ht(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},rb=class extends Cs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new An(0,0,e,t),this.scissorTest=!1,this.viewport=new An(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new Go(r);this.textures=[];let s=n.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:jn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new af(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},kr=class extends rb{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Rp=class extends Go{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var ob=class extends Go{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yi=class{constructor(e=new G(1/0,1/0,1/0),t=new G(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(ko.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ko.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=ko.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,ko):ko.fromBufferAttribute(o,s),ko.applyMatrix4(e.matrixWorld),this.expandByPoint(ko);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Pv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Pv.copy(n.boundingBox)),Pv.applyMatrix4(e.matrixWorld),this.union(Pv)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,ko),ko.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Cp),Av.subVectors(this.max,Cp),zu.subVectors(e.a,Cp),Vu.subVectors(e.b,Cp),Gu.subVectors(e.c,Cp),ll.subVectors(Vu,zu),cl.subVectors(Gu,Vu),zc.subVectors(zu,Gu);let t=[0,-ll.z,ll.y,0,-cl.z,cl.y,0,-zc.z,zc.y,ll.z,0,-ll.x,cl.z,0,-cl.x,zc.z,0,-zc.x,-ll.y,ll.x,0,-cl.y,cl.x,0,-zc.y,zc.x,0];return!iE(t,zu,Vu,Gu,Av)||(t=[1,0,0,0,1,0,0,0,1],!iE(t,zu,Vu,Gu,Av))?!1:(Ov.crossVectors(ll,cl),t=[Ov.x,Ov.y,Ov.z],iE(t,zu,Vu,Gu,Av))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ko).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ko).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(fa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fa),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},fa=[new G,new G,new G,new G,new G,new G,new G,new G],ko=new G,Pv=new Yi,zu=new G,Vu=new G,Gu=new G,ll=new G,cl=new G,zc=new G,Cp=new G,Av=new G,Ov=new G,Vc=new G;function iE(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Vc.fromArray(i,o);let a=r.x*Math.abs(Vc.x)+r.y*Math.abs(Vc.y)+r.z*Math.abs(Vc.z),l=e.dot(Vc),c=t.dot(Vc),d=n.dot(Vc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var v9=new Yi,wp=new G,rE=new G,gl=class{constructor(e=new G,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):v9.setFromPoints(e).getCenter(n);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;wp.subVectors(e,this.center);let t=wp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(wp,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(rE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(wp.copy(e.center).add(rE)),this.expandByPoint(wp.copy(e.center).sub(rE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},ha=new G,oE=new G,Rv=new G,dl=new G,sE=new G,kv=new G,aE=new G,xa=class{constructor(e=new G,t=new G(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ha)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ha.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ha.copy(this.origin).addScaledVector(this.direction,t),ha.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){oE.copy(e).add(t).multiplyScalar(.5),Rv.copy(t).sub(e).normalize(),dl.copy(this.origin).sub(oE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Rv),a=dl.dot(this.direction),l=-dl.dot(Rv),c=dl.lengthSq(),d=Math.abs(1-s*s),u,f,h,p;if(d>0)if(u=s*l-a,f=s*a-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let v=1/d;u*=v,f*=v,h=u*(u+s*f+2*a)+f*(s*u+f+2*l)+c}else f=o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-s*o+a)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(s*o+a)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=s>0?-o:o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(oE).addScaledVector(Rv,f),h}intersectSphere(e,t){ha.subVectors(e.center,this.origin);let n=ha.dot(this.direction),r=ha.dot(ha)-n*n,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=n-s,l=n+s;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,s=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,s=(e.min.y-f.y)*d),n>s||o>r||((o>n||isNaN(n))&&(n=o),(s<r||isNaN(r))&&(r=s),u>=0?(a=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(a=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),n>l||a>r)||((a>n||n!==n)&&(n=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ha)!==null}intersectTriangle(e,t,n,r,o){sE.subVectors(t,e),kv.subVectors(n,e),aE.crossVectors(sE,kv);let s=this.direction.dot(aE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;dl.subVectors(this.origin,e);let l=a*this.direction.dot(kv.crossVectors(dl,kv));if(l<0)return null;let c=a*this.direction.dot(sE.cross(dl));if(c<0||l+c>s)return null;let d=-a*dl.dot(aE);return d<0?null:this.at(d/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Mn=class i{constructor(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g)}set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=d,m[10]=u,m[14]=f,m[3]=h,m[7]=p,m[11]=v,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new i().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/Hu.setFromMatrixColumn(e,0).length(),o=1/Hu.setFromMatrixColumn(e,1).length(),s=1/Hu.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,o=e.z,s=Math.cos(n),a=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-v*c,t[9]=-a*l,t[2]=v-f*c,t[6]=p+h*c,t[10]=s*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f+v*a,t[4]=p*a-h,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=h*a-p,t[6]=v+f*a,t[10]=s*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f-v*a,t[4]=-s*u,t[8]=p+h*a,t[1]=h+p*a,t[5]=s*d,t[9]=v-f*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+v,t[1]=l*u,t[5]=v*c+f,t[9]=h*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=v-f*u,t[8]=p*u+h,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-v*u}else if(e.order==="XZY"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+v,t[5]=s*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=a*d,t[10]=v*u+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(b9,e,y9)}lookAt(e,t,n){let r=this.elements;return Ar.subVectors(e,t),Ar.lengthSq()===0&&(Ar.z=1),Ar.normalize(),ul.crossVectors(n,Ar),ul.lengthSq()===0&&(Math.abs(n.z)===1?Ar.x+=1e-4:Ar.z+=1e-4,Ar.normalize(),ul.crossVectors(n,Ar)),ul.normalize(),Fv.crossVectors(Ar,ul),r[0]=ul.x,r[4]=Fv.x,r[8]=Ar.x,r[1]=ul.y,r[5]=Fv.y,r[9]=Ar.y,r[2]=ul.z,r[6]=Fv.z,r[10]=Ar.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],v=n[6],g=n[10],m=n[14],b=n[3],y=n[7],x=n[11],_=n[15],E=r[0],D=r[4],A=r[8],S=r[12],I=r[1],L=r[5],H=r[9],z=r[13],X=r[2],q=r[6],K=r[10],j=r[14],te=r[3],ye=r[7],xe=r[11],Ce=r[15];return o[0]=s*E+a*I+l*X+c*te,o[4]=s*D+a*L+l*q+c*ye,o[8]=s*A+a*H+l*K+c*xe,o[12]=s*S+a*z+l*j+c*Ce,o[1]=d*E+u*I+f*X+h*te,o[5]=d*D+u*L+f*q+h*ye,o[9]=d*A+u*H+f*K+h*xe,o[13]=d*S+u*z+f*j+h*Ce,o[2]=p*E+v*I+g*X+m*te,o[6]=p*D+v*L+g*q+m*ye,o[10]=p*A+v*H+g*K+m*xe,o[14]=p*S+v*z+g*j+m*Ce,o[3]=b*E+y*I+x*X+_*te,o[7]=b*D+y*L+x*q+_*ye,o[11]=b*A+y*H+x*K+_*xe,o[15]=b*S+y*z+x*j+_*Ce,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,x=a*f-l*u,_=s*h-c*d,E=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*E)+r*(p*y-v*_+m*D)-o*(p*x-v*E+g*D)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,E=t*b+n*y+r*x+o*_;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/E;return e[0]=b*D,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*D,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*D,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*D,e[4]=y*D,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*D,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*D,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*D,e[8]=x*D,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*D,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*D,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*D,e[12]=_*D,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*D,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*D,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*D,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,s){return this.set(1,n,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,x=l*u,_=n.x,E=n.y,D=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*E,r[5]=(1-(f+m))*E,r[6]=(g+b)*E,r[7]=0,r[8]=(p+y)*D,r[9]=(g-b)*D,r[10]=(1-(f+v))*D,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=Hu.set(r[0],r[1],r[2]).length(),s=Hu.set(r[4],r[5],r[6]).length(),a=Hu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Fo.copy(this);let c=1/o,d=1/s,u=1/a;return Fo.elements[0]*=c,Fo.elements[1]*=c,Fo.elements[2]*=c,Fo.elements[4]*=d,Fo.elements[5]*=d,Fo.elements[6]*=d,Fo.elements[8]*=u,Fo.elements[9]*=u,Fo.elements[10]*=u,t.setFromRotationMatrix(Fo),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=Lo,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===Lo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Op)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,o,s,a=Lo,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===Lo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Op)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},Hu=new G,Fo=new Mn,b9=new G(0,0,0),y9=new G(1,1,1),ul=new G,Fv=new G,Ar=new G,jk=new Mn,Wk=new mo,_a=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,r,o=this._order){return this._x=t,this._y=n,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin(Ht(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Ht(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Ht(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Ht(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(Ht(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Ht(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:ht("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return jk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(jk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Wk.setFromEuler(this),this.setFromQuaternion(Wk,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return i.DEFAULT_ORDER="XYZ",i})(),lf=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},x9=0,$k=new G,ju=new mo,pa=new Mn,Nv=new G,Ep=new G,_9=new G,S9=new mo,Xk=new G(1,0,0),Yk=new G(0,1,0),qk=new G(0,0,1),Kk={type:"added"},C9={type:"removed"},Wu={type:"childadded",child:null},lE={type:"childremoved",child:null},Fr=(()=>{class i extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:x9++}),this.uuid=yf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new _a,r=new mo,o=new G(1,1,1);function s(){r.setFromEuler(n,!1)}function a(){n.setFromQuaternion(r,void 0,!1)}n._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new lf,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return ju.setFromAxisAngle(t,n),this.quaternion.multiply(ju),this}rotateOnWorldAxis(t,n){return ju.setFromAxisAngle(t,n),this.quaternion.premultiply(ju),this}rotateX(t){return this.rotateOnAxis(Xk,t)}rotateY(t){return this.rotateOnAxis(Yk,t)}rotateZ(t){return this.rotateOnAxis(qk,t)}translateOnAxis(t,n){return $k.copy(t).applyQuaternion(this.quaternion),this.position.add($k.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(Xk,t)}translateY(t){return this.translateOnAxis(Yk,t)}translateZ(t){return this.translateOnAxis(qk,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(pa.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Nv.copy(t):Nv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Ep.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?pa.lookAt(Ep,Nv,this.up):pa.lookAt(Nv,Ep,this.up),this.quaternion.setFromRotationMatrix(pa),o&&(pa.extractRotation(o.matrixWorld),ju.setFromRotationMatrix(pa),this.quaternion.premultiply(ju.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(yt("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(Kk),Wu.child=t,this.dispatchEvent(Wu),Wu.child=null):yt("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent(C9),lE.child=t,this.dispatchEvent(lE),lE.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),pa.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),pa.multiply(t.parent.matrixWorld)),t.applyMatrix4(pa),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Kk),Wu.child=t,this.dispatchEvent(Wu),Wu.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,n);if(a!==void 0)return a}}getObjectsByProperty(t,n,r=[]){this[t]===n&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,n,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ep,t,_9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ep,S9,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(n){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new G(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),No=new G,ma=new G,cE=new G,ga=new G,$u=new G,Xu=new G,Zk=new G,dE=new G,uE=new G,fE=new G,hE=new An,pE=new An,mE=new An,pl=class i{constructor(e=new G,t=new G,n=new G){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),No.subVectors(e,t),r.cross(No);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){No.subVectors(r,t),ma.subVectors(n,t),cE.subVectors(e,t);let s=No.dot(No),a=No.dot(ma),l=No.dot(cE),c=ma.dot(ma),d=ma.dot(cE),u=s*c-a*a;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-a*d)*f,p=(s*d-a*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,ga)===null?!1:ga.x>=0&&ga.y>=0&&ga.x+ga.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,ga)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,ga.x),l.addScaledVector(s,ga.y),l.addScaledVector(a,ga.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return hE.setScalar(0),pE.setScalar(0),mE.setScalar(0),hE.fromBufferAttribute(e,t),pE.fromBufferAttribute(e,n),mE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(hE,o.x),s.addScaledVector(pE,o.y),s.addScaledVector(mE,o.z),s}static isFrontFacing(e,t,n,r){return No.subVectors(n,t),ma.subVectors(e,t),No.cross(ma).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return No.subVectors(this.c,this.b),ma.subVectors(this.a,this.b),No.cross(ma).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return i.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,o){return i.getInterpolation(e,this.a,this.b,this.c,t,n,r,o)}containsPoint(e){return i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,o=this.c,s,a;$u.subVectors(r,n),Xu.subVectors(o,n),dE.subVectors(e,n);let l=$u.dot(dE),c=Xu.dot(dE);if(l<=0&&c<=0)return t.copy(n);uE.subVectors(e,r);let d=$u.dot(uE),u=Xu.dot(uE);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(n).addScaledVector($u,s);fE.subVectors(e,o);let h=$u.dot(fE),p=Xu.dot(fE);if(p>=0&&h<=p)return t.copy(o);let v=h*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(n).addScaledVector(Xu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Zk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Zk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector($u,s).addScaledVector(Xu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},XF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},fl={h:0,s:0,l:0},Lv={h:0,s:0,l:0};function gE(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}var ct=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=bn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Gt.workingColorSpace){if(e=eM(e,1),t=Ht(t,0,1),n=Ht(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o;this.r=gE(s,o,e+1/3),this.g=gE(s,o,e),this.b=gE(s,o,e-1/3)}return Gt.colorSpaceToWorking(this,r),this}setStyle(e,t=bn){function n(o){o!==void 0&&parseFloat(o)<1&&ht("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:ht("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(s===6)return this.setHex(parseInt(o,16),t);ht("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=bn){let n=XF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ht("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ya(e.r),this.g=ya(e.g),this.b=ya(e.b),this}copyLinearToSRGB(e){return this.r=Qu(e.r),this.g=Qu(e.g),this.b=Qu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=bn){return Gt.workingToColorSpace(Ai.copy(this),e),Math.round(Ht(Ai.r*255,0,255))*65536+Math.round(Ht(Ai.g*255,0,255))*256+Math.round(Ht(Ai.b*255,0,255))}getHexString(e=bn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.workingToColorSpace(Ai.copy(this),t);let n=Ai.r,r=Ai.g,o=Ai.b,s=Math.max(n,r,o),a=Math.min(n,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case n:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Gt.workingColorSpace){return Gt.workingToColorSpace(Ai.copy(this),t),e.r=Ai.r,e.g=Ai.g,e.b=Ai.b,e}getStyle(e=bn){Gt.workingToColorSpace(Ai.copy(this),e);let t=Ai.r,n=Ai.g,r=Ai.b;return e!==bn?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(fl),this.setHSL(fl.h+e,fl.s+t,fl.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(fl),e.getHSL(Lv);let n=Ip(fl.h,Lv.h,t),r=Ip(fl.s,Lv.s,t),o=Ip(fl.l,Lv.l,t);return this.setHSL(n,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ai=new ct;ct.NAMES=XF;var w9=0,ar=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:w9++}),this.uuid=yf(),this.name="",this.type="Material",this.blending=Wc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Qv,this.blendDst=eb,this.blendEquation=ml,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ct(0,0,0),this.blendAlpha=0,this.depthFunc=$c,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=ME,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=jc,this.stencilZFail=jc,this.stencilZPass=jc,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){ht(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ht(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Wc&&(n.blending=this.blending),this.side!==Xi&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Qv&&(n.blendSrc=this.blendSrc),this.blendDst!==eb&&(n.blendDst=this.blendDst),this.blendEquation!==ml&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==$c&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==ME&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==jc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==jc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==jc&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(o){let s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}if(t){let o=r(e.textures),s=r(e.images);o.length>0&&(n.textures=o),s.length>0&&(n.images=s)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let r=t.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},kp=class extends ar{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ct(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new _a,this.combine=Ob,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};var Jn=new G,Uv=new gt,E9=0,Rr=class{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:E9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=TE,this.updateRanges=[],this.gpuType=Vo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Uv.fromBufferAttribute(this,t),Uv.applyMatrix3(e),this.setXY(t,Uv.x,Uv.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix3(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix4(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyNormalMatrix(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.transformDirection(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=Ju(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=$i(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ju(t,this.array)),t}setX(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ju(t,this.array)),t}setY(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Ju(t,this.array)),t}setZ(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Ju(t,this.array)),t}setW(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array),o=$i(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==TE&&(e.usage=this.usage),e}};var Fp=class extends Rr{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var Np=class extends Rr{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Hn=class extends Rr{constructor(e,t,n){super(new Float32Array(e),t,n)}},M9=0,ho=new Mn,vE=new Fr,Yu=new G,Or=new Yi,Mp=new Yi,ui=new G,ei=class i extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:M9++}),this.uuid=yf(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(JE(e)?Np:Fp)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new At().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ho.makeRotationFromQuaternion(e),this.applyMatrix4(ho),this}rotateX(e){return ho.makeRotationX(e),this.applyMatrix4(ho),this}rotateY(e){return ho.makeRotationY(e),this.applyMatrix4(ho),this}rotateZ(e){return ho.makeRotationZ(e),this.applyMatrix4(ho),this}translate(e,t,n){return ho.makeTranslation(e,t,n),this.applyMatrix4(ho),this}scale(e,t,n){return ho.makeScale(e,t,n),this.applyMatrix4(ho),this}lookAt(e){return vE.lookAt(e),vE.updateMatrix(),this.applyMatrix4(vE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Yu).negate(),this.translate(Yu.x,Yu.y,Yu.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];n.push(s.x,s.y,s.z||0)}this.setAttribute("position",new Hn(n,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&ht("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Yi);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){yt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new G(-1/0,-1/0,-1/0),new G(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){let o=t[n];Or.setFromBufferAttribute(o),this.morphTargetsRelative?(ui.addVectors(this.boundingBox.min,Or.min),this.boundingBox.expandByPoint(ui),ui.addVectors(this.boundingBox.max,Or.max),this.boundingBox.expandByPoint(ui)):(this.boundingBox.expandByPoint(Or.min),this.boundingBox.expandByPoint(Or.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&yt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new gl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){yt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new G,1/0);return}if(e){let n=this.boundingSphere.center;if(Or.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];Mp.setFromBufferAttribute(a),this.morphTargetsRelative?(ui.addVectors(Or.min,Mp.min),Or.expandByPoint(ui),ui.addVectors(Or.max,Mp.max),Or.expandByPoint(ui)):(Or.expandByPoint(Mp.min),Or.expandByPoint(Mp.max))}Or.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)ui.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(ui));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)ui.fromBufferAttribute(a,c),l&&(Yu.fromBufferAttribute(e,c),ui.add(Yu)),r=Math.max(r,n.distanceToSquared(ui))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&yt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){yt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Rr(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let A=0;A<n.count;A++)a[A]=new G,l[A]=new G;let c=new G,d=new G,u=new G,f=new gt,h=new gt,p=new gt,v=new G,g=new G;function m(A,S,I){c.fromBufferAttribute(n,A),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,I),f.fromBufferAttribute(o,A),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,I),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[A].add(v),a[S].add(v),a[I].add(v),l[A].add(g),l[S].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)m(e.getX(z+0),e.getX(z+1),e.getX(z+2))}let y=new G,x=new G,_=new G,E=new G;function D(A){_.fromBufferAttribute(r,A),E.copy(_);let S=a[A];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(E,S);let L=x.dot(l[A])<0?-1:1;s.setXYZW(A,y.x,y.y,y.z,L)}for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)D(e.getX(z+0)),D(e.getX(z+1)),D(e.getX(z+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Rr(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new G,o=new G,s=new G,a=new G,l=new G,c=new G,d=new G,u=new G;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,v),c.fromBufferAttribute(n,g),a.add(d),l.add(d),c.add(d),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(v,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ui.fromBufferAttribute(e,t),ui.normalize(),e.setXYZ(t,ui.x,ui.y,ui.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new Rr(f,d,u)}if(this.index===null)return ht("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new i,n=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,n);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,n);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let l in n){let c=n[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(r[l]=d,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,d=s.length;c<d;c++){let u=s[c];this.addGroup(u.start,u.count,u.materialIndex)}let a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},Jk=new Mn,Gc=new xa,Bv=new gl,Qk=new G,zv=new G,Vv=new G,Gv=new G,bE=new G,Hv=new G,eF=new G,jv=new G,qi=class extends Fr{constructor(e=new ei,t=new kp){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}getVertexPosition(e,t){let n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,s=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){Hv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(bE.fromBufferAttribute(u,e),s?Hv.addScaledVector(bE,d):Hv.addScaledVector(bE.sub(t),d))}t.add(Hv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Bv.copy(n.boundingSphere),Bv.applyMatrix4(o),Gc.copy(e.ray).recast(e.near),!(Bv.containsPoint(Gc.origin)===!1&&(Gc.intersectSphere(Bv,Qk)===null||Gc.origin.distanceToSquared(Qk)>(e.far-e.near)**2))&&(Jk.copy(o).invert(),Gc.copy(e.ray).applyMatrix4(Jk),!(n.boundingBox!==null&&Gc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Gc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=a.getX(x),D=a.getX(x+1),A=a.getX(x+2);r=Wv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),x=a.getX(g+2);r=Wv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=x,D=x+1,A=x+2;r=Wv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,x=g+2;r=Wv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function T9(i,e,t,n,r,o,s,a){let l;if(e.side===Ki?l=n.intersectTriangle(s,o,r,!0,a):l=n.intersectTriangle(r,o,s,e.side===Xi,a),l===null)return null;jv.copy(a),jv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(jv);return c<t.near||c>t.far?null:{distance:c,point:jv.clone(),object:i}}function Wv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,zv),i.getVertexPosition(l,Vv),i.getVertexPosition(c,Gv);let d=T9(i,e,t,n,zv,Vv,Gv,eF);if(d){let u=new G;pl.getBarycoord(eF,zv,Vv,Gv,u),r&&(d.uv=pl.getInterpolatedAttribute(r,a,l,c,u,new gt)),o&&(d.uv1=pl.getInterpolatedAttribute(o,a,l,c,u,new gt)),s&&(d.normal=pl.getInterpolatedAttribute(s,a,l,c,u,new G),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new G,materialIndex:0};pl.getNormal(zv,Vv,Gv,f.normal),d.face=f,d.barycoord=u}return d}var cf=class i extends ei{constructor(e=1,t=1,n=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,s,o,0),p("z","y","x",1,-1,n,t,-e,s,o,1),p("x","z","y",1,1,e,n,t,r,s,2),p("x","z","y",1,-1,e,n,-t,r,s,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new Hn(c,3)),this.setAttribute("normal",new Hn(d,3)),this.setAttribute("uv",new Hn(u,2));function p(v,g,m,b,y,x,_,E,D,A,S){let I=x/D,L=_/A,H=x/2,z=_/2,X=E/2,q=D+1,K=A+1,j=0,te=0,ye=new G;for(let xe=0;xe<K;xe++){let Ce=xe*L-z;for(let ce=0;ce<q;ce++){let Ie=ce*I-H;ye[v]=Ie*b,ye[g]=Ce*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=E>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(ce/D),u.push(1-xe/A),j+=1}}for(let xe=0;xe<A;xe++)for(let Ce=0;Ce<D;Ce++){let ce=f+Ce+q*xe,Ie=f+Ce+q*(xe+1),Mt=f+(Ce+1)+q*(xe+1),Lt=f+(Ce+1)+q*xe;l.push(ce,Ie,Lt),l.push(Ie,Mt,Lt),te+=6}a.addGroup(h,te,S),h+=te,f+=j}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function rd(i){let e={};for(let t in i){e[t]={};for(let n in i[t]){let r=i[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(ht("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function Ri(i){let e={};for(let t=0;t<i.length;t++){let n=rd(i[t]);for(let r in n)e[r]=n[r]}return e}function D9(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function tM(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Gt.workingColorSpace}var YF={clone:rd,merge:Ri},I9=`void main() {
|
|
5
|
+
`).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=t.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.addHeaderEntry(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}addHeaderEntry(e,t){let n=e.toLowerCase();this.maybeSetNormalizedName(e,n),this.headers.has(n)?this.headers.get(n).push(t):this.headers.set(n,[t])}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var mv=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}},gv=class{encodeKey(e){return WR(e)}encodeValue(e){return WR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Rj(i,e){let t=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var kj=/%(\d[a-f0-9])/gi,Fj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function WR(i){return encodeURIComponent(i).replace(kj,(e,t)=>Fj[t]??e)}function pv(i){return`${i}`}var co=class i{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new gv,e.fromString){if(e.fromObject)throw new Ke(2805,!1);this.map=Rj(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(pv):[pv(n)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{t.push({param:n,value:o,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(pv(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(pv(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function Nj(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function $R(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function XR(i){return typeof Blob<"u"&&i instanceof Blob}function YR(i){return typeof FormData<"u"&&i instanceof FormData}function Lj(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var qR="Content-Type",KR="Accept",ZR="text/plain",JR="application/json",Uj=`${JR}, ${ZR}, */*`,Ou=class i{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,n,r){this.url=t,this.method=e.toUpperCase();let o;if(Nj(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new Ke(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new uo,this.context??=new mv,!this.params)this.params=new co,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||$R(this.body)||XR(this.body)||YR(this.body)||Lj(this.body)?this.body:this.body instanceof co?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||YR(this.body)?null:XR(this.body)?this.body.type||null:$R(this.body)?null:typeof this.body=="string"?ZR:this.body instanceof co?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?JR:null}clone(e={}){let t=e.method||this.method,n=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((E,D)=>E.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((E,D)=>E.set(D,e.setParams[D]),x)),new i(t,n,g,{params:x,headers:y,context:_,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},Uc=(function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i})(Uc||{}),Ru=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,n="OK"){this.headers=e.headers||new uo,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},vv=class i extends Ru{constructor(e={}){super(e)}type=Uc.ResponseHeader;clone(e={}){return new i({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},ku=class i extends Ru{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Uc.Response;clone(e={}){return new i({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},ol=class extends Ru{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},Bj=200,zj=204;var Vj=new qe("");var Gj=/^\)\]\}',?\n/;var Nw=(()=>{class i{xhrFactory;tracingService=Q(vs,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new Ke(-2800,!1);let n=this.xhrFactory;return ss(null).pipe(sS(()=>new En(o=>{let s=n.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(KR)||s.setRequestHeader(KR,Uj),!t.headers.has(qR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(qR,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new uo(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new vv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),x=null;m!==zj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Bj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let E=x;x=x.replace(Gj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=E,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new ku({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new ol({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ol({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(b)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new ol({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(b)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let m={type:Uc.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),t.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),o.next(m)}),v=this.maybePropagateTrace(g=>{let m={type:Uc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",f),s.addEventListener("abort",u),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:Uc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(n){return new(n||i)(Xe(Lc))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Hj(i,e){return e(i)}function jj(i,e,t){return(n,r)=>tu(t,()=>e(n,o=>i(o,r)))}var Lw=new qe("",{factory:()=>[]}),Uw=new qe(""),QR=new qe("",{factory:()=>!0});var Bw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(Nw),r},providedIn:"root"})}return i})();var bv=(()=>{class i{backend;injector;chain=null;pendingTasks=Q(cu);contributeToStability=Q(QR);constructor(t,n){this.backend=t,this.injector=n}handle(t){if(this.chain===null){let n=Array.from(new Set([...this.injector.get(Lw),...this.injector.get(Uw,[])]));this.chain=n.reduceRight((r,o)=>jj(r,o,this.injector),Hj)}if(this.contributeToStability){let n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(vh(n))}else return this.chain(t,n=>this.backend.handle(n))}static \u0275fac=function(n){return new(n||i)(Xe(Bw),Xe(Ti))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),zw=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(bv),r},providedIn:"root"})}return i})();function Fw(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,credentials:i.credentials,transferCache:i.transferCache,timeout:i.timeout,keepalive:i.keepalive,priority:i.priority,cache:i.cache,mode:i.mode,redirect:i.redirect,integrity:i.integrity,referrer:i.referrer,referrerPolicy:i.referrerPolicy}}var yv=(()=>{class i{handler;constructor(t){this.handler=t}request(t,n,r={}){let o;if(t instanceof Ou)o=t;else{let l;r.headers instanceof uo?l=r.headers:l=new uo(r.headers);let c;r.params&&(r.params instanceof co?c=r.params:c=new co({fromObject:r.params})),o=new Ou(t,n,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let s=ss(o).pipe(oS(l=>this.handler.handle(l)));if(t instanceof Ou||r.observe==="events")return s;let a=s.pipe(rS(l=>l instanceof ku));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Ke(2806,!1);return l.body}));case"blob":return a.pipe(rr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Ke(2807,!1);return l.body}));case"text":return a.pipe(rr(l=>{if(l.body!==null&&typeof l.body!="string")throw new Ke(2808,!1);return l.body}));default:return a.pipe(rr(l=>l.body))}case"response":return a;default:throw new Ke(2809,!1)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:new co().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,Fw(r,n))}post(t,n,r={}){return this.request("POST",t,Fw(r,n))}put(t,n,r={}){return this.request("PUT",t,Fw(r,n))}static \u0275fac=function(n){return new(n||i)(Xe(zw))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Wj=new qe("",{factory:()=>!0}),$j="XSRF-TOKEN",Xj=new qe("",{factory:()=>$j}),Yj="X-XSRF-TOKEN",qj=new qe("",{factory:()=>Yj}),Kj=(()=>{class i{cookieName=Q(Xj);doc=Q(wn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ap(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ek=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(Kj),r},providedIn:"root"})}return i})();function Zj(i,e){if(!Q(Wj)||i.method==="GET"||i.method==="HEAD")return e(i);try{let r=Q(sv).href,{origin:o}=new URL(r),{origin:s}=new URL(i.url,o);if(o!==s)return e(i)}catch{return e(i)}let t=Q(ek).getToken(),n=Q(qj);return t!=null&&!i.headers.has(n)&&(i=i.clone({headers:i.headers.set(n,t)})),e(i)}var Vw=(function(i){return i[i.Interceptors=0]="Interceptors",i[i.LegacyInterceptors=1]="LegacyInterceptors",i[i.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",i[i.NoXsrfProtection=3]="NoXsrfProtection",i[i.JsonpSupport=4]="JsonpSupport",i[i.RequestsMadeViaParent=5]="RequestsMadeViaParent",i[i.Fetch=6]="Fetch",i})(Vw||{});function Jj(i,e){return{\u0275kind:i,\u0275providers:e}}function Gw(...i){let e=[yv,bv,{provide:zw,useExisting:bv},{provide:Bw,useFactory:()=>Q(Vj,{optional:!0})??Q(Nw)},{provide:Lw,useValue:Zj,multi:!0}];for(let t of i)e.push(...t.\u0275providers);return Qs(e)}function Hw(i){return Jj(Vw.Interceptors,i.map(e=>({provide:Lw,useValue:e,multi:!0})))}var Qj=new qe(""),eW="b",tW="h",nW="s",iW="st",rW="u",oW="rt",jw=new qe(""),sW=["GET","HEAD"];function ik(i,e){let s=e,{isCacheActive:t}=s,n=en(s,["isCacheActive"]),{transferCache:r,method:o}=i;return!(!t||r===!1||o==="POST"&&!n.includePostRequests&&!r||o!=="POST"&&!sW.includes(o)||!n.includeRequestsWithAuthHeaders&&cW(i)||n.filter?.(i)===!1)}function rk(i,e){let{includeHeaders:t}=i,n=t;return typeof e=="object"&&e.includeHeaders&&(n=e.includeHeaders),n}function aW(i,e,t,n){let{transferCache:r}=i;if(!ik(i,e))return null;if(n)throw new Ke(2803,!1);let o=i.url,s=ok(i,o),a=t.get(s,null),l=rk(e,r);if(a){let{[eW]:c,[oW]:d,[tW]:u,[nW]:f,[iW]:h,[rW]:p}=a,v=c;switch(d){case"arraybuffer":v=nk(c);break;case"blob":v=new Blob([nk(c)]);break}let g=new uo(u);return new ku({body:v,headers:g,status:f,statusText:h,url:p})}return null}function lW(i,e){let t=Q(jw),n=Q(_u),r=Q(Qj,{optional:!0}),o=aW(i,t,n,r);if(o)return ss(o);let{transferCache:s}=i,a=rk(t,s),l=i.url,c=ok(i,l);return ik(i,t),e(i)}function cW(i){return i.headers.has("authorization")||i.headers.has("proxy-authorization")}function tk(i){return[...i.keys()].sort().map(e=>`${e}=${i.getAll(e)}`).join("&")}function ok(i,e){let{params:t,method:n,responseType:r}=i,o=tk(t),s=i.serializeBody();s instanceof URLSearchParams?s=tk(s):typeof s!="string"&&(s="");let a=[n,r,e,s,o].join("|"),l=dW(a);return l}function dW(i){let e=0;for(let t of i)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function nk(i){let e=atob(i);return Uint8Array.from(e,n=>n.charCodeAt(0)).buffer}function sk(i){return[{provide:jw,useFactory:()=>(Ro("NgHttpTransferCache"),R({isCacheActive:!0},i))},{provide:Uw,useValue:lW,multi:!0},{provide:Du,multi:!0,useFactory:()=>{let e=Q(Ir),t=Q(jw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var fp=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275prov=_e({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Xe(uW),r},providedIn:"root"})}return i})(),uW=(()=>{class i extends fp{_doc;constructor(t){super(),this._doc=t}sanitize(t,n){if(n==null)return null;switch(t){case Oo.NONE:return n;case Oo.HTML:return sa(n,"HTML")?Ao(n):I0(this._doc,String(n)).toString();case Oo.STYLE:return sa(n,"Style")?Ao(n):n;case Oo.SCRIPT:if(sa(n,"Script"))return Ao(n);throw new Ke(5200,!1);case Oo.URL:return sa(n,"URL")?Ao(n):qh(String(n));case Oo.RESOURCE_URL:if(sa(n,"ResourceURL"))return Ao(n);throw new Ke(5201,!1);default:throw new Ke(5202,!1)}}bypassSecurityTrustHtml(t){return SC(t)}bypassSecurityTrustStyle(t){return CC(t)}bypassSecurityTrustScript(t){return wC(t)}bypassSecurityTrustUrl(t){return EC(t)}bypassSecurityTrustResourceUrl(t){return MC(t)}static \u0275fac=function(n){return new(n||i)(Xe(wn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),xv=(function(i){return i[i.NoHttpTransferCache=0]="NoHttpTransferCache",i[i.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",i[i.I18nSupport=2]="I18nSupport",i[i.EventReplay=3]="EventReplay",i[i.IncrementalHydration=4]="IncrementalHydration",i})(xv||{});function fW(i,e=[],t={}){return{\u0275kind:i,\u0275providers:e}}function ak(){return fW(xv.EventReplay,TR())}function lk(...i){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of i)t.add(o),r.length&&e.push(r);let n=t.has(xv.HttpTransferCacheOptions);return Qs([[],[],DR(),t.has(xv.NoHttpTransferCache)||n?[]:sk({}),e])}var Fu=class i{loadingCount=N(0);isLoading=De(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function _v(i){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!i)return"Unhandled error";let t=i?.error,n=e(t?.errors);if(n)return n;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(i)&&i.length>0)return e(i)||"Unhandled error";let o=e(i?.messages);if(o)return o;if(typeof i?.messages=="string"&&i.messages.trim())return i.messages;if(typeof i?.message=="string"&&i.message.trim())return i.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let s=[];for(let a in t.errors)Object.prototype.hasOwnProperty.call(t.errors,a)&&s.push(...t.errors[a]??[]);if(s.length)return s.join(", ")}return i?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var da=class i{toastsSignal=N([]);toasts=De(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(n=>n.id!==e))}pushToast(e,t,n){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:n,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${n}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var hp=class i{constructor(e){this.toasterService=e}handleError(e){e instanceof ol&&this.showError(e)}showError(e){return this.toasterService.showError(_v(e)),Va(()=>e)}static \u0275fac=function(t){return new(t||i)(Xe(da))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var ck=(i,e)=>{let t=Q(hp),n=Q(Fu),r=i.headers.has("skipHandleError"),o=i.headers.get("Loader")==="true";return o&&n.show(),e(i).pipe(fc(s=>(r||t.handleError(s),r?ss(null):Va(()=>s))),vh(()=>{o&&n.hide()}))};var dk=[ck];var uk={apiUrl:"https://pixeasy-stage-api-htapefcta9c3arfd.westus3-01.azurewebsites.net/api/"};var Sv=new qe("ENV"),Cye=new qe("LOADER_DELAY");var fk={provide:Sv,useValue:uk};function hk(){return[s1(),lk(ak()),Gw(Hw(dk)),fk,Fu]}var Ck=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)($t(la),$t(Mr))};static \u0275dir=Zn({type:i})}return i})(),yp=(()=>{class i extends Ck{static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,features:[Dr]})}return i})(),sl=new qe(""),mW={provide:sl,useExisting:zi(()=>Kw),multi:!0},Kw=(()=>{class i extends yp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([mW]),Dr]})}return i})(),gW={provide:sl,useExisting:zi(()=>Uu),multi:!0};function vW(){let i=lo()?lo().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var bW=new qe(""),Uu=(()=>{class i extends Ck{_compositionMode;_composing=!1;constructor(t,n,r){super(t,n),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!vW())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)($t(la),$t(Mr),$t(bW,8))};static \u0275dir=Zn({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[ao([gW]),Dr]})}return i})();var Zw=new qe(""),yW=new qe("");function xW(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function _W(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function pk(i){return null}function wk(i){return i!=null}function Ek(i){return Tu(i)?gh(i):i}function Mk(i){let e={};return i.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function Tk(i,e){return e.map(t=>t(i))}function SW(i){return!i.validate}function Dk(i){return i.map(e=>SW(e)?e:t=>e.validate(t))}function CW(i){if(!i)return null;let e=i.filter(wk);return e.length==0?null:function(t){return Mk(Tk(t,e))}}function Ik(i){return i!=null?CW(Dk(i)):null}function wW(i){if(!i)return null;let e=i.filter(wk);return e.length==0?null:function(t){let n=Tk(t,e).map(Ek);return iS(n).pipe(rr(Mk))}}function Pk(i){return i!=null?wW(Dk(i)):null}function mk(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function EW(i){return i._rawValidators}function MW(i){return i._rawAsyncValidators}function Ww(i){return i?Array.isArray(i)?i:[i]:[]}function wv(i,e){return Array.isArray(i)?i.includes(e):i===e}function gk(i,e){let t=Ww(e);return Ww(i).forEach(r=>{wv(t,r)||t.push(r)}),t}function vk(i,e){return Ww(e).filter(t=>!wv(i,t))}var Ev=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Ik(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Pk(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},$w=class extends Ev{name;get formDirective(){return null}get path(){return null}},bp=class extends Ev{_parent=null;name=null;valueAccessor=null},Xw=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var al=(()=>{class i extends Xw{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)($t(bp,2))};static \u0275dir=Zn({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&pt("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[Dr]})}return i})();var pp="VALID",Cv="INVALID",Nu="PENDING",mp="DISABLED",Bc=class{},Mv=class extends Bc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},gp=class extends Bc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},vp=class extends Bc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Lu=class extends Bc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Yw=class extends Bc{source;constructor(e){super(),this.source=e}};function TW(i){return(Tv(i)?i.validators:i)||null}function DW(i){return Array.isArray(i)?Ik(i):i||null}function IW(i,e){return(Tv(e)?e.asyncValidators:i)||null}function PW(i){return Array.isArray(i)?Pk(i):i||null}function Tv(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}var qw=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return gn(this.statusReactive)}set status(e){gn(()=>this.statusReactive.set(e))}_status=De(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===pp}get invalid(){return this.status===Cv}get pending(){return this.status==Nu}get disabled(){return this.status===mp}get enabled(){return this.status!==mp}errors;get pristine(){return gn(this.pristineReactive)}set pristine(e){gn(()=>this.pristineReactive.set(e))}_pristine=De(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return gn(this.touchedReactive)}set touched(e){gn(()=>this.touchedReactive.set(e))}_touched=De(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new Eo;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(gk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(gk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(vk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(vk(e,this._rawAsyncValidators))}hasValidator(e){return wv(this._rawValidators,e)}hasAsyncValidator(e){return wv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new vp(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),e.onlySelf||this._parent?._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new vp(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new gp(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new gp(!0,n))}markAsPending(e={}){this.status=Nu;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Lu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=mp,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Mv(this.value,n)),this._events.next(new Lu(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=pp,this._forEachChild(n=>{n.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pp||this.status===Nu)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Mv(this.value,t)),this._events.next(new Lu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?mp:pp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Nu,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=Ek(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n?.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Lu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new yr,this.statusChanges=new yr}_calculateStatus(){return this._allControlsDisabled()?mp:this.errors?Cv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Nu)?Nu:this._anyControlsHaveStatus(Cv)?Cv:pp}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new gp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new vp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Tv(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=DW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=PW(this._rawAsyncValidators)}};var Ak=new qe("",{factory:()=>Jw}),Jw="always";function AW(i,e){return[...e.path,i]}function OW(i,e,t=Jw){kW(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),FW(i,e),LW(i,e),NW(i,e),RW(i,e)}function bk(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function RW(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function kW(i,e){let t=EW(i);e.validator!==null?i.setValidators(mk(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=MW(i);e.asyncValidator!==null?i.setAsyncValidators(mk(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();bk(e._rawValidators,r),bk(e._rawAsyncValidators,r)}function FW(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&Ok(i,e)})}function NW(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&Ok(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function Ok(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function LW(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function UW(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function BW(i){return Object.getPrototypeOf(i.constructor)===yp}function zW(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Uu?t=o:BW(o)?n=o:r=o}),r||n||t||null}function yk(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function xk(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var VW=class extends qw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(TW(t),IW(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Tv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(xk(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new Yw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){yk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){yk(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){xk(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var GW={provide:bp,useExisting:zi(()=>ua)},_k=Promise.resolve(),ua=(()=>{class i extends bp{_changeDetectorRef;callSetDisabledState;control=new VW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yr;constructor(t,n,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=zW(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),UW(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){OW(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){_k.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,r=n!==0&&ov(n);_k.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?AW(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)($t($w,9),$t(Zw,10),$t(yW,10),$t(sl,10),$t(rv,8),$t(Ak,8))};static \u0275dir=Zn({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ao([GW]),Dr,yu]})}return i})();var HW={provide:sl,useExisting:zi(()=>xp),multi:!0},xp=(()=>{class i extends yp{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){n&1&&ie("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[ao([HW]),Dr]})}return i})();var jW={provide:sl,useExisting:zi(()=>Dv),multi:!0};function Rk(i,e){return i==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function WW(i){return i.split(":")[0]}var Dv=(()=>{class i extends yp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Q(Ir).injector;destroyRef=Q(sr);cdr=Q(rv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,R0({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let n=this._getOptionId(t),r=Rk(n,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=n=>{this.value=this._getOptionValue(n),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n),t))return n;return null}_getOptionValue(t){let n=WW(t);return this._optionMap.has(n)?this._optionMap.get(n):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([jW]),Dr]})}return i})(),kk=(()=>{class i{_element;_renderer;_select;id;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(Rk(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(n){return new(n||i)($t(Mr),$t(la),$t(Dv,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})(),$W={provide:sl,useExisting:zi(()=>Fk),multi:!0};function Sk(i,e){return i==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${i}: ${e}`.slice(0,50))}function XW(i){return i.split(":")[0]}var Fk=(()=>{class i extends yp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let n;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));n=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else n=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(n)}registerOnChange(t){this.onChange=n=>{let r=[],o=n.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let l=s[a],c=this._getOptionValue(l.value);r.push(c)}}else{let s=n.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let n=(this._idCounter++).toString();return this._optionMap.set(n,t),n}_getOptionId(t){for(let n of this._optionMap.keys())if(this._compareWith(this._optionMap.get(n)._value,t))return n;return null}_getOptionValue(t){let n=XW(t);return this._optionMap.has(n)?this._optionMap.get(n)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(n,r){n&1&&ie("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ao([$W]),Dr]})}return i})(),Nk=(()=>{class i{_element;_renderer;_select;id;_value;constructor(t,n,r){this._element=t,this._renderer=n,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(Sk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Sk(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(n){return new(n||i)($t(Mr),$t(la),$t(Fk,9))};static \u0275dir=Zn({type:i,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return i})();function Lk(i){return typeof i=="number"?i:parseFloat(i)}var Uk=(()=>{class i{_validator=pk;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):pk,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(n){return new(n||i)};static \u0275dir=Zn({type:i,features:[yu]})}return i})(),YW={provide:Zw,useExisting:zi(()=>_p),multi:!0},_p=(()=>{class i extends Uk{max;inputName="max";normalizeInput=t=>Lk(t);createValidator=t=>_W(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[ao([YW]),Dr]})}return i})(),qW={provide:Zw,useExisting:zi(()=>Sp),multi:!0},Sp=(()=>{class i extends Uk{min;inputName="min";normalizeInput=t=>Lk(t);createValidator=t=>xW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=oa(i)))(r||i)}})();static \u0275dir=Zn({type:i,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(n,r){n&2&&Pn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[ao([qW]),Dr]})}return i})();var KW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({})}return i})();var fo=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Ak,useValue:t.callSetDisabledState??Jw}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=ca({type:i});static \u0275inj=cs({imports:[KW]})}return i})();var _l={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Sl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},hF=0,kE=1,pF=2;var Xp=1,mF=2,gf=3,Xi=0,Ki=1,Es=2,Ms=0,Wc=1,FE=2,NE=3,LE=4,gF=5,ml=100,vF=101,bF=102,yF=103,xF=104,_F=200,SF=201,CF=202,wF=203,Qv=204,eb=205,EF=206,MF=207,TF=208,DF=209,IF=210,PF=211,AF=212,OF=213,RF=214,Eb=0,Mb=1,Tb=2,$c=3,Db=4,Ib=5,Pb=6,Ab=7,Ob=0,kF=1,FF=2,Bo=0,UE=1,BE=2,zE=3,td=4,VE=5,GE=6,HE=7;var SE=300,Cl=301,nd=302,Rb=303,kb=304,Yp=306,tf=1e3,Oi=1001,tb=1002,hi=1003,NF=1004;var qp=1005;var jn=1006,Fb=1007;var go=1008;var lr=1009,jE=1010,WE=1011,vf=1012,Nb=1013,zo=1014,Vo=1015,Ts=1016,Lb=1017,Ub=1018,bf=1020,$E=35902,XE=35899,YE=1021,qE=1022,vo=1023,Ss=1026,wl=1027,KE=1028,Bb=1029,id=1030,zb=1031;var Vb=1033,Kp=33776,Zp=33777,Jp=33778,Qp=33779,Gb=35840,Hb=35841,jb=35842,Wb=35843,$b=36196,Xb=37492,Yb=37496,qb=37488,Kb=37489,Zb=37490,Jb=37491,Qb=37808,ey=37809,ty=37810,ny=37811,iy=37812,ry=37813,oy=37814,sy=37815,ay=37816,ly=37817,cy=37818,dy=37819,uy=37820,fy=37821,hy=36492,py=36494,my=36495,gy=36283,vy=36284,by=36285,yy=36286;var Pp=2300,nb=2301,Jv=2302,CE=2400,wE=2401,EE=2402;var LF=3200;var xy=0,UF=1,wa="",bn="srgb",Xc="srgb-linear",Ap="linear",on="srgb";var jc=7680;var ME=519,BF=512,zF=513,VF=514,_y=515,GF=516,HF=517,Sy=518,jF=519,TE=35044;var ZE="300 es",Lo=2e3,Op=2001;function JE(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function ZW(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)}function nf(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function WF(){let i=nf("canvas");return i.style.display="block",i}var Bk={},rf=null;function QE(...i){let e="THREE."+i.shift();rf?rf("log",e,...i):console.log(e,...i)}function ht(...i){let e="THREE."+i.shift();rf?rf("warn",e,...i):console.warn(e,...i)}function yt(...i){let e="THREE."+i.shift();rf?rf("error",e,...i):console.error(e,...i)}function of(...i){let e=i.join(" ");e in Bk||(Bk[e]=!0,ht(...i))}function $F(i,e,t){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}var Cs=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){let n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){let n=this._listeners;if(n===void 0)return;let r=n[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let n=t[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Pi=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],zk=1234567,Dp=Math.PI/180,sf=180/Math.PI;function yf(){let i=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Pi[i&255]+Pi[i>>8&255]+Pi[i>>16&255]+Pi[i>>24&255]+"-"+Pi[e&255]+Pi[e>>8&255]+"-"+Pi[e>>16&15|64]+Pi[e>>24&255]+"-"+Pi[t&63|128]+Pi[t>>8&255]+"-"+Pi[t>>16&255]+Pi[t>>24&255]+Pi[n&255]+Pi[n>>8&255]+Pi[n>>16&255]+Pi[n>>24&255]).toLowerCase()}function Ht(i,e,t){return Math.max(e,Math.min(t,i))}function eM(i,e){return(i%e+e)%e}function JW(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function QW(i,e,t){return i!==e?(t-i)/(e-i):0}function Ip(i,e,t){return(1-t)*i+t*e}function e9(i,e,t,n){return Ip(i,e,1-Math.exp(-t*n))}function t9(i,e=1){return e-Math.abs(eM(i,e*2)-e)}function n9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function i9(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function r9(i,e){return i+Math.floor(Math.random()*(e-i+1))}function o9(i,e){return i+Math.random()*(e-i)}function s9(i){return i*(.5-Math.random())}function a9(i){i!==void 0&&(zk=i);let e=zk+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function l9(i){return i*Dp}function c9(i){return i*sf}function d9(i){return(i&i-1)===0&&i!==0}function u9(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function f9(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function h9(i,e,t,n,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+n)/2),d=s((e+n)/2),u=o((e-n)/2),f=s((e-n)/2),h=o((n-e)/2),p=s((n-e)/2);switch(r){case"XYX":i.set(a*d,l*u,l*f,a*c);break;case"YZY":i.set(l*f,a*d,l*u,a*c);break;case"ZXZ":i.set(l*u,l*f,a*d,a*c);break;case"XZX":i.set(a*d,l*p,l*h,a*c);break;case"YXY":i.set(l*h,a*d,l*p,a*c);break;case"ZYZ":i.set(l*p,l*h,a*d,a*c);break;default:ht("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Ju(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function $i(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var nn={DEG2RAD:Dp,RAD2DEG:sf,generateUUID:yf,clamp:Ht,euclideanModulo:eM,mapLinear:JW,inverseLerp:QW,lerp:Ip,damp:e9,pingpong:t9,smoothstep:n9,smootherstep:i9,randInt:r9,randFloat:o9,randFloatSpread:s9,seededRandom:a9,degToRad:l9,radToDeg:c9,isPowerOfTwo:d9,ceilPowerOfTwo:u9,floorPowerOfTwo:f9,setQuaternionFromProperEuler:h9,normalize:$i,denormalize:Ju},gt=class i{constructor(e=0,t=0){i.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ht(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*r+e.x,this.y=o*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},mo=class{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,o,s,a){let l=n[r+0],c=n[r+1],d=n[r+2],u=n[r+3],f=o[s+0],h=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,s){let a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[s],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let n=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(r/2),u=a(o/2),f=l(n/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:ht("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=n+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(n>a&&n>u){let h=2*Math.sqrt(1+n-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-n-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-n-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ht(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-n*c,this._z=o*d+s*c+n*l-r*a,this._w=s*d-n*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(n=-n,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},G=class i{constructor(e=0,t=0,n=0){i.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Vk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Vk.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*n),d=2*(a*t-o*r),u=2*(o*n-s*t);return this.x=t+l*c+s*u-a*d,this.y=n+l*d+a*c-o*u,this.z=r+l*u+o*d-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-n*l,this.z=n*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Qw.copy(this).projectOnVector(e),this.sub(Qw)}reflect(e){return this.sub(Qw.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let n=this.dot(e)/t;return Math.acos(Ht(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},Qw=new G,Vk=new mo,At=class i{constructor(e,t,n,r,o,s,a,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c)}set(e,t,n,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=n,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[3],l=n[6],c=n[1],d=n[4],u=n[7],f=n[2],h=n[5],p=n[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],x=r[7],_=r[2],E=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*E,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*E,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*E,o[8]=f*m+h*x+p*D,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-n*o*d+n*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,f=a*l-d*o,h=c*o-s*l,p=t*u+n*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*n)*v,e[2]=(a*n-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(n*l-c*t)*v,e[8]=(s*t-n*o)*v,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(eE.makeScale(e,t)),this}rotate(e){return this.premultiply(eE.makeRotation(-e)),this}translate(e,t){return this.premultiply(eE.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}},eE=new At,Gk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Hk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function p9(){let i={enabled:!0,workingColorSpace:Xc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ya(r.r),r.g=ya(r.g),r.b=ya(r.b)),this.spaces[o].primaries!==this.spaces[s].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===on&&(r.r=Qu(r.r),r.g=Qu(r.g),r.b=Qu(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===wa?Ap:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,s){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return of("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return of("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[Xc]:{primaries:e,whitePoint:n,transfer:Ap,toXYZ:Gk,fromXYZ:Hk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:bn},outputColorSpaceConfig:{drawingBufferColorSpace:bn}},[bn]:{primaries:e,whitePoint:n,transfer:on,toXYZ:Gk,fromXYZ:Hk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:bn}}}),i}var Gt=p9();function ya(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function Qu(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Bu,ib=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Bu===void 0&&(Bu=nf("canvas")),Bu.width=e.width,Bu.height=e.height;let r=Bu.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Bu}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=nf("canvas");t.width=e.width,t.height=e.height;let n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);let r=n.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=ya(o[s]/255)*255;return n.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(ya(t[n]/255)*255):t[n]=ya(t[n]);return{data:t,width:e.width,height:e.height}}else return ht("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},m9=0,af=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:m9++}),this.uuid=yf(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let n={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)r[s].isDataTexture?o.push(tE(r[s].image)):o.push(tE(r[s]))}else o=tE(r);n.url=o}return t||(e.images[this.uuid]=n),n}};function tE(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?ib.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(ht("Texture: Unable to serialize Texture."),{})}var g9=0,nE=new G,Go=(()=>{class i extends Cs{constructor(t=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Oi,o=Oi,s=jn,a=go,l=vo,c=lr,d=i.DEFAULT_ANISOTROPY,u=wa){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:g9++}),this.uuid=yf(),this.name="",this.source=new af(t),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new gt(0,0),this.repeat=new gt(1,1),this.center=new gt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new At,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(nE).x}get height(){return this.source.getSize(nE).y}get depth(){return this.source.getSize(nE).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,n){this.updateRanges.push({start:t,count:n})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let n in t){let r=t[n];if(r===void 0){ht(`Texture.setValues(): parameter '${n}' has value of undefined.`);continue}let o=this[n];if(o===void 0){ht(`Texture.setValues(): property '${n}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[n]=r}}toJSON(t){let n=t===void 0||typeof t=="string";if(!n&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==SE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case tf:t.x=t.x-Math.floor(t.x);break;case Oi:t.x=t.x<0?0:1;break;case tb:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case tf:t.y=t.y-Math.floor(t.y);break;case Oi:t.y=t.y<0?0:1;break;case tb:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=SE,i.DEFAULT_ANISOTROPY=1,i})(),An=class i{constructor(e=0,t=0,n=0,r=1){i.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*n+s[11]*r+s[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,x=(h+1)/2,_=(m+1)/2,E=(d+f)/4,D=(u+v)/4,A=(p+g)/4;return y>x&&y>_?y<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(y),r=E/n,o=D/n):x>_?x<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),n=E/r,o=A/r):_<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),n=D/o,r=A/o),this.set(n,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Ht(this.x,e.x,t.x),this.y=Ht(this.y,e.y,t.y),this.z=Ht(this.z,e.z,t.z),this.w=Ht(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Ht(this.x,e,t),this.y=Ht(this.y,e,t),this.z=Ht(this.z,e,t),this.w=Ht(this.w,e,t),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Ht(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},rb=class extends Cs{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new An(0,0,e,t),this.scissorTest=!1,this.viewport=new An(0,0,e,t);let r={width:e,height:t,depth:n.depth},o=new Go(r);this.textures=[];let s=n.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){let t={minFilter:jn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=n,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new af(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},kr=class extends rb{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}},Rp=class extends Go{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var ob=class extends Go{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=hi,this.minFilter=hi,this.wrapR=Oi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Yi=class{constructor(e=new G(1/0,1/0,1/0),t=new G(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(ko.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(ko.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let n=ko.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let n=e.geometry;if(n!==void 0){let o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,ko):ko.fromBufferAttribute(o,s),ko.applyMatrix4(e.matrixWorld),this.expandByPoint(ko);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Pv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Pv.copy(n.boundingBox)),Pv.applyMatrix4(e.matrixWorld),this.union(Pv)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,ko),ko.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Cp),Av.subVectors(this.max,Cp),zu.subVectors(e.a,Cp),Vu.subVectors(e.b,Cp),Gu.subVectors(e.c,Cp),ll.subVectors(Vu,zu),cl.subVectors(Gu,Vu),zc.subVectors(zu,Gu);let t=[0,-ll.z,ll.y,0,-cl.z,cl.y,0,-zc.z,zc.y,ll.z,0,-ll.x,cl.z,0,-cl.x,zc.z,0,-zc.x,-ll.y,ll.x,0,-cl.y,cl.x,0,-zc.y,zc.x,0];return!iE(t,zu,Vu,Gu,Av)||(t=[1,0,0,0,1,0,0,0,1],!iE(t,zu,Vu,Gu,Av))?!1:(Ov.crossVectors(ll,cl),t=[Ov.x,Ov.y,Ov.z],iE(t,zu,Vu,Gu,Av))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,ko).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(ko).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(fa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fa),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},fa=[new G,new G,new G,new G,new G,new G,new G,new G],ko=new G,Pv=new Yi,zu=new G,Vu=new G,Gu=new G,ll=new G,cl=new G,zc=new G,Cp=new G,Av=new G,Ov=new G,Vc=new G;function iE(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){Vc.fromArray(i,o);let a=r.x*Math.abs(Vc.x)+r.y*Math.abs(Vc.y)+r.z*Math.abs(Vc.z),l=e.dot(Vc),c=t.dot(Vc),d=n.dot(Vc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var v9=new Yi,wp=new G,rE=new G,gl=class{constructor(e=new G,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):v9.setFromPoints(e).getCenter(n);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;wp.subVectors(e,this.center);let t=wp.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(wp,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(rE.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(wp.copy(e.center).add(rE)),this.expandByPoint(wp.copy(e.center).sub(rE))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},ha=new G,oE=new G,Rv=new G,dl=new G,sE=new G,kv=new G,aE=new G,xa=class{constructor(e=new G,t=new G(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ha)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=ha.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ha.copy(this.origin).addScaledVector(this.direction,t),ha.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){oE.copy(e).add(t).multiplyScalar(.5),Rv.copy(t).sub(e).normalize(),dl.copy(this.origin).sub(oE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Rv),a=dl.dot(this.direction),l=-dl.dot(Rv),c=dl.lengthSq(),d=Math.abs(1-s*s),u,f,h,p;if(d>0)if(u=s*l-a,f=s*a-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let v=1/d;u*=v,f*=v,h=u*(u+s*f+2*a)+f*(s*u+f+2*l)+c}else f=o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-s*o+a)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(s*o+a)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=s>0?-o:o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(oE).addScaledVector(Rv,f),h}intersectSphere(e,t){ha.subVectors(e.center,this.origin);let n=ha.dot(this.direction),r=ha.dot(ha)-n*n,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=n-s,l=n+s;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,s=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,s=(e.min.y-f.y)*d),n>s||o>r||((o>n||isNaN(n))&&(n=o),(s<r||isNaN(r))&&(r=s),u>=0?(a=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(a=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),n>l||a>r)||((a>n||n!==n)&&(n=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ha)!==null}intersectTriangle(e,t,n,r,o){sE.subVectors(t,e),kv.subVectors(n,e),aE.crossVectors(sE,kv);let s=this.direction.dot(aE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;dl.subVectors(this.origin,e);let l=a*this.direction.dot(kv.crossVectors(dl,kv));if(l<0)return null;let c=a*this.direction.dot(sE.cross(dl));if(c<0||l+c>s)return null;let d=-a*dl.dot(aE);return d<0?null:this.at(d/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Mn=class i{constructor(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g)}set(e,t,n,r,o,s,a,l,c,d,u,f,h,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=d,m[10]=u,m[14]=f,m[3]=h,m[7]=p,m[11]=v,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new i().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),n.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this)}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,n=e.elements,r=1/Hu.setFromMatrixColumn(e,0).length(),o=1/Hu.setFromMatrixColumn(e,1).length(),s=1/Hu.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,n=e.x,r=e.y,o=e.z,s=Math.cos(n),a=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-v*c,t[9]=-a*l,t[2]=v-f*c,t[6]=p+h*c,t[10]=s*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f+v*a,t[4]=p*a-h,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=h*a-p,t[6]=v+f*a,t[10]=s*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f-v*a,t[4]=-s*u,t[8]=p+h*a,t[1]=h+p*a,t[5]=s*d,t[9]=v-f*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+v,t[1]=l*u,t[5]=v*c+f,t[9]=h*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=v-f*u,t[8]=p*u+h,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-v*u}else if(e.order==="XZY"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+v,t[5]=s*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=a*d,t[10]=v*u+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(b9,e,y9)}lookAt(e,t,n){let r=this.elements;return Ar.subVectors(e,t),Ar.lengthSq()===0&&(Ar.z=1),Ar.normalize(),ul.crossVectors(n,Ar),ul.lengthSq()===0&&(Math.abs(n.z)===1?Ar.x+=1e-4:Ar.z+=1e-4,Ar.normalize(),ul.crossVectors(n,Ar)),ul.normalize(),Fv.crossVectors(Ar,ul),r[0]=ul.x,r[4]=Fv.x,r[8]=Ar.x,r[1]=ul.y,r[5]=Fv.y,r[9]=Ar.y,r[2]=ul.z,r[6]=Fv.z,r[10]=Ar.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[4],l=n[8],c=n[12],d=n[1],u=n[5],f=n[9],h=n[13],p=n[2],v=n[6],g=n[10],m=n[14],b=n[3],y=n[7],x=n[11],_=n[15],E=r[0],D=r[4],A=r[8],S=r[12],I=r[1],L=r[5],H=r[9],z=r[13],X=r[2],q=r[6],K=r[10],j=r[14],te=r[3],ye=r[7],xe=r[11],Ce=r[15];return o[0]=s*E+a*I+l*X+c*te,o[4]=s*D+a*L+l*q+c*ye,o[8]=s*A+a*H+l*K+c*xe,o[12]=s*S+a*z+l*j+c*Ce,o[1]=d*E+u*I+f*X+h*te,o[5]=d*D+u*L+f*q+h*ye,o[9]=d*A+u*H+f*K+h*xe,o[13]=d*S+u*z+f*j+h*Ce,o[2]=p*E+v*I+g*X+m*te,o[6]=p*D+v*L+g*q+m*ye,o[10]=p*A+v*H+g*K+m*xe,o[14]=p*S+v*z+g*j+m*Ce,o[3]=b*E+y*I+x*X+_*te,o[7]=b*D+y*L+x*q+_*ye,o[11]=b*A+y*H+x*K+_*xe,o[15]=b*S+y*z+x*j+_*Ce,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],n=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,x=a*f-l*u,_=s*h-c*d,E=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-n*(p*b-g*_+m*E)+r*(p*y-v*_+m*D)-o*(p*x-v*E+g*D)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,E=t*b+n*y+r*x+o*_;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/E;return e[0]=b*D,e[1]=(v*f*o-u*g*o-v*r*h+n*g*h+u*r*m-n*f*m)*D,e[2]=(a*g*o-v*l*o+v*r*c-n*g*c-a*r*m+n*l*m)*D,e[3]=(u*l*o-a*f*o-u*r*c+n*f*c+a*r*h-n*l*h)*D,e[4]=y*D,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*D,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*D,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*D,e[8]=x*D,e[9]=(p*u*o-d*v*o-p*n*h+t*v*h+d*n*m-t*u*m)*D,e[10]=(s*v*o-p*a*o+p*n*c-t*v*c-s*n*m+t*a*m)*D,e[11]=(d*a*o-s*u*o-d*n*c+t*u*c+s*n*h-t*a*h)*D,e[12]=_*D,e[13]=(d*v*r-p*u*r+p*n*f-t*v*f-d*n*g+t*u*g)*D,e[14]=(p*a*r-s*v*r-p*n*l+t*v*l+s*n*g-t*a*g)*D,e[15]=(s*u*r-d*a*r+d*n*l-t*u*l-s*n*f+t*a*f)*D,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,s){return this.set(1,n,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,x=l*u,_=n.x,E=n.y,D=n.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*E,r[5]=(1-(f+m))*E,r[6]=(g+b)*E,r[7]=0,r[8]=(p+y)*D,r[9]=(g-b)*D,r[10]=(1-(f+v))*D,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return n.set(1,1,1),t.identity(),this;let o=Hu.set(r[0],r[1],r[2]).length(),s=Hu.set(r[4],r[5],r[6]).length(),a=Hu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Fo.copy(this);let c=1/o,d=1/s,u=1/a;return Fo.elements[0]*=c,Fo.elements[1]*=c,Fo.elements[2]*=c,Fo.elements[4]*=d,Fo.elements[5]*=d,Fo.elements[6]*=d,Fo.elements[8]*=u,Fo.elements[9]*=u,Fo.elements[10]*=u,t.setFromRotationMatrix(Fo),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s,a=Lo,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(n-r),f=(t+e)/(t-e),h=(n+r)/(n-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===Lo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Op)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,r,o,s,a=Lo,l=!1){let c=this.elements,d=2/(t-e),u=2/(n-r),f=-(t+e)/(t-e),h=-(n+r)/(n-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===Lo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Op)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}},Hu=new G,Fo=new Mn,b9=new G(0,0,0),y9=new G(1,1,1),ul=new G,Fv=new G,Ar=new G,jk=new Mn,Wk=new mo,_a=(()=>{class i{constructor(t=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=n,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,n,r,o=this._order){return this._x=t,this._y=n,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,n=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(n){case"XYZ":this._y=Math.asin(Ht(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Ht(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Ht(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Ht(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(Ht(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Ht(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:ht("Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,n,r){return jk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(jk,n,r)}setFromVector3(t,n=this._order){return this.set(t.x,t.y,t.z,n)}reorder(t){return Wk.setFromEuler(this),this.setFromQuaternion(Wk,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],n=0){return t[n]=this._x,t[n+1]=this._y,t[n+2]=this._z,t[n+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return i.DEFAULT_ORDER="XYZ",i})(),lf=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},x9=0,$k=new G,ju=new mo,pa=new Mn,Nv=new G,Ep=new G,_9=new G,S9=new mo,Xk=new G(1,0,0),Yk=new G(0,1,0),qk=new G(0,0,1),Kk={type:"added"},C9={type:"removed"},Wu={type:"childadded",child:null},lE={type:"childremoved",child:null},Fr=(()=>{class i extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:x9++}),this.uuid=yf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let t=new G,n=new _a,r=new mo,o=new G(1,1,1);function s(){r.setFromEuler(n,!1)}function a(){n.setFromQuaternion(r,void 0,!1)}n._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new lf,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,n){this.quaternion.setFromAxisAngle(t,n)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,n){return ju.setFromAxisAngle(t,n),this.quaternion.multiply(ju),this}rotateOnWorldAxis(t,n){return ju.setFromAxisAngle(t,n),this.quaternion.premultiply(ju),this}rotateX(t){return this.rotateOnAxis(Xk,t)}rotateY(t){return this.rotateOnAxis(Yk,t)}rotateZ(t){return this.rotateOnAxis(qk,t)}translateOnAxis(t,n){return $k.copy(t).applyQuaternion(this.quaternion),this.position.add($k.multiplyScalar(n)),this}translateX(t){return this.translateOnAxis(Xk,t)}translateY(t){return this.translateOnAxis(Yk,t)}translateZ(t){return this.translateOnAxis(qk,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(pa.copy(this.matrixWorld).invert())}lookAt(t,n,r){t.isVector3?Nv.copy(t):Nv.set(t,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Ep.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?pa.lookAt(Ep,Nv,this.up):pa.lookAt(Nv,Ep,this.up),this.quaternion.setFromRotationMatrix(pa),o&&(pa.extractRotation(o.matrixWorld),ju.setFromRotationMatrix(pa),this.quaternion.premultiply(ju.invert()))}add(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return t===this?(yt("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(Kk),Wu.child=t,this.dispatchEvent(Wu),Wu.child=null):yt("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let n=this.children.indexOf(t);return n!==-1&&(t.parent=null,this.children.splice(n,1),t.dispatchEvent(C9),lE.child=t,this.dispatchEvent(lE),lE.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),pa.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),pa.multiply(t.parent.matrixWorld)),t.applyMatrix4(pa),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Kk),Wu.child=t,this.dispatchEvent(Wu),Wu.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,n){if(this[t]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,n);if(a!==void 0)return a}}getObjectsByProperty(t,n,r=[]){this[t]===n&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,n,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ep,t,_9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Ep,S9,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return t.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(t){t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(t)}traverseAncestors(t){let n=this.parent;n!==null&&(t(n),n.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(t)}updateWorldMatrix(t,n){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let n=t===void 0||typeof t=="string",r={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(n){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,n=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),n===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new G(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),No=new G,ma=new G,cE=new G,ga=new G,$u=new G,Xu=new G,Zk=new G,dE=new G,uE=new G,fE=new G,hE=new An,pE=new An,mE=new An,pl=class i{constructor(e=new G,t=new G,n=new G){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),No.subVectors(e,t),r.cross(No);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){No.subVectors(r,t),ma.subVectors(n,t),cE.subVectors(e,t);let s=No.dot(No),a=No.dot(ma),l=No.dot(cE),c=ma.dot(ma),d=ma.dot(cE),u=s*c-a*a;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-a*d)*f,p=(s*d-a*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,ga)===null?!1:ga.x>=0&&ga.y>=0&&ga.x+ga.y<=1}static getInterpolation(e,t,n,r,o,s,a,l){return this.getBarycoord(e,t,n,r,ga)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,ga.x),l.addScaledVector(s,ga.y),l.addScaledVector(a,ga.z),l)}static getInterpolatedAttribute(e,t,n,r,o,s){return hE.setScalar(0),pE.setScalar(0),mE.setScalar(0),hE.fromBufferAttribute(e,t),pE.fromBufferAttribute(e,n),mE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(hE,o.x),s.addScaledVector(pE,o.y),s.addScaledVector(mE,o.z),s}static isFrontFacing(e,t,n,r){return No.subVectors(n,t),ma.subVectors(e,t),No.cross(ma).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return No.subVectors(this.c,this.b),ma.subVectors(this.a,this.b),No.cross(ma).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return i.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,o){return i.getInterpolation(e,this.a,this.b,this.c,t,n,r,o)}containsPoint(e){return i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,o=this.c,s,a;$u.subVectors(r,n),Xu.subVectors(o,n),dE.subVectors(e,n);let l=$u.dot(dE),c=Xu.dot(dE);if(l<=0&&c<=0)return t.copy(n);uE.subVectors(e,r);let d=$u.dot(uE),u=Xu.dot(uE);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(n).addScaledVector($u,s);fE.subVectors(e,o);let h=$u.dot(fE),p=Xu.dot(fE);if(p>=0&&h<=p)return t.copy(o);let v=h*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(n).addScaledVector(Xu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Zk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Zk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(n).addScaledVector($u,s).addScaledVector(Xu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},XF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},fl={h:0,s:0,l:0},Lv={h:0,s:0,l:0};function gE(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}var ct=class{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=bn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=n,Gt.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Gt.workingColorSpace){if(e=eM(e,1),t=Ht(t,0,1),n=Ht(n,0,1),t===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o;this.r=gE(s,o,e+1/3),this.g=gE(s,o,e),this.b=gE(s,o,e-1/3)}return Gt.colorSpaceToWorking(this,r),this}setStyle(e,t=bn){function n(o){o!==void 0&&parseFloat(o)<1&&ht("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:ht("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(s===6)return this.setHex(parseInt(o,16),t);ht("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=bn){let n=XF[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ht("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ya(e.r),this.g=ya(e.g),this.b=ya(e.b),this}copyLinearToSRGB(e){return this.r=Qu(e.r),this.g=Qu(e.g),this.b=Qu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=bn){return Gt.workingToColorSpace(Ai.copy(this),e),Math.round(Ht(Ai.r*255,0,255))*65536+Math.round(Ht(Ai.g*255,0,255))*256+Math.round(Ht(Ai.b*255,0,255))}getHexString(e=bn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.workingToColorSpace(Ai.copy(this),t);let n=Ai.r,r=Ai.g,o=Ai.b,s=Math.max(n,r,o),a=Math.min(n,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case n:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-n)/u+2;break;case o:l=(n-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=Gt.workingColorSpace){return Gt.workingToColorSpace(Ai.copy(this),t),e.r=Ai.r,e.g=Ai.g,e.b=Ai.b,e}getStyle(e=bn){Gt.workingToColorSpace(Ai.copy(this),e);let t=Ai.r,n=Ai.g,r=Ai.b;return e!==bn?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(e,t,n){return this.getHSL(fl),this.setHSL(fl.h+e,fl.s+t,fl.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(fl),e.getHSL(Lv);let n=Ip(fl.h,Lv.h,t),r=Ip(fl.s,Lv.s,t),o=Ip(fl.l,Lv.l,t);return this.setHSL(n,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,n=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*r,this.g=o[1]*t+o[4]*n+o[7]*r,this.b=o[2]*t+o[5]*n+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ai=new ct;ct.NAMES=XF;var w9=0,ar=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:w9++}),this.uuid=yf(),this.name="",this.type="Material",this.blending=Wc,this.side=Xi,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Qv,this.blendDst=eb,this.blendEquation=ml,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new ct(0,0,0),this.blendAlpha=0,this.depthFunc=$c,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=ME,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=jc,this.stencilZFail=jc,this.stencilZPass=jc,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){ht(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ht(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Wc&&(n.blending=this.blending),this.side!==Xi&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Qv&&(n.blendSrc=this.blendSrc),this.blendDst!==eb&&(n.blendDst=this.blendDst),this.blendEquation!==ml&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==$c&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==ME&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==jc&&(n.stencilFail=this.stencilFail),this.stencilZFail!==jc&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==jc&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(o){let s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}if(t){let o=r(e.textures),s=r(e.images);o.length>0&&(n.textures=o),s.length>0&&(n.images=s)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,n=null;if(t!==null){let r=t.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},kp=class extends ar{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new ct(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new _a,this.combine=Ob,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};var Jn=new G,Uv=new gt,E9=0,Rr=class{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:E9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=TE,this.updateRanges=[],this.gpuType=Vo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)Uv.fromBufferAttribute(this,t),Uv.applyMatrix3(e),this.setXY(t,Uv.x,Uv.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix3(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix4(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.applyNormalMatrix(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Jn.fromBufferAttribute(this,t),Jn.transformDirection(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=Ju(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=$i(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ju(t,this.array)),t}setX(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ju(t,this.array)),t}setY(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Ju(t,this.array)),t}setZ(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Ju(t,this.array)),t}setW(e,t){return this.normalized&&(t=$i(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,o){return e*=this.itemSize,this.normalized&&(t=$i(t,this.array),n=$i(n,this.array),r=$i(r,this.array),o=$i(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==TE&&(e.usage=this.usage),e}};var Fp=class extends Rr{constructor(e,t,n){super(new Uint16Array(e),t,n)}};var Np=class extends Rr{constructor(e,t,n){super(new Uint32Array(e),t,n)}};var Hn=class extends Rr{constructor(e,t,n){super(new Float32Array(e),t,n)}},M9=0,ho=new Mn,vE=new Fr,Yu=new G,Or=new Yi,Mp=new Yi,ui=new G,ei=class i extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:M9++}),this.uuid=yf(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(JE(e)?Np:Fp)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new At().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return ho.makeRotationFromQuaternion(e),this.applyMatrix4(ho),this}rotateX(e){return ho.makeRotationX(e),this.applyMatrix4(ho),this}rotateY(e){return ho.makeRotationY(e),this.applyMatrix4(ho),this}rotateZ(e){return ho.makeRotationZ(e),this.applyMatrix4(ho),this}translate(e,t,n){return ho.makeTranslation(e,t,n),this.applyMatrix4(ho),this}scale(e,t,n){return ho.makeScale(e,t,n),this.applyMatrix4(ho),this}lookAt(e){return vE.lookAt(e),vE.updateMatrix(),this.applyMatrix4(vE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Yu).negate(),this.translate(Yu.x,Yu.y,Yu.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let n=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];n.push(s.x,s.y,s.z||0)}this.setAttribute("position",new Hn(n,3))}else{let n=Math.min(e.length,t.count);for(let r=0;r<n;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&ht("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Yi);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){yt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new G(-1/0,-1/0,-1/0),new G(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n<r;n++){let o=t[n];Or.setFromBufferAttribute(o),this.morphTargetsRelative?(ui.addVectors(this.boundingBox.min,Or.min),this.boundingBox.expandByPoint(ui),ui.addVectors(this.boundingBox.max,Or.max),this.boundingBox.expandByPoint(ui)):(this.boundingBox.expandByPoint(Or.min),this.boundingBox.expandByPoint(Or.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&yt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new gl);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){yt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new G,1/0);return}if(e){let n=this.boundingSphere.center;if(Or.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];Mp.setFromBufferAttribute(a),this.morphTargetsRelative?(ui.addVectors(Or.min,Mp.min),Or.expandByPoint(ui),ui.addVectors(Or.max,Mp.max),Or.expandByPoint(ui)):(Or.expandByPoint(Mp.min),Or.expandByPoint(Mp.max))}Or.getCenter(n);let r=0;for(let o=0,s=e.count;o<s;o++)ui.fromBufferAttribute(e,o),r=Math.max(r,n.distanceToSquared(ui));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)ui.fromBufferAttribute(a,c),l&&(Yu.fromBufferAttribute(e,c),ui.add(Yu)),r=Math.max(r,n.distanceToSquared(ui))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&yt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){yt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Rr(new Float32Array(4*n.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let A=0;A<n.count;A++)a[A]=new G,l[A]=new G;let c=new G,d=new G,u=new G,f=new gt,h=new gt,p=new gt,v=new G,g=new G;function m(A,S,I){c.fromBufferAttribute(n,A),d.fromBufferAttribute(n,S),u.fromBufferAttribute(n,I),f.fromBufferAttribute(o,A),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,I),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[A].add(v),a[S].add(v),a[I].add(v),l[A].add(g),l[S].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)m(e.getX(z+0),e.getX(z+1),e.getX(z+2))}let y=new G,x=new G,_=new G,E=new G;function D(A){_.fromBufferAttribute(r,A),E.copy(_);let S=a[A];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(E,S);let L=x.dot(l[A])<0?-1:1;s.setXYZW(A,y.x,y.y,y.z,L)}for(let A=0,S=b.length;A<S;++A){let I=b[A],L=I.start,H=I.count;for(let z=L,X=L+H;z<X;z+=3)D(e.getX(z+0)),D(e.getX(z+1)),D(e.getX(z+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Rr(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,h=n.count;f<h;f++)n.setXYZ(f,0,0,0);let r=new G,o=new G,s=new G,a=new G,l=new G,c=new G,d=new G,u=new G;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,v),c.fromBufferAttribute(n,g),a.add(d),l.add(d),c.add(d),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(v,l.x,l.y,l.z),n.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),n.setXYZ(f+0,d.x,d.y,d.z),n.setXYZ(f+1,d.x,d.y,d.z),n.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)ui.fromBufferAttribute(e,t),ui.normalize(),e.setXYZ(t,ui.x,ui.y,ui.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new Rr(f,d,u)}if(this.index===null)return ht("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new i,n=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,n);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,n);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let n=this.attributes;for(let l in n){let c=n[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(r[l]=d,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let n=e.index;n!==null&&this.setIndex(n.clone());let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,d=s.length;c<d;c++){let u=s[c];this.addGroup(u.start,u.count,u.materialIndex)}let a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},Jk=new Mn,Gc=new xa,Bv=new gl,Qk=new G,zv=new G,Vv=new G,Gv=new G,bE=new G,Hv=new G,eF=new G,jv=new G,qi=class extends Fr{constructor(e=new ei,t=new kp){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}getVertexPosition(e,t){let n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,s=n.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){Hv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(bE.fromBufferAttribute(u,e),s?Hv.addScaledVector(bE,d):Hv.addScaledVector(bE.sub(t),d))}t.add(Hv)}return t}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),Bv.copy(n.boundingSphere),Bv.applyMatrix4(o),Gc.copy(e.ray).recast(e.near),!(Bv.containsPoint(Gc.origin)===!1&&(Gc.intersectSphere(Bv,Qk)===null||Gc.origin.distanceToSquared(Qk)>(e.far-e.near)**2))&&(Jk.copy(o).invert(),Gc.copy(e.ray).applyMatrix4(Jk),!(n.boundingBox!==null&&Gc.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Gc)))}_computeIntersections(e,t,n){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=a.getX(x),D=a.getX(x+1),A=a.getX(x+2);r=Wv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),x=a.getX(g+2);r=Wv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=x,D=x+1,A=x+2;r=Wv(this,m,e,n,c,d,u,E,D,A),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,x=g+2;r=Wv(this,s,e,n,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function T9(i,e,t,n,r,o,s,a){let l;if(e.side===Ki?l=n.intersectTriangle(s,o,r,!0,a):l=n.intersectTriangle(r,o,s,e.side===Xi,a),l===null)return null;jv.copy(a),jv.applyMatrix4(i.matrixWorld);let c=t.ray.origin.distanceTo(jv);return c<t.near||c>t.far?null:{distance:c,point:jv.clone(),object:i}}function Wv(i,e,t,n,r,o,s,a,l,c){i.getVertexPosition(a,zv),i.getVertexPosition(l,Vv),i.getVertexPosition(c,Gv);let d=T9(i,e,t,n,zv,Vv,Gv,eF);if(d){let u=new G;pl.getBarycoord(eF,zv,Vv,Gv,u),r&&(d.uv=pl.getInterpolatedAttribute(r,a,l,c,u,new gt)),o&&(d.uv1=pl.getInterpolatedAttribute(o,a,l,c,u,new gt)),s&&(d.normal=pl.getInterpolatedAttribute(s,a,l,c,u,new G),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new G,materialIndex:0};pl.getNormal(zv,Vv,Gv,f.normal),d.face=f,d.barycoord=u}return d}var cf=class i extends ei{constructor(e=1,t=1,n=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,n,t,e,s,o,0),p("z","y","x",1,-1,n,t,-e,s,o,1),p("x","z","y",1,1,e,n,t,r,s,2),p("x","z","y",1,-1,e,n,-t,r,s,3),p("x","y","z",1,-1,e,t,n,r,o,4),p("x","y","z",-1,-1,e,t,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new Hn(c,3)),this.setAttribute("normal",new Hn(d,3)),this.setAttribute("uv",new Hn(u,2));function p(v,g,m,b,y,x,_,E,D,A,S){let I=x/D,L=_/A,H=x/2,z=_/2,X=E/2,q=D+1,K=A+1,j=0,te=0,ye=new G;for(let xe=0;xe<K;xe++){let Ce=xe*L-z;for(let ce=0;ce<q;ce++){let Ie=ce*I-H;ye[v]=Ie*b,ye[g]=Ce*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=E>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(ce/D),u.push(1-xe/A),j+=1}}for(let xe=0;xe<A;xe++)for(let Ce=0;Ce<D;Ce++){let ce=f+Ce+q*xe,Ie=f+Ce+q*(xe+1),Mt=f+(Ce+1)+q*(xe+1),Lt=f+(Ce+1)+q*xe;l.push(ce,Ie,Lt),l.push(Ie,Mt,Lt),te+=6}a.addGroup(h,te,S),h+=te,f+=j}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function rd(i){let e={};for(let t in i){e[t]={};for(let n in i[t]){let r=i[t][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(ht("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=r.clone():Array.isArray(r)?e[t][n]=r.slice():e[t][n]=r}}return e}function Ri(i){let e={};for(let t=0;t<i.length;t++){let n=rd(i[t]);for(let r in n)e[r]=n[r]}return e}function D9(i){let e=[];for(let t=0;t<i.length;t++)e.push(i[t].clone());return e}function tM(i){let e=i.getRenderTarget();return e===null?i.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:Gt.workingColorSpace}var YF={clone:rd,merge:Ri},I9=`void main() {
|
|
6
6
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
7
7
|
}`,P9=`void main() {
|
|
8
8
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
@@ -4612,7 +4612,7 @@ void main() {
|
|
|
4612
4612
|
`,fr=class i{elementRef=Q(Mr);renderer=Q(la);document=Q(wn);appTooltip=Me("");tooltipDelay=Me(150);tooltipPosition=Me("top");tooltipElement=null;timeoutId;scrollListeners=[];static stylesInjected=!1;ngOnInit(){if(!i.stylesInjected){let e=this.renderer.createElement("style");this.renderer.setProperty(e,"textContent",EZ),this.renderer.appendChild(this.document.head,e),i.stylesInjected=!0}}onMouseEnter(){this.showProgressive()}onMouseLeave(){this.hideProgressive()}onMouseDown(){this.hideProgressive()}ngOnDestroy(){this.hideProgressive()}showProgressive(){let e=this.appTooltip();if(!e)return;let t=this.elementRef.nativeElement;if(t.hasAttribute("title")){let n=t.getAttribute("title");t.setAttribute("data-original-title",n),t.removeAttribute("title")}this.timeoutId=setTimeout(()=>{this.createTooltip(e)},this.tooltipDelay())}hideProgressive(){this.timeoutId&&clearTimeout(this.timeoutId);let e=this.elementRef.nativeElement,t=e.getAttribute("data-original-title");if(t&&(e.setAttribute("title",t),e.removeAttribute("data-original-title")),this.tooltipElement){let n=this.tooltipElement;this.renderer.addClass(n,"tooltip-exit"),this.tooltipElement=null,this.scrollListeners.forEach(r=>r()),this.scrollListeners=[],setTimeout(()=>{n.parentNode&&this.renderer.removeChild(n.parentNode,n)},150)}}createTooltip(e){this.tooltipElement||(this.tooltipElement=this.renderer.createElement("div"),this.tooltipElement.innerHTML=`<div class="tooltip-content">${e}</div><div class="tooltip-arrow"></div>`,this.renderer.addClass(this.tooltipElement,"pixeasy-tooltip"),this.renderer.setStyle(this.tooltipElement,"position","fixed"),this.renderer.setStyle(this.tooltipElement,"z-index","10000"),this.renderer.setStyle(this.tooltipElement,"pointer-events","none"),this.renderer.appendChild(this.document.body,this.tooltipElement),this.renderer.setStyle(this.tooltipElement,"visibility","hidden"),setTimeout(()=>{if(this.tooltipElement){this.renderer.setStyle(this.tooltipElement,"visibility","visible"),this.positionTooltip();let t=this.document.defaultView||window,n=this.renderer.listen(t,"scroll",()=>{this.positionTooltip()});this.scrollListeners.push(n);let r=this.renderer.listen(t,"resize",()=>{this.positionTooltip()});this.scrollListeners.push(r);let o=this.elementRef.nativeElement.parentElement,s=0,a=10;for(;o&&s<a;){let l=this.renderer.listen(o,"scroll",()=>{this.positionTooltip()});this.scrollListeners.push(l),o=o.parentElement,s++}}},0))}positionTooltip(){if(!this.tooltipElement)return;let e=this.elementRef.nativeElement.getBoundingClientRect(),t=this.tooltipElement.getBoundingClientRect(),n=this.tooltipPosition(),r=this.document.defaultView||window,o=0,s=0;switch(this.renderer.removeClass(this.tooltipElement,"tooltip-top"),this.renderer.removeClass(this.tooltipElement,"tooltip-bottom"),this.renderer.removeClass(this.tooltipElement,"tooltip-left"),this.renderer.removeClass(this.tooltipElement,"tooltip-right"),n){case"top":o=e.top-t.height-10,s=e.left+(e.width-t.width)/2,this.renderer.addClass(this.tooltipElement,"tooltip-top");break;case"bottom":o=e.bottom+10,s=e.left+(e.width-t.width)/2,this.renderer.addClass(this.tooltipElement,"tooltip-bottom");break;case"left":o=e.top+(e.height-t.height)/2,s=e.left-t.width-10,this.renderer.addClass(this.tooltipElement,"tooltip-left");break;case"right":o=e.top+(e.height-t.height)/2,s=e.right+10,this.renderer.addClass(this.tooltipElement,"tooltip-right");break}n==="top"&&o<10?(o=e.bottom+10,this.renderer.removeClass(this.tooltipElement,"tooltip-top"),this.renderer.addClass(this.tooltipElement,"tooltip-bottom")):n==="bottom"&&o+t.height>r.innerHeight-10&&(o=e.top-t.height-10,this.renderer.removeClass(this.tooltipElement,"tooltip-bottom"),this.renderer.addClass(this.tooltipElement,"tooltip-top")),s<10&&(s=10),s+t.width>r.innerWidth-10&&(s=r.innerWidth-t.width-10),this.renderer.setStyle(this.tooltipElement,"top",`${o}px`),this.renderer.setStyle(this.tooltipElement,"left",`${s}px`)}static \u0275fac=function(t){return new(t||i)};static \u0275dir=Zn({type:i,selectors:[["","appTooltip",""]],hostBindings:function(t,n){t&1&&ie("mouseenter",function(){return n.onMouseEnter()})("mouseleave",function(){return n.onMouseLeave()})("mousedown",function(){return n.onMouseDown()})},inputs:{appTooltip:[1,"appTooltip"],tooltipDelay:[1,"tooltipDelay"],tooltipPosition:[1,"tooltipPosition"]}})};var E3="customizer-app-theme",M3="customizer-primary-palette",T3="customizer-secondary-palette",D3="customizer-accent-palette",Ix=[{id:"light",label:"Light",mode:"light",className:"theme-light"},{id:"dark",label:"Dark",mode:"dark",className:"theme-dark"},{id:"ocean",label:"Ocean",mode:"light",className:"theme-ocean"}],Cm=[{id:"violet",label:"Violet",colorRgb:"98 101 241"},{id:"cyan",label:"Cyan",colorRgb:"14 165 233"},{id:"emerald",label:"Emerald",colorRgb:"16 185 129"},{id:"rose",label:"Rose",colorRgb:"244 63 94"},{id:"amber",label:"Amber",colorRgb:"245 158 11"},{id:"indigo",label:"Indigo",colorRgb:"99 102 241"}],Yf=class i{document=Q(wn);themes=N(Ix);palettes=N(Cm);activeThemeId=N(this.getInitialThemeId());activePrimaryId=N(this.getInitialPaletteId(M3,"violet"));activeSecondaryId=N(this.getInitialPaletteId(T3,"emerald"));activeAccentId=N(this.getInitialPaletteId(D3,"amber"));activeTheme=De(()=>this.themes().find(e=>e.id===this.activeThemeId())??this.themes()[0]);activePrimary=De(()=>this.palettes().find(e=>e.id===this.activePrimaryId())??this.palettes()[0]);activeSecondary=De(()=>this.palettes().find(e=>e.id===this.activeSecondaryId())??this.palettes()[0]);activeAccent=De(()=>this.palettes().find(e=>e.id===this.activeAccentId())??this.palettes()[0]);distributorBrandingOverride=N(null);distributorThemeLockState=N(!1);isDistributorThemeLocked=De(()=>this.distributorThemeLockState());constructor(){Yt(()=>{let e=this.distributorBrandingOverride(),t=e?this.themes().find(n=>n.id===e.themeId)??this.themes()[0]:this.activeTheme();this.applyTheme({theme:t,primaryColorRgb:e?.primaryColorRgb??this.activePrimary()?.colorRgb,secondaryColorRgb:e?.secondaryColorRgb??this.activeSecondary()?.colorRgb,accentColorRgb:e?.accentColorRgb??this.activeAccent()?.colorRgb,shouldPersist:!this.distributorThemeLockState()})})}setTheme(e){this.distributorThemeLockState()||!this.themes().find(n=>n.id===e)||this.activeThemeId.set(e)}cycleTheme(){if(this.distributorThemeLockState())return;let e=this.themes();if(!e.length)return;let t=e.findIndex(r=>r.id===this.activeThemeId()),n=t<0?0:(t+1)%e.length;this.activeThemeId.set(e[n].id)}setPrimaryPalette(e){this.distributorThemeLockState()||this.palettes().some(t=>t.id===e)&&this.activePrimaryId.set(e)}setSecondaryPalette(e){this.distributorThemeLockState()||this.palettes().some(t=>t.id===e)&&this.activeSecondaryId.set(e)}setAccentPalette(e){this.distributorThemeLockState()||this.palettes().some(t=>t.id===e)&&this.activeAccentId.set(e)}applyDistributorBranding(e,t){let n=this.activePrimary()?.colorRgb??Cm[0].colorRgb,r=this.activeSecondary()?.colorRgb??Cm[0].colorRgb,o=this.activeAccent()?.colorRgb??Cm[0].colorRgb;this.distributorBrandingOverride.set({primaryColorRgb:this.parseColorToRgbTriplet(e.themePrimaryColor)??n,secondaryColorRgb:this.parseColorToRgbTriplet(e.themeSecondaryColor)??r,accentColorRgb:this.parseColorToRgbTriplet(e.themeAccentColor)??o,themeId:this.resolveThemeIdFromMode(e.themeMode)}),this.distributorThemeLockState.set(t?.lock??!0)}clearDistributorBranding(){this.distributorBrandingOverride.set(null),this.distributorThemeLockState.set(!1)}getInitialThemeId(){if(typeof localStorage>"u")return Ix[0].id;let e=localStorage.getItem(E3);return e&&Ix.some(t=>t.id===e)?e:Ix[0].id}getInitialPaletteId(e,t){if(typeof localStorage>"u")return t;let n=localStorage.getItem(e);return n&&Cm.some(r=>r.id===n)?n:t}applyTheme(e){let{theme:t,primaryColorRgb:n,secondaryColorRgb:r,accentColorRgb:o,shouldPersist:s}=e;if(!t||!n||!r||!o)return;let a=this.document.body;a.classList.remove(...this.themes().map(l=>l.className)),a.classList.add(t.className),t.mode==="dark"?a.classList.add("dark-mode"):a.classList.remove("dark-mode"),a.setAttribute("data-theme",t.id),a.style.setProperty("--primary-color",n),a.style.setProperty("--secondary-color",r),a.style.setProperty("--accent-color",o),typeof localStorage<"u"&&s&&(localStorage.setItem(E3,t.id),localStorage.setItem(M3,this.activePrimaryId()),localStorage.setItem(T3,this.activeSecondaryId()),localStorage.setItem(D3,this.activeAccentId()))}parseColorToRgbTriplet(e){if(!e)return null;let t=e.trim();if(!t)return null;let n=/^#([0-9a-fA-F]{3})$/,r=/^#([0-9a-fA-F]{6})$/,o=/^rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i,s=/^(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})$/,a=(f,h,p)=>f<0||f>255||h<0||h>255||p<0||p>255?null:`${f} ${h} ${p}`,l=t.match(n);if(l){let f=parseInt(l[1][0]+l[1][0],16),h=parseInt(l[1][1]+l[1][1],16),p=parseInt(l[1][2]+l[1][2],16);return a(f,h,p)}let c=t.match(r);if(c){let f=parseInt(c[1].slice(0,2),16),h=parseInt(c[1].slice(2,4),16),p=parseInt(c[1].slice(4,6),16);return a(f,h,p)}let d=t.match(o);if(d)return a(Number.parseInt(d[1],10),Number.parseInt(d[2],10),Number.parseInt(d[3],10));let u=t.match(s);return u?a(Number.parseInt(u[1],10),Number.parseInt(u[2],10),Number.parseInt(u[3],10)):null}resolveThemeIdFromMode(e){let t=(e??"").trim().toLowerCase();return t==="dark"?"dark":"light"}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var qf="#111827",Kf="#ffffff",wm="rgba(15,23,42,0.45)",zT="#ffffff";var I3="design-export";var P3="jersey-design";var A3="f99808af-8dc9-467a-8acb-08de5fd2bd0f";var Wr={TWO_D_GRID_SIZE:24,THREE_D_GRID_SIZE:.05,TWO_D_SNAP_TOLERANCE_PX:5,THREE_D_SNAP_TOLERANCE_NORMALIZED:.01,SNAP_RELEASE_MULTIPLIER:1.8,RULER_THICKNESS_PX:18,INCH_IN_PIXELS:96},gi={GUIDE_STROKE:"#2563eb",GUIDE_STROKE_ALT:"#0ea5e9",GRID_STROKE:"rgba(30,41,59,0.48)",GRID_STROKE_BOLD:"rgba(15,23,42,0.70)",GRID_TEXTURE_STROKE:"rgba(2,6,23,0.70)",GRID_TEXTURE_STROKE_BOLD:"rgba(2,6,23,0.96)",RULER_BG:"rgba(248,250,252,0.92)",RULER_BORDER:"rgba(148,163,184,0.6)",RULER_TEXT:"#334155"},O3={GRID:"Grid",SNAP:"Snap",UV_GRID:"UV Grid",RULER:"Ruler"};var Rt={manifestLoadFailed:"Unable to load manifest",missingProductId:"Missing product id.",manifestAssetsLoadFailed:"Unable to load assets",manifestAssetsLoadDetail:"Unable to load one or more manifest assets.",noSvgLoadedToExport:"No SVG loaded to export",noSvgDocumentLoaded:"No SVG document is loaded.",failedToSerializeSvg:"Failed to serialize SVG.",missingApiKey:"Missing API key for design submission.",designSubmissionFailed:"Design submission failed.",submissionLoadFailed:"Unable to load submission for editing.",submissionNotFound:"Submission not found.",submissionInvalidPayload:"Submission payload is invalid for editing.",submissionProductMismatch:"Submission product does not match the current product and cannot be edited here.",designSubmittedTitle:"Design Submitted",no3dModelForThumbnail:"3D model is not available for thumbnail generation.",noSvgDesignLoaded:"No SVG design is loaded.",failedSerializeSvgForThumbnail:"Failed to serialize SVG for thumbnail generation.",noThumbnailsGenerated:"No thumbnails were generated.",invalidSubmissionThumbnails:"Submission requires exactly 4 thumbnails: front, right, back, left.",failedGenerateSubmissionThumbnails:"Failed to generate thumbnails for design submission.",failedGenerateThumbnails:"Failed to generate and download thumbnails.",nothingToCopy:"Nothing to copy.",jsonCopied:"JSON copied.",copyFailed:"Copy failed. Please copy manually.",errorLoadingFilesFromUrls:"Error loading files from URLs:",failedRenderSvgOnCanvas:"Failed to render SVG on canvas",overlaySyncFailed:"Overlay synchronization failed"},Jo={svgRequired:"The design is not available. Please try again later or refresh the page.",svgUrlRequired:"Unable to load the design. Please try again.",invalidSvgContent:"The design file is not valid. Please refresh the page or try again later.",unableToParseSvg:"We couldn't process the design. Please refresh the page and try again.",noPathElements:"No customizable areas found in the design. Please contact support.",failedApplyPatternSvg:"Unable to apply the pattern. Please try again or select a different pattern.",invalidSvgPath:"The pattern could not be applied to this design. Please try a different pattern.",missingPathData:"The pattern is incomplete. Please select a different pattern and try again.",addPatternFromUrlFailed:"Error loading pattern:"},Ls={svgRequired:"Design Unavailable",svgUrlRequired:"Design Load Failed",invalidSvgContent:"Design Error",unableToParseSvg:"Design Error",noPathElements:"No Customizable Areas",failedApplyPatternSvg:"Pattern Failed",invalidSvgPath:"Pattern Not Compatible",missingPathData:"Pattern Error"},Us={garmentSvgRequired:"The design is not available. Please try again later or refresh the page.",patternSvgUrlRequired:"Unable to load the pattern. Please try again.",targetIdRequired:"This pattern cannot be applied to the current design. Please select a different pattern.",invalidSvgContent:"The design file is not valid. Please refresh the page or try again later.",noPatternDefinitionsImported:"This pattern is not compatible with the current design. Please try a different pattern.",noMatchingTargetIds:"This pattern cannot be applied to this area. Please select a different pattern or try another area.",skippedMissingTargetIds:"Some pattern areas are not available:",applyPatternFromUrlFailed:"Error loading pattern:",failedApplyPattern:"Unable to apply this pattern. Please try again or select a different pattern."},Ul={garmentSvgRequired:"Design Unavailable",patternSvgUrlRequired:"Pattern Load Failed",targetIdRequired:"Pattern Not Compatible",invalidSvgContent:"Design Error",noPatternDefinitionsImported:"Pattern Not Available",noMatchingTargetIds:"Cannot Apply Pattern",failedApplyPattern:"Pattern Failed"},Na={failedFetchEffectSvg:"Failed to fetch effect SVG",failedIngestWarpEnvelope:"Failed to ingest warp envelope",unableLoadEffectSvgUrl:"Unable to load effect SVG from the configured URL.",warpSvgParsingError:"The warp SVG contains parsing errors.",warpSvgNeedsViewBox:"Warp SVG must define a viewBox attribute.",warpSvgInvalidViewBox:"Warp SVG viewBox is invalid.",warpSvgNeedsTopBottomPath:'Warp SVG must contain <path id="top"> and <path id="bottom"> elements with d attributes.',warpEnvelopeReadFailed:"Unable to read the warp envelope SVG."},R3={errorLoading3dModel:"Error loading 3D model:",errorLoadingObjFile:"Error loading OBJ file:"},Em={failedLoadSvg:"Failed to load SVG:",failedSampleWarpPath:"Failed to sample warp path",failedMeasureWarpPath:"Failed to measure warp path"},k3=i=>`Submission ${i} created. PDF generating.`;var F3=i=>`Failed to convert text overlay "${i}"`,Px=i=>`Failed to load font face "${i}"`,N3=i=>`Unable to prepare font face "${i}"`,L3=i=>`Unable to download font "${i}"`,U3=i=>`Failed to parse font "${i}"`,B3=i=>`Failed to create FontFace for "${i}"`;var Qo="image/svg+xml",Nd="image/svg+xml;charset=utf-8",Ci="http://www.w3.org/2000/svg",Mm="http://www.w3.org/1999/xlink",Ax="<svg",Ld="parsererror";function MZ(i,e){for(let t of e.horizontal)i.remove(t);for(let t of e.vertical)i.remove(t)}function z3(i,e){return MZ(i,e),{horizontal:[],vertical:[]}}function V3(i,e,t,n,r,o,s){let a=Math.max(.5,n),l=Math.max(.5,r),c=Math.max(1,Math.round((o??a)/a)),d=Math.max(1,Math.round((s??l)/l));i.save(),i.shadowColor="rgba(255,255,255,0.28)",i.shadowBlur=.8;for(let u=0,f=0;u<=e+.5;u+=a,f+=1){let h=f%c===0;i.beginPath(),i.strokeStyle=h?gi.GRID_TEXTURE_STROKE_BOLD:gi.GRID_TEXTURE_STROKE,i.lineWidth=h?1.8:1.1,i.moveTo(u,0),i.lineTo(u,t),i.stroke()}for(let u=0,f=0;u<=t+.5;u+=l,f+=1){let h=f%d===0;i.beginPath(),i.strokeStyle=h?gi.GRID_TEXTURE_STROKE_BOLD:gi.GRID_TEXTURE_STROKE,i.lineWidth=h?1.8:1.1,i.moveTo(0,u),i.lineTo(e,u),i.stroke()}i.restore()}function G3(i,e,t,n,r,o,s,a){let l=n[0],c=n[4],d=n[5],u=Math.max(2,r*l),f=Math.max(2,o*l),h=Math.max(1,(s??r)*l),p=Math.max(1,(a??o)*l),v=Math.max(1,Math.round(h/u)),g=Math.max(1,Math.round(p/f)),m=c%u,b=d%f,y=i.canvas?.width??e,x=i.canvas?.height??t,_=e>0?y/e:1,E=t>0?x/t:1,D=Number.isFinite(_)&&Number.isFinite(E)?Math.max(_,E,1):1;i.save(),i.setTransform(D,0,0,D,0,0);for(let A=m;A<=e+u;A+=u){let S=Math.abs(Math.round((A-c)/u))%v===0;i.beginPath(),i.strokeStyle=S?gi.GRID_STROKE_BOLD:gi.GRID_STROKE,i.lineWidth=S?1:.6,i.moveTo(A,0),i.lineTo(A,t),i.stroke()}for(let A=b;A<=t+f;A+=f){let S=Math.abs(Math.round((A-d)/f))%g===0;i.beginPath(),i.strokeStyle=S?gi.GRID_STROKE_BOLD:gi.GRID_STROKE,i.lineWidth=S?1:.6,i.moveTo(0,A),i.lineTo(e,A),i.stroke()}for(let A=m-u;A>=-u;A-=u){let S=Math.abs(Math.round((A-c)/u))%v===0;i.beginPath(),i.strokeStyle=S?gi.GRID_STROKE_BOLD:gi.GRID_STROKE,i.lineWidth=S?1:.6,i.moveTo(A,0),i.lineTo(A,t),i.stroke()}for(let A=b-f;A>=-f;A-=f){let S=Math.abs(Math.round((A-d)/f))%g===0;i.beginPath(),i.strokeStyle=S?gi.GRID_STROKE_BOLD:gi.GRID_STROKE,i.lineWidth=S?1:.6,i.moveTo(0,A),i.lineTo(e,A),i.stroke()}i.restore()}function H3(i,e){for(let t of e.lines)i.remove(t)}function VT(i,e){return H3(i,e),{lines:[]}}function j3(i,e,t,n,r){if(H3(i,t),!e.length)return{lines:[]};let o=[];for(let s of e){let a=s.axis==="x"?new Os([s.value,0,s.value,r],{stroke:gi.GUIDE_STROKE,strokeWidth:1,selectable:!1,evented:!1,excludeFromExport:!0}):new Os([0,s.value,n,s.value],{stroke:gi.GUIDE_STROKE_ALT,strokeWidth:1,selectable:!1,evented:!1,excludeFromExport:!0});i.add(a),o.push(a)}return{lines:o}}function W3(i,e,t,n){if(e.length){i.save(),i.lineWidth=1.25;for(let r of e){if(i.beginPath(),i.strokeStyle=r.axis==="x"?gi.GUIDE_STROKE:gi.GUIDE_STROKE_ALT,r.axis==="x"){let o=r.value*t;i.moveTo(o,0),i.lineTo(o,n)}else{let o=r.value*n;i.moveTo(0,o),i.lineTo(t,o)}i.stroke()}i.restore()}}function $3(i,e){let t=[];for(let n of e){t.push({axis:"x",value:n.cx,reason:"object-center",sourceId:n.id}),t.push({axis:"y",value:n.cy,reason:"object-center",sourceId:n.id});let r=n.cx-n.halfW,o=n.cx+n.halfW,s=n.cy-n.halfH,a=n.cy+n.halfH;t.push({axis:"x",value:r+i.halfW,reason:"object-edge",sourceId:n.id}),t.push({axis:"x",value:o-i.halfW,reason:"object-edge",sourceId:n.id}),t.push({axis:"x",value:r-i.halfW,reason:"object-edge",sourceId:n.id}),t.push({axis:"x",value:o+i.halfW,reason:"object-edge",sourceId:n.id}),t.push({axis:"y",value:s+i.halfH,reason:"object-edge",sourceId:n.id}),t.push({axis:"y",value:a-i.halfH,reason:"object-edge",sourceId:n.id}),t.push({axis:"y",value:s-i.halfH,reason:"object-edge",sourceId:n.id}),t.push({axis:"y",value:a+i.halfH,reason:"object-edge",sourceId:n.id})}return t}function GT(i,e,t,n,r,o){let s=t.filter(c=>c.axis===i);if(!s.length)return{value:e,guide:null,lock:{active:!1,lockedValue:0}};if(o.active&&Math.abs(e-o.lockedValue)<=r){let d=s.find(u=>Math.abs(u.value-o.lockedValue)<=n);return{value:o.lockedValue,guide:d?{axis:i,value:o.lockedValue,reason:d.reason,sourceId:d.sourceId}:null,lock:o}}let a=null,l=Number.POSITIVE_INFINITY;for(let c of s){let d=Math.abs(e-c.value);d<l&&(a=c,l=d)}return!a||l>n?{value:e,guide:null,lock:{active:!1,lockedValue:0}}:{value:a.value,guide:{axis:i,value:a.value,reason:a.reason,sourceId:a.sourceId},lock:{active:!0,lockedValue:a.value}}}function X3(i,e,t){if(!e||e<=0)return null;let n=Math.round(i/e)*e;return Math.abs(i-n)<=t?n:null}function Fi(){return{lockX:{active:!1,lockedValue:0},lockY:{active:!1,lockedValue:0}}}function Ox(i,e,t,n,r,o){if(!r.snapEnabled)return{x:i.x,y:i.y,guides:[],state:Fi()};let s=[],a=Math.max(r.tolerance,1e-4),l=a*Wr.SNAP_RELEASE_MULTIPLIER,c=[{axis:"x",value:n.x,reason:"canvas-center"},{axis:"y",value:n.y,reason:"canvas-center"},...$3(e,t)];if(r.snapToGrid){let f=X3(i.x,r.gridStepX,a);f!=null&&c.push({axis:"x",value:f,reason:"grid"});let h=X3(i.y,r.gridStepY,a);h!=null&&c.push({axis:"y",value:h,reason:"grid"})}let d=GT("x",i.x,c,a,l,o.lockX),u=GT("y",i.y,c,a,l,o.lockY);return d.guide&&s.push(d.guide),u.guide&&s.push(u.guide),{x:d.value,y:u.value,guides:s,state:{lockX:d.lock,lockY:u.lock}}}var Bl=class i{getScale(e,t){let n=Number.isFinite(e)?Math.max(e,0):0,r=Number.isFinite(t)?Math.max(t,0):0;return n<=0||r<=0?0:n/r}getScaleX(e,t){return this.getScale(e,t)}getScaleY(e,t){return this.getScale(e,t)}inchesToSvgUnits(e,t,n){let r=this.getScale(t,n);return r<=0||!Number.isFinite(e)?0:e*r}inchesToSvgUnitsX(e,t,n){return this.inchesToSvgUnits(e,t,n)}inchesToSvgUnitsY(e,t,n){return this.inchesToSvgUnits(e,t,n)}svgUnitsToInches(e,t,n){let r=this.getScale(t,n);return r<=0||!Number.isFinite(e)?0:e/r}svgUnitsToInchesX(e,t,n){return this.svgUnitsToInches(e,t,n)}svgUnitsToInchesY(e,t,n){return this.svgUnitsToInches(e,t,n)}clampSvgUnitsToPrintArea(e,t,n){let r=this.inchesToSvgUnits(Number.isFinite(n)?n:0,t,n);return Number.isFinite(e)?r<=0?Math.max(e,0):Math.min(Math.max(e,0),r):0}clampSvgUnitsToPrintAreaX(e,t,n){return this.clampSvgUnitsToPrintArea(e,t,n)}clampSvgUnitsToPrintAreaY(e,t,n){return this.clampSvgUnitsToPrintArea(e,t,n)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var IZ=["canvasContainer"],PZ=(i,e)=>e.key;function AZ(i,e){if(i&1){let t=Ne();w(0,"button",22),ie("click",function(){let r=Z(t).$implicit,o=M();return J(o.onApplyCameraPreset(r.key))}),k(1),T()}if(i&2){let t=e.$implicit,n=M();pt("active",t.key===n.currentCameraPreset()),ne("disabled",!n.hasCurrentObject()),P(),zt(" ",t.label," ")}}function OZ(i,e){if(i&1){let t=Ne();w(0,"div",23),ie("click",function(){Z(t);let r=M();return J(r.dismissTouchHint())}),w(1,"button",24),ie("click",function(r){Z(t);let o=M();return r.stopPropagation(),J(o.dismissTouchHint())}),Y(2,"i",25),T(),w(3,"div",26)(4,"div",27),Y(5,"span",28)(6,"span",29),T(),w(7,"div",30)(8,"h4"),k(9,"Tap text/logo, then drag to transform"),T(),w(10,"p"),k(11," Single-finger drag rotates the 3D model. Tap text/logo, then single-touch drag to move it. "),T()()(),w(12,"div",26)(13,"div",31),Y(14,"span",28)(15,"span",28)(16,"span",32),T(),w(17,"div",30)(18,"h4"),k(19,"Pinch to zoom"),T(),w(20,"p"),k(21,"Use two fingers to zoom in and out."),T()()(),w(22,"div",26)(23,"div",33),Y(24,"span",28)(25,"span",28)(26,"span",34),T(),w(27,"div",30)(28,"h4"),k(29,"Two-finger drag to pan"),T(),w(30,"p"),k(31,"Move your camera target without changing rotation."),T()()()()}}function RZ(i,e){if(i&1){let t=Ne();w(0,"button",35),ie("click",function(){Z(t);let r=M();return J(r.replayTouchHint())}),Y(1,"i",36),T()}if(i&2){let t=M();ne("disabled",!t.isTouchDevice())}}var Rx=class i{static TOUCH_HINT_STORAGE_KEY="designkit.3d.touchHintSeen";container=Pu("canvasContainer");svgText=xs(null);isActive=Me(!0);mtlText=xs(null);objText=xs(null);materialSourceUrl=Me(null);showPlacementGuides=xs(!1);placementZones=xs([]);overlays=xs([]);activeOverlayId=xs(null);svgDimensions=xs(null);overlayBounds=Me(null);gridEnabled=Me(!0);snapEnabled=Me(!0);gridSize=Me(Wr.THREE_D_GRID_SIZE);gridSizeInches=Me(1);printAreaWidthInches=Me(null);printAreaHeightInches=Me(null);svgViewBox=xs({minX:0,minY:0,width:1e3,height:1e3});onUndo=kt();onRedo=kt();activeOverlayChange=kt();overlayPositionChange=kt();overlayResizeChange=kt();overlayRotationChange=kt();scene;camera;renderer;controls;raycaster=new Wp;pointer=new gt;defaultCameraPosition=new G(0,50,200);defaultCameraTarget=new G(0,0,0);objectCenter=new G(0,0,0);animationId=N(0);svgTexture=N(null);currentObject=N(null);hasCurrentObject=De(()=>!!this.currentObject());cameraPresets=N([{key:"front",label:"Front"},{key:"back",label:"Back"},{key:"left",label:"Left"},{key:"right",label:"Right"},{key:"top",label:"Top"},{key:"iso",label:"Iso"}]);isDraggingOverlay3D=N(!1);draggingOverlayId=N(null);draggingOverlayOffset=N(null);pointerDownState=N(null);dragStartThresholdPx=N(6);objectFitDistance=N(200);resizeHandler=()=>this.onWindowResize();isAutoRotateEnabled=N(!1);textureMetrics=N(null);textureSize=N(2048);zoomInFactor=N(.85);zoomOutFactor=N(1.18);resizeEdgeTolerance=N(.012);rotateHandleMinOffsetNormalized=.06;rotateHandleOffsetFactor=.5;rotateHandleHitRadiusMultiplier=1.8;overlayControlColor="#6366f1";containerResizeObserver=null;overlayBoxCache=new Map;textMeasureContext=null;document=Q(wn);originalMapByMaterial=new WeakMap;originalColorByMaterial=new WeakMap;compositeMapByMaterial=new WeakMap;activeCompositeMaps=new Set;handleThreePointerDown=e=>this.onThreePointerDown(e);handleThreePointerMove=e=>this.onThreePointerMove(e);handleThreePointerUp=()=>this.onThreePointerUp();handleThreeKeyDown=e=>this.onThreeKeyDown(e);keyboardMoveStepPx=1;keyboardRotationStepDeg=5;alignmentLabel=O3;uvGridModeEnabled=N(!1);gridSizeNormalized=N(Wr.THREE_D_GRID_SIZE);snapRuntimeState=N(Fi());activeDragGuides=N([]);activeWorldPoint=N(null);sceneReady=N(!1);rotationAccumulatorDeg=0;currentCameraPreset=N(void 0);designHistory=Q(Ll);themeService=Q(Yf);printAreaMeasurementService=Q(Bl);canUndo=this.designHistory.canUndo;canRedo=this.designHistory.canRedo;showTouchHint=N(!1);isTouchDevice=N(!1);touchHintTimerId=null;touchHintShownForSession=!1;constructor(){this.initializeTouchHintState(),Yt(()=>{let e=this.isActive();if(!this.isTouchDevice()){this.clearTouchHintTimer(),this.showTouchHint.set(!1);return}if(!e){this.clearTouchHintTimer(),this.showTouchHint.set(!1);return}this.touchHintShownForSession||(this.touchHintShownForSession=!0,this.showTouchHint.set(!0),this.touchHintTimerId=setTimeout(()=>{this.dismissTouchHint()},7e3))}),Yt(()=>{this.overlays(),this.activeOverlayId(),this.svgDimensions(),this.svgViewBox(),this.overlayBoxCache.clear()}),Yt(()=>{this.themeService.activeThemeId(),this.themeService.activePrimaryId(),this.themeService.activeSecondaryId(),this.themeService.activeAccentId(),this.applySceneBackgroundFromTheme()}),Yt(()=>{let e=this.gridSize();this.gridSizeNormalized.set(e),gn(()=>this.rebuildSVGTexture())}),Yt(()=>{this.gridSizeInches(),this.printAreaWidthInches(),this.printAreaHeightInches(),gn(()=>this.rebuildSVGTexture())}),Yt(()=>{let e=this.sceneReady(),t=this.objText();this.mtlText(),this.materialSourceUrl(),!(!e||!t)&&gn(()=>{this.load3DModel()})})}initializeTouchHintState(){if(typeof window>"u")return;let e="ontouchstart"in window||navigator.maxTouchPoints>0;this.isTouchDevice.set(e)}clearTouchHintTimer(){this.touchHintTimerId&&(clearTimeout(this.touchHintTimerId),this.touchHintTimerId=null)}dismissTouchHint(){this.clearTouchHintTimer(),this.showTouchHint.set(!1)}replayTouchHint(){this.isTouchDevice()&&(this.touchHintShownForSession=!0,this.clearTouchHintTimer(),this.showTouchHint.set(!0),this.touchHintTimerId=setTimeout(()=>{this.dismissTouchHint()},7e3))}ngAfterViewInit(){this.initScene(),this.animate(),this.rebuildSVGTexture(),this.sceneReady.set(!0)}initScene(){let e=this.container().nativeElement.clientWidth,t=this.container().nativeElement.clientHeight;this.scene=new Yc,this.applySceneBackgroundFromTheme(),this.camera=new fi(45,e/t,.1,1e3),this.camera.position.set(0,50,200),this.renderer=new Sf({antialias:!0,logarithmicDepthBuffer:!0}),this.renderer.setSize(e,t),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),this.renderer.outputColorSpace=bn,this.renderer.toneMapping=td,this.renderer.toneMappingExposure=1,this.applySceneBackgroundFromTheme(),this.container()?.nativeElement.appendChild(this.renderer.domElement);let n=new ed(16777215,.6);this.scene.add(n);let r=new Uo(16777215,1.2);r.position.set(100,150,100),r.castShadow=!1,this.scene.add(r);let o=new Uo(16777215,.6);o.position.set(-100,50,100),this.scene.add(o);let s=new Uo(16777215,.8);s.position.set(0,100,-150),this.scene.add(s);let a=new Qc(16777215,13421772,.5);a.position.set(0,200,0),this.scene.add(a),this.controls=new Ex(this.camera,this.renderer.domElement),this.controls.enableDamping=!0,this.controls.dampingFactor=.1,this.controls.enablePan=!0,this.controls.autoRotate=this.isAutoRotateEnabled(),this.controls.autoRotateSpeed=8;let l=this.renderer.domElement;l.tabIndex=0,l.addEventListener("pointerdown",this.handleThreePointerDown),l.addEventListener("pointermove",this.handleThreePointerMove),l.addEventListener("pointerup",this.handleThreePointerUp),l.addEventListener("pointerleave",this.handleThreePointerUp),l.addEventListener("pointercancel",this.handleThreePointerUp),l.addEventListener("keydown",this.handleThreeKeyDown),typeof ResizeObserver<"u"&&(this.containerResizeObserver?.disconnect(),this.containerResizeObserver=new ResizeObserver(()=>this.onWindowResize()),this.container()?.nativeElement&&this.containerResizeObserver.observe(this.container().nativeElement)),window.addEventListener("resize",this.resizeHandler)}applySceneBackgroundFromTheme(){let t=(getComputedStyle(this.document.body).getPropertyValue("--surface-100").trim()||"248 250 252").match(/\d+(?:\.\d+)?/g)?.slice(0,3).map(o=>Number(o)),r=(t&&t.length===3&&t.every(o=>Number.isFinite(o))?new ct(nn.clamp(t[0],0,255)/255,nn.clamp(t[1],0,255)/255,nn.clamp(t[2],0,255)/255):new ct(16317180)).clone().convertSRGBToLinear();this.scene&&(this.scene.background=r),this.renderer&&this.renderer.setClearColor(r,1)}onWindowResize(){let e=this.container().nativeElement.clientWidth,t=this.container().nativeElement.clientHeight;!e||!t||!this.camera||!this.renderer||(this.camera.aspect=e/t,this.camera.updateProjectionMatrix(),this.renderer.setSize(e,t),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio||1,2)))}resetCameraMetrics(){this.objectCenter.set(0,0,0);let e=200,t=this.defaultCameraPosition.distanceTo(this.defaultCameraTarget);this.objectFitDistance.set(t>0?t:e)}resetCameraPosition(){!this.camera||!this.controls||(this.camera.position.copy(this.defaultCameraPosition),this.camera.near=.1,this.camera.far=1e3,this.camera.up.set(0,1,0),this.camera.updateProjectionMatrix(),this.controls.target.copy(this.defaultCameraTarget),this.controls.autoRotate=this.isAutoRotateEnabled()&&!!this.currentObject(),this.controls.update())}async load3DModel(){try{this.resetCameraMetrics(),this.resetCameraPosition(),this.disposeCompositeMaterialMaps();let e=new $f,t=new Xf;if(this.mtlText()){let d=this.resolveMaterialResourcePath(this.materialSourceUrl()),u=this.normalizeMtlTexturePaths(this.mtlText(),d);debugger;let f=t.parse(u,d);f.preload(),e.setMaterials(f)}let n=e.parse(this.objText());this.stabilizeMeshGeometry(n);let r=new Yi().setFromObject(n),o=r.getSize(new G),s=Math.max(o.x,o.y,o.z);n.scale.setScalar(4/s);let a=r.getCenter(new G);n.position.sub(a);let l=d=>d?new Ca({map:d.map??null,color:d.color??new ct(16777215),roughness:.8,metalness:.1}):new Ca({color:16777215});n.traverse(d=>{d.isMesh&&(d.castShadow=!0,d.receiveShadow=!0,Array.isArray(d.material)?d.material=d.material.map(u=>l(u)):d.material=l(d.material))});let c=this.currentObject();c&&(this.restoreOriginalMaterialMaps(c),this.scene.remove(c)),this.scene.add(n),this.currentObject.set(n),this.svgTexture()&&this.applySVGTextureToOBJ(),this.fitCameraToObject(n)}catch(e){console.error(R3.errorLoading3dModel,e)}}resolveMaterialResourcePath(e){if(!e)return"";try{if(typeof window<"u")return new URL(".",new URL(e,window.location.href)).toString()}catch{}let t=e.split("?")[0].split("#")[0],n=t.lastIndexOf("/");return n>=0?t.slice(0,n+1):""}normalizeMtlTexturePaths(e,t){return e.trim()?e.split(/\r?\n/).map(n=>this.normalizeMtlMapLine(n,t)).join(`
|
|
4613
4613
|
`):e}normalizeMtlMapLine(e,t){let n=e.match(/^(\s*)(map_\S+|bump|disp|decal|refl)\s+(.+)$/i);if(!n)return e;let[,r,o,s]=n,a=s.trim().split(/\s+/);if(!a.length)return e;let l=a[a.length-1];if(this.isAbsoluteOrOnlineTexturePath(l))return e;let c=this.buildAbsoluteTexturePath(t,l);return c?(a[a.length-1]=c,`${r}${o} ${a.join(" ")}`):e}isAbsoluteOrOnlineTexturePath(e){let t=e.trim();return/^https?:\/\//i.test(t)||/^\/\//.test(t)}buildAbsoluteTexturePath(e,t){let r=t.split("?")[0].split("#")[0].split(/[\\/]/).pop();if(!r)return t;if(!e)return r;try{return new URL(r,e).toString()}catch{let o=e.endsWith("/")?"":"/";return`${e}${o}${r}`}}processSVGToTexture(e){this.renderSVGToTexture(e)}renderSVGToTexture(e){let t=this.textureSize(),n=document.createElement("canvas");n.width=t,n.height=t;let r=n.getContext("2d");r.clearRect(0,0,t,t);let o=new Blob([e],{type:Nd}),s=URL.createObjectURL(o),a=new Image;a.crossOrigin="anonymous",a.onload=()=>{let l=a.width/a.height,c=t,d=t;l>1?d=t/l:c=t*l,r.drawImage(a,0,0,c,d),this.drawPlacementGuidesOnTexture(r,c,d),this.textureMetrics.set({drawWidth:c,drawHeight:d}),URL.revokeObjectURL(s);let u=new ws(n);u.colorSpace=bn,u.minFilter=go,u.magFilter=jn,u.anisotropy=this.renderer.capabilities.getMaxAnisotropy(),u.flipY=!0,u.wrapS=Oi,u.wrapT=Oi,u.needsUpdate=!0,this.svgTexture()?.dispose(),this.svgTexture.set(u),this.applySVGTextureToOBJ()},a.src=s}rebuildSVGTexture(){if(!this.svgText()){this.svgTexture()?.dispose(),this.svgTexture.set(null),this.restoreOriginalMaterialMaps(this.currentObject()),this.disposeCompositeMaterialMaps();return}this.overlayBoxCache.clear();let e=this.textureSize(),t=document.createElement("canvas");t.width=e,t.height=e;let n=t.getContext("2d");n.clearRect(0,0,e,e);let r=new Blob([this.svgText()],{type:Nd}),o=URL.createObjectURL(r),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{let a=s.width/s.height,l=e,c=e;a>1?c=e/a:l=e*a,n.drawImage(s,0,0,l,c),this.drawPlacementGuidesOnTexture(n,l,c),this.textureMetrics.set({drawWidth:l,drawHeight:c}),URL.revokeObjectURL(o);let d=new ws(t);d.colorSpace=bn,d.flipY=!0,d.needsUpdate=!0,this.svgTexture()?.dispose(),this.svgTexture.set(d),this.applySVGTextureToOBJ()},s.src=o}applySVGTextureToOBJ(){let e=this.currentObject(),t=this.svgTexture();if(!e||!t)return;let n=this.getTextureSourceData(t);n&&e.traverse(r=>{r.isMesh&&r.material&&(Array.isArray(r.material)?r.material.forEach(o=>{this.applyBlendedMapToMaterial(o,t,n)}):this.applyBlendedMapToMaterial(r.material,t,n))})}applyBlendedMapToMaterial(e,t,n){if(!this.isMapCapableMaterial(e))return;this.originalMapByMaterial.has(e)||this.originalMapByMaterial.set(e,e.map??null);let r=this.originalMapByMaterial.get(e)??null;if(this.normalizeMaterialColorForTexture(e,!!r),!r){this.disposeCompositeMaterialMapFor(e),e.map=t,e.needsUpdate=!0;return}let o=this.getTextureSourceData(r);if(!o){this.disposeCompositeMaterialMapFor(e),e.map=t,e.needsUpdate=!0;return}let s=this.getSourceDimensions(o);if(!s){this.disposeCompositeMaterialMapFor(e),e.map=t,e.needsUpdate=!0;return}let a=this.buildTextureDetailPreservingCompositeCanvas(o,n,s.width,s.height);if(!a){this.disposeCompositeMaterialMapFor(e),e.map=t,e.needsUpdate=!0;return}this.disposeCompositeMaterialMapFor(e);let l=new ws(a);this.copyTextureSamplingAndTransformSettings(l,r,t),l.needsUpdate=!0,this.compositeMapByMaterial.set(e,l),this.activeCompositeMaps.add(l),e.map=l,e.needsUpdate=!0}copyTextureSamplingAndTransformSettings(e,t,n){e.colorSpace=t.colorSpace??n.colorSpace,e.flipY=t.flipY,e.wrapS=t.wrapS,e.wrapT=t.wrapT,e.magFilter=t.magFilter,e.minFilter=t.minFilter,e.anisotropy=t.anisotropy||n.anisotropy,e.generateMipmaps=t.generateMipmaps,e.premultiplyAlpha=t.premultiplyAlpha,e.unpackAlignment=t.unpackAlignment,e.repeat.copy(t.repeat),e.offset.copy(t.offset),e.center.copy(t.center),e.rotation=t.rotation,e.matrixAutoUpdate=t.matrixAutoUpdate,e.matrix.copy(t.matrix)}buildTextureDetailPreservingCompositeCanvas(e,t,n,r){let o=document.createElement("canvas");o.width=n,o.height=r;let s=o.getContext("2d");if(!s)return null;try{return s.clearRect(0,0,n,r),s.globalCompositeOperation="source-over",s.globalAlpha=1,s.drawImage(e,0,0,n,r),s.globalCompositeOperation="multiply",s.globalAlpha=1,s.drawImage(t,0,0,n,r),s.globalCompositeOperation="source-over",s.globalAlpha=1,o}catch{let a=document.createElement("canvas");a.width=n,a.height=r;let l=a.getContext("2d");return l?(l.clearRect(0,0,n,r),l.drawImage(e,0,0,n,r),l.drawImage(t,0,0,n,r),a):null}}getTextureSourceData(e){let t=e.source?.data??e.image;if(!t)return null;let n=this.getSourceDimensions(t);return!n||n.width<=0||n.height<=0?null:t}getSourceDimensions(e){if(e instanceof HTMLVideoElement)return!e.videoWidth||!e.videoHeight?null:{width:e.videoWidth,height:e.videoHeight};let t=e;return!t.width||!t.height?null:{width:t.width,height:t.height}}isMapCapableMaterial(e){return"map"in e}isColorCapableMaterial(e){return"color"in e&&e.color instanceof ct}normalizeMaterialColorForTexture(e,t){if(this.isColorCapableMaterial(e)){if(this.originalColorByMaterial.has(e)||this.originalColorByMaterial.set(e,e.color.clone()),t){e.color.copy(this.originalColorByMaterial.get(e));return}e.color.set(zT)}}disposeCompositeMaterialMapFor(e){let t=this.compositeMapByMaterial.get(e);t&&(this.activeCompositeMaps.delete(t),t.dispose(),this.compositeMapByMaterial.delete(e))}disposeCompositeMaterialMaps(){this.activeCompositeMaps.forEach(e=>e.dispose()),this.activeCompositeMaps.clear()}restoreOriginalMaterialMaps(e){e&&e.traverse(t=>{if(!t.isMesh||!t.material)return;(Array.isArray(t.material)?t.material:[t.material]).forEach(r=>{let o=!1;this.isMapCapableMaterial(r)&&(this.disposeCompositeMaterialMapFor(r),this.originalMapByMaterial.has(r)&&(r.map=this.originalMapByMaterial.get(r)??null,o=!0)),this.isColorCapableMaterial(r)&&this.originalColorByMaterial.has(r)&&(r.color.copy(this.originalColorByMaterial.get(r)),o=!0),o&&(r.needsUpdate=!0)})})}drawPlacementGuidesOnTexture(e,t,n){let r=this.svgViewBox()??{minX:0,minY:0,width:this.svgDimensions()?.width??t,height:this.svgDimensions()?.height??n},o=Math.max(r.width,1),s=Math.max(r.height,1),a=t/o,l=n/s,c=-r.minX*a,d=-r.minY*l;if(this.gridEnabled()){let u=this.getGridStepInches(),f=this.getTextureGridStepPixels(t,n,u),h=this.getTextureMajorStepPixels(t,n);V3(e,t,n,f.x,f.y,h.x,h.y)}if(this.showPlacementGuides()&&this.placementZones().length){e.save();let u=Math.max(6,Math.min(t,n)/48);e.setLineDash([u,u*.6]),e.lineWidth=Math.max(1,Math.min(a,l)),e.strokeStyle="#df1616",e.shadowColor="rgba(15,23,42,0.35)",e.shadowBlur=4;for(let f of this.placementZones()){if(!(f.allowedKinds.includes("text")||f.allowedKinds.includes("logo")))continue;let p=f.bounds.width*a,v=f.bounds.height*l;if(p<=0||v<=0)continue;let g=c+f.bounds.x*a,m=d+f.bounds.y*l;e.strokeRect(g,m,p,v)}e.restore()}W3(e,this.activeDragGuides(),t,n),this.drawActiveOverlayBoundsOnTexture(e,t,n)}drawActiveOverlayBoundsOnTexture(e,t,n){let r=this.findOverlayById(this.activeOverlayId());if(!r)return;let o=this.svgViewBox()??{minX:0,minY:0,width:this.svgDimensions()?.width??t,height:this.svgDimensions()?.height??n},s=Math.max(o.width,1),a=Math.max(o.height,1),l=t/s,c=n/a,d=-o.minX*l,u=-o.minY*c,f=this.getOverlayBoundingRect();if(!f.width||!f.height)return;let h=this.getOverlayBoxInfo(r,!1);if(!h)return;let p=f.x+h.cx*f.width,v=f.y+h.cy*f.height,g=h.halfW*2*f.width*l,m=h.halfH*2*f.height*c,b=f.height*c,y=d+p*l,x=u+v*c;e.save(),e.translate(y,x),e.rotate(h.angleRad),e.strokeStyle=this.overlayControlColor,e.lineWidth=Math.max(1.75,Math.min(l,c)*1.2),e.lineJoin="round",e.lineCap="round",e.shadowColor="rgba(15, 23, 42, 0.15)",e.shadowBlur=2,e.strokeRect(-g/2,-m/2,g,m),e.fillStyle=zT;let _=Math.max(4,Math.min(g,m)*.025),E=[[-g/2,-m/2],[g/2,-m/2],[-g/2,m/2],[g/2,m/2],[0,-m/2],[0,m/2],[-g/2,0],[g/2,0]];for(let[S,I]of E)e.beginPath(),e.arc(S,I,_,0,Math.PI*2),e.fill(),e.stroke();let A={x:0,y:this.getRotationHandleLocal(h).y*b};e.beginPath(),e.moveTo(0,-m/2),e.lineTo(A.x,A.y),e.stroke(),e.beginPath(),e.arc(A.x,A.y,_,0,Math.PI*2),e.fill(),e.stroke(),e.restore()}animate=()=>{this.animationId.set(requestAnimationFrame(this.animate)),this.controls.update(),this.renderer.render(this.scene,this.camera)};fitCameraToObject(e){let t=new Yi().setFromObject(e),n=t.getSize(new G),r=t.getCenter(new G),o=Math.max(n.x,n.y,n.z),s=this.camera.fov*(Math.PI/180),a=Math.abs(o/2/Math.tan(s/2));a*=1.5,this.camera.position.set(r.x,r.y,a),this.camera.near=Math.max(a/25,.1),this.camera.far=Math.max(a*25,this.camera.near+50),this.camera.updateProjectionMatrix(),this.objectCenter.copy(r),this.objectFitDistance.set(Math.max(a,1)),this.camera.up.set(0,1,0),this.controls.target.copy(r),this.controls.autoRotate=this.isAutoRotateEnabled(),this.controls.update()}ngOnDestroy(){if(cancelAnimationFrame(this.animationId()),this.clearTouchHintTimer(),this.restoreOriginalMaterialMaps(this.currentObject()),this.disposeCompositeMaterialMaps(),this.svgTexture()?.dispose(),this.svgTexture.set(null),this.containerResizeObserver?.disconnect(),this.containerResizeObserver=null,this.renderer){let e=this.renderer.domElement;e.removeEventListener("pointerdown",this.handleThreePointerDown),e.removeEventListener("pointermove",this.handleThreePointerMove),e.removeEventListener("pointerup",this.handleThreePointerUp),e.removeEventListener("pointerleave",this.handleThreePointerUp),e.removeEventListener("pointercancel",this.handleThreePointerUp),e.removeEventListener("keydown",this.handleThreeKeyDown),this.renderer.dispose()}window.removeEventListener("resize",this.resizeHandler)}normalizeModelUVs(e){e.traverse(t=>{if(!t.isMesh)return;let n=t.geometry;if(!n?.attributes?.uv)return;let r=n.attributes.uv.array,o=1/0,s=1/0,a=-1/0,l=-1/0;for(let u=0;u<r.length;u+=2)o=Math.min(o,r[u]),s=Math.min(s,r[u+1]),a=Math.max(a,r[u]),l=Math.max(l,r[u+1]);let c=a-o,d=l-s;for(let u=0;u<r.length;u+=2)r[u]=(r[u]-o)/c,r[u+1]=(r[u+1]-s)/d;n.attributes.uv.needsUpdate=!0})}getUVBounds(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;if(e.traverse(s=>{if(!s.isMesh)return;let a=s.geometry;if(!a?.attributes?.uv)return;let l=a.attributes.uv.array;for(let c=0;c<l.length;c+=2)t=Math.min(t,l[c]),n=Math.min(n,l[c+1]),r=Math.max(r,l[c]),o=Math.max(o,l[c+1])}),!isFinite(t))throw new Error("Model has no UVs");return{minU:t,minV:n,maxU:r,maxV:o,width:r-t,height:o-n,aspect:(r-t)/(o-n)}}cloneMaterial(e){return Array.isArray(e)?e.map(t=>t.clone()):e?.clone?e.clone():e}stabilizeMeshGeometry(e){e.traverse(t=>{let n=t;if(!n.isMesh||!(n.geometry instanceof ei))return;let r=Tx(n.geometry.clone(),1e-5);r.deleteAttribute("normal"),r.computeVertexNormals(),r.normalizeNormals(),r.computeBoundingBox(),r.computeBoundingSphere(),n.geometry.dispose(),n.geometry=r,(Array.isArray(n.material)?n.material:[n.material]).forEach(s=>{s&&("flatShading"in s&&(s.flatShading=!1),s.side=Xi,s.needsUpdate=!0)})})}onThreePointerDown(e){if(e.button!==0)return;this.renderer?.domElement?.focus(),e.preventDefault(),this.updatePointerFromEvent(e);let t=this.pickModelIntersection();if(!t?.uv){this.isDraggingOverlay3D.set(!1),this.draggingOverlayId.set(null),this.draggingOverlayOffset.set(null),this.pointerDownState.set(null),this.activeDragGuides.set([]),this.snapRuntimeState.set(Fi()),this.controls.enabled=!0,this.activeOverlayId()&&this.activeOverlayChange.emit(null);return}let n=this.resolveOverlayUnderPointer(t.uv.clone());if(!n){this.isDraggingOverlay3D.set(!1),this.draggingOverlayId.set(null),this.draggingOverlayOffset.set(null),this.pointerDownState.set(null),this.activeDragGuides.set([]),this.snapRuntimeState.set(Fi()),this.controls.enabled=!0,this.activeOverlayId()&&this.activeOverlayChange.emit(null);return}let{overlay:r,point:o}=n;this.activeOverlayChange.emit(r);let s=this.getOverlayBoxInfo(r,!0),a=this.resizeEdgeTolerance(),l="move",c=s?.halfW??.1,d=s?.halfH??.1,u=s?.angleRad??0,f,h;if(s){let p=this.toOverlayLocal(o,s),v=Math.abs(Math.abs(p.x)-s.halfW)<=a,g=Math.abs(Math.abs(p.y)-s.halfH)<=a;this.isNearRotationHandle(p,s,a)?(l="rotate",f=Math.atan2(p.y,p.x),this.rotationAccumulatorDeg=0):(v||g)&&(l="resize",h=v&&g?"both":v?"x":"y")}this.isDraggingOverlay3D.set(l!=="move"),this.draggingOverlayId.set(l!=="move"?r.id:null),this.draggingOverlayOffset.set(null),this.pointerDownState.set({overlayId:r.id,startClientX:e.clientX,startClientY:e.clientY,startNormalizedPoint:o,overlayStart:{x:r.normalizedX,y:r.normalizedY},mode:l,bounds:{width:c*2,height:d*2},startFontSize:this.isTextOverlay(r)?r.fontSize:void 0,startHorizontalScale:this.isTextOverlay(r)?r.horizontalScale??1:void 0,startVerticalScale:this.isTextOverlay(r)?r.verticalScale??1:void 0,startNormalizedWidth:this.isLogoOverlay(r)?r.normalizedWidth:void 0,startNormalizedHeight:this.isLogoOverlay(r)?r.normalizedHeight:void 0,angleRad:u,startAngleDeg:r.angle??0,accumulatedAngleDeg:0,startPointerAngleRad:f,resizeAxis:h}),this.controls.enabled=!1}onThreePointerMove(e){if(!this.pointerDownState()&&(!this.isDraggingOverlay3D()||!this.draggingOverlayId())){if(!this.overlays().length){this.renderer?.domElement&&(this.renderer.domElement.style.cursor="auto");return}this.updatePointerFromEvent(e);let c=this.pickModelIntersection();if(!c?.uv){this.renderer?.domElement&&(this.renderer.domElement.style.cursor="auto");return}let d=this.resolveOverlayUnderPointer(c.uv.clone());if(!d){this.renderer?.domElement&&(this.renderer.domElement.style.cursor="auto");return}this.setResizeCursor(d.overlay,d.point);return}e.preventDefault(),this.updatePointerFromEvent(e);let t=this.pickModelIntersection();if(!t?.uv)return;let n=this.pointerDownState();if(n?.mode==="resize"){let c=this.findOverlayById(n.overlayId);if(!c)return;let d=this.getNormalizedPointForView(t.uv.clone());if(!d)return;let u=this.getOverlayBoxInfo(c,!0);if(!u)return;let f=this.toOverlayLocal(d,{cx:n.overlayStart.x,cy:n.overlayStart.y,halfW:u.halfW,halfH:u.halfH,angleRad:n.angleRad??0}),h=Math.max(Math.abs(f.x),.01),p=Math.max(Math.abs(f.y),.01),v=Math.max(n.bounds.width,.02),g=Math.max(n.bounds.height,.02),m=h*2/v,b=p*2/g,y=n.resizeAxis??"both",x=y==="both"?(m+b)/2:y==="x"?m:b;if(this.isTextOverlay(c)&&n.startFontSize)if(c.lockAspectRatio??!0){let E=Math.max(6,n.startFontSize*x);this.overlayResizeChange.emit({overlay:c,fontSize:E})}else{let E=Math.max(n.startHorizontalScale??1,.1),D=Math.max(n.startVerticalScale??1,.1),A=y==="y"?E:Math.min(Math.max(E*m,.1),10),S=y==="x"?D:Math.min(Math.max(D*b,.1),10);this.overlayResizeChange.emit({overlay:c,horizontalScale:A,verticalScale:S})}else if(this.isLogoOverlay(c)&&n.startNormalizedWidth&&n.startNormalizedHeight){let _=c.lockAspectRatio??!0,E=y==="y"?n.startNormalizedWidth:Math.min(Math.max(n.startNormalizedWidth*m,.02),1),D=y==="x"?n.startNormalizedHeight:Math.min(Math.max(n.startNormalizedHeight*b,.02),1),A=_?Math.min(Math.max(n.startNormalizedWidth*x,n.startNormalizedWidth*.02),1):E,S=_?Math.min(Math.max(n.startNormalizedHeight*x,n.startNormalizedHeight*.02),1):D;this.overlayResizeChange.emit({overlay:c,normalizedWidth:A,normalizedHeight:S})}return}if(n?.mode==="rotate"){let c=this.findOverlayById(n.overlayId);if(!c)return;let d=this.getOverlayBoxInfo(c,!0);if(!d)return;let u=this.getNormalizedPointForView(t.uv.clone());if(!u)return;let f=this.toOverlayLocal(u,d),h=Math.atan2(f.y,f.x),p=n.startPointerAngleRad??0,v=(h-p)*(180/Math.PI);v>180?v-=360:v<=-180&&(v+=360),this.rotationAccumulatorDeg+=v;let g=(n.startAngleDeg??0)+this.rotationAccumulatorDeg;Math.abs(v)>.1&&this.overlayRotationChange.emit({overlay:c,angle:g}),n.startPointerAngleRad=h,this.renderer.domElement.style.cursor="crosshair";return}if(!this.isDraggingOverlay3D()){let c=this.pointerDownState();if(!c||c.overlayId!==this.activeOverlayId()||Math.hypot(e.clientX-c.startClientX,e.clientY-c.startClientY)<this.dragStartThresholdPx())return;let u=this.findOverlayById(c.overlayId);if(!u)return;this.isDraggingOverlay3D.set(!0),this.draggingOverlayId.set(u.id),this.draggingOverlayOffset.set({dx:c.startNormalizedPoint.x-c.overlayStart.x,dy:c.startNormalizedPoint.y-c.overlayStart.y}),this.renderer.domElement.style.cursor="grabbing"}if(!this.draggingOverlayId())return;let r=this.findOverlayById(this.draggingOverlayId());if(!r)return;let o=this.getNormalizedPointForView(t.uv.clone());if(!o)return;this.activeWorldPoint.set(t.point?.clone?.()??null);let s=this.draggingOverlayOffset()??{dx:0,dy:0},a=o.x-s.dx,l=o.y-s.dy;if(this.snapEnabled()){let c=this.getOverlayBoxInfo(r,!1),d={id:r.id,cx:a,cy:l,halfW:c?.halfW??.05,halfH:c?.halfH??.05},u=this.overlays().filter(h=>h.id!==r.id).map(h=>{let p=this.getOverlayBoxInfo(h,!1);return p?{id:h.id,cx:p.cx,cy:p.cy,halfW:p.halfW,halfH:p.halfH}:null}).filter(h=>!!h),f=Ox({x:a,y:l},d,u,{x:.5,y:.5},{snapEnabled:this.snapEnabled(),snapToGrid:this.gridEnabled(),gridStepX:this.getGridStepNormalizedX(),gridStepY:this.getGridStepNormalizedY(),tolerance:Wr.THREE_D_SNAP_TOLERANCE_NORMALIZED},this.snapRuntimeState());a=f.x,l=f.y,this.activeDragGuides.set(f.guides),this.snapRuntimeState.set(f.state)}else this.snapRuntimeState.set(Fi()),this.activeDragGuides.set([]);Math.abs(a-r.normalizedX)<2e-4&&Math.abs(l-r.normalizedY)<2e-4||(this.overlayPositionChange.emit({overlay:r,normalizedX:a,normalizedY:l}),this.renderer.domElement.style.cursor="grabbing")}findOverlayById(e){return e?this.overlays().find(t=>t.id===e)??null:null}onThreeKeyDown(e){let t=e.key.toLowerCase();if(e.ctrlKey||e.metaKey){if(t==="z"){e.shiftKey?this.onRedo.emit():this.onUndo.emit(),e.preventDefault(),e.stopPropagation();return}t==="y"&&(this.onRedo.emit(),e.preventDefault(),e.stopPropagation());return}let n=this.resolveKeyboardTargetOverlay();if(!n)return;let r=e.shiftKey?10:this.keyboardMoveStepPx,o=e.shiftKey?this.keyboardRotationStepDeg*3:this.keyboardRotationStepDeg;switch(t){case"arrowup":this.emitOverlayNudge(n,0,-r);break;case"arrowdown":this.emitOverlayNudge(n,0,r);break;case"arrowleft":this.emitOverlayNudge(n,-r,0);break;case"arrowright":this.emitOverlayNudge(n,r,0);break;case"q":case"[":this.overlayRotationChange.emit({overlay:n,angle:this.normalizeAngle((n.angle??0)-o)});break;case"e":case"]":this.overlayRotationChange.emit({overlay:n,angle:this.normalizeAngle((n.angle??0)+o)});break;default:return}e.preventDefault(),e.stopPropagation()}resolveKeyboardTargetOverlay(){let e=this.findOverlayById(this.activeOverlayId());if(e)return e;let t=this.overlays(),n=t.length>0?t[t.length-1]:null;return n?(this.activeOverlayChange.emit(n),n):null}emitOverlayNudge(e,t,n){let r=this.getOverlayBoundingRect();r.width<=0||r.height<=0||this.overlayPositionChange.emit({overlay:e,normalizedX:e.normalizedX+t/r.width,normalizedY:e.normalizedY+n/r.height})}onThreePointerUp(){let e=this.isDraggingOverlay3D();this.pointerDownState.set(null),this.rotationAccumulatorDeg=0,this.isDraggingOverlay3D()&&(this.isDraggingOverlay3D.set(!1),this.draggingOverlayId.set(null),this.draggingOverlayOffset.set(null)),this.controls.enabled=!0,this.activeDragGuides.set([]),this.snapRuntimeState.set(Fi()),this.activeWorldPoint.set(null),e&&this.rebuildSVGTexture(),this.renderer?.domElement&&(this.renderer.domElement.style.cursor="auto")}getRotationHandleLocal(e){return{x:0,y:-(e.halfH+Math.max(this.rotateHandleMinOffsetNormalized,e.halfH*this.rotateHandleOffsetFactor))}}isNearRotationHandle(e,t,n){let r=this.getRotationHandleLocal(t),o=Math.max(.012,n*this.rotateHandleHitRadiusMultiplier);return Math.hypot(e.x-r.x,e.y-r.y)<=o}normalizeAngle(e){return Number.isFinite(e)?Math.round(e*10)/10:0}onApplyCameraPreset(e){if(!this.currentObject()||!this.controls||!this.camera)return;this.currentCameraPreset.set(e);let t=this.objectCenter.clone(),n=Math.max(this.objectFitDistance(),1),r=new G;switch(e){case"front":r.set(0,0,n),this.camera.up.set(0,1,0);break;case"back":r.set(0,0,-n),this.camera.up.set(0,1,0);break;case"left":r.set(-n,0,0),this.camera.up.set(0,1,0);break;case"right":r.set(n,0,0),this.camera.up.set(0,1,0);break;case"top":r.set(0,n,0),this.camera.up.set(0,0,-1);break;case"iso":{let s=n*.85;r.set(s,s,s),this.camera.up.set(0,1,0);break}default:return}let o=t.clone().add(r);this.camera.position.copy(o),this.camera.lookAt(t),this.controls.target.copy(t),this.controls.update()}onCameraZoom(e){if(!this.currentObject()||!this.controls||!this.camera)return;let t=this.controls.target.clone(),n=this.camera.position.clone().sub(t),r=e==="in"?this.zoomInFactor():this.zoomOutFactor();n.multiplyScalar(r);let o=t.clone().add(n),s=o.clone().sub(t).length(),a=Math.max(this.objectFitDistance()*.25,5),l=Math.max(this.objectFitDistance()*8,this.objectFitDistance()+1);s<a||s>l||(this.camera.position.copy(o),this.camera.lookAt(t),this.controls.update())}onToggleAutoRotate(){!this.currentObject()||!this.controls||(this.isAutoRotateEnabled.update(e=>!e),this.controls.autoRotate=this.isAutoRotateEnabled(),this.controls.update())}onUvGridToggle(){this.uvGridModeEnabled.update(e=>!e),this.rebuildSVGTexture()}onGridSizeChange(e){let t=Number(e);Number.isFinite(t)&&(this.gridSizeNormalized.set(Math.max(.01,Math.min(.2,t))),this.rebuildSVGTexture())}getGridStepInches(){let e=this.gridSizeInches();return Number.isFinite(e)&&e>0?Math.max(.01,e):1}getGridStepNormalizedX(){let e=this.printAreaWidthInches();return Number.isFinite(e)&&e>0?this.getGridStepInches()/e:Math.max(this.gridSizeNormalized(),.01)}getGridStepNormalizedY(){let e=this.printAreaHeightInches();return Number.isFinite(e)&&e>0?this.getGridStepInches()/e:Math.max(this.gridSizeNormalized(),.01)}getTextureGridStepPixels(e,t,n){let r=this.printAreaWidthInches(),o=this.printAreaHeightInches(),s=Number.isFinite(r)&&r>0?e*n/r:Math.max(e*this.gridSizeNormalized(),1),a=Number.isFinite(o)&&o>0?t*n/o:Math.max(t*this.gridSizeNormalized(),1);return{x:Math.max(s,.5),y:Math.max(a,.5)}}getTextureMajorStepPixels(e,t){let r=this.printAreaWidthInches(),o=this.printAreaHeightInches(),s=Number.isFinite(r)&&r>0?e*1/r:Math.max(e*this.gridSizeNormalized(),1),a=Number.isFinite(o)&&o>0?t*1/o:Math.max(t*this.gridSizeNormalized(),1);return{x:Math.max(s,.5),y:Math.max(a,.5)}}onResetCamera(){let e=this.currentObject();if(e){this.fitCameraToObject(e);return}this.resetCameraPosition()}updatePointerFromEvent(e){let t=this.renderer?.domElement;if(!t)return;let n=t.getBoundingClientRect();this.pointer.x=(e.clientX-n.left)/n.width*2-1,this.pointer.y=-((e.clientY-n.top)/n.height)*2+1}pickModelIntersection(){let e=this.currentObject();if(!e)return null;this.raycaster.setFromCamera(this.pointer,this.camera);let t=this.raycaster.intersectObject(e,!0);return t.length?t[0]:null}isTextOverlay(e){return e.kind==="text"}isLogoOverlay(e){return e.kind==="logo"}resolveOverlayUnderPointer(e){let t=this.getNormalizedPointForView(e);if(!t)return null;let n=[...this.overlays()].reverse();for(let r of n){if(this.isTextOverlay(r)&&r.text.trim().length===0)continue;let o=this.getOverlayBoxInfo(r,!0);if(!o)continue;let s=this.toOverlayLocal(t,o),a=Math.abs(s.x)<=o.halfW&&Math.abs(s.y)<=o.halfH,l=this.isNearRotationHandle(s,o,this.resizeEdgeTolerance());if(a||l)return{overlay:r,point:t}}return null}setResizeCursor(e,t){let n=this.getOverlayBoxInfo(e,!0);if(!n||!this.renderer?.domElement)return;let r=this.resizeEdgeTolerance(),o=this.toOverlayLocal(t,n),s=Math.abs(Math.abs(o.x)-n.halfW)<=r,a=Math.abs(Math.abs(o.y)-n.halfH)<=r,l=this.isNearRotationHandle(o,n,r),c="grab";l?c="crosshair":s&&a?c="nwse-resize":s?c="ew-resize":a&&(c="ns-resize"),this.renderer.domElement.style.cursor=c}toOverlayLocal(e,t){let n=e.x-t.cx,r=e.y-t.cy,o=Math.cos(-t.angleRad),s=Math.sin(-t.angleRad);return{x:n*o-r*s,y:n*s+r*o}}getNormalizedPointForView(e){let t=this.textureMetrics()??{drawWidth:this.textureSize(),drawHeight:this.textureSize()};if(!this.svgViewBox().width||!this.svgViewBox().height)return null;let n=nn.clamp(e.x,0,1),r=nn.clamp(e.y,0,1),o=n*this.textureSize(),s=(1-r)*this.textureSize(),a=Math.min(Math.max(o,0),t.drawWidth),l=Math.min(Math.max(s,0),t.drawHeight),c=this.svgViewBox().minX+(t.drawWidth?a/t.drawWidth*this.svgViewBox().width:0),d=this.svgViewBox().minY+(t.drawHeight?l/t.drawHeight*this.svgViewBox().height:0),u=this.getOverlayBoundingRect();return!u.width||!u.height?null:{x:(c-u.x)/u.width,y:(d-u.y)/u.height}}getOverlayBoundingRect(){let e=this.overlayBounds();if(e&&e.width>0&&e.height>0)return e;let t=this.svgViewBox();if(t.width>0&&t.height>0)return{x:t.minX,y:t.minY,width:t.width,height:t.height};let n=null,r=this.svgDimensions(),o=r?{width:r.width,height:r.height,x:t.minX,y:t.minY}:null;return Dx(n,o)}getTextMeasureContext(){if(this.textMeasureContext)return this.textMeasureContext;if(typeof document>"u")return null;let e=document.createElement("canvas");return this.textMeasureContext=e.getContext("2d"),this.textMeasureContext}measureTextOverlaySizeInSvg(e){let t=Math.max(e.fontSize,1),n=e.lineHeight??1.2,r=Math.max(t*n,t),o=(e.text||"").split(/\r?\n/),s=o.length?o:[""],a=e.letterSpacing??0,l=e.fontStyle??"normal",c=e.fontWeight??"normal",d=(e.fontFamily??"sans-serif").trim()||"sans-serif",u=t*.6,f=this.getTextMeasureContext();f&&(f.font=`${l} ${c} ${t}px ${d}`);for(let x of s){let _=x.length?x:" ",E=f?f.measureText(_).width:_.length*t*.58,D=Math.max(_.length-1,0)*a;u=Math.max(u,E+D)}let h=Number.isFinite(e.horizontalScale)?Math.max(e.horizontalScale,.1):1,p=Number.isFinite(e.verticalScale)?Math.max(e.verticalScale,.1):1,v=Number.isFinite(e.strokeWidth)?e.strokeWidth:0,g=Number.isFinite(e.secondStrokeWidth)?e.secondStrokeWidth:0,m=g>0?(v+g)*2:v*2,b=Math.max(u+m,t*.6),y=Math.max(r*s.length+m,r);return{width:b*h,height:y*p}}getOverlayBoxInfo(e,t=!0){let n=this.getOverlayBoundingRect();if(!n.width||!n.height)return null;let r=`${e.id}:${t?"hit":"draw"}`,o=e.kind==="text"?[e.kind,e.text,e.fontSize,e.fontFamily??"",e.fontStyle??"",e.fontWeight??"",e.letterSpacing??"",e.lineHeight??"",e.horizontalScale??1,e.verticalScale??1,e.strokeWidth??0,e.secondStrokeWidth??0,e.normalizedX,e.normalizedY,e.angle??0,n.width,n.height,t?1:0].join("|"):[e.kind,e.normalizedWidth,e.normalizedHeight,e.normalizedX,e.normalizedY,e.angle??0,n.width,n.height,t?1:0].join("|"),s=this.overlayBoxCache.get(r);if(s&&s.signature===o)return s.value;let a,l,c=t?.004:.0015,d=.0025;if(e.kind==="text"){let p=e,v=this.measureTextOverlaySizeInSvg(p);a=v.width,l=v.height,c=t?.005:.002,d=.002}else{let p=e,v=Math.max(p.normalizedWidth,.02),g=Math.max(p.normalizedHeight,.02);a=v*n.width,l=g*n.height,c=t?.008:.004,d=.01}let u=Math.max(a/Math.max(n.width,1)/2,0),f=Math.max(l/Math.max(n.height,1)/2,0),h={cx:e.normalizedX,cy:e.normalizedY,halfW:Math.max(u+c,d),halfH:Math.max(f+c,d),angleRad:(e.angle??0)*Math.PI/180};return this.overlayBoxCache.set(r,{signature:o,value:h}),h}onRedoClick(){this.canRedo()&&this.onRedo.emit()}onUndoClick(){this.canUndo()&&this.onUndo.emit()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-three-d-ui"]],viewQuery:function(t,n){t&1&&nl(n.container,IZ,5),t&2&&Oc()},inputs:{svgText:[1,"svgText"],isActive:[1,"isActive"],mtlText:[1,"mtlText"],objText:[1,"objText"],materialSourceUrl:[1,"materialSourceUrl"],showPlacementGuides:[1,"showPlacementGuides"],placementZones:[1,"placementZones"],overlays:[1,"overlays"],activeOverlayId:[1,"activeOverlayId"],svgDimensions:[1,"svgDimensions"],overlayBounds:[1,"overlayBounds"],gridEnabled:[1,"gridEnabled"],snapEnabled:[1,"snapEnabled"],gridSize:[1,"gridSize"],gridSizeInches:[1,"gridSizeInches"],printAreaWidthInches:[1,"printAreaWidthInches"],printAreaHeightInches:[1,"printAreaHeightInches"],svgViewBox:[1,"svgViewBox"]},outputs:{svgText:"svgTextChange",mtlText:"mtlTextChange",objText:"objTextChange",showPlacementGuides:"showPlacementGuidesChange",placementZones:"placementZonesChange",overlays:"overlaysChange",activeOverlayId:"activeOverlayIdChange",svgDimensions:"svgDimensionsChange",svgViewBox:"svgViewBoxChange",onUndo:"onUndo",onRedo:"onRedo",activeOverlayChange:"activeOverlayChange",overlayPositionChange:"overlayPositionChange",overlayResizeChange:"overlayResizeChange",overlayRotationChange:"overlayRotationChange"},decls:25,vars:13,consts:[["canvasContainer",""],[1,"view-section"],[1,"view-header"],[1,"view-controls"],["type","button",1,"view-btn",3,"active","disabled"],[1,"relative","w-full","canvas-container","overflow-hidden","shadow-inner"],[1,"absolute","inset-0","w-full","h-full"],[1,"touch-gesture-coach"],[1,"canvas-toolbar"],["appTooltip","Undo","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-arrow-go-back-line"],["appTooltip","Redo","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-arrow-go-forward-line"],["appTooltip","Zoom In","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-zoom-in-line"],["appTooltip","Zoom Out","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-zoom-out-line"],["appTooltip","Reset","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-refresh-line"],["tooltipPosition","top",1,"toolbar-btn",3,"click","disabled","appTooltip"],[1,"ri-loop-right-line"],["appTooltip","Gesture Tips","tooltipPosition","top",1,"toolbar-btn",3,"disabled"],["type","button",1,"view-btn",3,"click","disabled"],[1,"touch-gesture-coach",3,"click"],["type","button","aria-label","Dismiss gesture tips",1,"touch-gesture-close",3,"click"],[1,"ri-close-line"],[1,"gesture-row"],["aria-hidden","true",1,"gesture-visual","rotate-visual"],[1,"finger"],[1,"arc"],[1,"gesture-copy"],["aria-hidden","true",1,"gesture-visual","pinch-visual"],[1,"pulse"],["aria-hidden","true",1,"gesture-visual","pan-visual"],[1,"arrow"],["appTooltip","Gesture Tips","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-question-line"]],template:function(t,n){t&1&&(w(0,"div",1)(1,"div",2)(2,"h3"),k(3,"3D View"),T(),w(4,"div",3),Dt(5,AZ,2,4,"button",4,PZ),T()(),w(7,"div",5),Y(8,"div",6,0),pe(10,OZ,32,0,"div",7),w(11,"div",8)(12,"button",9),ie("click",function(){return n.onUndoClick()}),Y(13,"i",10),T(),w(14,"button",11),ie("click",function(){return n.onRedoClick()}),Y(15,"i",12),T(),w(16,"button",13),ie("click",function(){return n.onCameraZoom("in")}),Y(17,"i",14),T(),w(18,"button",15),ie("click",function(){return n.onCameraZoom("out")}),Y(19,"i",16),T(),w(20,"button",17),ie("click",function(){return n.onResetCamera()}),Y(21,"i",18),T(),w(22,"button",19),ie("click",function(){return n.onToggleAutoRotate()}),Y(23,"i",20),T(),pe(24,RZ,2,1,"button",21),T()()()),t&2&&(P(5),It(n.cameraPresets()),P(5),me(n.isTouchDevice()&&n.showTouchHint()?10:-1),P(2),ne("disabled",!n.canUndo()),P(2),ne("disabled",!n.canRedo()),P(2),ne("disabled",!n.hasCurrentObject()),P(2),ne("disabled",!n.hasCurrentObject()),P(2),ne("disabled",!n.hasCurrentObject()),P(2),pt("ring-2",n.isAutoRotateEnabled())("ring-primary-400",n.isAutoRotateEnabled()),ne("disabled",!n.hasCurrentObject())("appTooltip",n.isAutoRotateEnabled()?"Stop Rotate":"Auto Rotate"),P(2),me(n.isTouchDevice()?24:-1))},dependencies:[qt,fr],styles:['[_nghost-%COMP%]{display:block;height:100%;min-height:0}.view-controls[_ngcontent-%COMP%]{display:flex;gap:5px;flex-wrap:wrap}.view-header[_ngcontent-%COMP%] .view-controls[_ngcontent-%COMP%]{display:flex;gap:5px;background:rgb(var(--surface-100, 248 250 252));padding:4px;border-radius:6px}.view-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 20px;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a0d}.alignment-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.grid-size-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:rgb(var(--text-color-secondary, 100 116 139));background:rgb(var(--surface-100, 248 250 252));border-radius:6px;padding:4px 6px}.measurement-badge[_ngcontent-%COMP%]{position:absolute;top:12px;right:12px;z-index:9;background:rgb(var(--surface-card, 255 255 255) / .88);color:rgb(var(--text-color-secondary, 100 116 139));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:8px;padding:6px 10px;font-size:12px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0}.view-btn[_ngcontent-%COMP%], .view-btn-2d[_ngcontent-%COMP%]{padding:6px 16px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;cursor:pointer;border-radius:4px;transition:all .2s}.view-btn.active[_ngcontent-%COMP%], .view-btn-2d.active[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff}.view-btn[_ngcontent-%COMP%]:hover:not(.active), .view-btn-2d[_ngcontent-%COMP%]:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .15)}.canvas-toolbar[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;display:flex;gap:8px;background:rgb(var(--surface-card, 255 255 255));padding:10px;border-radius:8px;box-shadow:0 2px 8px #0f172a1a;z-index:10}.view-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}.canvas-container[_ngcontent-%COMP%]{width:100%;flex:1 1 auto;min-height:260px;height:100%;position:relative;overflow:hidden;background:rgb(var(--surface-100, 248 250 252))}.touch-gesture-coach[_ngcontent-%COMP%]{position:absolute;right:10px;bottom:10px;width:min(285px,calc(100% - 20px));display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;background:linear-gradient(145deg,#0f172aeb,#1e293bdb);color:#f8fafc;box-shadow:0 8px 24px #02061752;z-index:20;animation:_ngcontent-%COMP%_coach-enter .26s ease-out}.touch-gesture-close[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px;width:24px;height:24px;border:0;border-radius:999px;background:#ffffff29;color:inherit;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.gesture-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:56px 1fr;align-items:center;gap:10px}.gesture-copy[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:12px;font-weight:600}.gesture-copy[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:2px 0 0;font-size:11px;line-height:1.35;color:#cbd5e1}.gesture-visual[_ngcontent-%COMP%]{position:relative;width:56px;height:40px}.gesture-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]{position:absolute;width:12px;height:20px;border-radius:999px;background:#94a3b8;border:1px solid rgb(226 232 240 / .55)}.rotate-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]{left:22px;top:11px;animation:_ngcontent-%COMP%_finger-rotate 1.7s ease-in-out infinite}.rotate-visual[_ngcontent-%COMP%] .arc[_ngcontent-%COMP%]{position:absolute;left:10px;top:7px;width:36px;height:24px;border-top:2px dashed rgb(125 211 252 / .9);border-radius:50%;animation:_ngcontent-%COMP%_arc-rotate 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:first-child{left:12px;top:10px;animation:_ngcontent-%COMP%_finger-pinch-left 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:nth-child(2){right:12px;top:10px;animation:_ngcontent-%COMP%_finger-pinch-right 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .pulse[_ngcontent-%COMP%]{position:absolute;inset:10px 18px;border-radius:999px;border:1px solid rgb(125 211 252 / .9);animation:_ngcontent-%COMP%_pinch-pulse 1.7s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:first-child{left:14px;top:10px;animation:_ngcontent-%COMP%_finger-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:nth-child(2){left:30px;top:10px;animation:_ngcontent-%COMP%_finger-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{position:absolute;left:9px;top:28px;width:38px;height:2px;background:#7dd3fc;animation:_ngcontent-%COMP%_arrow-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:before, .pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:after{content:"";position:absolute;top:-3px;width:8px;height:8px;border-top:2px solid rgb(125 211 252);border-right:2px solid rgb(125 211 252)}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:before{left:0;transform:rotate(-135deg)}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:after{right:0;transform:rotate(45deg)}@keyframes _ngcontent-%COMP%_coach-enter{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_finger-rotate{0%,to{transform:translate(-4px) rotate(-8deg)}50%{transform:translate(4px) rotate(8deg)}}@keyframes _ngcontent-%COMP%_arc-rotate{0%,to{opacity:.5;transform:rotate(-6deg)}50%{opacity:1;transform:rotate(6deg)}}@keyframes _ngcontent-%COMP%_finger-pinch-left{0%,to{transform:translate(-2px)}50%{transform:translate(3px)}}@keyframes _ngcontent-%COMP%_finger-pinch-right{0%,to{transform:translate(2px)}50%{transform:translate(-3px)}}@keyframes _ngcontent-%COMP%_pinch-pulse{0%,to{opacity:.3;transform:scaleX(1)}50%{opacity:1;transform:scaleX(.7)}}@keyframes _ngcontent-%COMP%_finger-pan{0%,to{transform:translate(-3px)}50%{transform:translate(4px)}}@keyframes _ngcontent-%COMP%_arrow-pan{0%,to{transform:translate(-3px);opacity:.7}50%{transform:translate(4px);opacity:1}}.toolbar-btn[_ngcontent-%COMP%]{width:36px;height:36px;border:none;background:transparent;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.toolbar-btn[_ngcontent-%COMP%]:hover{background:rgb(var(--surface-100, 248 250 252))}.toolbar-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed;background:rgb(var(--surface-100, 248 250 252));color:rgb(var(--text-color-secondary, 100 116 139));box-shadow:none}.toolbar-btn[_ngcontent-%COMP%]:disabled:hover{background:rgb(var(--surface-100, 248 250 252))}@media(max-width:1024px){.canvas-toolbar[_ngcontent-%COMP%]{left:10px;top:10px;gap:6px;padding:8px}}@media(max-width:640px){.view-header[_ngcontent-%COMP%]{padding:10px 12px;gap:8px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:14px}.canvas-toolbar[_ngcontent-%COMP%]{top:8px;left:8px;gap:4px;padding:6px 8px}.canvas-container[_ngcontent-%COMP%]{min-height:200px}.touch-gesture-coach[_ngcontent-%COMP%]{right:8px;bottom:8px;width:min(260px,calc(100% - 16px));padding:10px}.toolbar-btn[_ngcontent-%COMP%]{width:32px;height:32px;font-size:16px}.view-btn[_ngcontent-%COMP%], .view-btn-2d[_ngcontent-%COMP%]{padding:4px 10px;font-size:12px}}@media(max-width:480px){.view-header[_ngcontent-%COMP%]{padding:8px 10px;gap:6px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:13px}.canvas-toolbar[_ngcontent-%COMP%]{top:6px;left:6px;gap:3px;padding:4px 5px}.toolbar-btn[_ngcontent-%COMP%]{width:30px;height:30px;font-size:15px}.canvas-container[_ngcontent-%COMP%]{min-height:160px}.touch-gesture-coach[_ngcontent-%COMP%]{right:6px;bottom:6px;width:min(240px,calc(100% - 12px))}}@media(max-width:991px)and (orientation:landscape)and (max-height:500px){.canvas-toolbar[_ngcontent-%COMP%]{top:6px;left:6px;flex-direction:column;gap:4px;padding:6px}.view-header[_ngcontent-%COMP%]{padding:6px 10px}.canvas-container[_ngcontent-%COMP%]{min-height:120px}}']})};var kZ=["fabricCanvas"];function FZ(i,e){if(i&1){let t=Ne();w(0,"button",18),ie("click",function(){Z(t);let r=M();return J(r.onLayerToggle(null))}),k(1," All Layers "),T()}if(i&2){let t=M();pt("active",t.selectedLayerKey()==null)("bg-primary-600",t.layerIsActive(null))("text-white",t.layerIsActive(null))("border-primary-600",t.layerIsActive(null))("shadow-sm",t.layerIsActive(null))("bg-white",!t.layerIsActive(null))("text-gray-700",!t.layerIsActive(null))("border-gray-300",!t.layerIsActive(null))}}function NZ(i,e){if(i&1){let t=Ne();w(0,"button",18),ie("click",function(){let r=Z(t).$implicit,o=M();return J(o.onLayerToggle(r))}),k(1),T()}if(i&2){let t=e.$implicit,n=M();pt("active",n.selectedLayerKey()==t)("bg-primary-600",n.layerIsActive(t))("text-white",n.layerIsActive(t))("border-primary-600",n.layerIsActive(t))("shadow-sm",n.layerIsActive(t))("bg-white",!n.layerIsActive(t))("text-gray-700",!n.layerIsActive(t))("border-gray-300",!n.layerIsActive(t)),P(),zt(" ",t," ")}}function LZ(i,e){if(i&1){let t=Ne();w(0,"button",19),ie("click",function(){Z(t);let r=M();return J(r.replayTouchHint())}),Y(1,"i",20),T()}if(i&2){let t=M();ne("disabled",!t.isTouchDevice())}}function UZ(i,e){if(i&1){let t=Ne();w(0,"div",24),ie("click",function(){Z(t);let r=M(2);return J(r.dismissTouchHint())}),w(1,"button",25),ie("click",function(r){Z(t);let o=M(2);return r.stopPropagation(),J(o.dismissTouchHint())}),Y(2,"i",26),T(),w(3,"div",27)(4,"div",28),Y(5,"span",29)(6,"span",29)(7,"span",30),T(),w(8,"div",31)(9,"h4"),k(10,"Pinch to zoom"),T(),w(11,"p"),k(12,"Use two fingers to zoom in and out."),T()()(),w(13,"div",27)(14,"div",32),Y(15,"span",29)(16,"span",29)(17,"span",33),T(),w(18,"div",31)(19,"h4"),k(20,"Two-finger drag to pan"),T(),w(21,"p"),k(22,"Move the design area with two fingers."),T()()(),w(23,"div",27)(24,"div",34),Y(25,"span",35)(26,"span",29)(27,"span",36),T(),w(28,"div",31)(29,"h4"),k(30,"Single-touch to move logo/text"),T(),w(31,"p"),k(32,"Tap a logo or text, then drag with one finger to transform its position."),T()()()()}}function BZ(i,e){if(i&1&&(w(0,"div",21),Y(1,"canvas",22,0),T(),pe(3,UZ,33,0,"div",23)),i&2){let t=M();P(3),me(t.isTouchDevice()&&t.showTouchHint()?3:-1)}}var kx=class i{static TOUCH_HINT_STORAGE_KEY="designkit.2d.touchHintSeen";svgText=Me(null);isActive=Me(!0);layers=Me([]);selectedLayerKey=Me(null);isShowAllLayersOption=Me(!0);showPlacementGuides=Me(!1);gridEnabled=Me(!1);snapEnabled=Me(!0);gridSize=Me(24);cursorLabel=Me("");objectLabel=Me("");layerToggle=kt();canvasReady=kt();canvasDetached=kt();showPlacementGuidesChange=kt();gridSizeChange=kt();zoomIn=kt();zoomOut=kt();resetView=kt();onUndo=kt();onRedo=kt();fabricCanvasRef=Pu("fabricCanvas");designHistory=Q(Ll);canUndo=this.designHistory.canUndo;canRedo=this.designHistory.canRedo;showTouchHint=N(!1);isTouchDevice=N(!1);touchHintTimerId=null;touchHintShownForSession=!1;constructor(){this.initializeTouchHintState(),Yt(()=>{let e=this.isActive();if(!this.isTouchDevice()){this.clearTouchHintTimer(),this.showTouchHint.set(!1);return}if(!e){this.clearTouchHintTimer(),this.showTouchHint.set(!1);return}this.touchHintShownForSession||(this.touchHintShownForSession=!0,this.showTouchHint.set(!0),this.touchHintTimerId=setTimeout(()=>{this.dismissTouchHint()},7e3))}),Yt(()=>{let e=this.fabricCanvasRef();e?this.canvasReady.emit(e.nativeElement):this.canvasDetached.emit()})}initializeTouchHintState(){if(typeof window>"u")return;let e="ontouchstart"in window||navigator.maxTouchPoints>0;this.isTouchDevice.set(e)}clearTouchHintTimer(){this.touchHintTimerId&&(clearTimeout(this.touchHintTimerId),this.touchHintTimerId=null)}dismissTouchHint(){this.clearTouchHintTimer(),this.showTouchHint.set(!1)}replayTouchHint(){this.isTouchDevice()&&(this.touchHintShownForSession=!0,this.clearTouchHintTimer(),this.showTouchHint.set(!0),this.touchHintTimerId=setTimeout(()=>{this.dismissTouchHint()},7e3))}onLayerToggle(e){this.layerToggle.emit(e)}layerIsActive(e){let t=this.selectedLayerKey();return e===null?t===null:t===e}onZoomIn(){this.zoomIn.emit()}onZoomOut(){this.zoomOut.emit()}onResetCamera(){this.resetView.emit()}onRedoClick(){this.canRedo()&&this.onRedo.emit()}onUndoClick(){this.canUndo()&&this.onUndo.emit()}onGuidesToggle(){this.showPlacementGuidesChange.emit(!this.showPlacementGuides())}onGridSizeInput(e){let t=Number(e);Number.isFinite(t)&&this.gridSizeChange.emit(Math.max(8,Math.min(120,Math.round(t))))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-two-d-ui"]],viewQuery:function(t,n){t&1&&nl(n.fabricCanvasRef,kZ,5),t&2&&Oc()},inputs:{svgText:[1,"svgText"],isActive:[1,"isActive"],layers:[1,"layers"],selectedLayerKey:[1,"selectedLayerKey"],isShowAllLayersOption:[1,"isShowAllLayersOption"],showPlacementGuides:[1,"showPlacementGuides"],gridEnabled:[1,"gridEnabled"],snapEnabled:[1,"snapEnabled"],gridSize:[1,"gridSize"],cursorLabel:[1,"cursorLabel"],objectLabel:[1,"objectLabel"]},outputs:{layerToggle:"layerToggle",canvasReady:"canvasReady",canvasDetached:"canvasDetached",showPlacementGuidesChange:"showPlacementGuidesChange",gridSizeChange:"gridSizeChange",zoomIn:"zoomIn",zoomOut:"zoomOut",resetView:"resetView",onUndo:"onUndo",onRedo:"onRedo"},decls:22,vars:8,consts:[["fabricCanvas",""],[1,"view-header"],[1,"view-controls"],["type","button",1,"view-btn-2d",3,"active","bg-primary-600","text-white","border-primary-600","shadow-sm","bg-white","text-gray-700","border-gray-300"],[1,"canvas-content"],[1,"jersey-2d","relative","w-full"],[1,"canvas-toolbar","canvas-toolbar-2d"],["appTooltip","Undo","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-arrow-go-back-line"],["appTooltip","Redo","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-arrow-go-forward-line"],["appTooltip","Zoom In","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-zoom-in-line"],["appTooltip","Zoom Out","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-zoom-out-line"],["appTooltip","Reset","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-refresh-line"],["appTooltip","Gesture Tips","tooltipPosition","top",1,"toolbar-btn",3,"disabled"],["type","button",1,"view-btn-2d",3,"click"],["appTooltip","Gesture Tips","tooltipPosition","top",1,"toolbar-btn",3,"click","disabled"],[1,"ri-question-line"],[1,"canvas-stage"],[1,"fabric-stage-canvas"],[1,"touch-gesture-coach"],[1,"touch-gesture-coach",3,"click"],["type","button","aria-label","Dismiss gesture tips",1,"touch-gesture-close",3,"click"],[1,"ri-close-line"],[1,"gesture-row"],["aria-hidden","true",1,"gesture-visual","pinch-visual"],[1,"finger"],[1,"pulse"],[1,"gesture-copy"],["aria-hidden","true",1,"gesture-visual","pan-visual"],[1,"arrow"],["aria-hidden","true",1,"gesture-visual","drag-visual"],[1,"target"],[1,"trail"]],template:function(t,n){t&1&&(w(0,"div",1)(1,"h3"),k(2,"2D View"),T(),w(3,"div",2),pe(4,FZ,2,16,"button",3),Dt(5,NZ,2,17,"button",3,ow),T()(),w(7,"div",4)(8,"div",5)(9,"div",6)(10,"button",7),ie("click",function(){return n.onUndoClick()}),Y(11,"i",8),T(),w(12,"button",9),ie("click",function(){return n.onRedoClick()}),Y(13,"i",10),T(),w(14,"button",11),ie("click",function(){return n.onZoomIn()}),Y(15,"i",12),T(),w(16,"button",13),ie("click",function(){return n.onZoomOut()}),Y(17,"i",14),T(),w(18,"button",15),ie("click",function(){return n.onResetCamera()}),Y(19,"i",16),T(),pe(20,LZ,2,1,"button",17),T(),pe(21,BZ,4,1),T()()),t&2&&(P(4),me(n.isShowAllLayersOption()?4:-1),P(),It(n.layers()),P(5),ne("disabled",!n.canUndo()),P(2),ne("disabled",!n.canRedo()),P(2),ne("disabled",!n.svgText()),P(2),ne("disabled",!n.svgText()),P(2),ne("disabled",!n.svgText()),P(2),me(n.isTouchDevice()?20:-1),P(),me(n.svgText()?21:-1))},dependencies:[qt,fr],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}.view-controls[_ngcontent-%COMP%]{display:flex;gap:5px;flex-wrap:wrap}.view-header[_ngcontent-%COMP%] .view-controls[_ngcontent-%COMP%]{display:flex;gap:5px;background:rgb(var(--surface-100, 248 250 252));padding:4px;border-radius:6px}.view-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 20px;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a0d}.alignment-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.grid-size-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:rgb(var(--text-color-secondary, 100 116 139));background:rgb(var(--surface-100, 248 250 252));border-radius:6px;padding:4px 6px}.unit-select[_ngcontent-%COMP%]{border:1px solid rgb(var(--border-color, 203 213 225));border-radius:6px;padding:4px 8px;font-size:12px;background:rgb(var(--surface-card, 255 255 255))}.ruler-readout[_ngcontent-%COMP%]{display:flex;gap:12px;padding:6px 20px;font-size:12px;color:rgb(var(--text-color-secondary, 100 116 139));border-bottom:1px dashed rgb(var(--border-color, 203 213 225))}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0}.view-btn[_ngcontent-%COMP%], .view-btn-2d[_ngcontent-%COMP%]{padding:6px 16px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;cursor:pointer;border-radius:4px;transition:all .2s}.view-btn.active[_ngcontent-%COMP%], .view-btn-2d.active[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff}.view-btn[_ngcontent-%COMP%]:hover:not(.active), .view-btn-2d[_ngcontent-%COMP%]:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .15)}.canvas-toolbar[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;display:flex;gap:8px;background:rgb(var(--surface-card, 255 255 255));padding:10px;border-radius:8px;box-shadow:0 2px 8px #0f172a1a;z-index:10}.canvas-content[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center}.jersey-2d[_ngcontent-%COMP%]{width:100%;height:100%;min-height:0;display:flex;align-items:center;justify-content:center}.canvas-stage[_ngcontent-%COMP%]{position:relative;width:min(100%,760px);aspect-ratio:1 / 1;max-height:100%}.fabric-stage-canvas[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%}.touch-gesture-coach[_ngcontent-%COMP%]{position:absolute;right:10px;bottom:10px;width:min(280px,calc(100% - 20px));display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:12px;background:linear-gradient(140deg,#0f172aeb,#1e293be0);color:#f8fafc;box-shadow:0 8px 24px #0206174d;z-index:20;animation:_ngcontent-%COMP%_coach-enter .26s ease-out}.touch-gesture-close[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px;width:24px;height:24px;border:0;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#ffffff24;color:inherit;cursor:pointer}.gesture-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:56px 1fr;align-items:center;gap:10px}.gesture-copy[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:12px;font-weight:600;letter-spacing:.2px}.gesture-copy[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:2px 0 0;color:#cbd5e1;font-size:11px;line-height:1.35}.gesture-visual[_ngcontent-%COMP%]{position:relative;width:56px;height:40px}.gesture-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]{position:absolute;width:12px;height:20px;border-radius:999px;background:#94a3b8;border:1px solid rgb(226 232 240 / .55)}.pinch-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:first-child{left:12px;top:10px;animation:_ngcontent-%COMP%_finger-pinch-left 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:nth-child(2){right:12px;top:10px;animation:_ngcontent-%COMP%_finger-pinch-right 1.7s ease-in-out infinite}.pinch-visual[_ngcontent-%COMP%] .pulse[_ngcontent-%COMP%]{position:absolute;inset:10px 18px;border-radius:999px;border:1px solid rgb(125 211 252 / .9);animation:_ngcontent-%COMP%_pinch-pulse 1.7s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:first-child{left:14px;top:10px;animation:_ngcontent-%COMP%_finger-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]:nth-child(2){left:30px;top:10px;animation:_ngcontent-%COMP%_finger-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{position:absolute;left:9px;top:28px;width:38px;height:2px;background:#7dd3fc;animation:_ngcontent-%COMP%_arrow-pan 1.6s ease-in-out infinite}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:before, .pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:after{content:"";position:absolute;top:-3px;width:8px;height:8px;border-top:2px solid rgb(125 211 252);border-right:2px solid rgb(125 211 252)}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:before{left:0;transform:rotate(-135deg)}.pan-visual[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]:after{right:0;transform:rotate(45deg)}.drag-visual[_ngcontent-%COMP%] .target[_ngcontent-%COMP%]{position:absolute;left:7px;top:10px;width:18px;height:18px;border-radius:50%;border:2px solid rgb(125 211 252 / .95);background:#0f172a47}.drag-visual[_ngcontent-%COMP%] .finger[_ngcontent-%COMP%]{left:12px;top:12px;animation:_ngcontent-%COMP%_finger-drag 1.7s ease-in-out infinite}.drag-visual[_ngcontent-%COMP%] .trail[_ngcontent-%COMP%]{position:absolute;left:19px;top:20px;width:24px;height:2px;background:linear-gradient(to right,#7dd3fc33,#7dd3fcf2);transform-origin:left center;animation:_ngcontent-%COMP%_trail-drag 1.7s ease-in-out infinite}@keyframes _ngcontent-%COMP%_coach-enter{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_finger-pinch-left{0%,to{transform:translate(-2px)}50%{transform:translate(3px)}}@keyframes _ngcontent-%COMP%_finger-pinch-right{0%,to{transform:translate(2px)}50%{transform:translate(-3px)}}@keyframes _ngcontent-%COMP%_pinch-pulse{0%,to{opacity:.3;transform:scaleX(1)}50%{opacity:1;transform:scaleX(.7)}}@keyframes _ngcontent-%COMP%_finger-pan{0%,to{transform:translate(-3px)}50%{transform:translate(4px)}}@keyframes _ngcontent-%COMP%_arrow-pan{0%,to{transform:translate(-3px);opacity:.7}50%{transform:translate(4px);opacity:1}}@keyframes _ngcontent-%COMP%_finger-drag{0%,to{transform:translate(0)}50%{transform:translate(16px)}}@keyframes _ngcontent-%COMP%_trail-drag{0%,to{opacity:.2;transform:scaleX(.2)}50%{opacity:1;transform:scaleX(1)}}.toolbar-btn[_ngcontent-%COMP%]{width:36px;height:36px;border:none;background:transparent;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.toolbar-btn[_ngcontent-%COMP%]:hover{background:rgb(var(--surface-100, 248 250 252))}.toolbar-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed;background:rgb(var(--surface-100, 248 250 252));color:rgb(var(--text-color-secondary, 100 116 139));box-shadow:none}.toolbar-btn[_ngcontent-%COMP%]:disabled:hover{background:rgb(var(--surface-100, 248 250 252))}@media(max-width:1024px){.canvas-toolbar[_ngcontent-%COMP%]{gap:6px;padding:8px}}@media(max-width:640px){.view-header[_ngcontent-%COMP%]{padding:10px 12px;gap:8px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:14px}.canvas-toolbar[_ngcontent-%COMP%]{margin:6px 10px 0;width:max-content;padding:6px 8px;border-radius:6px}.toolbar-btn[_ngcontent-%COMP%]{width:32px;height:32px;font-size:16px}.canvas-stage[_ngcontent-%COMP%]{width:100%;max-height:100%}.touch-gesture-coach[_ngcontent-%COMP%]{right:8px;bottom:8px;width:min(260px,calc(100% - 16px));padding:10px}}@media(max-width:480px){.view-header[_ngcontent-%COMP%]{padding:8px 10px;gap:6px}.view-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:13px}.canvas-toolbar[_ngcontent-%COMP%]{gap:4px;padding:4px 6px}.toolbar-btn[_ngcontent-%COMP%]{width:30px;height:30px;font-size:15px}.view-btn[_ngcontent-%COMP%], .view-btn-2d[_ngcontent-%COMP%]{padding:4px 10px;font-size:12px}.touch-gesture-coach[_ngcontent-%COMP%]{width:min(240px,calc(100% - 12px));right:6px;bottom:6px}}@media(max-width:991px)and (orientation:landscape)and (max-height:500px){.canvas-toolbar[_ngcontent-%COMP%]{position:absolute;top:8px;left:8px;margin:0;flex-direction:column;gap:4px;padding:6px}.view-header[_ngcontent-%COMP%]{padding:6px 10px}}'],changeDetection:0})};var ri={OVERLAY_SELECT:"overlay-select",SELECTION_CLEARED:"selection-cleared",WHEEL:"wheel",PINCH:"pinch",POINTER_MOVE:"pointer-move",RESIZE:"resize"};function q3(i){let e=i.parentElement,t=new EventTarget,n=new zf(i,{selection:!0,preserveObjectStacking:!0}),r=()=>{let ce=e?.getBoundingClientRect(),Ie=Math.round(ce?.width??0),Mt=Math.round(ce?.height??0),Lt=Ie||i.clientWidth||0,de=Mt||i.clientHeight||0;return{width:Lt,height:de}},{width:o,height:s}=r();o>0&&s>0?(n.setDimensions({width:o,height:s}),n.requestRenderAll()):n.setDimensions({width:320,height:320});let a=null,l=!1,c=0,d=0,u=!0,f=!1,h="none",p=!1,v=0,g=0,m=0,b=()=>{let{width:ce,height:Ie}=r();if(ce<=0||Ie<=0){a==null&&typeof requestAnimationFrame<"u"&&(a=requestAnimationFrame(()=>{a=null,b()}));return}n.getWidth()===ce&&n.getHeight()===Ie||(n.setDimensions({width:ce,height:Ie}),t.dispatchEvent(new Event(ri.RESIZE)),n.requestRenderAll())},y=typeof ResizeObserver<"u"?new ResizeObserver(()=>b()):null;e?y?.observe(e):y?.observe(i),typeof window<"u"&&window.addEventListener("resize",b),b();let x=ce=>{let Mt=ce.target?.dataOverlayId;Mt&&t.dispatchEvent(new CustomEvent(ri.OVERLAY_SELECT,{detail:{overlayId:Mt}}))},_=()=>{t.dispatchEvent(new Event(ri.SELECTION_CLEARED))},E=ce=>{let Ie=ce.e;t.dispatchEvent(new CustomEvent(ri.WHEEL,{detail:{deltaY:Ie.deltaY}})),Ie.preventDefault(),Ie.stopPropagation()},D=ce=>{let Ie=ce.scenePoint??ce.pointer;!Ie||!Number.isFinite(Ie.x)||!Number.isFinite(Ie.y)||t.dispatchEvent(new CustomEvent(ri.POINTER_MOVE,{detail:{x:Ie.x,y:Ie.y}}))},A=ce=>h!=="none"&&h!==ce?!1:(h==="none"&&(u=n.selection,f=n.skipTargetFind,n.selection=!1,n.skipTargetFind=!0),h=ce,!0),S=ce=>{h===ce&&(h="none",n.selection=u,n.skipTargetFind=f,n.defaultCursor="default")},I=ce=>{ce.button===2&&A("right-pan")&&(l=!0,c=ce.clientX,d=ce.clientY,n.defaultCursor="grabbing",ce.preventDefault())},L=ce=>{if(!l)return;let Ie=n.viewportTransform;Ie&&(Ie[4]+=ce.clientX-c,Ie[5]+=ce.clientY-d,c=ce.clientX,d=ce.clientY,n.requestRenderAll(),ce.preventDefault())},H=()=>{if(!l)return;l=!1,S("right-pan");let ce=n.viewportTransform;ce&&n.setViewportTransform([ce[0],ce[1],ce[2],ce[3],ce[4],ce[5]]),n.requestRenderAll()},z=(ce,Ie)=>{let Mt=Ie.clientX-ce.clientX,Lt=Ie.clientY-ce.clientY;return Math.hypot(Mt,Lt)},X=(ce,Ie)=>{A("touch-gesture")&&(p=!0,v=(ce.clientX+Ie.clientX)/2,g=(ce.clientY+Ie.clientY)/2,m=z(ce,Ie))},q=()=>{if(!p)return;p=!1,m=0,S("touch-gesture");let ce=n.viewportTransform;ce&&n.setViewportTransform([ce[0],ce[1],ce[2],ce[3],ce[4],ce[5]]),n.requestRenderAll()},K=ce=>{ce.touches.length<2||(X(ce.touches[0],ce.touches[1]),p&&ce.preventDefault())},j=ce=>{if(!p||ce.touches.length<2)return;let Ie=ce.touches[0],Mt=ce.touches[1],Lt=(Ie.clientX+Mt.clientX)/2,de=(Ie.clientY+Mt.clientY)/2,ve=z(Ie,Mt),Ue=n.viewportTransform;if(Ue&&(Ue[4]+=Lt-v,Ue[5]+=de-g,n.requestRenderAll()),m>0&&Number.isFinite(ve)){let vt=ve/m;if(vt>1.02||vt<.98){let Ve=Math.min(1.2,Math.max(.8,vt));t.dispatchEvent(new CustomEvent(ri.PINCH,{detail:{multiplier:Ve}})),m=ve}}v=Lt,g=de,ce.preventDefault()},te=ce=>{if(p){if(ce.touches.length>=2){v=(ce.touches[0].clientX+ce.touches[1].clientX)/2,g=(ce.touches[0].clientY+ce.touches[1].clientY)/2,m=z(ce.touches[0],ce.touches[1]),ce.preventDefault();return}q()}},ye=ce=>{ce.preventDefault()},xe=n.upperCanvasEl.style.touchAction;return n.upperCanvasEl.style.touchAction="none",n.upperCanvasEl.addEventListener("contextmenu",ye),n.upperCanvasEl.addEventListener("mousedown",I),n.upperCanvasEl.addEventListener("mousemove",L),n.upperCanvasEl.addEventListener("touchstart",K,{passive:!1}),n.upperCanvasEl.addEventListener("touchmove",j,{passive:!1}),n.upperCanvasEl.addEventListener("touchend",te,{passive:!1}),n.upperCanvasEl.addEventListener("touchcancel",te,{passive:!1}),typeof window<"u"&&window.addEventListener("mouseup",H),n.on("mouse:down",x),n.on("mouse:move",D),n.on("selection:cleared",_),n.on("mouse:wheel",E),{canvas:n,events:t,syncDimensions:b,cleanup:()=>{a!=null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(a),a=null),typeof window<"u"&&(window.removeEventListener("resize",b),window.removeEventListener("mouseup",H)),y?.disconnect(),n.upperCanvasEl.style.touchAction=xe,n.upperCanvasEl.removeEventListener("contextmenu",ye),n.upperCanvasEl.removeEventListener("mousedown",I),n.upperCanvasEl.removeEventListener("mousemove",L),n.upperCanvasEl.removeEventListener("touchstart",K),n.upperCanvasEl.removeEventListener("touchmove",j),n.upperCanvasEl.removeEventListener("touchend",te),n.upperCanvasEl.removeEventListener("touchcancel",te),n.off("mouse:down",x),n.off("mouse:move",D),n.off("selection:cleared",_),n.off("mouse:wheel",E),n.dispose()}}}function K3(i){return!!(i&&Number.isFinite(i.x)&&Number.isFinite(i.y)&&Number.isFinite(i.width)&&Number.isFinite(i.height)&&i.width>0&&i.height>0)}function VZ(i,e,t,n){return K3(i)?i:K3(e)?e:t.width>0&&t.height>0?{x:t.minX,y:t.minY,width:t.width,height:t.height}:n&&n.width>0&&n.height>0?{x:0,y:0,width:n.width,height:n.height}:{x:0,y:0,width:1e3,height:1e3}}async function Z3(i){let{canvas:e,svgMarkup:t,fabricViewZoom:n,svgViewBox:r,svgDimensions:o,targetBounds:s,baseBounds:a,loadToken:l}=i;if(!t)return e.clear(),e.backgroundImage=void 0,e.requestRenderAll(),null;let c=new Blob([t],{type:Nd}),d=URL.createObjectURL(c);try{let u=await GZ(d),f=Math.max(e.getWidth(),1),h=Math.max(e.getHeight(),1),p=24,v=u.naturalWidth||u.width,g=u.naturalHeight||u.height,m=Math.max(f-p*2,1),b=Math.max(h-p*2,1),y=VZ(s,a,r,o),x=Math.max(y.width,1),_=Math.max(y.height,1),E=Math.min(m/x,b/_);if(!Number.isFinite(E)||E<=0){let ye=Math.max(a.width,1),xe=Math.max(a.height,1);E=Math.min(m/ye,b/xe)}(!Number.isFinite(E)||E<=0)&&(E=1);let D=E*n,A=y.width*D,S=y.height*D,I=(f-A)/2-y.x*D,L=(h-S)/2-y.y*D,H=r.width||o?.width||v,z=r.height||o?.height||g,X=H>0&&v>0?v/H:1,q=z>0&&g>0?g/z:1,K=Number.isFinite(X)&&X>0?X:Number.isFinite(q)&&q>0?q:1,j=D/K,te=await Br.fromURL(d);return te.set({left:I,top:L,scaleX:j,scaleY:j,selectable:!1,evented:!1,originX:"left",originY:"top"}),{transform:{scale:D,offsetX:I,offsetY:L},layout:{baseScale:E,targetBounds:y,canvasWidth:f,canvasHeight:h,pxPerUnit:K},image:te,token:l}}finally{URL.revokeObjectURL(d)}}function GZ(i){return new Promise((e,t)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=r=>t(r),n.src=i})}var zl={fillColor:"rgba(14,165,233,0.04)",strokeColor:"#df1616",minDashUnit:6,dashScaleMultiplier:2,dashGapMultiplier:.6,minStrokeWidth:1,strokeWidthRatio:.005};var HZ=new Set(["text","logo"]);function J3(i,e){let{show:t,transform:n,zones:r,state:o}=e,s=new Map(o.objects);if(!t||!n)return jT(i,s),{objects:s};let a=new Set,l=Math.max(zl.minDashUnit,n.scale*zl.dashScaleMultiplier);for(let c of r){if(!c.allowedKinds.some(b=>HZ.has(b)))continue;let u=c.bounds.width*n.scale,f=c.bounds.height*n.scale;if(u<=0||f<=0)continue;let h=n.offsetX+c.bounds.x*n.scale,p=n.offsetY+c.bounds.y*n.scale,v=Math.max(zl.minStrokeWidth,Math.min(u,f)*zl.strokeWidthRatio),g=[l,l*zl.dashGapMultiplier],m=s.get(c.placementKey);m?(m.canvas||i.add(m),m.set({left:h,top:p,width:u,height:f,strokeDashArray:g,strokeWidth:v,visible:!0})):(m=new jo({left:h,top:p,width:u,height:f,originX:"left",originY:"top",fill:zl.fillColor,stroke:zl.strokeColor,strokeDashArray:g,strokeWidth:v,selectable:!1,evented:!1,excludeFromExport:!0,hoverCursor:"default"}),s.set(c.placementKey,m),i.add(m)),m.setCoords(),a.add(c.placementKey)}for(let[c,d]of Array.from(s.entries()))a.has(c)||(i.remove(d),s.delete(c));return{objects:s}}function jT(i,e){for(let t of e.values())i.remove(t);e.clear()}var Vl="#aa001f",Bs={scale:1,rotation:0,translateX:0,translateY:0,opacity:1},Zf={scale:1,rotation:0,translateX:0,translateY:0,opacity:1};function Et(i){return i.kind==="text"}function oi(i){return i.kind==="logo"}var Fx=[{label:"Anton",value:"Anton",source:"https://cdn.jsdelivr.net/gh/google/fonts@main/ofl/anton/Anton-Regular.ttf"}],WT=Fx.reduce((i,e)=>(i[e.value]=e.source,i),{});var zs=class i{COMPRESSION_3D_QUALITY_OPAQUE=.25;COMPRESSION_3D_QUALITY_TRANSPARENT=.7;COMPRESSION_3D_MAX_RESOLUTION_OPAQUE=1200;COMPRESSION_3D_MAX_RESOLUTION_TRANSPARENT=900;compressionLog=[];constructor(){}async compressImageToDataUrl(e){try{let t=e?.trim()??"";if(!t)return e;let n=await this.resolveSourceToDataUrl(t);if(!n||!n.startsWith("data:image"))return e;let r=await this.detectTransparency(n),o=r?this.COMPRESSION_3D_QUALITY_TRANSPARENT:this.COMPRESSION_3D_QUALITY_OPAQUE,s=r?this.COMPRESSION_3D_MAX_RESOLUTION_TRANSPARENT:this.COMPRESSION_3D_MAX_RESOLUTION_OPAQUE,a=await this.downscaleAndReencodeImage(n,o,s,r);return a.length>=n.length?n:(this.logCompressionMetrics(n,a),a)}catch(t){return console.warn("[ImageCompressionService] Compression failed, returning original image:",t),e}}async resolveSourceToDataUrl(e){if(e.startsWith("data:image"))return e;if(!this.isFetchableImageUrl(e))return null;try{let t=await fetch(e);if(!t.ok)return null;let n=await t.blob();return n.type.startsWith("image/")?await this.blobToDataUrl(n):null}catch{return null}}isFetchableImageUrl(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("blob:")}blobToDataUrl(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let o=r.result;if(typeof o=="string"){t(o);return}n(new Error("Failed to convert blob to data URL"))},r.onerror=()=>n(r.error??new Error("FileReader error")),r.readAsDataURL(e)})}detectTransparency(e){return new Promise(t=>{try{let n=new Image;n.onload=()=>{let r=document.createElement("canvas");r.width=n.width,r.height=n.height;let o=r.getContext("2d");if(!o){t(!1);return}o.drawImage(n,0,0);let s=this.hasAlphaChannel(o,n.width,n.height);t(s)},n.onerror=()=>{t(!1)},n.crossOrigin="Anonymous",n.src=e}catch{t(!1)}})}downscaleAndReencodeImage(e,t,n,r){return new Promise((o,s)=>{let a=new Image;a.onload=()=>{try{let l=a.width,c=a.height,d=l,u=c;if(l>n||c>n){let p=l/c;p>1?(d=n,u=Math.round(n/p)):(u=n,d=Math.round(n*p))}let f=document.createElement("canvas");f.width=d,f.height=u;let h=f.getContext("2d");if(!h){s(new Error("Failed to get canvas 2D context"));return}if(h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.drawImage(a,0,0,d,u),this.storeDimensionInfo(l,c,d,u),r){let p=null;try{if(p=f.toDataURL("image/webp",t),!p.startsWith("data:image/webp"))throw new Error("WebP not supported, falling back to PNG");o(p)}catch{let v=f.toDataURL("image/png",t);o(v)}}else{let p=f.toDataURL("image/jpeg",t);o(p)}}catch(l){s(l)}},a.onerror=()=>{s(new Error("Failed to load image for compression"))},a.crossOrigin="Anonymous",a.src=e})}storeDimensionInfo(e,t,n,r){if(this.compressionLog.length>0){let o=this.compressionLog[this.compressionLog.length-1];o&&!o.originalResolution&&(o.originalResolution=`${e}\xD7${t}`,o.compressedResolution=`${n}\xD7${r}`)}}logCompressionMetrics(e,t){let n=e.length,r=t.length,o=((1-r/n)*100).toFixed(1),s="JPEG";if(t.startsWith("data:image/webp")?s="WebP":t.startsWith("data:image/png")&&(s="PNG"),this.compressionLog.push({original:n,compressed:r}),typeof console<"u"&&console.debug){let a=this.compressionLog[this.compressionLog.length-1],l=a?.originalResolution?` (${a.originalResolution} \u2192 ${a.compressedResolution})`:"";console.debug(`[ImageCompressionService] 3D Texture [${s}]: ${(n/1024).toFixed(1)}KB \u2192 ${(r/1024).toFixed(1)}KB (${o}% reduction)${l}`)}}getCompressionStats(){let e=this.compressionLog.length,t=this.compressionLog.reduce((o,s)=>o+s.original,0),n=this.compressionLog.reduce((o,s)=>o+s.compressed,0),r=e===0?0:(1-n/t)*100;return{totalCompressed:e,totalOriginalSize:t,totalCompressedSize:n,averageReductionPercent:parseFloat(r.toFixed(1))}}hasAlphaChannel(e,t,n){try{let o=e.getImageData(0,0,t,n).data,s=4;for(let a=3;a<o.length;a+=4*s)if(o[a]<255)return!0;return!1}catch{return!1}}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Gl=(r=>(r.TEXT="TEXT",r.LOGO="LOGO",r.OVERLAY="OVERLAY",r.BACKGROUND="BACKGROUND",r))(Gl||{}),La={OVERLAY:"overlay",EFFECTS:"effects",COLOR:"color",EFFECT:"effect"},Q3={removeWhiteBg:"Remove white bg",removingBg:"Removing...",removeWhiteBgTooltip:"Remove white background",logoToEdit:"Logo",widthLabel:"Width",heightLabel:"Height",resetTextDimensions:"Reset Width/Height",dimensionOutOfRange:"Value is out of allowed range for this overlay."};var Hl=class i{ensureMeasurementHost(e,t,n){if(!n())return null;if(this.isHostAttached(e()))return e();if(typeof document>"u"||!document.body)return null;let r=document.createElement("div");return r.style.position="absolute",r.style.width="0",r.style.height="0",r.style.overflow="hidden",r.style.opacity="0",r.style.pointerEvents="none",r.style.zIndex="-1",document.body.appendChild(r),e.set(r),t.set(!0),r}ensureMeasurementSvgClone(e,t,n,r,o){if(!e())return null;let s=this.ensureMeasurementHost(t,r,o);return s?(!r()&&n()&&s.contains(n())||(s.innerHTML=e(),n.set(s.querySelector("svg")),r.set(!1)),n()):null}queryMeasurementElementById(e,t){if(!e||!t)return null;let n=`[id="${this.escapeAttributeSelector(t)}"]`;try{return e.querySelector(n)}catch{return null}}disposeMeasurementHost(e){let t=e();t?.parentNode&&t.parentNode.removeChild(t),e.set(null)}escapeAttributeSelector(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}isHostAttached(e){return!!e&&typeof document<"u"&&document.body.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Bn=class i{constructor(e){this.measurementService=e}syncCommandIdSeq=0;syncCommandResolvers=new Map;measurementHost=N(null);measurementSvgRoot=N(null);measurementCloneDirty=N(!0);isBrowser=N(typeof window<"u");svgDocState=N(null);svgTextState=N(null);fabricReadyState=N(!1);fabricCanvasState=N(null);canvasTransformState=N(null);render2dCommandId=N(0);textureRebuildCommandId=N(0);overlaySyncCommandId=N(0);baseElementCache=N(null);baseBBoxCache=N(null);layerBoundsCache=N(new Map);backgroundPivotCache=N(new Map);patternPivotCache=N(new Map);overlays=N([]);textWarpEnvelope=N(null);textGlyphPlanCache=N(new Map);textGlyphPlanSignatures=N(new Map);textGlyphPlanPendingSignatures=N(new Map);textGlyphPlanPromises=N(new Map);textLayoutCache=N(new Map);warpPathCache=N({top:null,bottom:null});warpMeasurementSvg=N(null);activeOverlayId=N(null);overlayRuntimeDimensionsPx=N(new Map);printAreaWidthInches=N(null);printAreaHeightInches=N(null);_personalizationPlacements=[];personalizationPlacements(){return this._personalizationPlacements}setPersonalizationPlacements(e){this._personalizationPlacements=e}ensureMeasurementHost(){return this.measurementService.ensureMeasurementHost(this.measurementHost,this.measurementCloneDirty,this.isBrowser)}ensureMeasurementSvgClone(e){return this.measurementService.ensureMeasurementSvgClone(e,this.measurementHost,this.measurementSvgRoot,this.measurementCloneDirty,this.isBrowser)}invalidateBaseCaches(e){this.baseElementCache.set(null),this.baseBBoxCache.set(null),this.layerBoundsCache.set(new Map),this.backgroundPivotCache.set(new Map),this.patternPivotCache.set(new Map),this.measurementCloneDirty.set(!0),this.measurementSvgRoot.set(null),e&&e()}setActiveOverlay(e){this.activeOverlayId.set(e?.id??null)}setOverlayRuntimeDimensionsPx(e,t,n){!e||!Number.isFinite(t)||!Number.isFinite(n)||this.overlayRuntimeDimensionsPx.update(r=>{let o=new Map(r);return o.set(e,{width:Math.max(t,1),height:Math.max(n,1)}),o})}clearOverlayRuntimeDimensions(e){e&&this.overlayRuntimeDimensionsPx.update(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})}setPrintAreaInches(e,t){let n=Number.isFinite(e)&&e>0?e:null,r=Number.isFinite(t)&&t>0?t:null;this.printAreaWidthInches.set(n),this.printAreaHeightInches.set(r)}clearPrintAreaInches(){this.printAreaWidthInches.set(null),this.printAreaHeightInches.set(null)}svgDoc(){return this.svgDocState()}svgText(){return this.svgTextState()}markSvgMutated(e){this.svgTextState.set(new XMLSerializer().serializeToString(e)),this.measurementCloneDirty.set(!0),this.invalidateBaseCaches(),this.render2d(),this.requestTextureRebuild()}measurementDirty(){return this.measurementCloneDirty}syncOverlaysToSvgDoc(){let e=++this.syncCommandIdSeq,t=new Promise((n,r)=>{this.syncCommandResolvers.set(e,{resolve:n,reject:r})});return this.overlaySyncCommandId.set(e),t}completeOverlaySyncCommand(e,t){let n=this.syncCommandResolvers.get(e);if(n){if(this.syncCommandResolvers.delete(e),t){n.reject(t);return}n.resolve()}}render2d(){this.render2dCommandId.update(e=>e+1)}requestTextureRebuild(){this.textureRebuildCommandId.update(e=>e+1)}shouldApplyWarp(e){return!!(this.textWarpEnvelope()&&e.warpEnabled)}getWarpEnvelopeSignature(){if(!this.textWarpEnvelope())return"warp:none";let{viewBox:e,topPathD:t,bottomPathD:n}=this.textWarpEnvelope();return`${e.minX},${e.minY},${e.width},${e.height}|${t}|${n}`}resetWarpResources(){if(!this.isBrowser()){this.warpPathCache.set({top:null,bottom:null}),this.warpMeasurementSvg.set(null);return}["top","bottom"].forEach(t=>{let n=this.warpPathCache()[t];n?.path?.parentNode&&n.path.parentNode.removeChild(n.path)}),this.warpPathCache.set({top:null,bottom:null});let e=this.warpMeasurementSvg();e?.parentNode&&e.parentNode.removeChild(e),this.warpMeasurementSvg.set(null)}sampleWarpEdge(e,t,n){let r=this.ensureWarpPath(e,n??this.textWarpEnvelope());if(!r||r.length<=0)return null;let o=Math.min(Math.max(t,0),1),s=r.length*o;try{let a=r.path.getPointAtLength(s);return{x:a.x,y:a.y}}catch(a){return console.error(Em.failedSampleWarpPath,a),null}}getTextGlyphPlanIfFresh(e,t){return this.textGlyphPlanSignatures().get(e)!==t?null:this.textGlyphPlanCache().get(e)??null}storeTextGlyphPlan(e,t,n){this.setTextGlyphPlan(e,n,t)}queueTextGlyphPlanBuild(e,t,n){if(this.textGlyphPlanSignatures().get(e)===t||this.textGlyphPlanPendingSignatures().get(e)===t)return;this.textGlyphPlanPendingSignatures.update(a=>{let l=new Map(a);return l.set(e,t),l});let s=n.then(a=>(a&&this.setTextGlyphPlan(e,a,t),a)).finally(()=>{this.textGlyphPlanPendingSignatures().get(e)===t&&this.textGlyphPlanPendingSignatures.update(a=>{let l=new Map(a);return l.delete(e),l}),this.textGlyphPlanPromises.update(a=>{let l=new Map(a);return l.delete(e),l}),this.refreshFabricOverlays()});this.textGlyphPlanPromises.update(a=>{let l=new Map(a);return l.set(e,s),l})}clearAllTextGlyphPlans(){this.textGlyphPlanCache.set(new Map),this.textGlyphPlanSignatures.set(new Map),this.textGlyphPlanPendingSignatures.set(new Map),this.textGlyphPlanPromises.set(new Map),this.textLayoutCache.set(new Map)}clearTextGlyphPlan(e){let t=this.textGlyphPlanCache();t.delete(e),this.textGlyphPlanCache.set(t);let n=this.textGlyphPlanSignatures();n.delete(e),this.textGlyphPlanSignatures.set(n);let r=this.textGlyphPlanPendingSignatures();r.delete(e),this.textGlyphPlanPendingSignatures.set(r);let o=this.textGlyphPlanPromises();o.delete(e),this.textGlyphPlanPromises.set(o),this.clearTextLayoutCache(e)}refreshFabricOverlays(){let e=this.fabricReadyState(),t=this.fabricCanvasState(),n=this.canvasTransformState();!e||!t||!n||this.render2d()}setTextWarpEnvelope(e){this.textWarpEnvelope.set(e)}clearTextLayoutCache(e){let t=this.textLayoutCache();t.delete(e),this.textLayoutCache.set(t)}ensureWarpMeasurementRoot(){if(!this.isBrowser())return null;let e=this.ensureMeasurementHost();if(!e)return null;if(this.warpMeasurementSvg()&&e.contains(this.warpMeasurementSvg()))return this.warpMeasurementSvg();let t=document.createElementNS("http://www.w3.org/2000/svg","svg");return t.setAttribute("width","0"),t.setAttribute("height","0"),t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.opacity="0",t.style.pointerEvents="none",e.appendChild(t),this.warpMeasurementSvg.set(t),t}ensureWarpPath(e,t){if(!this.isBrowser())return null;let n=t;if(!n)return null;let r=e==="top"?n.topPathD:n.bottomPathD;if(!r||r.trim().length===0)return null;let o=this.warpPathCache()[e];if(o&&o.sourceD===r&&o.path.isConnected)return o.length=o.path.getTotalLength(),o;let s=this.ensureWarpMeasurementRoot();if(!s)return null;o?.path?.parentNode===s&&s.removeChild(o.path);let a=s.ownerDocument.createElementNS(s.namespaceURI,"path");a.setAttribute("d",r),s.appendChild(a);try{let l=a.getTotalLength(),c={path:a,length:l,sourceD:r};return this.warpPathCache.set(ue(R({},this.warpPathCache()),{[e]:c})),c}catch(l){return console.error(Em.failedMeasureWarpPath,l),a.parentNode?.removeChild(a),this.warpPathCache.set(ue(R({},this.warpPathCache()),{[e]:null})),null}}setTextGlyphPlan(e,t,n){this.textGlyphPlanCache.update(r=>{let o=new Map(r);return o.set(e,t),o}),this.textGlyphPlanSignatures.update(r=>{let o=new Map(r);return o.set(e,n),o})}static \u0275fac=function(t){return new(t||i)(Xe(Hl))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Jf=class i{constructor(e,t=Q(zs)){this.customizerState=e;this.imageCompressionService=t}templates=N([]);backgroundImages=N({});selectedBackgroundKey=N(null);backgroundBaseTransforms=N(new Map);backgroundPivotCache=N(new Map);state=De(()=>({images:this.backgroundImages(),selectedKey:this.selectedBackgroundKey(),templates:this.templates()}));minScale=.25;maxScale=6;scaleStep=.05;minRotation=-180;maxRotation=180;rotationStep=1;minTranslate=-500;maxTranslate=500;translateStep=1;minOpacity=0;maxOpacity=1;opacityStep=.05;xlinkNamespace="http://www.w3.org/1999/xlink";setTemplates(e){this.templates.set(e??[])}reset(){this.backgroundImages.set({}),this.selectedBackgroundKey.set(null),this.backgroundBaseTransforms.set(new Map),this.backgroundPivotCache.set(new Map)}refreshFromSvg(){let e=this.customizerState.svgDoc(),t={};if(this.backgroundBaseTransforms.set(new Map),this.backgroundPivotCache.set(new Map),!e){this.backgroundImages.set(t),this.selectedBackgroundKey.set(null);return}for(let n of this.templates()){let r=this.getTemplateImageElements(e,n),o=r[0]??null;if(!o){t[n.actionItemId]={src:null,fileName:null,transform:R({},Zf)};continue}for(let c of r){let d=c.id?.trim();if(!d)continue;let u=c.getAttribute("data-base-transform")??c.getAttribute("transform")??"";this.backgroundBaseTransforms.update(f=>{let h=new Map(f);return h.set(d,u),h})}let s=o.getAttribute("href")??o.getAttributeNS(this.xlinkNamespace,"href"),a=o.getAttribute("data-bg-name"),l={scale:this.normalizeScale(Number.parseFloat(o.getAttribute("data-bg-scale")??"1")),rotation:this.normalizeRotation(Number.parseFloat(o.getAttribute("data-bg-rotation")??"0")),translateX:this.normalizeTranslate(Number.parseFloat(o.getAttribute("data-bg-translate-x")??"0")),translateY:this.normalizeTranslate(Number.parseFloat(o.getAttribute("data-bg-translate-y")??"0")),opacity:this.normalizeOpacity(Number.parseFloat(o.getAttribute("data-bg-opacity")??"1"))};t[n.actionItemId]={src:s&&s.trim().length>0?s:null,fileName:a&&a.trim().length>0?a.trim():null,transform:l}}this.backgroundImages.set(t),this.selectedBackgroundKey()&&!this.backgroundImages()[this.selectedBackgroundKey()]&&this.selectedBackgroundKey.set(null)}select(e){this.selectedBackgroundKey.set(e)}resolveLabel(e){return this.findTemplate(e)?.name??e}async onFileSelected(e,t){if(!t)return null;if(t.size>26214400){let l=`Background image file size must not exceed ${25}MB`;return console.warn(`[BackgroundService] Background upload rejected: file exceeds ${25} MB limit.`),l}if(!(t.type.startsWith("image/")||/\.(png|jpg|jpeg|webp|gif|svg)$/i.test(t.name)))return null;let r=await this.readFileAsDataUrl(t);if(!r)return null;let o=await this.imageCompressionService.compressImageToDataUrl(r),s=this.getBackgroundState(e),a={src:r,fileName:t.name,src3d:o,transform:R({},s.transform)};return this.backgroundImages.set(ue(R({},this.backgroundImages()),{[e]:a})),this.selectedBackgroundKey.set(e),await this.applyBackgroundToSvg(e,a),null}async remove(e){let t=this.findTemplate(e),n=this.customizerState.svgDoc();if(n&&t){let o=this.getTemplateImageElements(n,t);for(let s of o){let a=s.id?.trim(),l=(a?this.backgroundBaseTransforms().get(a):null)??s.getAttribute("data-base-transform")??s.getAttribute("transform")??"";a&&this.backgroundBaseTransforms.update(c=>{let d=new Map(c);return d.set(a,l),d}),this.applyBackgroundSourceAttributes(s,null,null),this.applyBackgroundTransformAttributes(s,l,R({},Zf))}}let r={src:null,fileName:null,transform:R({},Zf)};this.backgroundImages.set(ue(R({},this.backgroundImages()),{[e]:r})),this.customizerState.svgDoc()&&this.customizerState.markSvgMutated(this.customizerState.svgDoc())}async applyToAll(e){let t=this.getBackgroundState(e);if(!t.src)return;let n=this.templates().filter(a=>a.type=="BACKGROUND").map(a=>a.actionItemId).filter(a=>a!==e);if(!n.length)return;let r={src:t.src,fileName:t.fileName,transform:R({},t.transform)},o=R({},this.backgroundImages());for(let a of n)o[a]={src:r.src,fileName:r.fileName,transform:R({},r.transform)};this.backgroundImages.set(o),await Promise.all(n.map(a=>this.applyBackgroundToSvg(a,{src:r.src,fileName:r.fileName,transform:R({},r.transform)},!1)));let s=this.customizerState.svgDoc();s&&this.customizerState.markSvgMutated(s)}async ensureCompressedSourcesFor3d(){let e=Object.entries(this.backgroundImages()).map(([a,l])=>({key:a,src:l.src?.trim()??"",hasCompressed:!!l.src3d})).filter(a=>a.src.length>0&&!a.hasCompressed);if(!e.length)return;let n=(await Promise.all(e.map(async a=>{try{return{key:a.key,src:a.src,src3d:await this.imageCompressionService.compressImageToDataUrl(a.src)}}catch(l){return console.warn("[BackgroundService] Failed to compress background image, using original",l),null}}))).filter(a=>!!a);if(!n.length)return;this.backgroundImages.update(a=>{let l=R({},a),c=!1;for(let d of n){let u=l[d.key];if(!u)continue;let f=u.src?.trim()??"";!f||u.src3d||f!==d.src||(l[d.key]=ue(R({},u),{src3d:d.src3d}),c=!0)}return c?l:a});let r=this.backgroundImages(),o=n.map(a=>a.key).filter(a=>{let l=r[a];return!!l?.src&&!!l.src3d});if(!o.length)return;await Promise.all(o.map(a=>this.applyBackgroundToSvg(a,r[a],!1)));let s=this.customizerState.svgDoc();s&&this.customizerState.markSvgMutated(s)}updateTransform(e,t,n){let r=n??this.selectedBackgroundKey();if(!r)return;this.selectedBackgroundKey()!==r&&this.selectedBackgroundKey.set(r);let o=typeof t=="number"?t:Number.parseFloat(t);if(!Number.isFinite(o))return;let s=this.normalizeTransform(e,o),a=this.getBackgroundState(r);if(Math.abs(a.transform[e]-s)<1e-4)return;let l=ue(R({},a.transform),{[e]:s}),c=ue(R({},a),{transform:l});this.backgroundImages.set(ue(R({},this.backgroundImages()),{[r]:c})),this.applyBackgroundToSvg(r,c)}stepTransform(e,t,n){let r=n??this.selectedBackgroundKey();if(!r)return;this.selectedBackgroundKey()!==r&&this.selectedBackgroundKey.set(r);let s=this.getBackgroundState(r).transform[e]+t,a=Math.round(s*100)/100;this.updateTransform(e,a,r)}resetTransform(e){let t=e??this.selectedBackgroundKey();if(!t)return;this.selectedBackgroundKey()!==t&&this.selectedBackgroundKey.set(t);let n=this.getBackgroundState(t),r=ue(R({},n),{transform:R({},Zf)});this.backgroundImages.set(ue(R({},this.backgroundImages()),{[t]:r})),this.applyBackgroundToSvg(t,r)}findTemplate(e){return this.templates().find(t=>t.actionItemId===e)}getBackgroundState(e){let t=this.backgroundImages()[e];return t?{src:t.src,fileName:t.fileName,src3d:t.src3d,transform:R({},t.transform)}:{src:null,fileName:null,transform:R({},Zf)}}async syncBackgroundsToSvgWithQuality(e="compressed"){let t=this.customizerState.svgDoc();if(!t)return;let n=this.backgroundImages(),r=Object.keys(n).filter(o=>!!n[o]?.src);r.length&&(await Promise.all(r.map(o=>this.applyBackgroundToSvg(o,n[o],!1,e))),this.customizerState.markSvgMutated(t))}async applyBackgroundToSvg(e,t,n=!0,r="compressed"){let o=this.customizerState.svgDoc();if(!o)return;let s=this.findTemplate(e);if(!s)return;let a=!!t.src,l=[];if(a?l=await this.ensureBackgroundImageElements(s):l=this.getTemplateImageElements(o,s),!l.length)return;let c;r==="compressed"?c=t.src3d||t.src:c=t.src;for(let d of l){let u=d.id?.trim(),f=(u?this.backgroundBaseTransforms().get(u):null)??d.getAttribute("data-base-transform")??d.getAttribute("transform")??"";u&&this.backgroundBaseTransforms.update(h=>{let p=new Map(h);return p.set(u,f),p}),this.applyBackgroundSourceAttributes(d,c,t.fileName),this.applyBackgroundTransformAttributes(d,f,t.transform)}n&&this.customizerState.markSvgMutated(o)}async ensureBackgroundImageElements(e){let t=this.customizerState.svgDoc();if(!t)return[];let n=this.getTemplateImageElements(t,e);if(!n.length){let r=t.documentElement;if(!r)return[];if(r.getAttribute("xmlns:xlink")||r.setAttribute("xmlns:xlink",this.xlinkNamespace),!e.specificAreaSvgLink)return[];let o=await fetch(e.specificAreaSvgLink);if(!o.ok)return console.error(Em.failedLoadSvg,e.specificAreaSvgLink),[];let a=(await o.text()).replace(/<svg[^>]*>/i,"").replace(/<\/svg>/i,""),l=new DOMParser,c=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="${this.xlinkNamespace}">${a}</svg>`,d=l.parseFromString(c,"image/svg+xml");Array.from(d.documentElement.childNodes).forEach(f=>{let h=t.importNode(f,!0);r.appendChild(h)}),n=this.getTemplateImageElements(t,e)}if(!n.length)return[];for(let r of n){let o=r.id?.trim(),s=r.getAttribute("data-base-transform"),a=r.getAttribute("transform")??"",l=s!==null?s:a;r.setAttribute("data-base-transform",l),o&&(this.backgroundBaseTransforms.update(c=>{let d=new Map(c);return d.set(o,l),d}),this.backgroundPivotCache.update(c=>{let d=new Map(c);return d.delete(o),d}))}return n}getTemplateImageElements(e,t){let n=this.parseTemplateTargetIds(t);if(!n.length)return[];let r=[];for(let o of n){let s=e.getElementById(o);!s||s.tagName.toLowerCase()!=="image"||r.push(s)}return r}parseTemplateTargetIds(e){return this.parseTargetIds(e.actionPathIdsCsv??e.actionItemId)}parseTargetIds(e){if(!e)return[];let t=new Set,n=[];for(let r of e.split(",")){let o=r.trim();if(!o)continue;let s=o.startsWith("#")?o.slice(1).trim():o;!s||t.has(s)||(t.add(s),n.push(s))}return n}applyBackgroundSourceAttributes(e,t,n){if(!t){e.removeAttribute("href"),e.removeAttributeNS(this.xlinkNamespace,"href"),e.removeAttribute("data-bg-name");return}e.setAttribute("href",t),n&&n.trim().length>0?e.setAttribute("data-bg-name",n.trim()):e.removeAttribute("data-bg-name")}applyBackgroundTransformAttributes(e,t,n){let r={scale:this.normalizeScale(n.scale),rotation:this.normalizeRotation(n.rotation),translateX:this.normalizeTranslate(n.translateX),translateY:this.normalizeTranslate(n.translateY),opacity:this.normalizeOpacity(n.opacity)};e.setAttribute("data-base-transform",t),e.setAttribute("data-bg-scale",r.scale.toString()),e.setAttribute("data-bg-rotation",r.rotation.toString()),e.setAttribute("data-bg-translate-x",r.translateX.toString()),e.setAttribute("data-bg-translate-y",r.translateY.toString()),e.setAttribute("data-bg-opacity",r.opacity.toString());let o=this.computeBackgroundPivot(e,t),s=this.composeCenteredTransformMatrix({scale:r.scale,rotation:r.rotation,translateX:r.translateX,translateY:r.translateY},o),a=this.matrixToTransform(s),l=[t,a].filter(c=>c&&c.trim().length>0).join(" ").trim();l.length>0?e.setAttribute("transform",l):e.removeAttribute("transform"),Math.abs(r.opacity-1)<1e-4?e.removeAttribute("opacity"):e.setAttribute("opacity",r.opacity.toString())}computeBackgroundPivot(e,t){let n=e.id??"";if(n&&this.backgroundPivotCache().has(n))return this.backgroundPivotCache().get(n);let r=e.getAttribute("transform");t&&t.trim().length>0?e.setAttribute("transform",t):e.removeAttribute("transform");let o;try{let a=e.getBBox();if(a.width>0&&a.height>0)o={cx:a.x+a.width/2,cy:a.y+a.height/2};else{let l=e.width?.baseVal?.value??0,c=e.height?.baseVal?.value??0,d=e.x?.baseVal?.value??0,u=e.y?.baseVal?.value??0;l>0&&c>0?o={cx:d+l/2,cy:u+c/2}:o={cx:.5,cy:.5}}}catch{let a=e.width?.baseVal?.value??0,l=e.height?.baseVal?.value??0,c=this.parseMatrixFromTransform(t),d=this.applyMatrixToPoint(c,a/2,l/2);o={cx:d.x,cy:d.y}}r!=null?e.setAttribute("transform",r):e.removeAttribute("transform");let s=Number.isFinite(o.cx)&&Number.isFinite(o.cy);return n&&s&&this.backgroundPivotCache.update(a=>{let l=new Map(a);return l.set(n,o),l}),o}composeCenteredTransformMatrix(e,t){let n=this.identityMatrix();return e.scale!==void 0&&!this.isNearlyZero(e.scale-1)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.scaleMatrix(e.scale,e.scale)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),e.rotation!==void 0&&!this.isNearlyZero(e.rotation)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.rotateMatrix(e.rotation)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),(e.translateX!==void 0&&!this.isNearlyZero(e.translateX)||e.translateY!==void 0&&!this.isNearlyZero(e.translateY))&&(n=this.multiplyMatrices(n,this.translateMatrix(e.translateX??0,e.translateY??0))),n}matrixToTransform(e){if(this.isNearlyZero(e.a-1)&&this.isNearlyZero(e.b)&&this.isNearlyZero(e.c)&&this.isNearlyZero(e.d-1)&&this.isNearlyZero(e.e)&&this.isNearlyZero(e.f))return null;let n=this.roundMatrixValue(e.a),r=this.roundMatrixValue(e.b),o=this.roundMatrixValue(e.c),s=this.roundMatrixValue(e.d),a=this.roundMatrixValue(e.e),l=this.roundMatrixValue(e.f);return`matrix(${n} ${r} ${o} ${s} ${a} ${l})`}parseMatrixFromTransform(e){if(!e)return this.identityMatrix();let t=e.match(/matrix\(([^)]+)\)/i);if(t){let r=t[1].split(/[\s,]+/).map(o=>Number.parseFloat(o)).filter(o=>Number.isFinite(o));if(r.length>=6)return{a:r[0],b:r[1],c:r[2],d:r[3],e:r[4],f:r[5]}}let n=this.customizerState.svgDoc();if(n)try{let r=n.createElementNS("http://www.w3.org/2000/svg","g");r.setAttribute("transform",e),n.documentElement.appendChild(r);let o=r.transform.baseVal.consolidate();if(r.remove(),o)return{a:o.matrix.a,b:o.matrix.b,c:o.matrix.c,d:o.matrix.d,e:o.matrix.e,f:o.matrix.f}}catch{}return this.identityMatrix()}applyMatrixToPoint(e,t,n){return{x:e.a*t+e.c*n+e.e,y:e.b*t+e.d*n+e.f}}isNearlyZero(e,t=1e-4){return Math.abs(e)<=t}roundMatrixValue(e,t=6){if(this.isNearlyZero(e))return 0;let n=Math.pow(10,t);return Math.round(e*n)/n}identityMatrix(){return{a:1,b:0,c:0,d:1,e:0,f:0}}multiplyMatrices(e,t){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}translateMatrix(e,t){return{a:1,b:0,c:0,d:1,e,f:t}}scaleMatrix(e,t){return{a:e,b:0,c:0,d:t,e:0,f:0}}rotateMatrix(e){let t=e*Math.PI/180,n=Math.cos(t),r=Math.sin(t);return{a:n,b:r,c:-r,d:n,e:0,f:0}}normalizeTransform(e,t){switch(e){case"scale":return this.normalizeScale(t);case"rotation":return this.normalizeRotation(t);case"translateX":case"translateY":return this.normalizeTranslate(t);case"opacity":return this.normalizeOpacity(t);default:return t}}normalizeScale(e){let t=Math.max(this.minScale,Math.min(this.maxScale,e));return Number.isFinite(t)?t:1}normalizeRotation(e){let t=Math.max(this.minRotation,Math.min(this.maxRotation,e));return Number.isFinite(t)?t:0}normalizeTranslate(e){let t=Math.max(this.minTranslate,Math.min(this.maxTranslate,e));return Number.isFinite(t)?t:0}normalizeOpacity(e){let t=Math.max(this.minOpacity,Math.min(this.maxOpacity,e));return Number.isFinite(t)?t:1}readFileAsDataUrl(e){return new Promise(t=>{let n=new FileReader;n.onload=()=>{let r=n.result;t(typeof r=="string"?r:null)},n.onerror=()=>t(null),n.readAsDataURL(e)})}static \u0275fac=function(t){return new(t||i)(Xe(Bn),Xe(zs))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};String.prototype.codePointAt||(function(){var i=(function(){try{var t={},n=Object.defineProperty,r=n(t,t,t)&&n}catch{}return r})(),e=function(t){if(this==null)throw TypeError();var n=String(this),r=n.length,o=t?Number(t):0;if(o!=o&&(o=0),!(o<0||o>=r)){var s=n.charCodeAt(o),a;return s>=55296&&s<=56319&&r>o+1&&(a=n.charCodeAt(o+1),a>=56320&&a<=57343)?(s-55296)*1024+a-56320+65536:s}};i?i(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e})();var uD=0,VU=-3;function Pm(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function WZ(i,e){this.source=i,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=e,this.destLen=0,this.ltree=new Pm,this.dtree=new Pm}var GU=new Pm,HU=new Pm,fD=new Uint8Array(30),hD=new Uint16Array(30),jU=new Uint8Array(30),WU=new Uint16Array(30),$Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),nU=new Pm,Vs=new Uint8Array(320);function $U(i,e,t,n){var r,o;for(r=0;r<t;++r)i[r]=0;for(r=0;r<30-t;++r)i[r+t]=r/t|0;for(o=n,r=0;r<30;++r)e[r]=o,o+=1<<i[r]}function XZ(i,e){var t;for(t=0;t<7;++t)i.table[t]=0;for(i.table[7]=24,i.table[8]=152,i.table[9]=112,t=0;t<24;++t)i.trans[t]=256+t;for(t=0;t<144;++t)i.trans[24+t]=t;for(t=0;t<8;++t)i.trans[168+t]=280+t;for(t=0;t<112;++t)i.trans[176+t]=144+t;for(t=0;t<5;++t)e.table[t]=0;for(e.table[5]=32,t=0;t<32;++t)e.trans[t]=t}var iU=new Uint16Array(16);function XT(i,e,t,n){var r,o;for(r=0;r<16;++r)i.table[r]=0;for(r=0;r<n;++r)i.table[e[t+r]]++;for(i.table[0]=0,o=0,r=0;r<16;++r)iU[r]=o,o+=i.table[r];for(r=0;r<n;++r)e[t+r]&&(i.trans[iU[e[t+r]]++]=r)}function YZ(i){i.bitcount--||(i.tag=i.source[i.sourceIndex++],i.bitcount=7);var e=i.tag&1;return i.tag>>>=1,e}function Gs(i,e,t){if(!e)return t;for(;i.bitcount<24;)i.tag|=i.source[i.sourceIndex++]<<i.bitcount,i.bitcount+=8;var n=i.tag&65535>>>16-e;return i.tag>>>=e,i.bitcount-=e,n+t}function nD(i,e){for(;i.bitcount<24;)i.tag|=i.source[i.sourceIndex++]<<i.bitcount,i.bitcount+=8;var t=0,n=0,r=0,o=i.tag;do n=2*n+(o&1),o>>>=1,++r,t+=e.table[r],n-=e.table[r];while(n>=0);return i.tag=o,i.bitcount-=r,e.trans[t+n]}function qZ(i,e,t){var n,r,o,s,a,l;for(n=Gs(i,5,257),r=Gs(i,5,1),o=Gs(i,4,4),s=0;s<19;++s)Vs[s]=0;for(s=0;s<o;++s){var c=Gs(i,3,0);Vs[$Z[s]]=c}for(XT(nU,Vs,0,19),a=0;a<n+r;){var d=nD(i,nU);switch(d){case 16:var u=Vs[a-1];for(l=Gs(i,2,3);l;--l)Vs[a++]=u;break;case 17:for(l=Gs(i,3,3);l;--l)Vs[a++]=0;break;case 18:for(l=Gs(i,7,11);l;--l)Vs[a++]=0;break;default:Vs[a++]=d;break}}XT(e,Vs,0,n),XT(t,Vs,n,r)}function rU(i,e,t){for(;;){var n=nD(i,e);if(n===256)return uD;if(n<256)i.dest[i.destLen++]=n;else{var r,o,s,a;for(n-=257,r=Gs(i,fD[n],hD[n]),o=nD(i,t),s=i.destLen-Gs(i,jU[o],WU[o]),a=s;a<s+r;++a)i.dest[i.destLen++]=i.dest[a]}}}function KZ(i){for(var e,t,n;i.bitcount>8;)i.sourceIndex--,i.bitcount-=8;if(e=i.source[i.sourceIndex+1],e=256*e+i.source[i.sourceIndex],t=i.source[i.sourceIndex+3],t=256*t+i.source[i.sourceIndex+2],e!==(~t&65535))return VU;for(i.sourceIndex+=4,n=e;n;--n)i.dest[i.destLen++]=i.source[i.sourceIndex++];return i.bitcount=0,uD}function ZZ(i,e){var t=new WZ(i,e),n,r,o;do{switch(n=YZ(t),r=Gs(t,2,0),r){case 0:o=KZ(t);break;case 1:o=rU(t,GU,HU);break;case 2:qZ(t,t.ltree,t.dtree),o=rU(t,t.ltree,t.dtree);break;default:o=VU}if(o!==uD)throw new Error("Data error")}while(!n);return t.destLen<t.dest.length?typeof t.dest.slice=="function"?t.dest.slice(0,t.destLen):t.dest.subarray(0,t.destLen):t.dest}XZ(GU,HU);$U(fD,hD,4,3);$U(jU,WU,2,1);fD[28]=0;hD[28]=258;var JZ=ZZ;function Qf(i,e,t,n,r){return Math.pow(1-r,3)*i+3*Math.pow(1-r,2)*r*e+3*(1-r)*Math.pow(r,2)*t+Math.pow(r,3)*n}function Zl(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}Zl.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)};Zl.prototype.addPoint=function(i,e){typeof i=="number"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=i,this.x2=i),i<this.x1&&(this.x1=i),i>this.x2&&(this.x2=i)),typeof e=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))};Zl.prototype.addX=function(i){this.addPoint(i,null)};Zl.prototype.addY=function(i){this.addPoint(null,i)};Zl.prototype.addBezier=function(i,e,t,n,r,o,s,a){var l=[i,e],c=[t,n],d=[r,o],u=[s,a];this.addPoint(i,e),this.addPoint(s,a);for(var f=0;f<=1;f++){var h=6*l[f]-12*c[f]+6*d[f],p=-3*l[f]+9*c[f]-9*d[f]+3*u[f],v=3*c[f]-3*l[f];if(p===0){if(h===0)continue;var g=-v/h;0<g&&g<1&&(f===0&&this.addX(Qf(l[f],c[f],d[f],u[f],g)),f===1&&this.addY(Qf(l[f],c[f],d[f],u[f],g)));continue}var m=Math.pow(h,2)-4*v*p;if(!(m<0)){var b=(-h+Math.sqrt(m))/(2*p);0<b&&b<1&&(f===0&&this.addX(Qf(l[f],c[f],d[f],u[f],b)),f===1&&this.addY(Qf(l[f],c[f],d[f],u[f],b)));var y=(-h-Math.sqrt(m))/(2*p);0<y&&y<1&&(f===0&&this.addX(Qf(l[f],c[f],d[f],u[f],y)),f===1&&this.addY(Qf(l[f],c[f],d[f],u[f],y)))}}};Zl.prototype.addQuad=function(i,e,t,n,r,o){var s=i+.6666666666666666*(t-i),a=e+2/3*(n-e),l=s+1/3*(r-i),c=a+1/3*(o-e);this.addBezier(i,e,s,a,l,c,r,o)};function Xn(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}Xn.prototype.moveTo=function(i,e){this.commands.push({type:"M",x:i,y:e})};Xn.prototype.lineTo=function(i,e){this.commands.push({type:"L",x:i,y:e})};Xn.prototype.curveTo=Xn.prototype.bezierCurveTo=function(i,e,t,n,r,o){this.commands.push({type:"C",x1:i,y1:e,x2:t,y2:n,x:r,y:o})};Xn.prototype.quadTo=Xn.prototype.quadraticCurveTo=function(i,e,t,n){this.commands.push({type:"Q",x1:i,y1:e,x:t,y:n})};Xn.prototype.close=Xn.prototype.closePath=function(){this.commands.push({type:"Z"})};Xn.prototype.extend=function(i){if(i.commands)i=i.commands;else if(i instanceof Zl){var e=i;this.moveTo(e.x1,e.y1),this.lineTo(e.x2,e.y1),this.lineTo(e.x2,e.y2),this.lineTo(e.x1,e.y2),this.close();return}Array.prototype.push.apply(this.commands,i)};Xn.prototype.getBoundingBox=function(){for(var i=new Zl,e=0,t=0,n=0,r=0,o=0;o<this.commands.length;o++){var s=this.commands[o];switch(s.type){case"M":i.addPoint(s.x,s.y),e=n=s.x,t=r=s.y;break;case"L":i.addPoint(s.x,s.y),n=s.x,r=s.y;break;case"Q":i.addQuad(n,r,s.x1,s.y1,s.x,s.y),n=s.x,r=s.y;break;case"C":i.addBezier(n,r,s.x1,s.y1,s.x2,s.y2,s.x,s.y),n=s.x,r=s.y;break;case"Z":n=e,r=t;break;default:throw new Error("Unexpected path command "+s.type)}}return i.isEmpty()&&i.addPoint(0,0),i};Xn.prototype.draw=function(i){i.beginPath();for(var e=0;e<this.commands.length;e+=1){var t=this.commands[e];t.type==="M"?i.moveTo(t.x,t.y):t.type==="L"?i.lineTo(t.x,t.y):t.type==="C"?i.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y):t.type==="Q"?i.quadraticCurveTo(t.x1,t.y1,t.x,t.y):t.type==="Z"&&i.closePath()}this.fill&&(i.fillStyle=this.fill,i.fill()),this.stroke&&(i.strokeStyle=this.stroke,i.lineWidth=this.strokeWidth,i.stroke())};Xn.prototype.toPathData=function(i){i=i!==void 0?i:2;function e(s){return Math.round(s)===s?""+Math.round(s):s.toFixed(i)}function t(){for(var s=arguments,a="",l=0;l<arguments.length;l+=1){var c=s[l];c>=0&&l>0&&(a+=" "),a+=e(c)}return a}for(var n="",r=0;r<this.commands.length;r+=1){var o=this.commands[r];o.type==="M"?n+="M"+t(o.x,o.y):o.type==="L"?n+="L"+t(o.x,o.y):o.type==="C"?n+="C"+t(o.x1,o.y1,o.x2,o.y2,o.x,o.y):o.type==="Q"?n+="Q"+t(o.x1,o.y1,o.x,o.y):o.type==="Z"&&(n+="Z")}return n};Xn.prototype.toSVG=function(i){var e='<path d="';return e+=this.toPathData(i),e+='"',this.fill&&this.fill!=="black"&&(this.fill===null?e+=' fill="none"':e+=' fill="'+this.fill+'"'),this.stroke&&(e+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),e+="/>",e};Xn.prototype.toDOMElement=function(i){var e=this.toPathData(i),t=document.createElementNS("http://www.w3.org/2000/svg","path");return t.setAttribute("d",e),t};function XU(i){throw new Error(i)}function oU(i,e){i||XU(e)}var xt={fail:XU,argument:oU,assert:oU},sU=32768,aU=2147483648,th={},Fe={},Ct={};function is(i){return function(){return i}}Fe.BYTE=function(i){return xt.argument(i>=0&&i<=255,"Byte value should be between 0 and 255."),[i]};Ct.BYTE=is(1);Fe.CHAR=function(i){return[i.charCodeAt(0)]};Ct.CHAR=is(1);Fe.CHARARRAY=function(i){typeof i>"u"&&(i="",console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));for(var e=[],t=0;t<i.length;t+=1)e[t]=i.charCodeAt(t);return e};Ct.CHARARRAY=function(i){return typeof i>"u"?0:i.length};Fe.USHORT=function(i){return[i>>8&255,i&255]};Ct.USHORT=is(2);Fe.SHORT=function(i){return i>=sU&&(i=-(2*sU-i)),[i>>8&255,i&255]};Ct.SHORT=is(2);Fe.UINT24=function(i){return[i>>16&255,i>>8&255,i&255]};Ct.UINT24=is(3);Fe.ULONG=function(i){return[i>>24&255,i>>16&255,i>>8&255,i&255]};Ct.ULONG=is(4);Fe.LONG=function(i){return i>=aU&&(i=-(2*aU-i)),[i>>24&255,i>>16&255,i>>8&255,i&255]};Ct.LONG=is(4);Fe.FIXED=Fe.ULONG;Ct.FIXED=Ct.ULONG;Fe.FWORD=Fe.SHORT;Ct.FWORD=Ct.SHORT;Fe.UFWORD=Fe.USHORT;Ct.UFWORD=Ct.USHORT;Fe.LONGDATETIME=function(i){return[0,0,0,0,i>>24&255,i>>16&255,i>>8&255,i&255]};Ct.LONGDATETIME=is(8);Fe.TAG=function(i){return xt.argument(i.length===4,"Tag should be exactly 4 ASCII characters."),[i.charCodeAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3)]};Ct.TAG=is(4);Fe.Card8=Fe.BYTE;Ct.Card8=Ct.BYTE;Fe.Card16=Fe.USHORT;Ct.Card16=Ct.USHORT;Fe.OffSize=Fe.BYTE;Ct.OffSize=Ct.BYTE;Fe.SID=Fe.USHORT;Ct.SID=Ct.USHORT;Fe.NUMBER=function(i){return i>=-107&&i<=107?[i+139]:i>=108&&i<=1131?(i=i-108,[(i>>8)+247,i&255]):i>=-1131&&i<=-108?(i=-i-108,[(i>>8)+251,i&255]):i>=-32768&&i<=32767?Fe.NUMBER16(i):Fe.NUMBER32(i)};Ct.NUMBER=function(i){return Fe.NUMBER(i).length};Fe.NUMBER16=function(i){return[28,i>>8&255,i&255]};Ct.NUMBER16=is(3);Fe.NUMBER32=function(i){return[29,i>>24&255,i>>16&255,i>>8&255,i&255]};Ct.NUMBER32=is(5);Fe.REAL=function(i){var e=i.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(e);if(t){var n=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));e=(Math.round(i*n)/n).toString()}for(var r="",o=0,s=e.length;o<s;o+=1){var a=e[o];a==="e"?r+=e[++o]==="-"?"c":"b":a==="."?r+="a":a==="-"?r+="e":r+=a}r+=r.length&1?"f":"ff";for(var l=[30],c=0,d=r.length;c<d;c+=2)l.push(parseInt(r.substr(c,2),16));return l};Ct.REAL=function(i){return Fe.REAL(i).length};Fe.NAME=Fe.CHARARRAY;Ct.NAME=Ct.CHARARRAY;Fe.STRING=Fe.CHARARRAY;Ct.STRING=Ct.CHARARRAY;th.UTF8=function(i,e,t){for(var n=[],r=t,o=0;o<r;o++,e+=1)n[o]=i.getUint8(e);return String.fromCharCode.apply(null,n)};th.UTF16=function(i,e,t){for(var n=[],r=t/2,o=0;o<r;o++,e+=2)n[o]=i.getUint16(e);return String.fromCharCode.apply(null,n)};Fe.UTF16=function(i){for(var e=[],t=0;t<i.length;t+=1){var n=i.charCodeAt(t);e[e.length]=n>>8&255,e[e.length]=n&255}return e};Ct.UTF16=function(i){return i.length*2};var iD={"x-mac-croatian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\u0160\u2122\xB4\xA8\u2260\u017D\xD8\u221E\xB1\u2264\u2265\u2206\xB5\u2202\u2211\u220F\u0161\u222B\xAA\xBA\u03A9\u017E\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u0106\xAB\u010C\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u0110\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\uF8FF\xA9\u2044\u20AC\u2039\u203A\xC6\xBB\u2013\xB7\u201A\u201E\u2030\xC2\u0107\xC1\u010D\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u0111\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u03C0\xCB\u02DA\xB8\xCA\xE6\u02C7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042A\u042B\u042C\u042D\u042E\u042F\u2020\xB0\u0490\xA3\xA7\u2022\xB6\u0406\xAE\xA9\u2122\u0402\u0452\u2260\u0403\u0453\u221E\xB1\u2264\u2265\u0456\xB5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040A\u045A\u0458\u0405\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\u040B\u045B\u040C\u045C\u0455\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u201E\u040E\u045E\u040F\u045F\u2116\u0401\u0451\u044F\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E","x-mac-gaelic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u1E02\xB1\u2264\u2265\u1E03\u010A\u010B\u1E0A\u1E0B\u1E1E\u1E1F\u0120\u0121\u1E40\xE6\xF8\u1E41\u1E56\u1E57\u027C\u0192\u017F\u1E60\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\u1E61\u1E9B\xFF\u0178\u1E6A\u20AC\u2039\u203A\u0176\u0177\u1E6B\xB7\u1EF2\u1EF3\u204A\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\u2663\xD2\xDA\xDB\xD9\u0131\xDD\xFD\u0174\u0175\u1E84\u1E85\u1E80\u1E81\u1E82\u1E83","x-mac-greek":"\xC4\xB9\xB2\xC9\xB3\xD6\xDC\u0385\xE0\xE2\xE4\u0384\xA8\xE7\xE9\xE8\xEA\xEB\xA3\u2122\xEE\xEF\u2022\xBD\u2030\xF4\xF6\xA6\u20AC\xF9\xFB\xFC\u2020\u0393\u0394\u0398\u039B\u039E\u03A0\xDF\xAE\xA9\u03A3\u03AA\xA7\u2260\xB0\xB7\u0391\xB1\u2264\u2265\xA5\u0392\u0395\u0396\u0397\u0399\u039A\u039C\u03A6\u03AB\u03A8\u03A9\u03AC\u039D\xAC\u039F\u03A1\u2248\u03A4\xAB\xBB\u2026\xA0\u03A5\u03A7\u0386\u0388\u0153\u2013\u2015\u201C\u201D\u2018\u2019\xF7\u0389\u038A\u038C\u038E\u03AD\u03AE\u03AF\u03CC\u038F\u03CD\u03B1\u03B2\u03C8\u03B4\u03B5\u03C6\u03B3\u03B7\u03B9\u03BE\u03BA\u03BB\u03BC\u03BD\u03BF\u03C0\u03CE\u03C1\u03C3\u03C4\u03B8\u03C9\u03C2\u03C7\u03C5\u03B6\u03CA\u03CB\u0390\u03B0\xAD","x-mac-icelandic":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\xDD\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\xD0\xF0\xDE\xFE\xFD\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140A\u140B\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144E\u144F\u1450\u1451\u1455\u1456\u1466\u146D\u146E\u146F\u1470\u1472\u1473\u1483\u148B\u148C\u148D\u148E\u1490\u1491\xB0\u14A1\u14A5\u14A6\u2022\xB6\u14A7\xAE\xA9\u2122\u14A8\u14AA\u14AB\u14BB\u14C2\u14C3\u14C4\u14C5\u14C7\u14C8\u14D0\u14EF\u14F0\u14F1\u14F2\u14F4\u14F5\u1505\u14D5\u14D6\u14D7\u14D8\u14DA\u14DB\u14EA\u1528\u1529\u152A\u152B\u152D\u2026\xA0\u152E\u153E\u1555\u1556\u1557\u2013\u2014\u201C\u201D\u2018\u2019\u1558\u1559\u155A\u155D\u1546\u1547\u1548\u1549\u154B\u154C\u1550\u157F\u1580\u1581\u1582\u1583\u1584\u1585\u158F\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15A0\u15A1\u15A2\u15A3\u15A4\u15A5\u15A6\u157C\u0141\u0142","x-mac-ce":"\xC4\u0100\u0101\xC9\u0104\xD6\xDC\xE1\u0105\u010C\xE4\u010D\u0106\u0107\xE9\u0179\u017A\u010E\xED\u010F\u0112\u0113\u0116\xF3\u0117\xF4\xF6\xF5\xFA\u011A\u011B\xFC\u2020\xB0\u0118\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\u0119\xA8\u2260\u0123\u012E\u012F\u012A\u2264\u2265\u012B\u0136\u2202\u2211\u0142\u013B\u013C\u013D\u013E\u0139\u013A\u0145\u0146\u0143\xAC\u221A\u0144\u0147\u2206\xAB\xBB\u2026\xA0\u0148\u0150\xD5\u0151\u014C\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\u014D\u0154\u0155\u0158\u2039\u203A\u0159\u0156\u0157\u0160\u201A\u201E\u0161\u015A\u015B\xC1\u0164\u0165\xCD\u017D\u017E\u016A\xD3\xD4\u016B\u016E\xDA\u016F\u0170\u0171\u0172\u0173\xDD\xFD\u0137\u017B\u0141\u017C\u0122\u02C7",macintosh:"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-romanian":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\u0102\u0218\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\u0103\u0219\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\u021A\u021B\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7","x-mac-turkish":"\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u011E\u011F\u0130\u0131\u015E\u015F\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\uF8A0\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7"};th.MACSTRING=function(i,e,t,n){var r=iD[n];if(r!==void 0){for(var o="",s=0;s<t;s++){var a=i.getUint8(e+s);a<=127?o+=String.fromCharCode(a):o+=r[a&127]}return o}};var Nx=typeof WeakMap=="function"&&new WeakMap,Lx,QZ=function(i){if(!Lx){Lx={};for(var e in iD)Lx[e]=new String(e)}var t=Lx[i];if(t!==void 0){if(Nx){var n=Nx.get(t);if(n!==void 0)return n}var r=iD[i];if(r!==void 0){for(var o={},s=0;s<r.length;s++)o[r.charCodeAt(s)]=s+128;return Nx&&Nx.set(t,o),o}}};Fe.MACSTRING=function(i,e){var t=QZ(e);if(t!==void 0){for(var n=[],r=0;r<i.length;r++){var o=i.charCodeAt(r);if(o>=128&&(o=t[o],o===void 0))return;n[r]=o}return n}};Ct.MACSTRING=function(i,e){var t=Fe.MACSTRING(i,e);return t!==void 0?t.length:0};function rD(i){return i>=-128&&i<=127}function eJ(i,e,t){for(var n=0,r=i.length;e<r&&n<64&&i[e]===0;)++e,++n;return t.push(128|n-1),e}function tJ(i,e,t){for(var n=0,r=i.length,o=e;o<r&&n<64;){var s=i[o];if(!rD(s)||s===0&&o+1<r&&i[o+1]===0)break;++o,++n}t.push(n-1);for(var a=e;a<o;++a)t.push(i[a]+256&255);return o}function nJ(i,e,t){for(var n=0,r=i.length,o=e;o<r&&n<64;){var s=i[o];if(s===0||rD(s)&&o+1<r&&rD(i[o+1]))break;++o,++n}t.push(64|n-1);for(var a=e;a<o;++a){var l=i[a];t.push(l+65536>>8&255,l+256&255)}return o}Fe.VARDELTAS=function(i){for(var e=0,t=[];e<i.length;){var n=i[e];n===0?e=eJ(i,e,t):n>=-128&&n<=127?e=tJ(i,e,t):e=nJ(i,e,t)}return t};Fe.INDEX=function(i){for(var e=1,t=[e],n=[],r=0;r<i.length;r+=1){var o=Fe.OBJECT(i[r]);Array.prototype.push.apply(n,o),e+=o.length,t.push(e)}if(n.length===0)return[0,0];for(var s=[],a=1+Math.floor(Math.log(e)/Math.log(2))/8|0,l=[void 0,Fe.BYTE,Fe.USHORT,Fe.UINT24,Fe.ULONG][a],c=0;c<t.length;c+=1){var d=l(t[c]);Array.prototype.push.apply(s,d)}return Array.prototype.concat(Fe.Card16(i.length),Fe.OffSize(a),s,n)};Ct.INDEX=function(i){return Fe.INDEX(i).length};Fe.DICT=function(i){for(var e=[],t=Object.keys(i),n=t.length,r=0;r<n;r+=1){var o=parseInt(t[r],0),s=i[o];e=e.concat(Fe.OPERAND(s.value,s.type)),e=e.concat(Fe.OPERATOR(o))}return e};Ct.DICT=function(i){return Fe.DICT(i).length};Fe.OPERATOR=function(i){return i<1200?[i]:[12,i-1200]};Fe.OPERAND=function(i,e){var t=[];if(Array.isArray(e))for(var n=0;n<e.length;n+=1)xt.argument(i.length===e.length,"Not enough arguments given for type"+e),t=t.concat(Fe.OPERAND(i[n],e[n]));else if(e==="SID")t=t.concat(Fe.NUMBER(i));else if(e==="offset")t=t.concat(Fe.NUMBER32(i));else if(e==="number")t=t.concat(Fe.NUMBER(i));else if(e==="real")t=t.concat(Fe.REAL(i));else throw new Error("Unknown operand type "+e);return t};Fe.OP=Fe.BYTE;Ct.OP=Ct.BYTE;var Ux=typeof WeakMap=="function"&&new WeakMap;Fe.CHARSTRING=function(i){if(Ux){var e=Ux.get(i);if(e!==void 0)return e}for(var t=[],n=i.length,r=0;r<n;r+=1){var o=i[r];t=t.concat(Fe[o.type](o.value))}return Ux&&Ux.set(i,t),t};Ct.CHARSTRING=function(i){return Fe.CHARSTRING(i).length};Fe.OBJECT=function(i){var e=Fe[i.type];return xt.argument(e!==void 0,"No encoding function for type "+i.type),e(i.value)};Ct.OBJECT=function(i){var e=Ct[i.type];return xt.argument(e!==void 0,"No sizeOf function for type "+i.type),e(i.value)};Fe.TABLE=function(i){for(var e=[],t=i.fields.length,n=[],r=[],o=0;o<t;o+=1){var s=i.fields[o],a=Fe[s.type];xt.argument(a!==void 0,"No encoding function for field type "+s.type+" ("+s.name+")");var l=i[s.name];l===void 0&&(l=s.value);var c=a(l);s.type==="TABLE"?(r.push(e.length),e=e.concat([0,0]),n.push(c)):e=e.concat(c)}for(var d=0;d<n.length;d+=1){var u=r[d],f=e.length;xt.argument(f<65536,"Table "+i.tableName+" too big."),e[u]=f>>8,e[u+1]=f&255,e=e.concat(n[d])}return e};Ct.TABLE=function(i){for(var e=0,t=i.fields.length,n=0;n<t;n+=1){var r=i.fields[n],o=Ct[r.type];xt.argument(o!==void 0,"No sizeOf function for field type "+r.type+" ("+r.name+")");var s=i[r.name];s===void 0&&(s=r.value),e+=o(s),r.type==="TABLE"&&(e+=2)}return e};Fe.RECORD=Fe.TABLE;Ct.RECORD=Ct.TABLE;Fe.LITERAL=function(i){return i};Ct.LITERAL=function(i){return i.length};function vi(i,e,t){if(e.length&&(e[0].name!=="coverageFormat"||e[0].value===1))for(var n=0;n<e.length;n+=1){var r=e[n];this[r.name]=r.value}if(this.tableName=i,this.fields=e,t)for(var o=Object.keys(t),s=0;s<o.length;s+=1){var a=o[s],l=t[a];this[a]!==void 0&&(this[a]=l)}}vi.prototype.encode=function(){return Fe.TABLE(this)};vi.prototype.sizeOf=function(){return Ct.TABLE(this)};function Am(i,e,t){t===void 0&&(t=e.length);var n=new Array(e.length+1);n[0]={name:i+"Count",type:"USHORT",value:t};for(var r=0;r<e.length;r++)n[r+1]={name:i+r,type:"USHORT",value:e[r]};return n}function oD(i,e,t){var n=e.length,r=new Array(n+1);r[0]={name:i+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r[o+1]={name:i+o,type:"TABLE",value:t(e[o],o)};return r}function Om(i,e,t){var n=e.length,r=[];r[0]={name:i+"Count",type:"USHORT",value:n};for(var o=0;o<n;o++)r=r.concat(t(e[o],o));return r}function Hx(i){i.format===1?vi.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(Am("glyph",i.glyphs))):i.format===2?vi.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:2}].concat(Om("rangeRecord",i.ranges,function(e){return[{name:"startGlyphID",type:"USHORT",value:e.start},{name:"endGlyphID",type:"USHORT",value:e.end},{name:"startCoverageIndex",type:"USHORT",value:e.index}]}))):xt.assert(!1,"Coverage format must be 1 or 2.")}Hx.prototype=Object.create(vi.prototype);Hx.prototype.constructor=Hx;function jx(i){vi.call(this,"scriptListTable",Om("scriptRecord",i,function(e,t){var n=e.script,r=n.defaultLangSys;return xt.assert(!!r,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new vi("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new vi("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:r.reqFeatureIndex}].concat(Am("featureIndex",r.featureIndexes)))}].concat(Om("langSys",n.langSysRecords,function(o,s){var a=o.langSys;return[{name:"langSysTag"+s,type:"TAG",value:o.tag},{name:"langSys"+s,type:"TABLE",value:new vi("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:a.reqFeatureIndex}].concat(Am("featureIndex",a.featureIndexes)))}]})))}]}))}jx.prototype=Object.create(vi.prototype);jx.prototype.constructor=jx;function Wx(i){vi.call(this,"featureListTable",Om("featureRecord",i,function(e,t){var n=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new vi("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(Am("lookupListIndex",n.lookupListIndexes)))}]}))}Wx.prototype=Object.create(vi.prototype);Wx.prototype.constructor=Wx;function $x(i,e){vi.call(this,"lookupListTable",oD("lookup",i,function(t){var n=e[t.lookupType];return xt.assert(!!n,"Unable to write GSUB lookup type "+t.lookupType+" tables."),new vi("lookupTable",[{name:"lookupType",type:"USHORT",value:t.lookupType},{name:"lookupFlag",type:"USHORT",value:t.lookupFlag}].concat(oD("subtable",t.subtables,n)))}))}$x.prototype=Object.create(vi.prototype);$x.prototype.constructor=$x;var je={Table:vi,Record:vi,Coverage:Hx,ScriptList:jx,FeatureList:Wx,LookupList:$x,ushortList:Am,tableList:oD,recordList:Om};function lU(i,e){return i.getUint8(e)}function Xx(i,e){return i.getUint16(e,!1)}function iJ(i,e){return i.getInt16(e,!1)}function pD(i,e){return i.getUint32(e,!1)}function YU(i,e){var t=i.getInt16(e,!1),n=i.getUint16(e+2,!1);return t+n/65535}function rJ(i,e){for(var t="",n=e;n<e+4;n+=1)t+=String.fromCharCode(i.getInt8(n));return t}function oJ(i,e,t){for(var n=0,r=0;r<t;r+=1)n<<=8,n+=i.getUint8(e+r);return n}function sJ(i,e,t){for(var n=[],r=e;r<t;r+=1)n.push(i.getUint8(r));return n}function aJ(i){for(var e="",t=0;t<i.length;t+=1)e+=String.fromCharCode(i[t]);return e}var lJ={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function se(i,e){this.data=i,this.offset=e,this.relativeOffset=0}se.prototype.parseByte=function(){var i=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,i};se.prototype.parseChar=function(){var i=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,i};se.prototype.parseCard8=se.prototype.parseByte;se.prototype.parseUShort=function(){var i=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,i};se.prototype.parseCard16=se.prototype.parseUShort;se.prototype.parseSID=se.prototype.parseUShort;se.prototype.parseOffset16=se.prototype.parseUShort;se.prototype.parseShort=function(){var i=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,i};se.prototype.parseF2Dot14=function(){var i=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,i};se.prototype.parseULong=function(){var i=pD(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,i};se.prototype.parseOffset32=se.prototype.parseULong;se.prototype.parseFixed=function(){var i=YU(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,i};se.prototype.parseString=function(i){var e=this.data,t=this.offset+this.relativeOffset,n="";this.relativeOffset+=i;for(var r=0;r<i;r++)n+=String.fromCharCode(e.getUint8(t+r));return n};se.prototype.parseTag=function(){return this.parseString(4)};se.prototype.parseLongDateTime=function(){var i=pD(this.data,this.offset+this.relativeOffset+4);return i-=2082844800,this.relativeOffset+=8,i};se.prototype.parseVersion=function(i){var e=Xx(this.data,this.offset+this.relativeOffset),t=Xx(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,i===void 0&&(i=4096),e+t/i/10};se.prototype.skip=function(i,e){e===void 0&&(e=1),this.relativeOffset+=lJ[i]*e};se.prototype.parseULongList=function(i){i===void 0&&(i=this.parseULong());for(var e=new Array(i),t=this.data,n=this.offset+this.relativeOffset,r=0;r<i;r++)e[r]=t.getUint32(n),n+=4;return this.relativeOffset+=i*4,e};se.prototype.parseOffset16List=se.prototype.parseUShortList=function(i){i===void 0&&(i=this.parseUShort());for(var e=new Array(i),t=this.data,n=this.offset+this.relativeOffset,r=0;r<i;r++)e[r]=t.getUint16(n),n+=2;return this.relativeOffset+=i*2,e};se.prototype.parseShortList=function(i){for(var e=new Array(i),t=this.data,n=this.offset+this.relativeOffset,r=0;r<i;r++)e[r]=t.getInt16(n),n+=2;return this.relativeOffset+=i*2,e};se.prototype.parseByteList=function(i){for(var e=new Array(i),t=this.data,n=this.offset+this.relativeOffset,r=0;r<i;r++)e[r]=t.getUint8(n++);return this.relativeOffset+=i,e};se.prototype.parseList=function(i,e){e||(e=i,i=this.parseUShort());for(var t=new Array(i),n=0;n<i;n++)t[n]=e.call(this);return t};se.prototype.parseList32=function(i,e){e||(e=i,i=this.parseULong());for(var t=new Array(i),n=0;n<i;n++)t[n]=e.call(this);return t};se.prototype.parseRecordList=function(i,e){e||(e=i,i=this.parseUShort());for(var t=new Array(i),n=Object.keys(e),r=0;r<i;r++){for(var o={},s=0;s<n.length;s++){var a=n[s],l=e[a];o[a]=l.call(this)}t[r]=o}return t};se.prototype.parseRecordList32=function(i,e){e||(e=i,i=this.parseULong());for(var t=new Array(i),n=Object.keys(e),r=0;r<i;r++){for(var o={},s=0;s<n.length;s++){var a=n[s],l=e[a];o[a]=l.call(this)}t[r]=o}return t};se.prototype.parseStruct=function(i){if(typeof i=="function")return i.call(this);for(var e=Object.keys(i),t={},n=0;n<e.length;n++){var r=e[n],o=i[r];t[r]=o.call(this)}return t};se.prototype.parseValueRecord=function(i){if(i===void 0&&(i=this.parseUShort()),i!==0){var e={};return i&1&&(e.xPlacement=this.parseShort()),i&2&&(e.yPlacement=this.parseShort()),i&4&&(e.xAdvance=this.parseShort()),i&8&&(e.yAdvance=this.parseShort()),i&16&&(e.xPlaDevice=void 0,this.parseShort()),i&32&&(e.yPlaDevice=void 0,this.parseShort()),i&64&&(e.xAdvDevice=void 0,this.parseShort()),i&128&&(e.yAdvDevice=void 0,this.parseShort()),e}};se.prototype.parseValueRecordList=function(){for(var i=this.parseUShort(),e=this.parseUShort(),t=new Array(e),n=0;n<e;n++)t[n]=this.parseValueRecord(i);return t};se.prototype.parsePointer=function(i){var e=this.parseOffset16();if(e>0)return new se(this.data,this.offset+e).parseStruct(i)};se.prototype.parsePointer32=function(i){var e=this.parseOffset32();if(e>0)return new se(this.data,this.offset+e).parseStruct(i)};se.prototype.parseListOfLists=function(i){for(var e=this.parseOffset16List(),t=e.length,n=this.relativeOffset,r=new Array(t),o=0;o<t;o++){var s=e[o];if(s===0){r[o]=void 0;continue}if(this.relativeOffset=s,i){for(var a=this.parseOffset16List(),l=new Array(a.length),c=0;c<a.length;c++)this.relativeOffset=s+a[c],l[c]=i.call(this);r[o]=l}else r[o]=this.parseUShortList()}return this.relativeOffset=n,r};se.prototype.parseCoverage=function(){var i=this.offset+this.relativeOffset,e=this.parseUShort(),t=this.parseUShort();if(e===1)return{format:1,glyphs:this.parseUShortList(t)};if(e===2){for(var n=new Array(t),r=0;r<t;r++)n[r]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:n}}throw new Error("0x"+i.toString(16)+": Coverage format must be 1 or 2.")};se.prototype.parseClassDef=function(){var i=this.offset+this.relativeOffset,e=this.parseUShort();if(e===1)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(e===2)return{format:2,ranges:this.parseRecordList({start:se.uShort,end:se.uShort,classId:se.uShort})};throw new Error("0x"+i.toString(16)+": ClassDef format must be 1 or 2.")};se.list=function(i,e){return function(){return this.parseList(i,e)}};se.list32=function(i,e){return function(){return this.parseList32(i,e)}};se.recordList=function(i,e){return function(){return this.parseRecordList(i,e)}};se.recordList32=function(i,e){return function(){return this.parseRecordList32(i,e)}};se.pointer=function(i){return function(){return this.parsePointer(i)}};se.pointer32=function(i){return function(){return this.parsePointer32(i)}};se.tag=se.prototype.parseTag;se.byte=se.prototype.parseByte;se.uShort=se.offset16=se.prototype.parseUShort;se.uShortList=se.prototype.parseUShortList;se.uLong=se.offset32=se.prototype.parseULong;se.uLongList=se.prototype.parseULongList;se.struct=se.prototype.parseStruct;se.coverage=se.prototype.parseCoverage;se.classDef=se.prototype.parseClassDef;var cU={reserved:se.uShort,reqFeatureIndex:se.uShort,featureIndexes:se.uShortList};se.prototype.parseScriptList=function(){return this.parsePointer(se.recordList({tag:se.tag,script:se.pointer({defaultLangSys:se.pointer(cU),langSysRecords:se.recordList({tag:se.tag,langSys:se.pointer(cU)})})}))||[]};se.prototype.parseFeatureList=function(){return this.parsePointer(se.recordList({tag:se.tag,feature:se.pointer({featureParams:se.offset16,lookupListIndexes:se.uShortList})}))||[]};se.prototype.parseLookupList=function(i){return this.parsePointer(se.list(se.pointer(function(){var e=this.parseUShort();xt.argument(1<=e&&e<=9,"GPOS/GSUB lookup type "+e+" unknown.");var t=this.parseUShort(),n=t&16;return{lookupType:e,lookupFlag:t,subtables:this.parseList(se.pointer(i[e])),markFilteringSet:n?this.parseUShort():void 0}})))||[]};se.prototype.parseFeatureVariationsList=function(){return this.parsePointer32(function(){var i=this.parseUShort(),e=this.parseUShort();xt.argument(i===1&&e<1,"GPOS/GSUB feature variations table unknown.");var t=this.parseRecordList32({conditionSetOffset:se.offset32,featureTableSubstitutionOffset:se.offset32});return t})||[]};var Qe={getByte:lU,getCard8:lU,getUShort:Xx,getCard16:Xx,getShort:iJ,getULong:pD,getFixed:YU,getTag:rJ,getOffset:oJ,getBytes:sJ,bytesToString:aJ,Parser:se};function cJ(i,e){e.parseUShort(),i.length=e.parseULong(),i.language=e.parseULong();var t;i.groupCount=t=e.parseULong(),i.glyphIndexMap={};for(var n=0;n<t;n+=1)for(var r=e.parseULong(),o=e.parseULong(),s=e.parseULong(),a=r;a<=o;a+=1)i.glyphIndexMap[a]=s,s++}function dJ(i,e,t,n,r){i.length=e.parseUShort(),i.language=e.parseUShort();var o;i.segCount=o=e.parseUShort()>>1,e.skip("uShort",3),i.glyphIndexMap={};for(var s=new Qe.Parser(t,n+r+14),a=new Qe.Parser(t,n+r+16+o*2),l=new Qe.Parser(t,n+r+16+o*4),c=new Qe.Parser(t,n+r+16+o*6),d=n+r+16+o*8,u=0;u<o-1;u+=1)for(var f=void 0,h=s.parseUShort(),p=a.parseUShort(),v=l.parseShort(),g=c.parseUShort(),m=p;m<=h;m+=1)g!==0?(d=c.offset+c.relativeOffset-2,d+=g,d+=(m-p)*2,f=Qe.getUShort(t,d),f!==0&&(f=f+v&65535)):f=m+v&65535,i.glyphIndexMap[m]=f}function uJ(i,e){var t={};t.version=Qe.getUShort(i,e),xt.argument(t.version===0,"cmap table version should be 0."),t.numTables=Qe.getUShort(i,e+2);for(var n=-1,r=t.numTables-1;r>=0;r-=1){var o=Qe.getUShort(i,e+4+r*8),s=Qe.getUShort(i,e+4+r*8+2);if(o===3&&(s===0||s===1||s===10)||o===0&&(s===0||s===1||s===2||s===3||s===4)){n=Qe.getULong(i,e+4+r*8+4);break}}if(n===-1)throw new Error("No valid cmap sub-tables found.");var a=new Qe.Parser(i,e+n);if(t.format=a.parseUShort(),t.format===12)cJ(t,a);else if(t.format===4)dJ(t,a,i,e,n);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+t.format+").");return t}function fJ(i,e,t){i.segments.push({end:e,start:e,delta:-(e-t),offset:0,glyphIndex:t})}function hJ(i){i.segments.push({end:65535,start:65535,delta:1,offset:0})}function pJ(i){var e=!0,t;for(t=i.length-1;t>0;t-=1){var n=i.get(t);if(n.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),e=!1;break}}var r=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:e?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:e?12:20}];e||(r=r.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),r=r.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var o=new je.Table("cmap",r);for(o.segments=[],t=0;t<i.length;t+=1){for(var s=i.get(t),a=0;a<s.unicodes.length;a+=1)fJ(o,s.unicodes[a],t);o.segments=o.segments.sort(function(b,y){return b.start-y.start})}hJ(o);var l=o.segments.length,c=0,d=[],u=[],f=[],h=[],p=[],v=[];for(t=0;t<l;t+=1){var g=o.segments[t];g.end<=65535&&g.start<=65535?(d=d.concat({name:"end_"+t,type:"USHORT",value:g.end}),u=u.concat({name:"start_"+t,type:"USHORT",value:g.start}),f=f.concat({name:"idDelta_"+t,type:"SHORT",value:g.delta}),h=h.concat({name:"idRangeOffset_"+t,type:"USHORT",value:g.offset}),g.glyphId!==void 0&&(p=p.concat({name:"glyph_"+t,type:"USHORT",value:g.glyphId}))):c+=1,!e&&g.glyphIndex!==void 0&&(v=v.concat({name:"cmap12Start_"+t,type:"ULONG",value:g.start}),v=v.concat({name:"cmap12End_"+t,type:"ULONG",value:g.end}),v=v.concat({name:"cmap12Glyph_"+t,type:"ULONG",value:g.glyphIndex}))}if(o.segCountX2=(l-c)*2,o.searchRange=Math.pow(2,Math.floor(Math.log(l-c)/Math.log(2)))*2,o.entrySelector=Math.log(o.searchRange/2)/Math.log(2),o.rangeShift=o.segCountX2-o.searchRange,o.fields=o.fields.concat(d),o.fields.push({name:"reservedPad",type:"USHORT",value:0}),o.fields=o.fields.concat(u),o.fields=o.fields.concat(f),o.fields=o.fields.concat(h),o.fields=o.fields.concat(p),o.cmap4Length=14+d.length*2+2+u.length*2+f.length*2+h.length*2+p.length*2,!e){var m=16+v.length*4;o.cmap12Offset=20+o.cmap4Length,o.fields=o.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:m},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:v.length/3}]),o.fields=o.fields.concat(v)}return o}var qU={parse:uJ,make:pJ},Vx=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],mJ=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],gJ=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],Bd=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function KU(i){this.font=i}KU.prototype.charToGlyphIndex=function(i){var e=i.codePointAt(0),t=this.font.glyphs;if(t){for(var n=0;n<t.length;n+=1)for(var r=t.get(n),o=0;o<r.unicodes.length;o+=1)if(r.unicodes[o]===e)return n}return null};function ZU(i){this.cmap=i}ZU.prototype.charToGlyphIndex=function(i){return this.cmap.glyphIndexMap[i.codePointAt(0)]||0};function Yx(i,e){this.encoding=i,this.charset=e}Yx.prototype.charToGlyphIndex=function(i){var e=i.codePointAt(0),t=this.encoding[e];return this.charset.indexOf(t)};function mD(i){switch(i.version){case 1:this.names=Bd.slice();break;case 2:this.names=new Array(i.numberOfGlyphs);for(var e=0;e<i.numberOfGlyphs;e++)i.glyphNameIndex[e]<Bd.length?this.names[e]=Bd[i.glyphNameIndex[e]]:this.names[e]=i.names[i.glyphNameIndex[e]-Bd.length];break;case 2.5:this.names=new Array(i.numberOfGlyphs);for(var t=0;t<i.numberOfGlyphs;t++)this.names[t]=Bd[t+i.glyphNameIndex[t]];break;case 3:this.names=[];break;default:this.names=[];break}}mD.prototype.nameToGlyphIndex=function(i){return this.names.indexOf(i)};mD.prototype.glyphIndexToName=function(i){return this.names[i]};function vJ(i){for(var e,t=i.tables.cmap.glyphIndexMap,n=Object.keys(t),r=0;r<n.length;r+=1){var o=n[r],s=t[o];e=i.glyphs.get(s),e.addUnicode(parseInt(o))}for(var a=0;a<i.glyphs.length;a+=1)e=i.glyphs.get(a),i.cffEncoding?i.isCIDFont?e.name="gid"+a:e.name=i.cffEncoding.charset[a]:i.glyphNames.names&&(e.name=i.glyphNames.glyphIndexToName(a))}function bJ(i){i._IndexToUnicodeMap={};for(var e=i.tables.cmap.glyphIndexMap,t=Object.keys(e),n=0;n<t.length;n+=1){var r=t[n],o=e[r];i._IndexToUnicodeMap[o]===void 0?i._IndexToUnicodeMap[o]={unicodes:[parseInt(r)]}:i._IndexToUnicodeMap[o].unicodes.push(parseInt(r))}}function yJ(i,e){e.lowMemory?bJ(i):vJ(i)}function xJ(i,e,t,n,r){i.beginPath(),i.moveTo(e,t),i.lineTo(n,r),i.stroke()}var Ud={line:xJ};function _J(i,e){var t=e||new Xn;return{configurable:!0,get:function(){return typeof t=="function"&&(t=t()),t},set:function(n){t=n}}}function Co(i){this.bindConstructorValues(i)}Co.prototype.bindConstructorValues=function(i){this.index=i.index||0,this.name=i.name||null,this.unicode=i.unicode||void 0,this.unicodes=i.unicodes||i.unicode!==void 0?[i.unicode]:[],"xMin"in i&&(this.xMin=i.xMin),"yMin"in i&&(this.yMin=i.yMin),"xMax"in i&&(this.xMax=i.xMax),"yMax"in i&&(this.yMax=i.yMax),"advanceWidth"in i&&(this.advanceWidth=i.advanceWidth),Object.defineProperty(this,"path",_J(this,i.path))};Co.prototype.addUnicode=function(i){this.unicodes.length===0&&(this.unicode=i),this.unicodes.push(i)};Co.prototype.getBoundingBox=function(){return this.path.getBoundingBox()};Co.prototype.getPath=function(i,e,t,n,r){i=i!==void 0?i:0,e=e!==void 0?e:0,t=t!==void 0?t:72;var o,s;n||(n={});var a=n.xScale,l=n.yScale;if(n.hinting&&r&&r.hinting&&(s=this.path&&r.hinting.exec(this,t)),s)o=r.hinting.getCommands(s),i=Math.round(i),e=Math.round(e),a=l=1;else{o=this.path.commands;var c=1/(this.path.unitsPerEm||1e3)*t;a===void 0&&(a=c),l===void 0&&(l=c)}for(var d=new Xn,u=0;u<o.length;u+=1){var f=o[u];f.type==="M"?d.moveTo(i+f.x*a,e+-f.y*l):f.type==="L"?d.lineTo(i+f.x*a,e+-f.y*l):f.type==="Q"?d.quadraticCurveTo(i+f.x1*a,e+-f.y1*l,i+f.x*a,e+-f.y*l):f.type==="C"?d.curveTo(i+f.x1*a,e+-f.y1*l,i+f.x2*a,e+-f.y2*l,i+f.x*a,e+-f.y*l):f.type==="Z"&&d.closePath()}return d};Co.prototype.getContours=function(){if(this.points===void 0)return[];for(var i=[],e=[],t=0;t<this.points.length;t+=1){var n=this.points[t];e.push(n),n.lastPointOfContour&&(i.push(e),e=[])}return xt.argument(e.length===0,"There are still points left in the current contour."),i};Co.prototype.getMetrics=function(){for(var i=this.path.commands,e=[],t=[],n=0;n<i.length;n+=1){var r=i[n];r.type!=="Z"&&(e.push(r.x),t.push(r.y)),(r.type==="Q"||r.type==="C")&&(e.push(r.x1),t.push(r.y1)),r.type==="C"&&(e.push(r.x2),t.push(r.y2))}var o={xMin:Math.min.apply(null,e),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,e),yMax:Math.max.apply(null,t),leftSideBearing:this.leftSideBearing};return isFinite(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o};Co.prototype.draw=function(i,e,t,n,r){this.getPath(e,t,n,r).draw(i)};Co.prototype.drawPoints=function(i,e,t,n){function r(u,f,h,p){i.beginPath();for(var v=0;v<u.length;v+=1)i.moveTo(f+u[v].x*p,h+u[v].y*p),i.arc(f+u[v].x*p,h+u[v].y*p,2,0,Math.PI*2,!1);i.closePath(),i.fill()}e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:24;for(var o=1/this.path.unitsPerEm*n,s=[],a=[],l=this.path,c=0;c<l.commands.length;c+=1){var d=l.commands[c];d.x!==void 0&&s.push({x:d.x,y:-d.y}),d.x1!==void 0&&a.push({x:d.x1,y:-d.y1}),d.x2!==void 0&&a.push({x:d.x2,y:-d.y2})}i.fillStyle="blue",r(s,e,t,o),i.fillStyle="red",r(a,e,t,o)};Co.prototype.drawMetrics=function(i,e,t,n){var r;e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:24,r=1/this.path.unitsPerEm*n,i.lineWidth=1,i.strokeStyle="black",Ud.line(i,e,-1e4,e,1e4),Ud.line(i,-1e4,t,1e4,t);var o=this.xMin||0,s=this.yMin||0,a=this.xMax||0,l=this.yMax||0,c=this.advanceWidth||0;i.strokeStyle="blue",Ud.line(i,e+o*r,-1e4,e+o*r,1e4),Ud.line(i,e+a*r,-1e4,e+a*r,1e4),Ud.line(i,-1e4,t+-s*r,1e4,t+-s*r),Ud.line(i,-1e4,t+-l*r,1e4,t+-l*r),i.strokeStyle="green",Ud.line(i,e+c*r,-1e4,e+c*r,1e4)};function Bx(i,e,t){Object.defineProperty(i,e,{get:function(){return i.path,i[t]},set:function(n){i[t]=n},enumerable:!0,configurable:!0})}function gD(i,e){if(this.font=i,this.glyphs={},Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];n.path.unitsPerEm=i.unitsPerEm,this.glyphs[t]=n}this.length=e&&e.length||0}gD.prototype.get=function(i){if(this.glyphs[i]===void 0){this.font._push(i),typeof this.glyphs[i]=="function"&&(this.glyphs[i]=this.glyphs[i]());var e=this.glyphs[i],t=this.font._IndexToUnicodeMap[i];if(t)for(var n=0;n<t.unicodes.length;n++)e.addUnicode(t.unicodes[n]);this.font.cffEncoding?this.font.isCIDFont?e.name="gid"+i:e.name=this.font.cffEncoding.charset[i]:this.font.glyphNames.names&&(e.name=this.font.glyphNames.glyphIndexToName(i)),this.glyphs[i].advanceWidth=this.font._hmtxTableData[i].advanceWidth,this.glyphs[i].leftSideBearing=this.font._hmtxTableData[i].leftSideBearing}else typeof this.glyphs[i]=="function"&&(this.glyphs[i]=this.glyphs[i]());return this.glyphs[i]};gD.prototype.push=function(i,e){this.glyphs[i]=e,this.length++};function SJ(i,e){return new Co({index:e,font:i})}function CJ(i,e,t,n,r,o){return function(){var s=new Co({index:e,font:i});return s.path=function(){t(s,n,r);var a=o(i.glyphs,s);return a.unitsPerEm=i.unitsPerEm,a},Bx(s,"xMin","_xMin"),Bx(s,"xMax","_xMax"),Bx(s,"yMin","_yMin"),Bx(s,"yMax","_yMax"),s}}function wJ(i,e,t,n){return function(){var r=new Co({index:e,font:i});return r.path=function(){var o=t(i,r,n);return o.unitsPerEm=i.unitsPerEm,o},r}}var js={GlyphSet:gD,glyphLoader:SJ,ttfGlyphLoader:CJ,cffGlyphLoader:wJ};function JU(i,e){if(i===e)return!0;if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length)return!1;for(var t=0;t<i.length;t+=1)if(!JU(i[t],e[t]))return!1;return!0}else return!1}function sD(i){var e;return i.length<1240?e=107:i.length<33900?e=1131:e=32768,e}function Xl(i,e,t){var n=[],r=[],o=Qe.getCard16(i,e),s,a;if(o!==0){var l=Qe.getByte(i,e+2);s=e+(o+1)*l+2;for(var c=e+3,d=0;d<o+1;d+=1)n.push(Qe.getOffset(i,c,l)),c+=l;a=s+n[o]}else a=e+2;for(var u=0;u<n.length-1;u+=1){var f=Qe.getBytes(i,s+n[u],s+n[u+1]);t&&(f=t(f)),r.push(f)}return{objects:r,startOffset:e,endOffset:a}}function EJ(i,e){var t=[],n=Qe.getCard16(i,e),r,o;if(n!==0){var s=Qe.getByte(i,e+2);r=e+(n+1)*s+2;for(var a=e+3,l=0;l<n+1;l+=1)t.push(Qe.getOffset(i,a,s)),a+=s;o=r+t[n]}else o=e+2;return{offsets:t,startOffset:e,endOffset:o}}function MJ(i,e,t,n,r){var o=Qe.getCard16(t,n),s=0;if(o!==0){var a=Qe.getByte(t,n+2);s=n+(o+1)*a+2}var l=Qe.getBytes(t,s+e[i],s+e[i+1]);return r&&(l=r(l)),l}function TJ(i){for(var e="",t=15,n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];;){var r=i.parseByte(),o=r>>4,s=r&15;if(o===t||(e+=n[o],s===t))break;e+=n[s]}return parseFloat(e)}function DJ(i,e){var t,n,r,o;if(e===28)return t=i.parseByte(),n=i.parseByte(),t<<8|n;if(e===29)return t=i.parseByte(),n=i.parseByte(),r=i.parseByte(),o=i.parseByte(),t<<24|n<<16|r<<8|o;if(e===30)return TJ(i);if(e>=32&&e<=246)return e-139;if(e>=247&&e<=250)return t=i.parseByte(),(e-247)*256+t+108;if(e>=251&&e<=254)return t=i.parseByte(),-(e-251)*256-t-108;throw new Error("Invalid b0 "+e)}function IJ(i){for(var e={},t=0;t<i.length;t+=1){var n=i[t][0],r=i[t][1],o=void 0;if(r.length===1?o=r[0]:o=r,e.hasOwnProperty(n)&&!isNaN(e[n]))throw new Error("Object "+e+" already has key "+n);e[n]=o}return e}function QU(i,e,t){e=e!==void 0?e:0;var n=new Qe.Parser(i,e),r=[],o=[];for(t=t!==void 0?t:i.length;n.relativeOffset<t;){var s=n.parseByte();s<=21?(s===12&&(s=1200+n.parseByte()),r.push([s,o]),o=[]):o.push(DJ(n,s))}return IJ(r)}function Im(i,e){return e<=390?e=Vx[e]:e=i[e-391],e}function eB(i,e,t){for(var n={},r,o=0;o<e.length;o+=1){var s=e[o];if(Array.isArray(s.type)){var a=[];a.length=s.type.length;for(var l=0;l<s.type.length;l++)r=i[s.op]!==void 0?i[s.op][l]:void 0,r===void 0&&(r=s.value!==void 0&&s.value[l]!==void 0?s.value[l]:null),s.type[l]==="SID"&&(r=Im(t,r)),a[l]=r;n[s.name]=a}else r=i[s.op],r===void 0&&(r=s.value!==void 0?s.value:null),s.type==="SID"&&(r=Im(t,r)),n[s.name]=r}return n}function PJ(i,e){var t={};return t.formatMajor=Qe.getCard8(i,e),t.formatMinor=Qe.getCard8(i,e+1),t.size=Qe.getCard8(i,e+2),t.offsetSize=Qe.getCard8(i,e+3),t.startOffset=e,t.endOffset=e+4,t}var tB=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],nB=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function AJ(i,e){var t=QU(i,0,i.byteLength);return eB(t,tB,e)}function iB(i,e,t,n){var r=QU(i,e,t);return eB(r,nB,n)}function dU(i,e,t,n){for(var r=[],o=0;o<t.length;o+=1){var s=new DataView(new Uint8Array(t[o]).buffer),a=AJ(s,n);a._subrs=[],a._subrsBias=0,a._defaultWidthX=0,a._nominalWidthX=0;var l=a.private[0],c=a.private[1];if(l!==0&&c!==0){var d=iB(i,c+e,l,n);if(a._defaultWidthX=d.defaultWidthX,a._nominalWidthX=d.nominalWidthX,d.subrs!==0){var u=c+d.subrs,f=Xl(i,u+e);a._subrs=f.objects,a._subrsBias=sD(a._subrs)}a._privateDict=d}r.push(a)}return r}function OJ(i,e,t,n){var r,o,s=new Qe.Parser(i,e);t-=1;var a=[".notdef"],l=s.parseCard8();if(l===0)for(var c=0;c<t;c+=1)r=s.parseSID(),a.push(Im(n,r));else if(l===1)for(;a.length<=t;){r=s.parseSID(),o=s.parseCard8();for(var d=0;d<=o;d+=1)a.push(Im(n,r)),r+=1}else if(l===2)for(;a.length<=t;){r=s.parseSID(),o=s.parseCard16();for(var u=0;u<=o;u+=1)a.push(Im(n,r)),r+=1}else throw new Error("Unknown charset format "+l);return a}function RJ(i,e,t){var n,r={},o=new Qe.Parser(i,e),s=o.parseCard8();if(s===0)for(var a=o.parseCard8(),l=0;l<a;l+=1)n=o.parseCard8(),r[n]=l;else if(s===1){var c=o.parseCard8();n=1;for(var d=0;d<c;d+=1)for(var u=o.parseCard8(),f=o.parseCard8(),h=u;h<=u+f;h+=1)r[h]=n,n+=1}else throw new Error("Unknown encoding format "+s);return new Yx(r,t)}function uU(i,e,t){var n,r,o,s,a=new Xn,l=[],c=0,d=!1,u=!1,f=0,h=0,p,v,g,m;if(i.isCIDFont){var b=i.tables.cff.topDict._fdSelect[e.index],y=i.tables.cff.topDict._fdArray[b];p=y._subrs,v=y._subrsBias,g=y._defaultWidthX,m=y._nominalWidthX}else p=i.tables.cff.topDict._subrs,v=i.tables.cff.topDict._subrsBias,g=i.tables.cff.topDict._defaultWidthX,m=i.tables.cff.topDict._nominalWidthX;var x=g;function _(A,S){u&&a.closePath(),a.moveTo(A,S),u=!0}function E(){var A;A=l.length%2!==0,A&&!d&&(x=l.shift()+m),c+=l.length>>1,l.length=0,d=!0}function D(A){for(var S,I,L,H,z,X,q,K,j,te,ye,xe,Ce=0;Ce<A.length;){var ce=A[Ce];switch(Ce+=1,ce){case 1:E();break;case 3:E();break;case 4:l.length>1&&!d&&(x=l.shift()+m,d=!0),h+=l.pop(),_(f,h);break;case 5:for(;l.length>0;)f+=l.shift(),h+=l.shift(),a.lineTo(f,h);break;case 6:for(;l.length>0&&(f+=l.shift(),a.lineTo(f,h),l.length!==0);)h+=l.shift(),a.lineTo(f,h);break;case 7:for(;l.length>0&&(h+=l.shift(),a.lineTo(f,h),l.length!==0);)f+=l.shift(),a.lineTo(f,h);break;case 8:for(;l.length>0;)n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+l.shift(),a.curveTo(n,r,o,s,f,h);break;case 10:z=l.pop()+v,X=p[z],X&&D(X);break;case 11:return;case 12:switch(ce=A[Ce],Ce+=1,ce){case 35:n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),q=o+l.shift(),K=s+l.shift(),j=q+l.shift(),te=K+l.shift(),ye=j+l.shift(),xe=te+l.shift(),f=ye+l.shift(),h=xe+l.shift(),l.shift(),a.curveTo(n,r,o,s,q,K),a.curveTo(j,te,ye,xe,f,h);break;case 34:n=f+l.shift(),r=h,o=n+l.shift(),s=r+l.shift(),q=o+l.shift(),K=s,j=q+l.shift(),te=s,ye=j+l.shift(),xe=h,f=ye+l.shift(),a.curveTo(n,r,o,s,q,K),a.curveTo(j,te,ye,xe,f,h);break;case 36:n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),q=o+l.shift(),K=s,j=q+l.shift(),te=s,ye=j+l.shift(),xe=te+l.shift(),f=ye+l.shift(),a.curveTo(n,r,o,s,q,K),a.curveTo(j,te,ye,xe,f,h);break;case 37:n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),q=o+l.shift(),K=s+l.shift(),j=q+l.shift(),te=K+l.shift(),ye=j+l.shift(),xe=te+l.shift(),Math.abs(ye-f)>Math.abs(xe-h)?f=ye+l.shift():h=xe+l.shift(),a.curveTo(n,r,o,s,q,K),a.curveTo(j,te,ye,xe,f,h);break;default:console.log("Glyph "+e.index+": unknown operator 1200"+ce),l.length=0}break;case 14:l.length>0&&!d&&(x=l.shift()+m,d=!0),u&&(a.closePath(),u=!1);break;case 18:E();break;case 19:case 20:E(),Ce+=c+7>>3;break;case 21:l.length>2&&!d&&(x=l.shift()+m,d=!0),h+=l.pop(),f+=l.pop(),_(f,h);break;case 22:l.length>1&&!d&&(x=l.shift()+m,d=!0),f+=l.pop(),_(f,h);break;case 23:E();break;case 24:for(;l.length>2;)n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+l.shift(),a.curveTo(n,r,o,s,f,h);f+=l.shift(),h+=l.shift(),a.lineTo(f,h);break;case 25:for(;l.length>6;)f+=l.shift(),h+=l.shift(),a.lineTo(f,h);n=f+l.shift(),r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+l.shift(),a.curveTo(n,r,o,s,f,h);break;case 26:for(l.length%2&&(f+=l.shift());l.length>0;)n=f,r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o,h=s+l.shift(),a.curveTo(n,r,o,s,f,h);break;case 27:for(l.length%2&&(h+=l.shift());l.length>0;)n=f+l.shift(),r=h,o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s,a.curveTo(n,r,o,s,f,h);break;case 28:S=A[Ce],I=A[Ce+1],l.push((S<<24|I<<16)>>16),Ce+=2;break;case 29:z=l.pop()+i.gsubrsBias,X=i.gsubrs[z],X&&D(X);break;case 30:for(;l.length>0&&(n=f,r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+(l.length===1?l.shift():0),a.curveTo(n,r,o,s,f,h),l.length!==0);)n=f+l.shift(),r=h,o=n+l.shift(),s=r+l.shift(),h=s+l.shift(),f=o+(l.length===1?l.shift():0),a.curveTo(n,r,o,s,f,h);break;case 31:for(;l.length>0&&(n=f+l.shift(),r=h,o=n+l.shift(),s=r+l.shift(),h=s+l.shift(),f=o+(l.length===1?l.shift():0),a.curveTo(n,r,o,s,f,h),l.length!==0);)n=f,r=h+l.shift(),o=n+l.shift(),s=r+l.shift(),f=o+l.shift(),h=s+(l.length===1?l.shift():0),a.curveTo(n,r,o,s,f,h);break;default:ce<32?console.log("Glyph "+e.index+": unknown operator "+ce):ce<247?l.push(ce-139):ce<251?(S=A[Ce],Ce+=1,l.push((ce-247)*256+S+108)):ce<255?(S=A[Ce],Ce+=1,l.push(-(ce-251)*256-S-108)):(S=A[Ce],I=A[Ce+1],L=A[Ce+2],H=A[Ce+3],Ce+=4,l.push((S<<24|I<<16|L<<8|H)/65536))}}}return D(t),e.advanceWidth=x,a}function kJ(i,e,t,n){var r=[],o,s=new Qe.Parser(i,e),a=s.parseCard8();if(a===0)for(var l=0;l<t;l++){if(o=s.parseCard8(),o>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+o+" (FD count "+n+")");r.push(o)}else if(a===3){var c=s.parseCard16(),d=s.parseCard16();if(d!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+d);for(var u,f=0;f<c;f++){if(o=s.parseCard8(),u=s.parseCard16(),o>=n)throw new Error("CFF table CID Font FDSelect has bad FD index value "+o+" (FD count "+n+")");if(u>t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+u);for(;d<u;d++)r.push(o);d=u}if(u!==t)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+u)}else throw new Error("CFF Table CID Font FDSelect table has unsupported format "+a);return r}function FJ(i,e,t,n){t.tables.cff={};var r=PJ(i,e),o=Xl(i,r.endOffset,Qe.bytesToString),s=Xl(i,o.endOffset),a=Xl(i,s.endOffset,Qe.bytesToString),l=Xl(i,a.endOffset);t.gsubrs=l.objects,t.gsubrsBias=sD(t.gsubrs);var c=dU(i,e,s.objects,a.objects);if(c.length!==1)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+c.length);var d=c[0];if(t.tables.cff.topDict=d,d._privateDict&&(t.defaultWidthX=d._privateDict.defaultWidthX,t.nominalWidthX=d._privateDict.nominalWidthX),d.ros[0]!==void 0&&d.ros[1]!==void 0&&(t.isCIDFont=!0),t.isCIDFont){var u=d.fdArray,f=d.fdSelect;if(u===0||f===0)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");u+=e;var h=Xl(i,u),p=dU(i,e,h.objects,a.objects);d._fdArray=p,f+=e,d._fdSelect=kJ(i,f,t.numGlyphs,p.length)}var v=e+d.private[1],g=iB(i,v,d.private[0],a.objects);if(t.defaultWidthX=g.defaultWidthX,t.nominalWidthX=g.nominalWidthX,g.subrs!==0){var m=v+g.subrs,b=Xl(i,m);t.subrs=b.objects,t.subrsBias=sD(t.subrs)}else t.subrs=[],t.subrsBias=0;var y;n.lowMemory?(y=EJ(i,e+d.charStrings),t.nGlyphs=y.offsets.length):(y=Xl(i,e+d.charStrings),t.nGlyphs=y.objects.length);var x=OJ(i,e+d.charset,t.nGlyphs,a.objects);if(d.encoding===0?t.cffEncoding=new Yx(mJ,x):d.encoding===1?t.cffEncoding=new Yx(gJ,x):t.cffEncoding=RJ(i,e+d.encoding,x),t.encoding=t.encoding||t.cffEncoding,t.glyphs=new js.GlyphSet(t),n.lowMemory)t._push=function(D){var A=MJ(D,y.offsets,i,e+d.charStrings);t.glyphs.push(D,js.cffGlyphLoader(t,D,uU,A))};else for(var _=0;_<t.nGlyphs;_+=1){var E=y.objects[_];t.glyphs.push(_,js.cffGlyphLoader(t,_,uU,E))}}function rB(i,e){var t,n=Vx.indexOf(i);return n>=0&&(t=n),n=e.indexOf(i),n>=0?t=n+Vx.length:(t=Vx.length+e.length,e.push(i)),t}function NJ(){return new je.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function LJ(i){var e=new je.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);e.names=[];for(var t=0;t<i.length;t+=1)e.names.push({name:"name_"+t,type:"NAME",value:i[t]});return e}function oB(i,e,t){for(var n={},r=0;r<i.length;r+=1){var o=i[r],s=e[o.name];s!==void 0&&!JU(s,o.value)&&(o.type==="SID"&&(s=rB(s,t)),n[o.op]={name:o.name,type:o.type,value:s})}return n}function fU(i,e){var t=new je.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=oB(tB,i,e),t}function hU(i){var e=new je.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return e.topDicts=[{name:"topDict_0",type:"TABLE",value:i}],e}function UJ(i){var e=new je.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);e.strings=[];for(var t=0;t<i.length;t+=1)e.strings.push({name:"string_"+t,type:"STRING",value:i[t]});return e}function BJ(){return new je.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}])}function zJ(i,e){for(var t=new je.Record("Charsets",[{name:"format",type:"Card8",value:0}]),n=0;n<i.length;n+=1){var r=i[n],o=rB(r,e);t.fields.push({name:"glyph_"+n,type:"SID",value:o})}return t}function VJ(i){var e=[],t=i.path;e.push({name:"width",type:"NUMBER",value:i.advanceWidth});for(var n=0,r=0,o=0;o<t.commands.length;o+=1){var s=void 0,a=void 0,l=t.commands[o];if(l.type==="Q"){var c=.3333333333333333,d=2/3;l={type:"C",x:l.x,y:l.y,x1:Math.round(c*n+d*l.x1),y1:Math.round(c*r+d*l.y1),x2:Math.round(c*l.x+d*l.x1),y2:Math.round(c*l.y+d*l.y1)}}if(l.type==="M")s=Math.round(l.x-n),a=Math.round(l.y-r),e.push({name:"dx",type:"NUMBER",value:s}),e.push({name:"dy",type:"NUMBER",value:a}),e.push({name:"rmoveto",type:"OP",value:21}),n=Math.round(l.x),r=Math.round(l.y);else if(l.type==="L")s=Math.round(l.x-n),a=Math.round(l.y-r),e.push({name:"dx",type:"NUMBER",value:s}),e.push({name:"dy",type:"NUMBER",value:a}),e.push({name:"rlineto",type:"OP",value:5}),n=Math.round(l.x),r=Math.round(l.y);else if(l.type==="C"){var u=Math.round(l.x1-n),f=Math.round(l.y1-r),h=Math.round(l.x2-l.x1),p=Math.round(l.y2-l.y1);s=Math.round(l.x-l.x2),a=Math.round(l.y-l.y2),e.push({name:"dx1",type:"NUMBER",value:u}),e.push({name:"dy1",type:"NUMBER",value:f}),e.push({name:"dx2",type:"NUMBER",value:h}),e.push({name:"dy2",type:"NUMBER",value:p}),e.push({name:"dx",type:"NUMBER",value:s}),e.push({name:"dy",type:"NUMBER",value:a}),e.push({name:"rrcurveto",type:"OP",value:8}),n=Math.round(l.x),r=Math.round(l.y)}}return e.push({name:"endchar",type:"OP",value:14}),e}function GJ(i){for(var e=new je.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]),t=0;t<i.length;t+=1){var n=i.get(t),r=VJ(n);e.charStrings.push({name:n.name,type:"CHARSTRING",value:r})}return e}function HJ(i,e){var t=new je.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return t.dict=oB(nB,i,e),t}function jJ(i,e){for(var t=new je.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),n=1/e.unitsPerEm,r={version:e.version,fullName:e.fullName,familyName:e.familyName,weight:e.weightName,fontBBox:e.fontBBox||[0,0,0,0],fontMatrix:[n,0,0,n,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},o={},s=[],a,l=1;l<i.length;l+=1)a=i.get(l),s.push(a.name);var c=[];t.header=NJ(),t.nameIndex=LJ([e.postScriptName]);var d=fU(r,c);t.topDictIndex=hU(d),t.globalSubrIndex=BJ(),t.charsets=zJ(s,c),t.charStringsIndex=GJ(i),t.privateDict=HJ(o,c),t.stringIndex=UJ(c);var u=t.header.sizeOf()+t.nameIndex.sizeOf()+t.topDictIndex.sizeOf()+t.stringIndex.sizeOf()+t.globalSubrIndex.sizeOf();return r.charset=u,r.encoding=0,r.charStrings=r.charset+t.charsets.sizeOf(),r.private[1]=r.charStrings+t.charStringsIndex.sizeOf(),d=fU(r,c),t.topDictIndex=hU(d),t}var sB={parse:FJ,make:jJ};function WJ(i,e){var t={},n=new Qe.Parser(i,e);return t.version=n.parseVersion(),t.fontRevision=Math.round(n.parseFixed()*1e3)/1e3,t.checkSumAdjustment=n.parseULong(),t.magicNumber=n.parseULong(),xt.argument(t.magicNumber===1594834165,"Font header has wrong magic number."),t.flags=n.parseUShort(),t.unitsPerEm=n.parseUShort(),t.created=n.parseLongDateTime(),t.modified=n.parseLongDateTime(),t.xMin=n.parseShort(),t.yMin=n.parseShort(),t.xMax=n.parseShort(),t.yMax=n.parseShort(),t.macStyle=n.parseUShort(),t.lowestRecPPEM=n.parseUShort(),t.fontDirectionHint=n.parseShort(),t.indexToLocFormat=n.parseShort(),t.glyphDataFormat=n.parseShort(),t}function $J(i){var e=Math.round(new Date().getTime()/1e3)+2082844800,t=e;return i.createdTimestamp&&(t=i.createdTimestamp+2082844800),new je.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:t},{name:"modified",type:"LONGDATETIME",value:e},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],i)}var aB={parse:WJ,make:$J};function XJ(i,e){var t={},n=new Qe.Parser(i,e);return t.version=n.parseVersion(),t.ascender=n.parseShort(),t.descender=n.parseShort(),t.lineGap=n.parseShort(),t.advanceWidthMax=n.parseUShort(),t.minLeftSideBearing=n.parseShort(),t.minRightSideBearing=n.parseShort(),t.xMaxExtent=n.parseShort(),t.caretSlopeRise=n.parseShort(),t.caretSlopeRun=n.parseShort(),t.caretOffset=n.parseShort(),n.relativeOffset+=8,t.metricDataFormat=n.parseShort(),t.numberOfHMetrics=n.parseUShort(),t}function YJ(i){return new je.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],i)}var lB={parse:XJ,make:YJ};function qJ(i,e,t,n,r){for(var o,s,a=new Qe.Parser(i,e),l=0;l<n;l+=1){l<t&&(o=a.parseUShort(),s=a.parseShort());var c=r.get(l);c.advanceWidth=o,c.leftSideBearing=s}}function KJ(i,e,t,n,r){i._hmtxTableData={};for(var o,s,a=new Qe.Parser(e,t),l=0;l<r;l+=1)l<n&&(o=a.parseUShort(),s=a.parseShort()),i._hmtxTableData[l]={advanceWidth:o,leftSideBearing:s}}function ZJ(i,e,t,n,r,o,s){s.lowMemory?KJ(i,e,t,n,r):qJ(e,t,n,r,o)}function JJ(i){for(var e=new je.Table("hmtx",[]),t=0;t<i.length;t+=1){var n=i.get(t),r=n.advanceWidth||0,o=n.leftSideBearing||0;e.fields.push({name:"advanceWidth_"+t,type:"USHORT",value:r}),e.fields.push({name:"leftSideBearing_"+t,type:"SHORT",value:o})}return e}var cB={parse:ZJ,make:JJ};function QJ(i){for(var e=new je.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:i.length}]),t="",n=12+i.length*4,r=0;r<i.length;++r){var o=t.indexOf(i[r]);o<0&&(o=t.length,t+=i[r]),e.fields.push({name:"offset "+r,type:"USHORT",value:n+o}),e.fields.push({name:"length "+r,type:"USHORT",value:i[r].length})}return e.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),e}function eQ(i,e){var t=new Qe.Parser(i,e),n=t.parseULong();xt.argument(n===1,"Unsupported ltag table version."),t.skip("uLong",1);for(var r=t.parseULong(),o=[],s=0;s<r;s++){for(var a="",l=e+t.parseUShort(),c=t.parseUShort(),d=l;d<l+c;++d)a+=String.fromCharCode(i.getInt8(d));o.push(a)}return o}var dB={make:QJ,parse:eQ};function tQ(i,e){var t={},n=new Qe.Parser(i,e);return t.version=n.parseVersion(),t.numGlyphs=n.parseUShort(),t.version===1&&(t.maxPoints=n.parseUShort(),t.maxContours=n.parseUShort(),t.maxCompositePoints=n.parseUShort(),t.maxCompositeContours=n.parseUShort(),t.maxZones=n.parseUShort(),t.maxTwilightPoints=n.parseUShort(),t.maxStorage=n.parseUShort(),t.maxFunctionDefs=n.parseUShort(),t.maxInstructionDefs=n.parseUShort(),t.maxStackElements=n.parseUShort(),t.maxSizeOfInstructions=n.parseUShort(),t.maxComponentElements=n.parseUShort(),t.maxComponentDepth=n.parseUShort()),t}function nQ(i){return new je.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:i}])}var uB={parse:tQ,make:nQ},fB=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],hB={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},iQ={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},pB={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function rQ(i,e,t){switch(i){case 0:if(e===65535)return"und";if(t)return t[e];break;case 1:return hB[e];case 3:return pB[e]}}var aD="utf-16",oQ={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},sQ={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function mB(i,e,t){switch(i){case 0:return aD;case 1:return sQ[t]||oQ[e];case 3:if(e===1||e===10)return aD;break}}function aQ(i,e,t){for(var n={},r=new Qe.Parser(i,e),o=r.parseUShort(),s=r.parseUShort(),a=r.offset+r.parseUShort(),l=0;l<s;l++){var c=r.parseUShort(),d=r.parseUShort(),u=r.parseUShort(),f=r.parseUShort(),h=fB[f]||f,p=r.parseUShort(),v=r.parseUShort(),g=rQ(c,u,t),m=mB(c,d,u);if(m!==void 0&&g!==void 0){var b=void 0;if(m===aD?b=th.UTF16(i,a+v,p):b=th.MACSTRING(i,a+v,p,m),b){var y=n[h];y===void 0&&(y=n[h]={}),y[g]=b}}}var x=0;return o===1&&(x=r.parseUShort()),n}function YT(i){var e={};for(var t in i)e[i[t]]=parseInt(t);return e}function pU(i,e,t,n,r,o){return new je.Record("NameRecord",[{name:"platformID",type:"USHORT",value:i},{name:"encodingID",type:"USHORT",value:e},{name:"languageID",type:"USHORT",value:t},{name:"nameID",type:"USHORT",value:n},{name:"length",type:"USHORT",value:r},{name:"offset",type:"USHORT",value:o}])}function lQ(i,e){var t=i.length,n=e.length-t+1;e:for(var r=0;r<n;r++)for(;r<n;r++){for(var o=0;o<t;o++)if(e[r+o]!==i[o])continue e;return r}return-1}function mU(i,e){var t=lQ(i,e);if(t<0){t=e.length;for(var n=0,r=i.length;n<r;++n)e.push(i[n])}return t}function cQ(i,e){var t,n=[],r={},o=YT(fB);for(var s in i){var a=o[s];if(a===void 0&&(a=s),t=parseInt(a),isNaN(t))throw new Error('Name table entry "'+s+'" does not exist, see nameTableNames for complete list.');r[t]=i[s],n.push(t)}for(var l=YT(hB),c=YT(pB),d=[],u=[],f=0;f<n.length;f++){t=n[f];var h=r[t];for(var p in h){var v=h[p],g=1,m=l[p],b=iQ[m],y=mB(g,b,m),x=Fe.MACSTRING(v,y);x===void 0&&(g=0,m=e.indexOf(p),m<0&&(m=e.length,e.push(p)),b=4,x=Fe.UTF16(v));var _=mU(x,u);d.push(pU(g,b,m,t,x.length,_));var E=c[p];if(E!==void 0){var D=Fe.UTF16(v),A=mU(D,u);d.push(pU(3,1,E,t,D.length,A))}}}d.sort(function(L,H){return L.platformID-H.platformID||L.encodingID-H.encodingID||L.languageID-H.languageID||L.nameID-H.nameID});for(var S=new je.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:d.length},{name:"stringOffset",type:"USHORT",value:6+d.length*12}]),I=0;I<d.length;I++)S.fields.push({name:"record_"+I,type:"RECORD",value:d[I]});return S.fields.push({name:"strings",type:"LITERAL",value:u}),S}var gB={parse:aQ,make:cQ},lD=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}];function dQ(i){for(var e=0;e<lD.length;e+=1){var t=lD[e];if(i>=t.begin&&i<t.end)return e}return-1}function uQ(i,e){var t={},n=new Qe.Parser(i,e);t.version=n.parseUShort(),t.xAvgCharWidth=n.parseShort(),t.usWeightClass=n.parseUShort(),t.usWidthClass=n.parseUShort(),t.fsType=n.parseUShort(),t.ySubscriptXSize=n.parseShort(),t.ySubscriptYSize=n.parseShort(),t.ySubscriptXOffset=n.parseShort(),t.ySubscriptYOffset=n.parseShort(),t.ySuperscriptXSize=n.parseShort(),t.ySuperscriptYSize=n.parseShort(),t.ySuperscriptXOffset=n.parseShort(),t.ySuperscriptYOffset=n.parseShort(),t.yStrikeoutSize=n.parseShort(),t.yStrikeoutPosition=n.parseShort(),t.sFamilyClass=n.parseShort(),t.panose=[];for(var r=0;r<10;r++)t.panose[r]=n.parseByte();return t.ulUnicodeRange1=n.parseULong(),t.ulUnicodeRange2=n.parseULong(),t.ulUnicodeRange3=n.parseULong(),t.ulUnicodeRange4=n.parseULong(),t.achVendID=String.fromCharCode(n.parseByte(),n.parseByte(),n.parseByte(),n.parseByte()),t.fsSelection=n.parseUShort(),t.usFirstCharIndex=n.parseUShort(),t.usLastCharIndex=n.parseUShort(),t.sTypoAscender=n.parseShort(),t.sTypoDescender=n.parseShort(),t.sTypoLineGap=n.parseShort(),t.usWinAscent=n.parseUShort(),t.usWinDescent=n.parseUShort(),t.version>=1&&(t.ulCodePageRange1=n.parseULong(),t.ulCodePageRange2=n.parseULong()),t.version>=2&&(t.sxHeight=n.parseShort(),t.sCapHeight=n.parseShort(),t.usDefaultChar=n.parseUShort(),t.usBreakChar=n.parseUShort(),t.usMaxContent=n.parseUShort()),t}function fQ(i){return new je.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],i)}var cD={parse:uQ,make:fQ,unicodeRanges:lD,getUnicodeRange:dQ};function hQ(i,e){var t={},n=new Qe.Parser(i,e);switch(t.version=n.parseVersion(),t.italicAngle=n.parseFixed(),t.underlinePosition=n.parseShort(),t.underlineThickness=n.parseShort(),t.isFixedPitch=n.parseULong(),t.minMemType42=n.parseULong(),t.maxMemType42=n.parseULong(),t.minMemType1=n.parseULong(),t.maxMemType1=n.parseULong(),t.version){case 1:t.names=Bd.slice();break;case 2:t.numberOfGlyphs=n.parseUShort(),t.glyphNameIndex=new Array(t.numberOfGlyphs);for(var r=0;r<t.numberOfGlyphs;r++)t.glyphNameIndex[r]=n.parseUShort();t.names=[];for(var o=0;o<t.numberOfGlyphs;o++)if(t.glyphNameIndex[o]>=Bd.length){var s=n.parseChar();t.names.push(n.parseString(s))}break;case 2.5:t.numberOfGlyphs=n.parseUShort(),t.offset=new Array(t.numberOfGlyphs);for(var a=0;a<t.numberOfGlyphs;a++)t.offset[a]=n.parseChar();break}return t}function pQ(){return new je.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])}var vB={parse:hQ,make:pQ},es=new Array(9);es[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(se.coverage),deltaGlyphId:this.parseUShort()};if(t===2)return{substFormat:2,coverage:this.parsePointer(se.coverage),substitute:this.parseOffset16List()};xt.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")};es[2]=function(){var e=this.parseUShort();return xt.argument(e===1,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(se.coverage),sequences:this.parseListOfLists()}};es[3]=function(){var e=this.parseUShort();return xt.argument(e===1,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(se.coverage),alternateSets:this.parseListOfLists()}};es[4]=function(){var e=this.parseUShort();return xt.argument(e===1,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(se.coverage),ligatureSets:this.parseListOfLists(function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}})}};var eh={sequenceIndex:se.uShort,lookupListIndex:se.uShort};es[5]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:t,coverage:this.parsePointer(se.coverage),ruleSets:this.parseListOfLists(function(){var o=this.parseUShort(),s=this.parseUShort();return{input:this.parseUShortList(o-1),lookupRecords:this.parseRecordList(s,eh)}})};if(t===2)return{substFormat:t,coverage:this.parsePointer(se.coverage),classDef:this.parsePointer(se.classDef),classSets:this.parseListOfLists(function(){var o=this.parseUShort(),s=this.parseUShort();return{classes:this.parseUShortList(o-1),lookupRecords:this.parseRecordList(s,eh)}})};if(t===3){var n=this.parseUShort(),r=this.parseUShort();return{substFormat:t,coverages:this.parseList(n,se.pointer(se.coverage)),lookupRecords:this.parseRecordList(r,eh)}}xt.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")};es[6]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{substFormat:1,coverage:this.parsePointer(se.coverage),chainRuleSets:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(eh)}})};if(t===2)return{substFormat:2,coverage:this.parsePointer(se.coverage),backtrackClassDef:this.parsePointer(se.classDef),inputClassDef:this.parsePointer(se.classDef),lookaheadClassDef:this.parsePointer(se.classDef),chainClassSet:this.parseListOfLists(function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(eh)}})};if(t===3)return{substFormat:3,backtrackCoverage:this.parseList(se.pointer(se.coverage)),inputCoverage:this.parseList(se.pointer(se.coverage)),lookaheadCoverage:this.parseList(se.pointer(se.coverage)),lookupRecords:this.parseRecordList(eh)};xt.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")};es[7]=function(){var e=this.parseUShort();xt.argument(e===1,"GSUB Extension Substitution subtable identifier-format must be 1");var t=this.parseUShort(),n=new se(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:es[t].call(n)}};es[8]=function(){var e=this.parseUShort();return xt.argument(e===1,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(se.coverage),backtrackCoverage:this.parseList(se.pointer(se.coverage)),lookaheadCoverage:this.parseList(se.pointer(se.coverage)),substitutes:this.parseUShortList()}};function mQ(i,e){e=e||0;var t=new se(i,e),n=t.parseVersion(1);return xt.argument(n===1||n===1.1,"Unsupported GSUB table version."),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(es)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(es),variations:t.parseFeatureVariationsList()}}var nh=new Array(9);nh[1]=function(e){return e.substFormat===1?new je.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new je.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new je.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new je.Coverage(e.coverage)}].concat(je.ushortList("substitute",e.substitute)))};nh[2]=function(e){return xt.assert(e.substFormat===1,"Lookup type 2 substFormat must be 1."),new je.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new je.Coverage(e.coverage)}].concat(je.tableList("seqSet",e.sequences,function(t){return new je.Table("sequenceSetTable",je.ushortList("sequence",t))})))};nh[3]=function(e){return xt.assert(e.substFormat===1,"Lookup type 3 substFormat must be 1."),new je.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new je.Coverage(e.coverage)}].concat(je.tableList("altSet",e.alternateSets,function(t){return new je.Table("alternateSetTable",je.ushortList("alternate",t))})))};nh[4]=function(e){return xt.assert(e.substFormat===1,"Lookup type 4 substFormat must be 1."),new je.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new je.Coverage(e.coverage)}].concat(je.tableList("ligSet",e.ligatureSets,function(t){return new je.Table("ligatureSetTable",je.tableList("ligature",t,function(n){return new je.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:n.ligGlyph}].concat(je.ushortList("component",n.components,n.components.length+1)))}))})))};nh[6]=function(e){if(e.substFormat===1){var t=new je.Table("chainContextTable",[{name:"substFormat",type:"USHORT",value:e.substFormat},{name:"coverage",type:"TABLE",value:new je.Coverage(e.coverage)}].concat(je.tableList("chainRuleSet",e.chainRuleSets,function(o){return new je.Table("chainRuleSetTable",je.tableList("chainRule",o,function(s){var a=je.ushortList("backtrackGlyph",s.backtrack,s.backtrack.length).concat(je.ushortList("inputGlyph",s.input,s.input.length+1)).concat(je.ushortList("lookaheadGlyph",s.lookahead,s.lookahead.length)).concat(je.ushortList("substitution",[],s.lookupRecords.length));return s.lookupRecords.forEach(function(l,c){a=a.concat({name:"sequenceIndex"+c,type:"USHORT",value:l.sequenceIndex}).concat({name:"lookupListIndex"+c,type:"USHORT",value:l.lookupListIndex})}),new je.Table("chainRuleTable",a)}))})));return t}else if(e.substFormat===2)xt.assert(!1,"lookup type 6 format 2 is not yet supported.");else if(e.substFormat===3){var n=[{name:"substFormat",type:"USHORT",value:e.substFormat}];n.push({name:"backtrackGlyphCount",type:"USHORT",value:e.backtrackCoverage.length}),e.backtrackCoverage.forEach(function(o,s){n.push({name:"backtrackCoverage"+s,type:"TABLE",value:new je.Coverage(o)})}),n.push({name:"inputGlyphCount",type:"USHORT",value:e.inputCoverage.length}),e.inputCoverage.forEach(function(o,s){n.push({name:"inputCoverage"+s,type:"TABLE",value:new je.Coverage(o)})}),n.push({name:"lookaheadGlyphCount",type:"USHORT",value:e.lookaheadCoverage.length}),e.lookaheadCoverage.forEach(function(o,s){n.push({name:"lookaheadCoverage"+s,type:"TABLE",value:new je.Coverage(o)})}),n.push({name:"substitutionCount",type:"USHORT",value:e.lookupRecords.length}),e.lookupRecords.forEach(function(o,s){n=n.concat({name:"sequenceIndex"+s,type:"USHORT",value:o.sequenceIndex}).concat({name:"lookupListIndex"+s,type:"USHORT",value:o.lookupListIndex})});var r=new je.Table("chainContextTable",n);return r}xt.assert(!1,"lookup type 6 format must be 1, 2 or 3.")};function gQ(i){return new je.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new je.ScriptList(i.scripts)},{name:"features",type:"TABLE",value:new je.FeatureList(i.features)},{name:"lookups",type:"TABLE",value:new je.LookupList(i.lookups,nh)}])}var bB={parse:mQ,make:gQ};function vQ(i,e){var t=new Qe.Parser(i,e),n=t.parseULong();xt.argument(n===1,"Unsupported META table version."),t.parseULong(),t.parseULong();for(var r=t.parseULong(),o={},s=0;s<r;s++){var a=t.parseTag(),l=t.parseULong(),c=t.parseULong(),d=th.UTF8(i,e+l,c);o[a]=d}return o}function bQ(i){var e=Object.keys(i).length,t="",n=16+e*12,r=new je.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:n},{name:"numTags",type:"ULONG",value:e}]);for(var o in i){var s=t.length;t+=i[o],r.fields.push({name:"tag "+o,type:"TAG",value:o}),r.fields.push({name:"offset "+o,type:"ULONG",value:n+s}),r.fields.push({name:"length "+o,type:"ULONG",value:i[o].length})}return r.fields.push({name:"stringPool",type:"CHARARRAY",value:t}),r}var yB={parse:vQ,make:bQ};function gU(i){return Math.log(i)/Math.log(2)|0}function vD(i){for(;i.length%4!==0;)i.push(0);for(var e=0,t=0;t<i.length;t+=4)e+=(i[t]<<24)+(i[t+1]<<16)+(i[t+2]<<8)+i[t+3];return e%=Math.pow(2,32),e}function vU(i,e,t,n){return new je.Record("Table Record",[{name:"tag",type:"TAG",value:i!==void 0?i:""},{name:"checkSum",type:"ULONG",value:e!==void 0?e:0},{name:"offset",type:"ULONG",value:t!==void 0?t:0},{name:"length",type:"ULONG",value:n!==void 0?n:0}])}function xB(i){var e=new je.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);e.tables=i,e.numTables=i.length;var t=Math.pow(2,gU(e.numTables));e.searchRange=16*t,e.entrySelector=gU(t),e.rangeShift=e.numTables*16-e.searchRange;for(var n=[],r=[],o=e.sizeOf()+vU().sizeOf()*e.numTables;o%4!==0;)o+=1,r.push({name:"padding",type:"BYTE",value:0});for(var s=0;s<i.length;s+=1){var a=i[s];xt.argument(a.tableName.length===4,"Table name"+a.tableName+" is invalid.");var l=a.sizeOf(),c=vU(a.tableName,vD(a.encode()),o,l);for(n.push({name:c.tag+" Table Record",type:"RECORD",value:c}),r.push({name:a.tableName+" table",type:"RECORD",value:a}),o+=l,xt.argument(!isNaN(o),"Something went wrong calculating the offset.");o%4!==0;)o+=1,r.push({name:"padding",type:"BYTE",value:0})}return n.sort(function(d,u){return d.value.tag>u.value.tag?1:-1}),e.fields=e.fields.concat(n),e.fields=e.fields.concat(r),e}function bU(i,e,t){for(var n=0;n<e.length;n+=1){var r=i.charToGlyphIndex(e[n]);if(r>0){var o=i.glyphs.get(r);return o.getMetrics()}}return t}function yQ(i){for(var e=0,t=0;t<i.length;t+=1)e+=i[t];return e/i.length}function xQ(i){for(var e=[],t=[],n=[],r=[],o=[],s=[],a=[],l,c=0,d=0,u=0,f=0,h=0,p=0;p<i.glyphs.length;p+=1){var v=i.glyphs.get(p),g=v.unicode|0;if(isNaN(v.advanceWidth))throw new Error("Glyph "+v.name+" ("+p+"): advanceWidth is not a number.");(l>g||l===void 0)&&g>0&&(l=g),c<g&&(c=g);var m=cD.getUnicodeRange(g);if(m<32)d|=1<<m;else if(m<64)u|=1<<m-32;else if(m<96)f|=1<<m-64;else if(m<123)h|=1<<m-96;else throw new Error("Unicode ranges bits > 123 are reserved for internal usage");if(v.name!==".notdef"){var b=v.getMetrics();e.push(b.xMin),t.push(b.yMin),n.push(b.xMax),r.push(b.yMax),s.push(b.leftSideBearing),a.push(b.rightSideBearing),o.push(v.advanceWidth)}}var y={xMin:Math.min.apply(null,e),yMin:Math.min.apply(null,t),xMax:Math.max.apply(null,n),yMax:Math.max.apply(null,r),advanceWidthMax:Math.max.apply(null,o),advanceWidthAvg:yQ(o),minLeftSideBearing:Math.min.apply(null,s),maxLeftSideBearing:Math.max.apply(null,s),minRightSideBearing:Math.min.apply(null,a)};y.ascender=i.ascender,y.descender=i.descender;var x=aB.make({flags:3,unitsPerEm:i.unitsPerEm,xMin:y.xMin,yMin:y.yMin,xMax:y.xMax,yMax:y.yMax,lowestRecPPEM:3,createdTimestamp:i.createdTimestamp}),_=lB.make({ascender:y.ascender,descender:y.descender,advanceWidthMax:y.advanceWidthMax,minLeftSideBearing:y.minLeftSideBearing,minRightSideBearing:y.minRightSideBearing,xMaxExtent:y.maxLeftSideBearing+(y.xMax-y.xMin),numberOfHMetrics:i.glyphs.length}),E=uB.make(i.glyphs.length),D=cD.make(Object.assign({xAvgCharWidth:Math.round(y.advanceWidthAvg),usFirstCharIndex:l,usLastCharIndex:c,ulUnicodeRange1:d,ulUnicodeRange2:u,ulUnicodeRange3:f,ulUnicodeRange4:h,sTypoAscender:y.ascender,sTypoDescender:y.descender,sTypoLineGap:0,usWinAscent:y.yMax,usWinDescent:Math.abs(y.yMin),ulCodePageRange1:1,sxHeight:bU(i,"xyvw",{yMax:Math.round(y.ascender/2)}).yMax,sCapHeight:bU(i,"HIKLEFJMNTZBDPRAGOQSUVWXY",y).yMax,usDefaultChar:i.hasChar(" ")?32:0,usBreakChar:i.hasChar(" ")?32:0},i.tables.os2)),A=cB.make(i.glyphs),S=qU.make(i.glyphs),I=i.getEnglishName("fontFamily"),L=i.getEnglishName("fontSubfamily"),H=I+" "+L,z=i.getEnglishName("postScriptName");z||(z=I.replace(/\s/g,"")+"-"+L);var X={};for(var q in i.names)X[q]=i.names[q];X.uniqueID||(X.uniqueID={en:i.getEnglishName("manufacturer")+":"+H}),X.postScriptName||(X.postScriptName={en:z}),X.preferredFamily||(X.preferredFamily=i.names.fontFamily),X.preferredSubfamily||(X.preferredSubfamily=i.names.fontSubfamily);var K=[],j=gB.make(X,K),te=K.length>0?dB.make(K):void 0,ye=vB.make(),xe=sB.make(i.glyphs,{version:i.getEnglishName("version"),fullName:H,familyName:I,weightName:L,postScriptName:z,unitsPerEm:i.unitsPerEm,fontBBox:[0,y.yMin,y.ascender,y.advanceWidthMax]}),Ce=i.metas&&Object.keys(i.metas).length>0?yB.make(i.metas):void 0,ce=[x,_,E,D,j,S,ye,xe,A];te&&ce.push(te),i.tables.gsub&&ce.push(bB.make(i.tables.gsub)),Ce&&ce.push(Ce);for(var Ie=xB(ce),Mt=Ie.encode(),Lt=vD(Mt),de=Ie.fields,ve=!1,Ue=0;Ue<de.length;Ue+=1)if(de[Ue].name==="head table"){de[Ue].value.checkSumAdjustment=2981146554-Lt,ve=!0;break}if(!ve)throw new Error("Could not find head table with checkSum to adjust.");return Ie}var _Q={make:xB,fontToTable:xQ,computeCheckSum:vD};function qT(i,e){for(var t=0,n=i.length-1;t<=n;){var r=t+n>>>1,o=i[r].tag;if(o===e)return r;o<e?t=r+1:n=r-1}return-t-1}function yU(i,e){for(var t=0,n=i.length-1;t<=n;){var r=t+n>>>1,o=i[r];if(o===e)return r;o<e?t=r+1:n=r-1}return-t-1}function xU(i,e){for(var t,n=0,r=i.length-1;n<=r;){var o=n+r>>>1;t=i[o];var s=t.start;if(s===e)return t;s<e?n=o+1:r=o-1}if(n>0)return t=i[n-1],e>t.end?0:t}function km(i,e){this.font=i,this.tableName=e}km.prototype={searchTag:qT,binSearch:yU,getTable:function(i){var e=this.font.tables[this.tableName];return!e&&i&&(e=this.font.tables[this.tableName]=this.createDefaultTable()),e},getScriptNames:function(){var i=this.getTable();return i?i.scripts.map(function(e){return e.tag}):[]},getDefaultScriptName:function(){var i=this.getTable();if(i){for(var e=!1,t=0;t<i.scripts.length;t++){var n=i.scripts[t].tag;if(n==="DFLT")return n;n==="latn"&&(e=!0)}if(e)return"latn"}},getScriptTable:function(i,e){var t=this.getTable(e);if(t){i=i||"DFLT";var n=t.scripts,r=qT(t.scripts,i);if(r>=0)return n[r].script;if(e){var o={tag:i,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return n.splice(-1-r,0,o),o.script}}},getLangSysTable:function(i,e,t){var n=this.getScriptTable(i,t);if(n){if(!e||e==="dflt"||e==="DFLT")return n.defaultLangSys;var r=qT(n.langSysRecords,e);if(r>=0)return n.langSysRecords[r].langSys;if(t){var o={tag:e,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return n.langSysRecords.splice(-1-r,0,o),o.langSys}}},getFeatureTable:function(i,e,t,n){var r=this.getLangSysTable(i,e,n);if(r){for(var o,s=r.featureIndexes,a=this.font.tables[this.tableName].features,l=0;l<s.length;l++)if(o=a[s[l]],o.tag===t)return o.feature;if(n){var c=a.length;return xt.assert(c===0||t>=a[c-1].tag,"Features must be added in alphabetical order."),o={tag:t,feature:{params:0,lookupListIndexes:[]}},a.push(o),s.push(c),o.feature}}},getLookupTables:function(i,e,t,n,r){var o=this.getFeatureTable(i,e,t,r),s=[];if(o){for(var a,l=o.lookupListIndexes,c=this.font.tables[this.tableName].lookups,d=0;d<l.length;d++)a=c[l[d]],a.lookupType===n&&s.push(a);if(s.length===0&&r){a={lookupType:n,lookupFlag:0,subtables:[],markFilteringSet:void 0};var u=c.length;return c.push(a),l.push(u),[a]}}return s},getGlyphClass:function(i,e){switch(i.format){case 1:return i.startGlyph<=e&&e<i.startGlyph+i.classes.length?i.classes[e-i.startGlyph]:0;case 2:var t=xU(i.ranges,e);return t?t.classId:0}},getCoverageIndex:function(i,e){switch(i.format){case 1:var t=yU(i.glyphs,e);return t>=0?t:-1;case 2:var n=xU(i.ranges,e);return n?n.index+e-n.start:-1}},expandCoverage:function(i){if(i.format===1)return i.glyphs;for(var e=[],t=i.ranges,n=0;n<t.length;n++)for(var r=t[n],o=r.start,s=r.end,a=o;a<=s;a++)e.push(a);return e}};function Fm(i){km.call(this,i,"gpos")}Fm.prototype=km.prototype;Fm.prototype.init=function(){var i=this.getDefaultScriptName();this.defaultKerningTables=this.getKerningTables(i)};Fm.prototype.getKerningValue=function(i,e,t){for(var n=0;n<i.length;n++)for(var r=i[n].subtables,o=0;o<r.length;o++){var s=r[o],a=this.getCoverageIndex(s.coverage,e);if(!(a<0))switch(s.posFormat){case 1:for(var l=s.pairSets[a],c=0;c<l.length;c++){var d=l[c];if(d.secondGlyph===t)return d.value1&&d.value1.xAdvance||0}break;case 2:var u=this.getGlyphClass(s.classDef1,e),f=this.getGlyphClass(s.classDef2,t),h=s.classRecords[u][f];return h.value1&&h.value1.xAdvance||0}}return 0};Fm.prototype.getKerningTables=function(i,e){if(this.font.tables.gpos)return this.getLookupTables(i,e,"kern",2)};function $r(i){km.call(this,i,"gsub")}function SQ(i,e){var t=i.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(i[n]!==e[n])return!1;return!0}function bD(i,e,t){for(var n=i.subtables,r=0;r<n.length;r++){var o=n[r];if(o.substFormat===e)return o}if(t)return n.push(t),t}$r.prototype=km.prototype;$r.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}};$r.prototype.getSingle=function(i,e,t){for(var n=[],r=this.getLookupTables(e,t,i,1),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++){var l=s[a],c=this.expandCoverage(l.coverage),d=void 0;if(l.substFormat===1){var u=l.deltaGlyphId;for(d=0;d<c.length;d++){var f=c[d];n.push({sub:f,by:f+u})}}else{var h=l.substitute;for(d=0;d<c.length;d++)n.push({sub:c[d],by:h[d]})}}return n};$r.prototype.getMultiple=function(i,e,t){for(var n=[],r=this.getLookupTables(e,t,i,2),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++){var l=s[a],c=this.expandCoverage(l.coverage),d=void 0;for(d=0;d<c.length;d++){var u=c[d],f=l.sequences[d];n.push({sub:u,by:f})}}return n};$r.prototype.getAlternates=function(i,e,t){for(var n=[],r=this.getLookupTables(e,t,i,3),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++)for(var l=s[a],c=this.expandCoverage(l.coverage),d=l.alternateSets,u=0;u<c.length;u++)n.push({sub:c[u],by:d[u]});return n};$r.prototype.getLigatures=function(i,e,t){for(var n=[],r=this.getLookupTables(e,t,i,4),o=0;o<r.length;o++)for(var s=r[o].subtables,a=0;a<s.length;a++)for(var l=s[a],c=this.expandCoverage(l.coverage),d=l.ligatureSets,u=0;u<c.length;u++)for(var f=c[u],h=d[u],p=0;p<h.length;p++){var v=h[p];n.push({sub:[f].concat(v.components),by:v.ligGlyph})}return n};$r.prototype.addSingle=function(i,e,t,n){var r=this.getLookupTables(t,n,i,1,!0)[0],o=bD(r,2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});xt.assert(o.coverage.format===1,"Single: unable to modify coverage table format "+o.coverage.format);var s=e.sub,a=this.binSearch(o.coverage.glyphs,s);a<0&&(a=-1-a,o.coverage.glyphs.splice(a,0,s),o.substitute.splice(a,0,0)),o.substitute[a]=e.by};$r.prototype.addMultiple=function(i,e,t,n){xt.assert(e.by instanceof Array&&e.by.length>1,'Multiple: "by" must be an array of two or more ids');var r=this.getLookupTables(t,n,i,2,!0)[0],o=bD(r,1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});xt.assert(o.coverage.format===1,"Multiple: unable to modify coverage table format "+o.coverage.format);var s=e.sub,a=this.binSearch(o.coverage.glyphs,s);a<0&&(a=-1-a,o.coverage.glyphs.splice(a,0,s),o.sequences.splice(a,0,0)),o.sequences[a]=e.by};$r.prototype.addAlternate=function(i,e,t,n){var r=this.getLookupTables(t,n,i,3,!0)[0],o=bD(r,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});xt.assert(o.coverage.format===1,"Alternate: unable to modify coverage table format "+o.coverage.format);var s=e.sub,a=this.binSearch(o.coverage.glyphs,s);a<0&&(a=-1-a,o.coverage.glyphs.splice(a,0,s),o.alternateSets.splice(a,0,0)),o.alternateSets[a]=e.by};$r.prototype.addLigature=function(i,e,t,n){var r=this.getLookupTables(t,n,i,4,!0)[0],o=r.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},r.subtables[0]=o),xt.assert(o.coverage.format===1,"Ligature: unable to modify coverage table format "+o.coverage.format);var s=e.sub[0],a=e.sub.slice(1),l={ligGlyph:e.by,components:a},c=this.binSearch(o.coverage.glyphs,s);if(c>=0){for(var d=o.ligatureSets[c],u=0;u<d.length;u++)if(SQ(d[u].components,a))return;d.push(l)}else c=-1-c,o.coverage.glyphs.splice(c,0,s),o.ligatureSets.splice(c,0,[l])};$r.prototype.getFeature=function(i,e,t){if(/ss\d\d/.test(i))return this.getSingle(i,e,t);switch(i){case"aalt":case"salt":return this.getSingle(i,e,t).concat(this.getAlternates(i,e,t));case"dlig":case"liga":case"rlig":return this.getLigatures(i,e,t);case"ccmp":return this.getMultiple(i,e,t).concat(this.getLigatures(i,e,t));case"stch":return this.getMultiple(i,e,t)}};$r.prototype.add=function(i,e,t,n){if(/ss\d\d/.test(i))return this.addSingle(i,e,t,n);switch(i){case"aalt":case"salt":return typeof e.by=="number"?this.addSingle(i,e,t,n):this.addAlternate(i,e,t,n);case"dlig":case"liga":case"rlig":return this.addLigature(i,e,t,n);case"ccmp":return e.by instanceof Array?this.addMultiple(i,e,t,n):this.addLigature(i,e,t,n)}};function CQ(){return typeof window<"u"}function wQ(i){for(var e=new Buffer(i.byteLength),t=new Uint8Array(i),n=0;n<e.length;++n)e[n]=t[n];return e}function Dm(i,e){if(!i)throw e}function _U(i,e,t,n,r){var o;return(e&n)>0?(o=i.parseByte(),(e&r)===0&&(o=-o),o=t+o):(e&r)>0?o=t:o=t+i.parseShort(),o}function _B(i,e,t){var n=new Qe.Parser(e,t);i.numberOfContours=n.parseShort(),i._xMin=n.parseShort(),i._yMin=n.parseShort(),i._xMax=n.parseShort(),i._yMax=n.parseShort();var r,o;if(i.numberOfContours>0){for(var s=i.endPointIndices=[],a=0;a<i.numberOfContours;a+=1)s.push(n.parseUShort());i.instructionLength=n.parseUShort(),i.instructions=[];for(var l=0;l<i.instructionLength;l+=1)i.instructions.push(n.parseByte());var c=s[s.length-1]+1;r=[];for(var d=0;d<c;d+=1)if(o=n.parseByte(),r.push(o),(o&8)>0)for(var u=n.parseByte(),f=0;f<u;f+=1)r.push(o),d+=1;if(xt.argument(r.length===c,"Bad flags."),s.length>0){var h=[],p;if(c>0){for(var v=0;v<c;v+=1)o=r[v],p={},p.onCurve=!!(o&1),p.lastPointOfContour=s.indexOf(v)>=0,h.push(p);for(var g=0,m=0;m<c;m+=1)o=r[m],p=h[m],p.x=_U(n,o,g,2,16),g=p.x;for(var b=0,y=0;y<c;y+=1)o=r[y],p=h[y],p.y=_U(n,o,b,4,32),b=p.y}i.points=h}else i.points=[]}else if(i.numberOfContours===0)i.points=[];else{i.isComposite=!0,i.points=[],i.components=[];for(var x=!0;x;){r=n.parseUShort();var _={glyphIndex:n.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(r&1)>0?(r&2)>0?(_.dx=n.parseShort(),_.dy=n.parseShort()):_.matchedPoints=[n.parseUShort(),n.parseUShort()]:(r&2)>0?(_.dx=n.parseChar(),_.dy=n.parseChar()):_.matchedPoints=[n.parseByte(),n.parseByte()],(r&8)>0?_.xScale=_.yScale=n.parseF2Dot14():(r&64)>0?(_.xScale=n.parseF2Dot14(),_.yScale=n.parseF2Dot14()):(r&128)>0&&(_.xScale=n.parseF2Dot14(),_.scale01=n.parseF2Dot14(),_.scale10=n.parseF2Dot14(),_.yScale=n.parseF2Dot14()),i.components.push(_),x=!!(r&32)}if(r&256){i.instructionLength=n.parseUShort(),i.instructions=[];for(var E=0;E<i.instructionLength;E+=1)i.instructions.push(n.parseByte())}}}function KT(i,e){for(var t=[],n=0;n<i.length;n+=1){var r=i[n],o={x:e.xScale*r.x+e.scale01*r.y+e.dx,y:e.scale10*r.x+e.yScale*r.y+e.dy,onCurve:r.onCurve,lastPointOfContour:r.lastPointOfContour};t.push(o)}return t}function EQ(i){for(var e=[],t=[],n=0;n<i.length;n+=1){var r=i[n];t.push(r),r.lastPointOfContour&&(e.push(t),t=[])}return xt.argument(t.length===0,"There are still points left in the current contour."),e}function SB(i){var e=new Xn;if(!i)return e;for(var t=EQ(i),n=0;n<t.length;++n){var r=t[n],o=null,s=r[r.length-1],a=r[0];if(s.onCurve)e.moveTo(s.x,s.y);else if(a.onCurve)e.moveTo(a.x,a.y);else{var l={x:(s.x+a.x)*.5,y:(s.y+a.y)*.5};e.moveTo(l.x,l.y)}for(var c=0;c<r.length;++c)if(o=s,s=a,a=r[(c+1)%r.length],s.onCurve)e.lineTo(s.x,s.y);else{var d=o,u=a;o.onCurve||(d={x:(s.x+o.x)*.5,y:(s.y+o.y)*.5}),a.onCurve||(u={x:(s.x+a.x)*.5,y:(s.y+a.y)*.5}),e.quadraticCurveTo(s.x,s.y,u.x,u.y)}e.closePath()}return e}function CB(i,e){if(e.isComposite)for(var t=0;t<e.components.length;t+=1){var n=e.components[t],r=i.get(n.glyphIndex);if(r.getPath(),r.points){var o=void 0;if(n.matchedPoints===void 0)o=KT(r.points,n);else{if(n.matchedPoints[0]>e.points.length-1||n.matchedPoints[1]>r.points.length-1)throw Error("Matched points out of range in "+e.name);var s=e.points[n.matchedPoints[0]],a=r.points[n.matchedPoints[1]],l={xScale:n.xScale,scale01:n.scale01,scale10:n.scale10,yScale:n.yScale,dx:0,dy:0};a=KT([a],l)[0],l.dx=s.x-a.x,l.dy=s.y-a.y,o=KT(r.points,l)}e.points=e.points.concat(o)}}return SB(e.points)}function MQ(i,e,t,n){for(var r=new js.GlyphSet(n),o=0;o<t.length-1;o+=1){var s=t[o],a=t[o+1];s!==a?r.push(o,js.ttfGlyphLoader(n,o,_B,i,e+s,CB)):r.push(o,js.glyphLoader(n,o))}return r}function TQ(i,e,t,n){var r=new js.GlyphSet(n);return n._push=function(o){var s=t[o],a=t[o+1];s!==a?r.push(o,js.ttfGlyphLoader(n,o,_B,i,e+s,CB)):r.push(o,js.glyphLoader(n,o))},r}function DQ(i,e,t,n,r){return r.lowMemory?TQ(i,e,t,n):MQ(i,e,t,n)}var wB={getPath:SB,parse:DQ},EB,Vd,MB,dD;function TB(i){this.font=i,this.getCommands=function(e){return wB.getPath(e).commands},this._fpgmState=this._prepState=void 0,this._errorState=0}function IQ(i){return i}function DB(i){return Math.sign(i)*Math.round(Math.abs(i))}function PQ(i){return Math.sign(i)*Math.round(Math.abs(i*2))/2}function AQ(i){return Math.sign(i)*(Math.round(Math.abs(i)+.5)-.5)}function OQ(i){return Math.sign(i)*Math.ceil(Math.abs(i))}function RQ(i){return Math.sign(i)*Math.floor(Math.abs(i))}var IB=function(i){var e=this.srPeriod,t=this.srPhase,n=this.srThreshold,r=1;return i<0&&(i=-i,r=-1),i+=n-t,i=Math.trunc(i/e)*e,i+=t,i<0?t*r:i*r},Hs={x:1,y:0,axis:"x",distance:function(i,e,t,n){return(t?i.xo:i.x)-(n?e.xo:e.x)},interpolate:function(i,e,t,n){var r,o,s,a,l,c,d;if(!n||n===this){if(r=i.xo-e.xo,o=i.xo-t.xo,l=e.x-e.xo,c=t.x-t.xo,s=Math.abs(r),a=Math.abs(o),d=s+a,d===0){i.x=i.xo+(l+c)/2;return}i.x=i.xo+(l*a+c*s)/d;return}if(r=n.distance(i,e,!0,!0),o=n.distance(i,t,!0,!0),l=n.distance(e,e,!1,!0),c=n.distance(t,t,!1,!0),s=Math.abs(r),a=Math.abs(o),d=s+a,d===0){Hs.setRelative(i,i,(l+c)/2,n,!0);return}Hs.setRelative(i,i,(l*a+c*s)/d,n,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(i,e,t,n,r){if(!n||n===this){i.x=(r?e.xo:e.x)+t;return}var o=r?e.xo:e.x,s=r?e.yo:e.y,a=o+t*n.x,l=s+t*n.y;i.x=a+(i.y-l)/n.normalSlope},slope:0,touch:function(i){i.xTouched=!0},touched:function(i){return i.xTouched},untouch:function(i){i.xTouched=!1}},Ua={x:0,y:1,axis:"y",distance:function(i,e,t,n){return(t?i.yo:i.y)-(n?e.yo:e.y)},interpolate:function(i,e,t,n){var r,o,s,a,l,c,d;if(!n||n===this){if(r=i.yo-e.yo,o=i.yo-t.yo,l=e.y-e.yo,c=t.y-t.yo,s=Math.abs(r),a=Math.abs(o),d=s+a,d===0){i.y=i.yo+(l+c)/2;return}i.y=i.yo+(l*a+c*s)/d;return}if(r=n.distance(i,e,!0,!0),o=n.distance(i,t,!0,!0),l=n.distance(e,e,!1,!0),c=n.distance(t,t,!1,!0),s=Math.abs(r),a=Math.abs(o),d=s+a,d===0){Ua.setRelative(i,i,(l+c)/2,n,!0);return}Ua.setRelative(i,i,(l*a+c*s)/d,n,!0)},normalSlope:0,setRelative:function(i,e,t,n,r){if(!n||n===this){i.y=(r?e.yo:e.y)+t;return}var o=r?e.xo:e.x,s=r?e.yo:e.y,a=o+t*n.x,l=s+t*n.y;i.y=l+n.normalSlope*(i.x-a)},slope:Number.POSITIVE_INFINITY,touch:function(i){i.yTouched=!0},touched:function(i){return i.yTouched},untouch:function(i){i.yTouched=!1}};Object.freeze(Hs);Object.freeze(Ua);function Nm(i,e){this.x=i,this.y=e,this.axis=void 0,this.slope=e/i,this.normalSlope=-i/e,Object.freeze(this)}Nm.prototype.distance=function(i,e,t,n){return this.x*Hs.distance(i,e,t,n)+this.y*Ua.distance(i,e,t,n)};Nm.prototype.interpolate=function(i,e,t,n){var r,o,s,a,l,c,d;if(s=n.distance(i,e,!0,!0),a=n.distance(i,t,!0,!0),r=n.distance(e,e,!1,!0),o=n.distance(t,t,!1,!0),l=Math.abs(s),c=Math.abs(a),d=l+c,d===0){this.setRelative(i,i,(r+o)/2,n,!0);return}this.setRelative(i,i,(r*c+o*l)/d,n,!0)};Nm.prototype.setRelative=function(i,e,t,n,r){n=n||this;var o=r?e.xo:e.x,s=r?e.yo:e.y,a=o+t*n.x,l=s+t*n.y,c=n.normalSlope,d=this.slope,u=i.x,f=i.y;i.x=(d*u-c*a+l-f)/(d-c),i.y=d*(i.x-u)+f};Nm.prototype.touch=function(i){i.xTouched=!0,i.yTouched=!0};function Lm(i,e){var t=Math.sqrt(i*i+e*e);return i/=t,e/=t,i===1&&e===0?Hs:i===0&&e===1?Ua:new Nm(i,e)}function Ba(i,e,t,n){this.x=this.xo=Math.round(i*64)/64,this.y=this.yo=Math.round(e*64)/64,this.lastPointOfContour=t,this.onCurve=n,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Ba.prototype.nextTouched=function(i){for(var e=this.nextPointOnContour;!i.touched(e)&&e!==this;)e=e.nextPointOnContour;return e};Ba.prototype.prevTouched=function(i){for(var e=this.prevPointOnContour;!i.touched(e)&&e!==this;)e=e.prevPointOnContour;return e};var Rm=Object.freeze(new Ba(0,0)),kQ={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function Yl(i,e){switch(this.env=i,this.stack=[],this.prog=e,i){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=Hs,this.round=DB}}TB.prototype.exec=function(i,e){if(typeof e!="number")throw new Error("Point size is not a number!");if(!(this._errorState>2)){var t=this.font,n=this._prepState;if(!n||n.ppem!==e){var r=this._fpgmState;if(!r){Yl.prototype=kQ,r=this._fpgmState=new Yl("fpgm",t.tables.fpgm),r.funcs=[],r.font=t,exports.DEBUG&&(console.log("---EXEC FPGM---"),r.step=-1);try{Vd(r)}catch(c){console.log("Hinting error in FPGM:"+c),this._errorState=3;return}}Yl.prototype=r,n=this._prepState=new Yl("prep",t.tables.prep),n.ppem=e;var o=t.tables.cvt;if(o)for(var s=n.cvt=new Array(o.length),a=e/t.unitsPerEm,l=0;l<o.length;l++)s[l]=o[l]*a;else n.cvt=[];exports.DEBUG&&(console.log("---EXEC PREP---"),n.step=-1);try{Vd(n)}catch(c){this._errorState<2&&console.log("Hinting error in PREP:"+c),this._errorState=2}}if(!(this._errorState>1))try{return MB(i,n)}catch(c){this._errorState<1&&(console.log("Hinting error:"+c),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}}};MB=function(i,e){var t=e.ppem/e.font.unitsPerEm,n=t,r=i.components,o,s,a;if(Yl.prototype=e,!r)a=new Yl("glyf",i.instructions),exports.DEBUG&&(console.log("---EXEC GLYPH---"),a.step=-1),dD(i,a,t,n),s=a.gZone;else{var l=e.font;s=[],o=[];for(var c=0;c<r.length;c++){var d=r[c],u=l.glyphs.get(d.glyphIndex);a=new Yl("glyf",u.instructions),exports.DEBUG&&(console.log("---EXEC COMP "+c+"---"),a.step=-1),dD(u,a,t,n);for(var f=Math.round(d.dx*t),h=Math.round(d.dy*n),p=a.gZone,v=a.contours,g=0;g<p.length;g++){var m=p[g];m.xTouched=m.yTouched=!1,m.xo=m.x=m.x+f,m.yo=m.y=m.y+h}var b=s.length;s.push.apply(s,p);for(var y=0;y<v.length;y++)o.push(v[y]+b)}i.instructions&&!a.inhibitGridFit&&(a=new Yl("glyf",i.instructions),a.gZone=a.z0=a.z1=a.z2=s,a.contours=o,s.push(new Ba(0,0),new Ba(Math.round(i.advanceWidth*t),0)),exports.DEBUG&&(console.log("---EXEC COMPOSITE---"),a.step=-1),Vd(a),s.length-=2)}return s};dD=function(i,e,t,n){for(var r=i.points||[],o=r.length,s=e.gZone=e.z0=e.z1=e.z2=[],a=e.contours=[],l,c=0;c<o;c++)l=r[c],s[c]=new Ba(l.x*t,l.y*n,l.lastPointOfContour,l.onCurve);for(var d,u,f=0;f<o;f++)l=s[f],d||(d=l,a.push(f)),l.lastPointOfContour?(l.nextPointOnContour=d,d.prevPointOnContour=l,d=void 0):(u=s[f+1],l.nextPointOnContour=u,u.prevPointOnContour=l);if(!e.inhibitGridFit){if(exports.DEBUG){console.log("PROCESSING GLYPH",e.stack);for(var h=0;h<o;h++)console.log(h,s[h].x,s[h].y)}if(s.push(new Ba(0,0),new Ba(Math.round(i.advanceWidth*t),0)),Vd(e),s.length-=2,exports.DEBUG){console.log("FINISHED GLYPH",e.stack);for(var p=0;p<o;p++)console.log(p,s[p].x,s[p].y)}}};Vd=function(i){var e=i.prog;if(e){var t=e.length,n;for(i.ip=0;i.ip<t;i.ip++){if(exports.DEBUG&&i.step++,n=EB[e[i.ip]],!n)throw new Error("unknown instruction: 0x"+Number(e[i.ip]).toString(16));n(i)}}};function qx(i){for(var e=i.tZone=new Array(i.gZone.length),t=0;t<e.length;t++)e[t]=new Ba(0,0)}function PB(i,e){var t=i.prog,n=i.ip,r=1,o;do if(o=t[++n],o===88)r++;else if(o===89)r--;else if(o===64)n+=t[n+1]+1;else if(o===65)n+=2*t[n+1]+1;else if(o>=176&&o<=183)n+=o-176+1;else if(o>=184&&o<=191)n+=(o-184+1)*2;else if(e&&r===1&&o===27)break;while(r>0);i.ip=n}function SU(i,e){exports.DEBUG&&console.log(e.step,"SVTCA["+i.axis+"]"),e.fv=e.pv=e.dpv=i}function CU(i,e){exports.DEBUG&&console.log(e.step,"SPVTCA["+i.axis+"]"),e.pv=e.dpv=i}function wU(i,e){exports.DEBUG&&console.log(e.step,"SFVTCA["+i.axis+"]"),e.fv=i}function EU(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z2[n],s=e.z1[r];exports.DEBUG&&console.log("SPVTL["+i+"]",n,r);var a,l;i?(a=o.y-s.y,l=s.x-o.x):(a=s.x-o.x,l=s.y-o.y),e.pv=e.dpv=Lm(a,l)}function MU(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z2[n],s=e.z1[r];exports.DEBUG&&console.log("SFVTL["+i+"]",n,r);var a,l;i?(a=o.y-s.y,l=s.x-o.x):(a=s.x-o.x,l=s.y-o.y),e.fv=Lm(a,l)}function FQ(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"SPVFS[]",t,n),i.pv=i.dpv=Lm(n,t)}function NQ(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"SPVFS[]",t,n),i.fv=Lm(n,t)}function LQ(i){var e=i.stack,t=i.pv;exports.DEBUG&&console.log(i.step,"GPV[]"),e.push(t.x*16384),e.push(t.y*16384)}function UQ(i){var e=i.stack,t=i.fv;exports.DEBUG&&console.log(i.step,"GFV[]"),e.push(t.x*16384),e.push(t.y*16384)}function BQ(i){i.fv=i.pv,exports.DEBUG&&console.log(i.step,"SFVTPV[]")}function zQ(i){var e=i.stack,t=e.pop(),n=e.pop(),r=e.pop(),o=e.pop(),s=e.pop(),a=i.z0,l=i.z1,c=a[t],d=a[n],u=l[r],f=l[o],h=i.z2[s];exports.DEBUG&&console.log("ISECT[], ",t,n,r,o,s);var p=c.x,v=c.y,g=d.x,m=d.y,b=u.x,y=u.y,x=f.x,_=f.y,E=(p-g)*(y-_)-(v-m)*(b-x),D=p*m-v*g,A=b*_-y*x;h.x=(D*(b-x)-A*(p-g))/E,h.y=(D*(y-_)-A*(v-m))/E}function VQ(i){i.rp0=i.stack.pop(),exports.DEBUG&&console.log(i.step,"SRP0[]",i.rp0)}function GQ(i){i.rp1=i.stack.pop(),exports.DEBUG&&console.log(i.step,"SRP1[]",i.rp1)}function HQ(i){i.rp2=i.stack.pop(),exports.DEBUG&&console.log(i.step,"SRP2[]",i.rp2)}function jQ(i){var e=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"SZP0[]",e),i.zp0=e,e){case 0:i.tZone||qx(i),i.z0=i.tZone;break;case 1:i.z0=i.gZone;break;default:throw new Error("Invalid zone pointer")}}function WQ(i){var e=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"SZP1[]",e),i.zp1=e,e){case 0:i.tZone||qx(i),i.z1=i.tZone;break;case 1:i.z1=i.gZone;break;default:throw new Error("Invalid zone pointer")}}function $Q(i){var e=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"SZP2[]",e),i.zp2=e,e){case 0:i.tZone||qx(i),i.z2=i.tZone;break;case 1:i.z2=i.gZone;break;default:throw new Error("Invalid zone pointer")}}function XQ(i){var e=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"SZPS[]",e),i.zp0=i.zp1=i.zp2=e,e){case 0:i.tZone||qx(i),i.z0=i.z1=i.z2=i.tZone;break;case 1:i.z0=i.z1=i.z2=i.gZone;break;default:throw new Error("Invalid zone pointer")}}function YQ(i){i.loop=i.stack.pop(),exports.DEBUG&&console.log(i.step,"SLOOP[]",i.loop)}function qQ(i){exports.DEBUG&&console.log(i.step,"RTG[]"),i.round=DB}function KQ(i){exports.DEBUG&&console.log(i.step,"RTHG[]"),i.round=AQ}function ZQ(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SMD[]",e),i.minDis=e/64}function JQ(i){exports.DEBUG&&console.log(i.step,"ELSE[]"),PB(i,!1)}function QQ(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"JMPR[]",e),i.ip+=e-1}function eee(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SCVTCI[]",e),i.cvCutIn=e/64}function tee(i){var e=i.stack;exports.DEBUG&&console.log(i.step,"DUP[]"),e.push(e[e.length-1])}function ZT(i){exports.DEBUG&&console.log(i.step,"POP[]"),i.stack.pop()}function nee(i){exports.DEBUG&&console.log(i.step,"CLEAR[]"),i.stack.length=0}function iee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"SWAP[]"),e.push(t),e.push(n)}function ree(i){var e=i.stack;exports.DEBUG&&console.log(i.step,"DEPTH[]"),e.push(e.length)}function oee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"LOOPCALL[]",t,n);var r=i.ip,o=i.prog;i.prog=i.funcs[t];for(var s=0;s<n;s++)Vd(i),exports.DEBUG&&console.log(++i.step,s+1<n?"next loopcall":"done loopcall",s);i.ip=r,i.prog=o}function see(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"CALL[]",e);var t=i.ip,n=i.prog;i.prog=i.funcs[e],Vd(i),i.ip=t,i.prog=n,exports.DEBUG&&console.log(++i.step,"returning from",e)}function aee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"CINDEX[]",t),e.push(e[e.length-t])}function lee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"MINDEX[]",t),e.push(e.splice(e.length-t,1)[0])}function cee(i){if(i.env!=="fpgm")throw new Error("FDEF not allowed here");var e=i.stack,t=i.prog,n=i.ip,r=e.pop(),o=n;for(exports.DEBUG&&console.log(i.step,"FDEF[]",r);t[++n]!==45;);i.ip=n,i.funcs[r]=t.slice(o+1,n)}function TU(i,e){var t=e.stack.pop(),n=e.z0[t],r=e.fv,o=e.pv;exports.DEBUG&&console.log(e.step,"MDAP["+i+"]",t);var s=o.distance(n,Rm);i&&(s=e.round(s)),r.setRelative(n,Rm,s,o),r.touch(n),e.rp0=e.rp1=t}function DU(i,e){var t=e.z2,n=t.length-2,r,o,s;exports.DEBUG&&console.log(e.step,"IUP["+i.axis+"]");for(var a=0;a<n;a++)r=t[a],!i.touched(r)&&(o=r.prevTouched(i),o!==r&&(s=r.nextTouched(i),o===s&&i.setRelative(r,r,i.distance(o,o,!1,!0),i,!0),i.interpolate(r,o,s,i)))}function IU(i,e){for(var t=e.stack,n=i?e.rp1:e.rp2,r=(i?e.z0:e.z1)[n],o=e.fv,s=e.pv,a=e.loop,l=e.z2;a--;){var c=t.pop(),d=l[c],u=s.distance(r,r,!1,!0);o.setRelative(d,d,u,s),o.touch(d),exports.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-a)+": ":"")+"SHP["+(i?"rp1":"rp2")+"]",c)}e.loop=1}function PU(i,e){var t=e.stack,n=i?e.rp1:e.rp2,r=(i?e.z0:e.z1)[n],o=e.fv,s=e.pv,a=t.pop(),l=e.z2[e.contours[a]],c=l;exports.DEBUG&&console.log(e.step,"SHC["+i+"]",a);var d=s.distance(r,r,!1,!0);do c!==r&&o.setRelative(c,c,d,s),c=c.nextPointOnContour;while(c!==l)}function AU(i,e){var t=e.stack,n=i?e.rp1:e.rp2,r=(i?e.z0:e.z1)[n],o=e.fv,s=e.pv,a=t.pop();exports.DEBUG&&console.log(e.step,"SHZ["+i+"]",a);var l;switch(a){case 0:l=e.tZone;break;case 1:l=e.gZone;break;default:throw new Error("Invalid zone")}for(var c,d=s.distance(r,r,!1,!0),u=l.length-2,f=0;f<u;f++)c=l[f],o.setRelative(c,c,d,s)}function dee(i){for(var e=i.stack,t=i.loop,n=i.fv,r=e.pop()/64,o=i.z2;t--;){var s=e.pop(),a=o[s];exports.DEBUG&&console.log(i.step,(i.loop>1?"loop "+(i.loop-t)+": ":"")+"SHPIX[]",s,r),n.setRelative(a,a,r),n.touch(a)}i.loop=1}function uee(i){for(var e=i.stack,t=i.rp1,n=i.rp2,r=i.loop,o=i.z0[t],s=i.z1[n],a=i.fv,l=i.dpv,c=i.z2;r--;){var d=e.pop(),u=c[d];exports.DEBUG&&console.log(i.step,(i.loop>1?"loop "+(i.loop-r)+": ":"")+"IP[]",d,t,"<->",n),a.interpolate(u,o,s,l),a.touch(u)}i.loop=1}function OU(i,e){var t=e.stack,n=t.pop()/64,r=t.pop(),o=e.z1[r],s=e.z0[e.rp0],a=e.fv,l=e.pv;a.setRelative(o,s,n,l),a.touch(o),exports.DEBUG&&console.log(e.step,"MSIRP["+i+"]",n,r),e.rp1=e.rp0,e.rp2=r,i&&(e.rp0=r)}function fee(i){for(var e=i.stack,t=i.rp0,n=i.z0[t],r=i.loop,o=i.fv,s=i.pv,a=i.z1;r--;){var l=e.pop(),c=a[l];exports.DEBUG&&console.log(i.step,(i.loop>1?"loop "+(i.loop-r)+": ":"")+"ALIGNRP[]",l),o.setRelative(c,n,0,s),o.touch(c)}i.loop=1}function hee(i){exports.DEBUG&&console.log(i.step,"RTDG[]"),i.round=PQ}function RU(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z0[r],s=e.fv,a=e.pv,l=e.cvt[n];exports.DEBUG&&console.log(e.step,"MIAP["+i+"]",n,"(",l,")",r);var c=a.distance(o,Rm);i&&(Math.abs(c-l)<e.cvCutIn&&(c=l),c=e.round(c)),s.setRelative(o,Rm,c,a),e.zp0===0&&(o.xo=o.x,o.yo=o.y),s.touch(o),e.rp0=e.rp1=r}function pee(i){var e=i.prog,t=i.ip,n=i.stack,r=e[++t];exports.DEBUG&&console.log(i.step,"NPUSHB[]",r);for(var o=0;o<r;o++)n.push(e[++t]);i.ip=t}function mee(i){var e=i.ip,t=i.prog,n=i.stack,r=t[++e];exports.DEBUG&&console.log(i.step,"NPUSHW[]",r);for(var o=0;o<r;o++){var s=t[++e]<<8|t[++e];s&32768&&(s=-((s^65535)+1)),n.push(s)}i.ip=e}function gee(i){var e=i.stack,t=i.store;t||(t=i.store=[]);var n=e.pop(),r=e.pop();exports.DEBUG&&console.log(i.step,"WS",n,r),t[r]=n}function vee(i){var e=i.stack,t=i.store,n=e.pop();exports.DEBUG&&console.log(i.step,"RS",n);var r=t&&t[n]||0;e.push(r)}function bee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"WCVTP",t,n),i.cvt[n]=t/64}function yee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"RCVT",t),e.push(i.cvt[t]*64)}function kU(i,e){var t=e.stack,n=t.pop(),r=e.z2[n];exports.DEBUG&&console.log(e.step,"GC["+i+"]",n),t.push(e.dpv.distance(r,Rm,i,!1)*64)}function FU(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z1[n],s=e.z0[r],a=e.dpv.distance(s,o,i,i);exports.DEBUG&&console.log(e.step,"MD["+i+"]",n,r,"->",a),e.stack.push(Math.round(a*64))}function xee(i){exports.DEBUG&&console.log(i.step,"MPPEM[]"),i.stack.push(i.ppem)}function _ee(i){exports.DEBUG&&console.log(i.step,"FLIPON[]"),i.autoFlip=!0}function See(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"LT[]",t,n),e.push(n<t?1:0)}function Cee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"LTEQ[]",t,n),e.push(n<=t?1:0)}function wee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"GT[]",t,n),e.push(n>t?1:0)}function Eee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"GTEQ[]",t,n),e.push(n>=t?1:0)}function Mee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"EQ[]",t,n),e.push(t===n?1:0)}function Tee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"NEQ[]",t,n),e.push(t!==n?1:0)}function Dee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"ODD[]",t),e.push(Math.trunc(t)%2?1:0)}function Iee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"EVEN[]",t),e.push(Math.trunc(t)%2?0:1)}function Pee(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"IF[]",e),e||(PB(i,!0),exports.DEBUG&&console.log(i.step,"EIF[]"))}function Aee(i){exports.DEBUG&&console.log(i.step,"EIF[]")}function Oee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"AND[]",t,n),e.push(t&&n?1:0)}function Ree(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"OR[]",t,n),e.push(t||n?1:0)}function kee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"NOT[]",t),e.push(t?0:1)}function JT(i,e){var t=e.stack,n=t.pop(),r=e.fv,o=e.pv,s=e.ppem,a=e.deltaBase+(i-1)*16,l=e.deltaShift,c=e.z0;exports.DEBUG&&console.log(e.step,"DELTAP["+i+"]",n,t);for(var d=0;d<n;d++){var u=t.pop(),f=t.pop(),h=a+((f&240)>>4);if(h===s){var p=(f&15)-8;p>=0&&p++,exports.DEBUG&&console.log(e.step,"DELTAPFIX",u,"by",p*l);var v=c[u];r.setRelative(v,v,p*l,o)}}}function Fee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"SDB[]",t),i.deltaBase=t}function Nee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"SDS[]",t),i.deltaShift=Math.pow(.5,t)}function Lee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"ADD[]",t,n),e.push(n+t)}function Uee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"SUB[]",t,n),e.push(n-t)}function Bee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"DIV[]",t,n),e.push(n*64/t)}function zee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"MUL[]",t,n),e.push(n*t/64)}function Vee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"ABS[]",t),e.push(Math.abs(t))}function Gee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"NEG[]",t),e.push(-t)}function Hee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"FLOOR[]",t),e.push(Math.floor(t/64)*64)}function jee(i){var e=i.stack,t=e.pop();exports.DEBUG&&console.log(i.step,"CEILING[]",t),e.push(Math.ceil(t/64)*64)}function zx(i,e){var t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"ROUND[]"),t.push(e.round(n/64)*64)}function Wee(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"WCVTF[]",t,n),i.cvt[n]=t*i.ppem/i.font.unitsPerEm}function QT(i,e){var t=e.stack,n=t.pop(),r=e.ppem,o=e.deltaBase+(i-1)*16,s=e.deltaShift;exports.DEBUG&&console.log(e.step,"DELTAC["+i+"]",n,t);for(var a=0;a<n;a++){var l=t.pop(),c=t.pop(),d=o+((c&240)>>4);if(d===r){var u=(c&15)-8;u>=0&&u++;var f=u*s;exports.DEBUG&&console.log(e.step,"DELTACFIX",l,"by",f),e.cvt[l]+=f}}}function $ee(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SROUND[]",e),i.round=IB;var t;switch(e&192){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(i.srPeriod=t,e&48){case 0:i.srPhase=0;break;case 16:i.srPhase=.25*t;break;case 32:i.srPhase=.5*t;break;case 48:i.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}e&=15,e===0?i.srThreshold=0:i.srThreshold=(e/8-.5)*t}function Xee(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"S45ROUND[]",e),i.round=IB;var t;switch(e&192){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(i.srPeriod=t,e&48){case 0:i.srPhase=0;break;case 16:i.srPhase=.25*t;break;case 32:i.srPhase=.5*t;break;case 48:i.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}e&=15,e===0?i.srThreshold=0:i.srThreshold=(e/8-.5)*t}function Yee(i){exports.DEBUG&&console.log(i.step,"ROFF[]"),i.round=IQ}function qee(i){exports.DEBUG&&console.log(i.step,"RUTG[]"),i.round=OQ}function Kee(i){exports.DEBUG&&console.log(i.step,"RDTG[]"),i.round=RQ}function Zee(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SCANCTRL[]",e)}function NU(i,e){var t=e.stack,n=t.pop(),r=t.pop(),o=e.z2[n],s=e.z1[r];exports.DEBUG&&console.log(e.step,"SDPVTL["+i+"]",n,r);var a,l;i?(a=o.y-s.y,l=s.x-o.x):(a=s.x-o.x,l=s.y-o.y),e.dpv=Lm(a,l)}function Jee(i){var e=i.stack,t=e.pop(),n=0;exports.DEBUG&&console.log(i.step,"GETINFO[]",t),t&1&&(n=35),t&32&&(n|=4096),e.push(n)}function Qee(i){var e=i.stack,t=e.pop(),n=e.pop(),r=e.pop();exports.DEBUG&&console.log(i.step,"ROLL[]"),e.push(n),e.push(t),e.push(r)}function ete(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"MAX[]",t,n),e.push(Math.max(n,t))}function tte(i){var e=i.stack,t=e.pop(),n=e.pop();exports.DEBUG&&console.log(i.step,"MIN[]",t,n),e.push(Math.min(n,t))}function nte(i){var e=i.stack.pop();exports.DEBUG&&console.log(i.step,"SCANTYPE[]",e)}function ite(i){var e=i.stack.pop(),t=i.stack.pop();switch(exports.DEBUG&&console.log(i.step,"INSTCTRL[]",e,t),e){case 1:i.inhibitGridFit=!!t;return;case 2:i.ignoreCvt=!!t;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Wl(i,e){var t=e.stack,n=e.prog,r=e.ip;exports.DEBUG&&console.log(e.step,"PUSHB["+i+"]");for(var o=0;o<i;o++)t.push(n[++r]);e.ip=r}function $l(i,e){var t=e.ip,n=e.prog,r=e.stack;exports.DEBUG&&console.log(e.ip,"PUSHW["+i+"]");for(var o=0;o<i;o++){var s=n[++t]<<8|n[++t];s&32768&&(s=-((s^65535)+1)),r.push(s)}e.ip=t}function Ze(i,e,t,n,r,o){var s=o.stack,a=i&&s.pop(),l=s.pop(),c=o.rp0,d=o.z0[c],u=o.z1[l],f=o.minDis,h=o.fv,p=o.dpv,v,g,m,b;g=v=p.distance(u,d,!0,!0),m=g>=0?1:-1,g=Math.abs(g),i&&(b=o.cvt[a],n&&Math.abs(g-b)<o.cvCutIn&&(g=b)),t&&g<f&&(g=f),n&&(g=o.round(g)),h.setRelative(u,d,m*g,p),h.touch(u),exports.DEBUG&&console.log(o.step,(i?"MIRP[":"MDRP[")+(e?"M":"m")+(t?">":"_")+(n?"R":"_")+(r===0?"Gr":r===1?"Bl":r===2?"Wh":"")+"]",i?a+"("+o.cvt[a]+","+b+")":"",l,"(d =",v,"->",m*g,")"),o.rp1=o.rp0,o.rp2=l,e&&(o.rp0=l)}EB=[SU.bind(void 0,Ua),SU.bind(void 0,Hs),CU.bind(void 0,Ua),CU.bind(void 0,Hs),wU.bind(void 0,Ua),wU.bind(void 0,Hs),EU.bind(void 0,0),EU.bind(void 0,1),MU.bind(void 0,0),MU.bind(void 0,1),FQ,NQ,LQ,UQ,BQ,zQ,VQ,GQ,HQ,jQ,WQ,$Q,XQ,YQ,qQ,KQ,ZQ,JQ,QQ,eee,void 0,void 0,tee,ZT,nee,iee,ree,aee,lee,void 0,void 0,void 0,oee,see,cee,void 0,TU.bind(void 0,0),TU.bind(void 0,1),DU.bind(void 0,Ua),DU.bind(void 0,Hs),IU.bind(void 0,0),IU.bind(void 0,1),PU.bind(void 0,0),PU.bind(void 0,1),AU.bind(void 0,0),AU.bind(void 0,1),dee,uee,OU.bind(void 0,0),OU.bind(void 0,1),fee,hee,RU.bind(void 0,0),RU.bind(void 0,1),pee,mee,gee,vee,bee,yee,kU.bind(void 0,0),kU.bind(void 0,1),void 0,FU.bind(void 0,0),FU.bind(void 0,1),xee,void 0,_ee,void 0,void 0,See,Cee,wee,Eee,Mee,Tee,Dee,Iee,Pee,Aee,Oee,Ree,kee,JT.bind(void 0,1),Fee,Nee,Lee,Uee,Bee,zee,Vee,Gee,Hee,jee,zx.bind(void 0,0),zx.bind(void 0,1),zx.bind(void 0,2),zx.bind(void 0,3),void 0,void 0,void 0,void 0,Wee,JT.bind(void 0,2),JT.bind(void 0,3),QT.bind(void 0,1),QT.bind(void 0,2),QT.bind(void 0,3),$ee,Xee,void 0,void 0,Yee,void 0,qee,Kee,ZT,ZT,void 0,void 0,void 0,void 0,void 0,Zee,NU.bind(void 0,0),NU.bind(void 0,1),Jee,void 0,Qee,ete,tte,nte,ite,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Wl.bind(void 0,1),Wl.bind(void 0,2),Wl.bind(void 0,3),Wl.bind(void 0,4),Wl.bind(void 0,5),Wl.bind(void 0,6),Wl.bind(void 0,7),Wl.bind(void 0,8),$l.bind(void 0,1),$l.bind(void 0,2),$l.bind(void 0,3),$l.bind(void 0,4),$l.bind(void 0,5),$l.bind(void 0,6),$l.bind(void 0,7),$l.bind(void 0,8),Ze.bind(void 0,0,0,0,0,0),Ze.bind(void 0,0,0,0,0,1),Ze.bind(void 0,0,0,0,0,2),Ze.bind(void 0,0,0,0,0,3),Ze.bind(void 0,0,0,0,1,0),Ze.bind(void 0,0,0,0,1,1),Ze.bind(void 0,0,0,0,1,2),Ze.bind(void 0,0,0,0,1,3),Ze.bind(void 0,0,0,1,0,0),Ze.bind(void 0,0,0,1,0,1),Ze.bind(void 0,0,0,1,0,2),Ze.bind(void 0,0,0,1,0,3),Ze.bind(void 0,0,0,1,1,0),Ze.bind(void 0,0,0,1,1,1),Ze.bind(void 0,0,0,1,1,2),Ze.bind(void 0,0,0,1,1,3),Ze.bind(void 0,0,1,0,0,0),Ze.bind(void 0,0,1,0,0,1),Ze.bind(void 0,0,1,0,0,2),Ze.bind(void 0,0,1,0,0,3),Ze.bind(void 0,0,1,0,1,0),Ze.bind(void 0,0,1,0,1,1),Ze.bind(void 0,0,1,0,1,2),Ze.bind(void 0,0,1,0,1,3),Ze.bind(void 0,0,1,1,0,0),Ze.bind(void 0,0,1,1,0,1),Ze.bind(void 0,0,1,1,0,2),Ze.bind(void 0,0,1,1,0,3),Ze.bind(void 0,0,1,1,1,0),Ze.bind(void 0,0,1,1,1,1),Ze.bind(void 0,0,1,1,1,2),Ze.bind(void 0,0,1,1,1,3),Ze.bind(void 0,1,0,0,0,0),Ze.bind(void 0,1,0,0,0,1),Ze.bind(void 0,1,0,0,0,2),Ze.bind(void 0,1,0,0,0,3),Ze.bind(void 0,1,0,0,1,0),Ze.bind(void 0,1,0,0,1,1),Ze.bind(void 0,1,0,0,1,2),Ze.bind(void 0,1,0,0,1,3),Ze.bind(void 0,1,0,1,0,0),Ze.bind(void 0,1,0,1,0,1),Ze.bind(void 0,1,0,1,0,2),Ze.bind(void 0,1,0,1,0,3),Ze.bind(void 0,1,0,1,1,0),Ze.bind(void 0,1,0,1,1,1),Ze.bind(void 0,1,0,1,1,2),Ze.bind(void 0,1,0,1,1,3),Ze.bind(void 0,1,1,0,0,0),Ze.bind(void 0,1,1,0,0,1),Ze.bind(void 0,1,1,0,0,2),Ze.bind(void 0,1,1,0,0,3),Ze.bind(void 0,1,1,0,1,0),Ze.bind(void 0,1,1,0,1,1),Ze.bind(void 0,1,1,0,1,2),Ze.bind(void 0,1,1,0,1,3),Ze.bind(void 0,1,1,1,0,0),Ze.bind(void 0,1,1,1,0,1),Ze.bind(void 0,1,1,1,0,2),Ze.bind(void 0,1,1,1,0,3),Ze.bind(void 0,1,1,1,1,0),Ze.bind(void 0,1,1,1,1,1),Ze.bind(void 0,1,1,1,1,2),Ze.bind(void 0,1,1,1,1,3)];function ih(i){this.char=i,this.state={},this.activeState=null}function yD(i,e,t){this.contextName=t,this.startIndex=i,this.endOffset=e}function rte(i,e,t){this.contextName=i,this.openRange=null,this.ranges=[],this.checkStart=e,this.checkEnd=t}function ts(i,e){this.context=i,this.index=e,this.length=i.length,this.current=i[e],this.backtrack=i.slice(0,e),this.lookahead=i.slice(e+1)}function Kx(i){this.eventId=i,this.subscribers=[]}function ote(i){var e=this,t=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];t.forEach(function(r){Object.defineProperty(e.events,r,{value:new Kx(r)})}),i&&t.forEach(function(r){var o=i[r];typeof o=="function"&&e.events[r].subscribe(o)});var n=["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"];n.forEach(function(r){e.events[r].subscribe(e.updateContextsRanges)})}function zn(i){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],ote.call(this,i)}ih.prototype.setState=function(i,e){return this.state[i]=e,this.activeState={key:i,value:this.state[i]},this.activeState};ih.prototype.getState=function(i){return this.state[i]||null};zn.prototype.inboundIndex=function(i){return i>=0&&i<this.tokens.length};zn.prototype.composeRUD=function(i){var e=this,t=!0,n=i.map(function(o){return e[o[0]].apply(e,o.slice(1).concat(t))}),r=function(o){return typeof o=="object"&&o.hasOwnProperty("FAIL")};if(n.every(r))return{FAIL:"composeRUD: one or more operations hasn't completed successfully",report:n.filter(r)};this.dispatch("composeRUD",[n.filter(function(o){return!r(o)})])};zn.prototype.replaceRange=function(i,e,t,n){e=e!==null?e:this.tokens.length;var r=t.every(function(s){return s instanceof ih});if(!isNaN(i)&&this.inboundIndex(i)&&r){var o=this.tokens.splice.apply(this.tokens,[i,e].concat(t));return n||this.dispatch("replaceToken",[i,e,t]),[o,t]}else return{FAIL:"replaceRange: invalid tokens or startIndex."}};zn.prototype.replaceToken=function(i,e,t){if(!isNaN(i)&&this.inboundIndex(i)&&e instanceof ih){var n=this.tokens.splice(i,1,e);return t||this.dispatch("replaceToken",[i,e]),[n[0],e]}else return{FAIL:"replaceToken: invalid token or index."}};zn.prototype.removeRange=function(i,e,t){e=isNaN(e)?this.tokens.length:e;var n=this.tokens.splice(i,e);return t||this.dispatch("removeRange",[n,i,e]),n};zn.prototype.removeToken=function(i,e){if(!isNaN(i)&&this.inboundIndex(i)){var t=this.tokens.splice(i,1);return e||this.dispatch("removeToken",[t,i]),t}else return{FAIL:"removeToken: invalid token index."}};zn.prototype.insertToken=function(i,e,t){var n=i.every(function(r){return r instanceof ih});return n?(this.tokens.splice.apply(this.tokens,[e,0].concat(i)),t||this.dispatch("insertToken",[i,e]),i):{FAIL:"insertToken: invalid token(s)."}};zn.prototype.registerModifier=function(i,e,t){this.events.newToken.subscribe(function(n,r){var o=[n,r],s=e===null||e.apply(this,o)===!0,a=[n,r];if(s){var l=t.apply(this,a);n.setState(i,l)}}),this.registeredModifiers.push(i)};Kx.prototype.subscribe=function(i){return typeof i=="function"?this.subscribers.push(i)-1:{FAIL:"invalid '"+this.eventId+"' event handler"}};Kx.prototype.unsubscribe=function(i){this.subscribers.splice(i,1)};ts.prototype.setCurrentIndex=function(i){this.index=i,this.current=this.context[i],this.backtrack=this.context.slice(0,i),this.lookahead=this.context.slice(i+1)};ts.prototype.get=function(i){switch(!0){case i===0:return this.current;case(i<0&&Math.abs(i)<=this.backtrack.length):return this.backtrack.slice(i)[0];case(i>0&&i<=this.lookahead.length):return this.lookahead[i-1];default:return null}};zn.prototype.rangeToText=function(i){if(i instanceof yD)return this.getRangeTokens(i).map(function(e){return e.char}).join("")};zn.prototype.getText=function(){return this.tokens.map(function(i){return i.char}).join("")};zn.prototype.getContext=function(i){var e=this.registeredContexts[i];return e||null};zn.prototype.on=function(i,e){var t=this.events[i];return t?t.subscribe(e):null};zn.prototype.dispatch=function(i,e){var t=this,n=this.events[i];n instanceof Kx&&n.subscribers.forEach(function(r){r.apply(t,e||[])})};zn.prototype.registerContextChecker=function(i,e,t){if(this.getContext(i))return{FAIL:"context name '"+i+"' is already registered."};if(typeof e!="function")return{FAIL:"missing context start check."};if(typeof t!="function")return{FAIL:"missing context end check."};var n=new rte(i,e,t);return this.registeredContexts[i]=n,this.contextCheckers.push(n),n};zn.prototype.getRangeTokens=function(i){var e=i.startIndex+i.endOffset;return[].concat(this.tokens.slice(i.startIndex,e))};zn.prototype.getContextRanges=function(i){var e=this.getContext(i);return e?e.ranges:{FAIL:"context checker '"+i+"' is not registered."}};zn.prototype.resetContextsRanges=function(){var i=this.registeredContexts;for(var e in i)if(i.hasOwnProperty(e)){var t=i[e];t.ranges=[]}};zn.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var i=this.tokens.map(function(n){return n.char}),e=0;e<i.length;e++){var t=new ts(i,e);this.runContextCheck(t)}this.dispatch("updateContextsRanges",[this.registeredContexts])};zn.prototype.setEndOffset=function(i,e){var t=this.getContext(e).openRange.startIndex,n=new yD(t,i,e),r=this.getContext(e).ranges;return n.rangeId=e+"."+r.length,r.push(n),this.getContext(e).openRange=null,n};zn.prototype.runContextCheck=function(i){var e=this,t=i.index;this.contextCheckers.forEach(function(n){var r=n.contextName,o=e.getContext(r).openRange;if(!o&&n.checkStart(i)&&(o=new yD(t,null,r),e.getContext(r).openRange=o,e.dispatch("contextStart",[r,t])),o&&n.checkEnd(i)){var s=t-o.startIndex+1,a=e.setEndOffset(s,r);e.dispatch("contextEnd",[r,a])}})};zn.prototype.tokenize=function(i){this.tokens=[],this.resetContextsRanges();var e=Array.from(i);this.dispatch("start");for(var t=0;t<e.length;t++){var n=e[t],r=new ts(e,t);this.dispatch("next",[r]),this.runContextCheck(r);var o=new ih(n);this.tokens.push(o),this.dispatch("newToken",[o,r])}return this.dispatch("end",[this.tokens]),this.tokens};function ql(i){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(i)}function AB(i){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(i)}function Kl(i){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(i)}function Gx(i){return/[A-z]/.test(i)}function ste(i){return/\s/.test(i)}function Xr(i){this.font=i,this.features={}}function zd(i){this.id=i.id,this.tag=i.tag,this.substitution=i.substitution}function Um(i,e){if(!i)return-1;switch(e.format){case 1:return e.glyphs.indexOf(i);case 2:for(var t=e.ranges,n=0;n<t.length;n++){var r=t[n];if(i>=r.start&&i<=r.end){var o=i-r.start;return r.index+o}}break;default:return-1}return-1}function ate(i,e){var t=Um(i,e.coverage);return t===-1?null:i+e.deltaGlyphId}function lte(i,e){var t=Um(i,e.coverage);return t===-1?null:e.substitute[t]}function eD(i,e){for(var t=[],n=0;n<i.length;n++){var r=i[n],o=e.current;o=Array.isArray(o)?o[0]:o;var s=Um(o,r);s!==-1&&t.push(s)}return t.length!==i.length?-1:t}function cte(i,e){var t=e.inputCoverage.length+e.lookaheadCoverage.length+e.backtrackCoverage.length;if(i.context.length<t)return[];var n=eD(e.inputCoverage,i);if(n===-1)return[];var r=e.inputCoverage.length-1;if(i.lookahead.length<e.lookaheadCoverage.length)return[];for(var o=i.lookahead.slice(r);o.length&&Kl(o[0].char);)o.shift();var s=new ts(o,0),a=eD(e.lookaheadCoverage,s),l=[].concat(i.backtrack);for(l.reverse();l.length&&Kl(l[0].char);)l.shift();if(l.length<e.backtrackCoverage.length)return[];var c=new ts(l,0),d=eD(e.backtrackCoverage,c),u=n.length===e.inputCoverage.length&&a.length===e.lookaheadCoverage.length&&d.length===e.backtrackCoverage.length,f=[];if(u)for(var h=0;h<e.lookupRecords.length;h++)for(var p=e.lookupRecords[h],v=p.lookupListIndex,g=this.getLookupByIndex(v),m=0;m<g.subtables.length;m++){var b=g.subtables[m],y=this.getLookupMethod(g,b),x=this.getSubstitutionType(g,b);if(x==="12")for(var _=0;_<n.length;_++){var E=i.get(_),D=y(E);D&&f.push(D)}}return f}function dte(i,e){var t=i.current,n=Um(t,e.coverage);if(n===-1)return null;for(var r,o=e.ligatureSets[n],s=0;s<o.length;s++){r=o[s];for(var a=0;a<r.components.length;a++){var l=i.lookahead[a],c=r.components[a];if(l!==c)break;if(a===r.components.length-1)return r}}return null}function ute(i,e){var t=Um(i,e.coverage);return t===-1?null:e.sequences[t]}Xr.prototype.getDefaultScriptFeaturesIndexes=function(){for(var i=this.font.tables.gsub.scripts,e=0;e<i.length;e++){var t=i[e];if(t.tag==="DFLT")return t.script.defaultLangSys.featureIndexes}return[]};Xr.prototype.getScriptFeaturesIndexes=function(i){var e=this.font.tables;if(!e.gsub)return[];if(!i)return this.getDefaultScriptFeaturesIndexes();for(var t=this.font.tables.gsub.scripts,n=0;n<t.length;n++){var r=t[n];if(r.tag===i&&r.script.defaultLangSys)return r.script.defaultLangSys.featureIndexes;var o=r.langSysRecords;if(o)for(var s=0;s<o.length;s++){var a=o[s];if(a.tag===i){var l=a.langSys;return l.featureIndexes}}}return this.getDefaultScriptFeaturesIndexes()};Xr.prototype.mapTagsToFeatures=function(i,e){for(var t={},n=0;n<i.length;n++){var r=i[n].tag,o=i[n].feature;t[r]=o}this.features[e].tags=t};Xr.prototype.getScriptFeatures=function(i){var e=this.features[i];if(this.features.hasOwnProperty(i))return e;var t=this.getScriptFeaturesIndexes(i);if(!t)return null;var n=this.font.tables.gsub;return e=t.map(function(r){return n.features[r]}),this.features[i]=e,this.mapTagsToFeatures(e,i),e};Xr.prototype.getSubstitutionType=function(i,e){var t=i.lookupType.toString(),n=e.substFormat.toString();return t+n};Xr.prototype.getLookupMethod=function(i,e){var t=this,n=this.getSubstitutionType(i,e);switch(n){case"11":return function(r){return ate.apply(t,[r,e])};case"12":return function(r){return lte.apply(t,[r,e])};case"63":return function(r){return cte.apply(t,[r,e])};case"41":return function(r){return dte.apply(t,[r,e])};case"21":return function(r){return ute.apply(t,[r,e])};default:throw new Error("lookupType: "+i.lookupType+" - substFormat: "+e.substFormat+" is not yet supported")}};Xr.prototype.lookupFeature=function(i){var e=i.contextParams,t=e.index,n=this.getFeature({tag:i.tag,script:i.script});if(!n)return new Error("font '"+this.font.names.fullName.en+"' doesn't support feature '"+i.tag+"' for script '"+i.script+"'.");for(var r=this.getFeatureLookups(n),o=[].concat(e.context),s=0;s<r.length;s++)for(var a=r[s],l=this.getLookupSubtables(a),c=0;c<l.length;c++){var d=l[c],u=this.getSubstitutionType(a,d),f=this.getLookupMethod(a,d),h=void 0;switch(u){case"11":h=f(e.current),h&&o.splice(t,1,new zd({id:11,tag:i.tag,substitution:h}));break;case"12":h=f(e.current),h&&o.splice(t,1,new zd({id:12,tag:i.tag,substitution:h}));break;case"63":h=f(e),Array.isArray(h)&&h.length&&o.splice(t,1,new zd({id:63,tag:i.tag,substitution:h}));break;case"41":h=f(e),h&&o.splice(t,1,new zd({id:41,tag:i.tag,substitution:h}));break;case"21":h=f(e.current),h&&o.splice(t,1,new zd({id:21,tag:i.tag,substitution:h}));break}e=new ts(o,t),!(Array.isArray(h)&&!h.length)&&(h=null)}return o.length?o:null};Xr.prototype.supports=function(i){if(!i.script)return!1;this.getScriptFeatures(i.script);var e=this.features.hasOwnProperty(i.script);if(!i.tag)return e;var t=this.features[i.script].some(function(n){return n.tag===i.tag});return e&&t};Xr.prototype.getLookupSubtables=function(i){return i.subtables||null};Xr.prototype.getLookupByIndex=function(i){var e=this.font.tables.gsub.lookups;return e[i]||null};Xr.prototype.getFeatureLookups=function(i){return i.lookupListIndexes.map(this.getLookupByIndex.bind(this))};Xr.prototype.getFeature=function(e){if(!this.font)return{FAIL:"No font was found"};this.features.hasOwnProperty(e.script)||this.getScriptFeatures(e.script);var t=this.features[e.script];return t?t.tags[e.tag]?this.features[e.script].tags[e.tag]:null:{FAIL:"No feature for script "+e.script}};function fte(i){var e=i.current,t=i.get(-1);return t===null&&ql(e)||!ql(t)&&ql(e)}function hte(i){var e=i.get(1);return e===null||!ql(e)}var pte={startCheck:fte,endCheck:hte};function mte(i){var e=i.current,t=i.get(-1);return(ql(e)||Kl(e))&&!ql(t)}function gte(i){var e=i.get(1);switch(!0){case e===null:return!0;case(!ql(e)&&!Kl(e)):var t=ste(e);if(!t)return!0;if(t){var n=!1;if(n=i.lookahead.some(function(r){return ql(r)||Kl(r)}),!n)return!0}break;default:return!1}}var vte={startCheck:mte,endCheck:gte};function bte(i,e,t){e[t].setState(i.tag,i.substitution)}function yte(i,e,t){e[t].setState(i.tag,i.substitution)}function xte(i,e,t){i.substitution.forEach(function(n,r){var o=e[t+r];o.setState(i.tag,n)})}function _te(i,e,t){var n=e[t];n.setState(i.tag,i.substitution.ligGlyph);for(var r=i.substitution.components.length,o=0;o<r;o++)n=e[t+o+1],n.setState("deleted",!0)}var LU={11:bte,12:yte,63:xte,41:_te};function xD(i,e,t){i instanceof zd&&LU[i.id]&&LU[i.id](i,e,t)}function Ste(i){for(var e=[].concat(i.backtrack),t=e.length-1;t>=0;t--){var n=e[t],r=AB(n),o=Kl(n);if(!r&&!o)return!0;if(r)return!1}return!1}function Cte(i){if(AB(i.current))return!1;for(var e=0;e<i.lookahead.length;e++){var t=i.lookahead[e],n=Kl(t);if(!n)return!0}return!1}function wte(i){var e=this,t="arab",n=this.featuresTags[t],r=this.tokenizer.getRangeTokens(i);if(r.length!==1){var o=new ts(r.map(function(a){return a.getState("glyphIndex")}),0),s=new ts(r.map(function(a){return a.char}),0);r.forEach(function(a,l){if(!Kl(a.char)){o.setCurrentIndex(l),s.setCurrentIndex(l);var c=0;Ste(s)&&(c|=1),Cte(s)&&(c|=2);var d;switch(c){case 1:d="fina";break;case 2:d="init";break;case 3:d="medi";break}if(n.indexOf(d)!==-1){var u=e.query.lookupFeature({tag:d,script:t,contextParams:o});if(u instanceof Error)return console.info(u.message);u.forEach(function(f,h){f instanceof zd&&(xD(f,r,h),o.context[h]=f.substitution)})}}})}}function UU(i,e){var t=i.map(function(n){return n.activeState.value});return new ts(t,e||0)}function Ete(i){var e=this,t="arab",n=this.tokenizer.getRangeTokens(i),r=UU(n);r.context.forEach(function(o,s){r.setCurrentIndex(s);var a=e.query.lookupFeature({tag:"rlig",script:t,contextParams:r});a.length&&(a.forEach(function(l){return xD(l,n,s)}),r=UU(n))})}function Mte(i){var e=i.current,t=i.get(-1);return t===null&&Gx(e)||!Gx(t)&&Gx(e)}function Tte(i){var e=i.get(1);return e===null||!Gx(e)}var Dte={startCheck:Mte,endCheck:Tte};function BU(i,e){var t=i.map(function(n){return n.activeState.value});return new ts(t,e||0)}function Ite(i){var e=this,t="latn",n=this.tokenizer.getRangeTokens(i),r=BU(n);r.context.forEach(function(o,s){r.setCurrentIndex(s);var a=e.query.lookupFeature({tag:"liga",script:t,contextParams:r});a.length&&(a.forEach(function(l){return xD(l,n,s)}),r=BU(n))})}function rs(i){this.baseDir=i||"ltr",this.tokenizer=new zn,this.featuresTags={}}rs.prototype.setText=function(i){this.text=i};rs.prototype.contextChecks={latinWordCheck:Dte,arabicWordCheck:pte,arabicSentenceCheck:vte};function tD(i){var e=this.contextChecks[i+"Check"];return this.tokenizer.registerContextChecker(i,e.startCheck,e.endCheck)}function Pte(){return tD.call(this,"latinWord"),tD.call(this,"arabicWord"),tD.call(this,"arabicSentence"),this.tokenizer.tokenize(this.text)}function Ate(){var i=this,e=this.tokenizer.getContextRanges("arabicSentence");e.forEach(function(t){var n=i.tokenizer.getRangeTokens(t);i.tokenizer.replaceRange(t.startIndex,t.endOffset,n.reverse())})}rs.prototype.registerFeatures=function(i,e){var t=this,n=e.filter(function(r){return t.query.supports({script:i,tag:r})});this.featuresTags.hasOwnProperty(i)?this.featuresTags[i]=this.featuresTags[i].concat(n):this.featuresTags[i]=n};rs.prototype.applyFeatures=function(i,e){if(!i)throw new Error("No valid font was provided to apply features");this.query||(this.query=new Xr(i));for(var t=0;t<e.length;t++){var n=e[t];this.query.supports({script:n.script})&&this.registerFeatures(n.script,n.tags)}};rs.prototype.registerModifier=function(i,e,t){this.tokenizer.registerModifier(i,e,t)};function _D(){if(this.tokenizer.registeredModifiers.indexOf("glyphIndex")===-1)throw new Error("glyphIndex modifier is required to apply arabic presentation features.")}function Ote(){var i=this,e="arab";if(this.featuresTags.hasOwnProperty(e)){_D.call(this);var t=this.tokenizer.getContextRanges("arabicWord");t.forEach(function(n){wte.call(i,n)})}}function Rte(){var i=this,e="arab";if(this.featuresTags.hasOwnProperty(e)){var t=this.featuresTags[e];if(t.indexOf("rlig")!==-1){_D.call(this);var n=this.tokenizer.getContextRanges("arabicWord");n.forEach(function(r){Ete.call(i,r)})}}}function kte(){var i=this,e="latn";if(this.featuresTags.hasOwnProperty(e)){var t=this.featuresTags[e];if(t.indexOf("liga")!==-1){_D.call(this);var n=this.tokenizer.getContextRanges("latinWord");n.forEach(function(r){Ite.call(i,r)})}}}rs.prototype.checkContextReady=function(i){return!!this.tokenizer.getContext(i)};rs.prototype.applyFeaturesToContexts=function(){this.checkContextReady("arabicWord")&&(Ote.call(this),Rte.call(this)),this.checkContextReady("latinWord")&&kte.call(this),this.checkContextReady("arabicSentence")&&Ate.call(this)};rs.prototype.processText=function(i){(!this.text||this.text!==i)&&(this.setText(i),Pte.call(this),this.applyFeaturesToContexts())};rs.prototype.getBidiText=function(i){return this.processText(i),this.tokenizer.getText()};rs.prototype.getTextGlyphs=function(i){this.processText(i);for(var e=[],t=0;t<this.tokenizer.tokens.length;t++){var n=this.tokenizer.tokens[t];if(!n.state.deleted){var r=n.activeState.value;e.push(Array.isArray(r)?r[0]:r)}}return e};function xn(i){i=i||{},i.tables=i.tables||{},i.empty||(Dm(i.familyName,"When creating a new Font object, familyName is required."),Dm(i.styleName,"When creating a new Font object, styleName is required."),Dm(i.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Dm(i.ascender,"When creating a new Font object, ascender is required."),Dm(i.descender<=0,"When creating a new Font object, negative descender value is required."),this.names={fontFamily:{en:i.familyName||" "},fontSubfamily:{en:i.styleName||" "},fullName:{en:i.fullName||i.familyName+" "+i.styleName},postScriptName:{en:i.postScriptName||(i.familyName+i.styleName).replace(/\s/g,"")},designer:{en:i.designer||" "},designerURL:{en:i.designerURL||" "},manufacturer:{en:i.manufacturer||" "},manufacturerURL:{en:i.manufacturerURL||" "},license:{en:i.license||" "},licenseURL:{en:i.licenseURL||" "},version:{en:i.version||"Version 0.1"},description:{en:i.description||" "},copyright:{en:i.copyright||" "},trademark:{en:i.trademark||" "}},this.unitsPerEm=i.unitsPerEm||1e3,this.ascender=i.ascender,this.descender=i.descender,this.createdTimestamp=i.createdTimestamp,this.tables=Object.assign(i.tables,{os2:Object.assign({usWeightClass:i.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:i.widthClass||this.usWidthClasses.MEDIUM,fsSelection:i.fsSelection||this.fsSelectionValues.REGULAR},i.tables.os2)})),this.supported=!0,this.glyphs=new js.GlyphSet(this,i.glyphs||[]),this.encoding=new KU(this),this.position=new Fm(this),this.substitution=new $r(this),this.tables=this.tables||{},this._push=null,this._hmtxTableData={},Object.defineProperty(this,"hinting",{get:function(){if(this._hinting)return this._hinting;if(this.outlinesFormat==="truetype")return this._hinting=new TB(this)}})}xn.prototype.hasChar=function(i){return this.encoding.charToGlyphIndex(i)!==null};xn.prototype.charToGlyphIndex=function(i){return this.encoding.charToGlyphIndex(i)};xn.prototype.charToGlyph=function(i){var e=this.charToGlyphIndex(i),t=this.glyphs.get(e);return t||(t=this.glyphs.get(0)),t};xn.prototype.updateFeatures=function(i){return this.defaultRenderOptions.features.map(function(e){return e.script==="latn"?{script:"latn",tags:e.tags.filter(function(t){return i[t]})}:e})};xn.prototype.stringToGlyphs=function(i,e){var t=this,n=new rs,r=function(u){return t.charToGlyphIndex(u.char)};n.registerModifier("glyphIndex",null,r);var o=e?this.updateFeatures(e.features):this.defaultRenderOptions.features;n.applyFeatures(this,o);for(var s=n.getTextGlyphs(i),a=s.length,l=new Array(a),c=this.glyphs.get(0),d=0;d<a;d+=1)l[d]=this.glyphs.get(s[d])||c;return l};xn.prototype.nameToGlyphIndex=function(i){return this.glyphNames.nameToGlyphIndex(i)};xn.prototype.nameToGlyph=function(i){var e=this.nameToGlyphIndex(i),t=this.glyphs.get(e);return t||(t=this.glyphs.get(0)),t};xn.prototype.glyphIndexToName=function(i){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(i):""};xn.prototype.getKerningValue=function(i,e){i=i.index||i,e=e.index||e;var t=this.position.defaultKerningTables;return t?this.position.getKerningValue(t,i,e):this.kerningPairs[i+","+e]||0};xn.prototype.defaultRenderOptions={kerning:!0,features:[{script:"arab",tags:["init","medi","fina","rlig"]},{script:"latn",tags:["liga","rlig"]}]};xn.prototype.forEachGlyph=function(i,e,t,n,r,o){e=e!==void 0?e:0,t=t!==void 0?t:0,n=n!==void 0?n:72,r=Object.assign({},this.defaultRenderOptions,r);var s=1/this.unitsPerEm*n,a=this.stringToGlyphs(i,r),l;if(r.kerning){var c=r.script||this.position.getDefaultScriptName();l=this.position.getKerningTables(c,r.language)}for(var d=0;d<a.length;d+=1){var u=a[d];if(o.call(this,u,e,t,n,r),u.advanceWidth&&(e+=u.advanceWidth*s),r.kerning&&d<a.length-1){var f=l?this.position.getKerningValue(l,u.index,a[d+1].index):this.getKerningValue(u,a[d+1]);e+=f*s}r.letterSpacing?e+=r.letterSpacing*n:r.tracking&&(e+=r.tracking/1e3*n)}return e};xn.prototype.getPath=function(i,e,t,n,r){var o=new Xn;return this.forEachGlyph(i,e,t,n,r,function(s,a,l,c){var d=s.getPath(a,l,c,r,this);o.extend(d)}),o};xn.prototype.getPaths=function(i,e,t,n,r){var o=[];return this.forEachGlyph(i,e,t,n,r,function(s,a,l,c){var d=s.getPath(a,l,c,r,this);o.push(d)}),o};xn.prototype.getAdvanceWidth=function(i,e,t){return this.forEachGlyph(i,0,0,e,t,function(){})};xn.prototype.draw=function(i,e,t,n,r,o){this.getPath(e,t,n,r,o).draw(i)};xn.prototype.drawPoints=function(i,e,t,n,r,o){this.forEachGlyph(e,t,n,r,o,function(s,a,l,c){s.drawPoints(i,a,l,c)})};xn.prototype.drawMetrics=function(i,e,t,n,r,o){this.forEachGlyph(e,t,n,r,o,function(s,a,l,c){s.drawMetrics(i,a,l,c)})};xn.prototype.getEnglishName=function(i){var e=this.names[i];if(e)return e.en};xn.prototype.validate=function(){var i=this;function e(n,r){}function t(n){var r=i.getEnglishName(n);r&&r.trim().length>0}t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),this.unitsPerEm>0};xn.prototype.toTables=function(){return _Q.fontToTable(this)};xn.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()};xn.prototype.toArrayBuffer=function(){for(var i=this.toTables(),e=i.encode(),t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0;r<e.length;r++)n[r]=e[r];return t};xn.prototype.download=function(i){var e=this.getEnglishName("fontFamily"),t=this.getEnglishName("fontSubfamily");i=i||e.replace(/\s/g,"")+"-"+t+".otf";var n=this.toArrayBuffer();if(CQ())if(window.URL=window.URL||window.webkitURL,window.URL){var r=new DataView(n),o=new Blob([r],{type:"font/opentype"}),s=document.createElement("a");s.href=window.URL.createObjectURL(o),s.download=i;var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!1),s.dispatchEvent(a)}else console.warn("Font file could not be downloaded. Try using a different browser.");else{var l=tU(),c=wQ(n);l.writeFileSync(i,c)}};xn.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512};xn.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9};xn.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};function OB(i,e){var t=JSON.stringify(i),n=256;for(var r in e){var o=parseInt(r);if(!(!o||o<256)){if(JSON.stringify(e[r])===t)return o;n<=o&&(n=o+1)}}return e[n]=i,n}function Fte(i,e,t){var n=OB(e.name,t);return[{name:"tag_"+i,type:"TAG",value:e.tag},{name:"minValue_"+i,type:"FIXED",value:e.minValue<<16},{name:"defaultValue_"+i,type:"FIXED",value:e.defaultValue<<16},{name:"maxValue_"+i,type:"FIXED",value:e.maxValue<<16},{name:"flags_"+i,type:"USHORT",value:0},{name:"nameID_"+i,type:"USHORT",value:n}]}function Nte(i,e,t){var n={},r=new Qe.Parser(i,e);return n.tag=r.parseTag(),n.minValue=r.parseFixed(),n.defaultValue=r.parseFixed(),n.maxValue=r.parseFixed(),r.skip("uShort",1),n.name=t[r.parseUShort()]||{},n}function Lte(i,e,t,n){for(var r=OB(e.name,n),o=[{name:"nameID_"+i,type:"USHORT",value:r},{name:"flags_"+i,type:"USHORT",value:0}],s=0;s<t.length;++s){var a=t[s].tag;o.push({name:"axis_"+i+" "+a,type:"FIXED",value:e.coordinates[a]<<16})}return o}function Ute(i,e,t,n){var r={},o=new Qe.Parser(i,e);r.name=n[o.parseUShort()]||{},o.skip("uShort",1),r.coordinates={};for(var s=0;s<t.length;++s)r.coordinates[t[s].tag]=o.parseFixed();return r}function Bte(i,e){var t=new je.Table("fvar",[{name:"version",type:"ULONG",value:65536},{name:"offsetToData",type:"USHORT",value:0},{name:"countSizePairs",type:"USHORT",value:2},{name:"axisCount",type:"USHORT",value:i.axes.length},{name:"axisSize",type:"USHORT",value:20},{name:"instanceCount",type:"USHORT",value:i.instances.length},{name:"instanceSize",type:"USHORT",value:4+i.axes.length*4}]);t.offsetToData=t.sizeOf();for(var n=0;n<i.axes.length;n++)t.fields=t.fields.concat(Fte(n,i.axes[n],e));for(var r=0;r<i.instances.length;r++)t.fields=t.fields.concat(Lte(r,i.instances[r],i.axes,e));return t}function zte(i,e,t){var n=new Qe.Parser(i,e),r=n.parseULong();xt.argument(r===65536,"Unsupported fvar table version.");var o=n.parseOffset16();n.skip("uShort",1);for(var s=n.parseUShort(),a=n.parseUShort(),l=n.parseUShort(),c=n.parseUShort(),d=[],u=0;u<s;u++)d.push(Nte(i,e+o+u*a,t));for(var f=[],h=e+o+s*a,p=0;p<l;p++)f.push(Ute(i,h+p*c,d,t));return{axes:d,instances:f}}var Vte={make:Bte,parse:zte},Gte=function(){return{coverage:this.parsePointer(se.coverage),attachPoints:this.parseList(se.pointer(se.uShortList))}},Hte=function(){var i=this.parseUShort();if(xt.argument(i===1||i===2||i===3,"Unsupported CaretValue table version."),i===1)return{coordinate:this.parseShort()};if(i===2)return{pointindex:this.parseShort()};if(i===3)return{coordinate:this.parseShort()}},jte=function(){return this.parseList(se.pointer(Hte))},Wte=function(){return{coverage:this.parsePointer(se.coverage),ligGlyphs:this.parseList(se.pointer(jte))}},$te=function(){return this.parseUShort(),this.parseList(se.pointer(se.coverage))};function Xte(i,e){e=e||0;var t=new se(i,e),n=t.parseVersion(1);xt.argument(n===1||n===1.2||n===1.3,"Unsupported GDEF table version.");var r={version:n,classDef:t.parsePointer(se.classDef),attachList:t.parsePointer(Gte),ligCaretList:t.parsePointer(Wte),markAttachClassDef:t.parsePointer(se.classDef)};return n>=1.2&&(r.markGlyphSets=t.parsePointer($te)),r}var Yte={parse:Xte},ns=new Array(10);ns[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();if(t===1)return{posFormat:1,coverage:this.parsePointer(se.coverage),value:this.parseValueRecord()};if(t===2)return{posFormat:2,coverage:this.parsePointer(se.coverage),values:this.parseValueRecordList()};xt.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")};ns[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();xt.assert(t===1||t===2,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var n=this.parsePointer(se.coverage),r=this.parseUShort(),o=this.parseUShort();if(t===1)return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:o,pairSets:this.parseList(se.pointer(se.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(r),value2:this.parseValueRecord(o)}})))};if(t===2){var s=this.parsePointer(se.classDef),a=this.parsePointer(se.classDef),l=this.parseUShort(),c=this.parseUShort();return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:o,classDef1:s,classDef2:a,class1Count:l,class2Count:c,classRecords:this.parseList(l,se.list(c,function(){return{value1:this.parseValueRecord(r),value2:this.parseValueRecord(o)}}))}}};ns[3]=function(){return{error:"GPOS Lookup 3 not supported"}};ns[4]=function(){return{error:"GPOS Lookup 4 not supported"}};ns[5]=function(){return{error:"GPOS Lookup 5 not supported"}};ns[6]=function(){return{error:"GPOS Lookup 6 not supported"}};ns[7]=function(){return{error:"GPOS Lookup 7 not supported"}};ns[8]=function(){return{error:"GPOS Lookup 8 not supported"}};ns[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function qte(i,e){e=e||0;var t=new se(i,e),n=t.parseVersion(1);return xt.argument(n===1||n===1.1,"Unsupported GPOS table version "+n),n===1?{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(ns)}:{version:n,scripts:t.parseScriptList(),features:t.parseFeatureList(),lookups:t.parseLookupList(ns),variations:t.parseFeatureVariationsList()}}var Kte=new Array(10);function Zte(i){return new je.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new je.ScriptList(i.scripts)},{name:"features",type:"TABLE",value:new je.FeatureList(i.features)},{name:"lookups",type:"TABLE",value:new je.LookupList(i.lookups,Kte)}])}var Jte={parse:qte,make:Zte};function Qte(i){var e={};i.skip("uShort");var t=i.parseUShort();xt.argument(t===0,"Unsupported kern sub-table version."),i.skip("uShort",2);var n=i.parseUShort();i.skip("uShort",3);for(var r=0;r<n;r+=1){var o=i.parseUShort(),s=i.parseUShort(),a=i.parseShort();e[o+","+s]=a}return e}function ene(i){var e={};i.skip("uShort");var t=i.parseULong();t>1&&console.warn("Only the first kern subtable is supported."),i.skip("uLong");var n=i.parseUShort(),r=n&255;if(i.skip("uShort"),r===0){var o=i.parseUShort();i.skip("uShort",3);for(var s=0;s<o;s+=1){var a=i.parseUShort(),l=i.parseUShort(),c=i.parseShort();e[a+","+l]=c}}return e}function tne(i,e){var t=new Qe.Parser(i,e),n=t.parseUShort();if(n===0)return Qte(t);if(n===1)return ene(t);throw new Error("Unsupported kern table version ("+n+").")}var nne={parse:tne};function ine(i,e,t,n){for(var r=new Qe.Parser(i,e),o=n?r.parseUShort:r.parseULong,s=[],a=0;a<t+1;a+=1){var l=o.call(r);n&&(l*=2),s.push(l)}return s}var rne={parse:ine};function zU(i,e){for(var t=[],n=12,r=0;r<e;r+=1){var o=Qe.getTag(i,n),s=Qe.getULong(i,n+4),a=Qe.getULong(i,n+8),l=Qe.getULong(i,n+12);t.push({tag:o,checksum:s,offset:a,length:l,compression:!1}),n+=16}return t}function one(i,e){for(var t=[],n=44,r=0;r<e;r+=1){var o=Qe.getTag(i,n),s=Qe.getULong(i,n+4),a=Qe.getULong(i,n+8),l=Qe.getULong(i,n+12),c=void 0;a<l?c="WOFF":c=!1,t.push({tag:o,offset:s,compression:c,compressedLength:a,length:l}),n+=20}return t}function $n(i,e){if(e.compression==="WOFF"){var t=new Uint8Array(i.buffer,e.offset+2,e.compressedLength-2),n=new Uint8Array(e.length);if(JZ(t,n),n.byteLength!==e.length)throw new Error("Decompression error: "+e.tag+" decompressed length doesn't match recorded length");var r=new DataView(n.buffer,0);return{data:r,offset:0}}else return{data:i,offset:e.offset}}function RB(i,e){e=e??{};var t,n,r=new xn({empty:!0}),o=new DataView(i,0),s,a=[],l=Qe.getTag(o,0);if(l==="\0\0\0"||l==="true"||l==="typ1")r.outlinesFormat="truetype",s=Qe.getUShort(o,4),a=zU(o,s);else if(l==="OTTO")r.outlinesFormat="cff",s=Qe.getUShort(o,4),a=zU(o,s);else if(l==="wOFF"){var c=Qe.getTag(o,4);if(c==="\0\0\0")r.outlinesFormat="truetype";else if(c==="OTTO")r.outlinesFormat="cff";else throw new Error("Unsupported OpenType flavor "+l);s=Qe.getUShort(o,12),a=one(o,s)}else throw new Error("Unsupported OpenType signature "+l);for(var d,u,f,h,p,v,g,m,b,y,x,_,E=0;E<s;E+=1){var D=a[E],A=void 0;switch(D.tag){case"cmap":A=$n(o,D),r.tables.cmap=qU.parse(A.data,A.offset),r.encoding=new ZU(r.tables.cmap);break;case"cvt ":A=$n(o,D),_=new Qe.Parser(A.data,A.offset),r.tables.cvt=_.parseShortList(D.length/2);break;case"fvar":u=D;break;case"fpgm":A=$n(o,D),_=new Qe.Parser(A.data,A.offset),r.tables.fpgm=_.parseByteList(D.length);break;case"head":A=$n(o,D),r.tables.head=aB.parse(A.data,A.offset),r.unitsPerEm=r.tables.head.unitsPerEm,t=r.tables.head.indexToLocFormat;break;case"hhea":A=$n(o,D),r.tables.hhea=lB.parse(A.data,A.offset),r.ascender=r.tables.hhea.ascender,r.descender=r.tables.hhea.descender,r.numberOfHMetrics=r.tables.hhea.numberOfHMetrics;break;case"hmtx":g=D;break;case"ltag":A=$n(o,D),n=dB.parse(A.data,A.offset);break;case"maxp":A=$n(o,D),r.tables.maxp=uB.parse(A.data,A.offset),r.numGlyphs=r.tables.maxp.numGlyphs;break;case"name":y=D;break;case"OS/2":A=$n(o,D),r.tables.os2=cD.parse(A.data,A.offset);break;case"post":A=$n(o,D),r.tables.post=vB.parse(A.data,A.offset),r.glyphNames=new mD(r.tables.post);break;case"prep":A=$n(o,D),_=new Qe.Parser(A.data,A.offset),r.tables.prep=_.parseByteList(D.length);break;case"glyf":f=D;break;case"loca":b=D;break;case"CFF ":d=D;break;case"kern":m=D;break;case"GDEF":h=D;break;case"GPOS":p=D;break;case"GSUB":v=D;break;case"meta":x=D;break}}var S=$n(o,y);if(r.tables.name=gB.parse(S.data,S.offset,n),r.names=r.tables.name,f&&b){var I=t===0,L=$n(o,b),H=rne.parse(L.data,L.offset,r.numGlyphs,I),z=$n(o,f);r.glyphs=wB.parse(z.data,z.offset,H,r,e)}else if(d){var X=$n(o,d);sB.parse(X.data,X.offset,r,e)}else throw new Error("Font doesn't contain TrueType or CFF outlines.");var q=$n(o,g);if(cB.parse(r,q.data,q.offset,r.numberOfHMetrics,r.numGlyphs,r.glyphs,e),yJ(r,e),m){var K=$n(o,m);r.kerningPairs=nne.parse(K.data,K.offset)}else r.kerningPairs={};if(h){var j=$n(o,h);r.tables.gdef=Yte.parse(j.data,j.offset)}if(p){var te=$n(o,p);r.tables.gpos=Jte.parse(te.data,te.offset),r.position.init()}if(v){var ye=$n(o,v);r.tables.gsub=bB.parse(ye.data,ye.offset)}if(u){var xe=$n(o,u);r.tables.fvar=Vte.parse(xe.data,xe.offset,r.names)}if(x){var Ce=$n(o,x);r.tables.meta=yB.parse(Ce.data,Ce.offset),r.metas=r.tables.meta}return r}var pr="Custom Font";var Zx=class i{constructor(e){this.customizerState=e}queueFontFaceLoad(e,t){if(!t.isBrowser()||!t.fontSourceMap()[e]||t.fontFacesReady().has(e))return;let r=t.fontFacePromises().get(e);if(!r){if(r=this.ensureFontFaceLoaded(e,t),!r)return;t.fontFacePromises.update(o=>{let s=new Map(o);return s.set(e,r),s})}r.then(()=>{t.fontFacesReady().has(e)||(t.fontFacesReady.update(o=>{let s=new Set(o);return s.add(e),s}),this.customizerState.refreshFabricOverlays())}).catch(o=>{console.error(Px(e),o)})}createFontLabelFromFileName(e){let n=e.replace(/\.[^.]+$/,"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim();return n?n.split(" ").filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):pr}createUniqueFontFamilyName(e,t){let n=e.trim()||pr,r=n,o=2;for(;t.fontSourceMap()[r];)r=`${n} ${o}`,o+=1;return r}async resolveOpentypeFont(e,t){let n=this.resolveOverlayFontFamily(e,t),r=await this.getOpentypeFont(n,t);return r||(n===t.defaultFontFamily()?null:this.getOpentypeFont(t.defaultFontFamily(),t))}ensureFontFaceLoaded(e,t){return!t.isBrowser()||!t.fontSourceMap()[e]?void 0:this.getFontBinary(e,t).then(o=>!o||typeof FontFace>"u"||typeof document>"u"?void 0:new FontFace(e,o).load().then(a=>{document.fonts.add(a)})).catch(o=>{console.error(N3(e),o)})}getFontBinary(e,t){if(!t.isBrowser())return Promise.resolve(null);let n=t.fontSourceMap()[e];if(!n)return Promise.resolve(null);if(n instanceof ArrayBuffer)return t.fontBinaryPromises().has(e)||t.fontBinaryPromises.update(r=>{let o=new Map(r);return o.set(e,Promise.resolve(n.slice(0))),o}),t.fontBinaryPromises().get(e);if(!t.fontBinaryPromises().has(e)){let r=fetch(n).then(o=>{if(!o.ok)throw new Error(`Font download failed (${o.status})`);return o.arrayBuffer()}).catch(o=>(console.error(L3(e),o),null));t.fontBinaryPromises.update(o=>{let s=new Map(o);return s.set(e,r),s})}return t.fontBinaryPromises().get(e)}getOpentypeFont(e,t){if(!t.fontSourceMap()[e])return Promise.resolve(null);if(!t.fontOutlinePromises().has(e)){let r=this.getFontBinary(e,t).then(o=>{if(!o||this.readSignature(o)==="wOF2")return null;try{return RB(o.slice(0))}catch(a){return console.error(U3(e),a),null}});t.fontOutlinePromises.update(o=>{let s=new Map(o);return s.set(e,r),s})}return t.fontOutlinePromises().get(e)}resolveOverlayFontFamily(e,t){let n=e.fontFamily?.trim();return n&&t.fontSourceMap()[n]?n:t.defaultFontFamily()}readSignature(e){let t=new Uint8Array(e,0,4);return String.fromCharCode(t[0],t[1],t[2],t[3])}static \u0275fac=function(t){return new(t||i)(Xe(Bn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Jx=class i{constructor(e){this.customizerState=e}async computeTextGlyphPlan(e,t){let n=t.font;if(!n)return null;let r=n.stringToGlyphs(e.text);if(!r.length)return null;let o=t.letterSpacing,s=n.unitsPerEm||1e3,a=e.fontSize/s,l=r.map(p=>(p.advanceWidth??s*.5)*a),d=l.reduce((p,v)=>p+v,0)+o*Math.max(0,r.length-1),u=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,h=-d/2;return r.forEach((p,v)=>{let m=p.getPath(h,0,e.fontSize).getBoundingBox();Number.isFinite(m.y1)&&Number.isFinite(m.y2)&&(u=Math.min(u,m.y1),f=Math.max(f,m.y2)),h+=l[v]+o}),(!Number.isFinite(u)||!Number.isFinite(f))&&(u=-e.fontSize*.5,f=e.fontSize*.5),{glyphs:r,advances:l,totalWidth:d,minY:u,maxY:f,letterSpacing:o}}buildTextLayoutFromPlan(e,t,n){if(n.shouldApplyWarp){let h=this.buildWarpedTextLayout(e,t,n);if(h.length>0)return h}let r=t.letterSpacing,o=t.totalWidth||0,s=t.glyphs,a=t.advances,l=[],c=(t.minY+t.maxY)/2,d=0,u=n.curveControlY,f={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY};if(s.forEach((h,p)=>{let v=a[p]??0,g=d+v/2,m=o===0?0:g/o,b=this.computeGlyphCurvePoint(m,o,u),y=h.getPath(-v/2,0,e.fontSize),x=y.getBoundingBox(),_={d:y.toPathData(3),x:b.x-o/2,y:b.y-c,angle:b.angle};this.expandCurvedLayoutBounds(f,x,_),l.push(_),d+=v+r}),l.length>0&&Number.isFinite(f.minX)&&Number.isFinite(f.minY)){let h=(f.minX+f.maxX)/2,p=(f.minY+f.maxY)/2;l.forEach(v=>{v.x-=h,v.y-=p})}return l}buildWarpedTextLayout(e,t,n){let r=n.textWarpEnvelope;if(!r||t.glyphs.length===0)return[];let o=t.letterSpacing,s=t.totalWidth||0,a=Math.max(e.fontSize*Math.max(t.glyphs.length,1),1),l=s>0?s:a,c=Math.max(t.maxY-t.minY,e.fontSize||1),d=[],u={minX:Number.POSITIVE_INFINITY,minY:Number.POSITIVE_INFINITY,maxX:Number.NEGATIVE_INFINITY,maxY:Number.NEGATIVE_INFINITY},f=0;if(t.glyphs.forEach((b,y)=>{b.getPath(f,0,e.fontSize).commands.forEach(_=>{let E=this.warpPathCommand(_,t,r,l,c,n);E&&(d.push(E),this.expandWarpBounds(u,E))}),f+=(t.advances[y]??0)+o}),!d.length)return[];let h=Number.isFinite(u.minX)&&Number.isFinite(u.maxX)&&Number.isFinite(u.minY)&&Number.isFinite(u.maxY),p=h?(u.minX+u.maxX)/2:0,v=h?(u.minY+u.maxY)/2:0,g=d.map(b=>this.translateWarpCommand(b,p,v)),m=new Xn;return g.forEach(b=>this.appendWarpCommandToPath(m,b)),[{d:m.toPathData(3),x:0,y:0,angle:0}]}computeGlyphCurvePoint(e,t,n){if(!Number.isFinite(t)||t===0)return{x:0,y:0,angle:0};let r=Math.min(Math.max(e,0),1),o=t/2,s=2*(1-r)*r*o+r*r*t,a=2*(1-r)*r*n,l=2*(1-r)*o+2*r*(t-o),c=2*n*(1-2*r),d=Math.atan2(c,l||1)*(180/Math.PI);return{x:s,y:a,angle:d}}warpPathCommand(e,t,n,r,o,s){switch(e.type){case"M":if(!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let a=this.warpPointForGlyph(e.x,e.y,t,n,r,o,s);return{type:"M",x:a.x,y:a.y};case"L":if(!Number.isFinite(e.x)||!Number.isFinite(e.y))return null;let l=this.warpPointForGlyph(e.x,e.y,t,n,r,o,s);return{type:"L",x:l.x,y:l.y};case"C":if(!Number.isFinite(e.x)||!Number.isFinite(e.y)||!Number.isFinite(e.x1)||!Number.isFinite(e.y1)||!Number.isFinite(e.x2)||!Number.isFinite(e.y2))return null;let c=this.warpPointForGlyph(e.x1,e.y1,t,n,r,o,s),d=this.warpPointForGlyph(e.x2,e.y2,t,n,r,o,s),u=this.warpPointForGlyph(e.x,e.y,t,n,r,o,s);return{type:"C",x1:c.x,y1:c.y,x2:d.x,y2:d.y,x:u.x,y:u.y};case"Q":if(!Number.isFinite(e.x)||!Number.isFinite(e.y)||!Number.isFinite(e.x1)||!Number.isFinite(e.y1))return null;let f=this.warpPointForGlyph(e.x1,e.y1,t,n,r,o,s),h=this.warpPointForGlyph(e.x,e.y,t,n,r,o,s);return{type:"Q",x1:f.x,y1:f.y,x:h.x,y:h.y};case"Z":return{type:"Z"};default:return null}}warpPointForGlyph(e,t,n,r,o,s,a){if(!Number.isFinite(e)||!Number.isFinite(t))return{x:0,y:0};let l=o>0?e/o:.5,c=s>0?(t-n.minY)/s:.5,d=nn.clamp(l,0,1),u=this.customizerState.sampleWarpEdge("top",d,r),f=this.customizerState.sampleWarpEdge("bottom",d,r);if(!u||!f)return{x:e,y:t};let h=nn.clamp(c,0,1),p=u.x+(f.x-u.x)*h,v=u.y+(f.y-u.y)*h,g=r.viewBox.width||1,m=r.viewBox.height||1,b=(p-r.viewBox.minX)*o/g,y=(v-r.viewBox.minY)*s/m+n.minY;return{x:b,y}}expandWarpBounds(e,t){this.extractPointsFromWarpCommand(t).forEach(r=>{e.minX=Math.min(e.minX,r.x),e.maxX=Math.max(e.maxX,r.x),e.minY=Math.min(e.minY,r.y),e.maxY=Math.max(e.maxY,r.y)})}extractPointsFromWarpCommand(e){switch(e.type){case"M":case"L":return[{x:e.x,y:e.y}];case"C":return[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2},{x:e.x,y:e.y}];case"Q":return[{x:e.x1,y:e.y1},{x:e.x,y:e.y}];default:return[]}}translateWarpCommand(e,t,n){switch(e.type){case"M":return{type:"M",x:e.x-t,y:e.y-n};case"L":return{type:"L",x:e.x-t,y:e.y-n};case"C":return{type:"C",x1:e.x1-t,y1:e.y1-n,x2:e.x2-t,y2:e.y2-n,x:e.x-t,y:e.y-n};case"Q":return{type:"Q",x1:e.x1-t,y1:e.y1-n,x:e.x-t,y:e.y-n};default:return e}}appendWarpCommandToPath(e,t){switch(t.type){case"M":e.moveTo(t.x,t.y);break;case"L":e.lineTo(t.x,t.y);break;case"C":e.curveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y);break;case"Q":e.quadraticCurveTo(t.x1,t.y1,t.x,t.y);break;case"Z":e.closePath();break}}expandCurvedLayoutBounds(e,t,n){if(!t)return;let r=n.angle*Math.PI/180,o=Math.cos(r),s=Math.sin(r);[{x:t.x1,y:t.y1},{x:t.x1,y:t.y2},{x:t.x2,y:t.y1},{x:t.x2,y:t.y2}].forEach(l=>{let c=l.x*o-l.y*s,d=l.x*s+l.y*o,u=c+n.x,f=d+n.y;e.minX=Math.min(e.minX,u),e.maxX=Math.max(e.maxX,u),e.minY=Math.min(e.minY,f),e.maxY=Math.max(e.maxY,f)})}static \u0275fac=function(t){return new(t||i)(Xe(Bn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var Qx=class i{overlayShadowFilterCache=new Map;overlayShadowFilterSerial=0;buildSvgForView(e,t,n,r){if(!e)return null;let o=e.cloneNode(!0),s=o.documentElement;if(!s)return null;let a=new Set(r?.preserveOverlayIds??[]);Array.from(s.querySelectorAll('[data-overlay="true"]')).forEach(d=>{let u=d.getAttribute("id")?.trim();u&&a.has(u)||d.parentNode?.removeChild(d)});let l=s.querySelector("#OverlayLayer");l&&!l.querySelector('[data-overlay="true"]')&&l.parentNode?.removeChild(l);let c=(n??[]).filter(d=>d&&d.trim().length>0);return c.length>0&&this.applyLayerVisibilityFilter(s,c,t),this.applyLayerClipPath(o,s,c),new XMLSerializer().serializeToString(o)}ensureDefsElement(e){if(!e)return null;let t=e.documentElement,n=t.namespaceURI||Ci,r=t.querySelector("defs");return r||(r=e.createElementNS(n,"defs"),t.insertBefore(r,t.firstChild)),r}clearOverlayFilterDefs(e){Array.from(e.querySelectorAll('[data-overlay-filter="true"]')).forEach(t=>{t.parentNode?.removeChild(t)}),this.overlayShadowFilterCache=new Map,this.overlayShadowFilterSerial=0}ensureShadowFilter(e,t,n){let r=`${t.color}|${t.blur}|${t.offsetX}|${t.offsetY}`,o=this.overlayShadowFilterCache.get(r);if(o)return o;let s=e.ownerDocument||n;if(!s)return r;let a=e.namespaceURI||Ci;this.overlayShadowFilterSerial+=1;let l=`overlay-shadow-${this.overlayShadowFilterSerial}`,c=s.createElementNS(a,"filter");c.setAttribute("id",l),c.setAttribute("data-overlay-filter","true"),c.setAttribute("color-interpolation-filters","sRGB"),c.setAttribute("x","-40%"),c.setAttribute("y","-40%"),c.setAttribute("width","180%"),c.setAttribute("height","180%");let d=s.createElementNS(a,"feDropShadow");return d.setAttribute("dx",`${t.offsetX}`),d.setAttribute("dy",`${t.offsetY}`),d.setAttribute("stdDeviation",`${Math.max(t.blur/2,0)}`),d.setAttribute("flood-color",t.color),d.setAttribute("flood-opacity","1"),c.appendChild(d),e.appendChild(c),this.overlayShadowFilterCache.set(r,l),l}appendTextOverlayAsPath(e){let{overlay:t,layout:n,center:r,overlayContainer:o,defs:s,svgDoc:a,strokeColor:l,strokeWidth:c,secondStrokeColor:d,secondStrokeWidth:u,shadowSettings:f}=e;if(!n.length)return;let h=a.documentElement?.namespaceURI||Ci,p=f?this.ensureShadowFilter(s,f,a):null,g=t.fontWeight==="bold"&&t.fontSize?Math.max(t.fontSize*.06,1):0,m=a.createElementNS(h,"g");if(m.setAttribute("id",t.id),m.setAttribute("data-overlay","true"),m.setAttribute("aria-label",t.text),n.forEach(E=>{let D=[];(Math.abs(E.x)>.01||Math.abs(E.y)>.01)&&D.push(`translate(${E.x} ${E.y})`),Math.abs(E.angle)>.01&&D.push(`rotate(${E.angle})`);let A=D.length?D.join(" "):null;if(g>0){let L=a.createElementNS(h,"path");L.setAttribute("d",E.d),L.setAttribute("fill",t.fill),L.setAttribute("stroke",t.fill),L.setAttribute("stroke-width",`${g}`),L.setAttribute("paint-order","stroke fill"),L.setAttribute("stroke-linejoin","round"),L.setAttribute("stroke-linecap","round"),A&&L.setAttribute("transform",A),m.appendChild(L)}let S=a.createElementNS(h,"path");if(S.setAttribute("d",E.d),S.setAttribute("fill",t.fill),d&&u>0){let L=u+(c>0?c:0);S.setAttribute("stroke",d),S.setAttribute("stroke-width",`${L}`),S.setAttribute("paint-order","stroke fill"),S.setAttribute("stroke-linejoin","round"),S.setAttribute("stroke-linecap","round")}else S.setAttribute("stroke","none");A&&S.setAttribute("transform",A),m.appendChild(S);let I=a.createElementNS(h,"path");I.setAttribute("d",E.d),I.setAttribute("fill",t.fill),l&&c>0?(I.setAttribute("stroke",l),I.setAttribute("stroke-width",`${c}`),I.setAttribute("paint-order","stroke fill"),I.setAttribute("stroke-linejoin","round"),I.setAttribute("stroke-linecap","round")):I.setAttribute("stroke","none"),A&&I.setAttribute("transform",A),m.appendChild(I)}),!m.childNodes.length)return;let b=[`translate(${r.x} ${r.y})`],y=Number.isFinite(t.horizontalScale)?Math.max(t.horizontalScale,.1):1,x=Number.isFinite(t.verticalScale)?Math.max(t.verticalScale,.1):1;(Math.abs(y-1)>1e-4||Math.abs(x-1)>1e-4)&&b.push(`scale(${y} ${x})`),t.fontStyle==="italic"&&b.push("skewX(-12)");let _=t.angle??0;Math.abs(_)>.01&&b.push(`rotate(${_})`),m.setAttribute("transform",b.join(" ")),p&&m.setAttribute("filter",`url(#${p})`),o.appendChild(m)}serializeSvg(e,t=!0){if(!e)return null;let r=new XMLSerializer().serializeToString(e);return t?this.formatXml(r):r}downloadSvg(e,t){let n=new Blob([e],{type:Nd}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(r),100)}applyLayerClipPath(e,t,n){let r="layer-preview-clip",o=t.namespaceURI||Ci,s=(n??[]).map(d=>d.trim()).filter(d=>d.length>0);if(s.length===0){t.removeAttribute("clip-path");let d=e.getElementById(r);d&&d.parentNode?.removeChild(d);return}let a=this.ensureDefsElementForClone(t);if(!a)return;let l=e.getElementById(r);if(l&&!(l instanceof SVGClipPathElement)&&(l=null),!l)l=e.createElementNS(o,"clipPath"),l.setAttribute("id",r),l.setAttribute("clipPathUnits","userSpaceOnUse"),a.appendChild(l);else for(;l.firstChild;)l.removeChild(l.firstChild);let c=!1;if(s.forEach(d=>{let u=e.getElementById(d);if(!u||!(u instanceof SVGElement))return;let f=u.cloneNode(!0);f.removeAttribute("id"),l.appendChild(f),c=!0}),!c){l?.remove(),t.removeAttribute("clip-path");return}t.setAttribute("clip-path",`url(#${r})`)}applyLayerVisibilityFilter(e,t,n){let r=new Set(t.map(a=>this.normalizeSvgId(a)).filter(a=>a.length>0));if(r.size===0)return;let o=n.flatMap(a=>a.actionPathIdsCsv).map(a=>this.normalizeSvgId(a)).filter(a=>a.length>0);if(o.length===0)return;let s=new Set(o);e.querySelectorAll("[id]").forEach(a=>{let l=this.normalizeSvgId(a.getAttribute("id"));!l||!s.has(l)||(r.has(l)?(a.removeAttribute("display"),a.removeAttribute("data-layer-hidden")):(a.setAttribute("display","none"),a.setAttribute("data-layer-hidden","true")))})}ensureDefsElementForClone(e){let t=e.ownerDocument;if(!t)return null;let n=e.querySelector("defs");if(n)return n;let r=e.namespaceURI||Ci,o=t.createElementNS(r,"defs");return e.insertBefore(o,e.firstChild),o}normalizeSvgId(e){return e?.trim().toLowerCase()??""}formatXml(e){let t="",n=0,r=e.replace(/>\s*</g,"><").replace(/</g,"~::~<").split("~::~");for(let o of r){let s=0;o.match(/^<\//)?n=Math.max(n-1,0):o.match(/^<.*?>$/)&&!o.match(/<.*?\/>/)&&(s=1);let a=new Array(n+1).join(" ");t+=a+o+`\r
|
|
4614
4614
|
`,n+=s}return t.trim()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var e_=class i{resolveShadowSettings(e,t){let n=Number.isFinite(e.shadowBlur)?e.shadowBlur:t.blur,r=Number.isFinite(e.shadowOffsetX)?e.shadowOffsetX:t.offsetX,o=Number.isFinite(e.shadowOffsetY)?e.shadowOffsetY:t.offsetY;return Math.abs(n)<.01&&Math.abs(r)<.01&&Math.abs(o)<.01?null:{blur:n,offsetX:r,offsetY:o,color:e.shadowColor??t.color}}getShadowCanvasShift(e,t){if(!e)return{x:0,y:0};let n=t||1;return{x:e.offsetX*.5*n,y:e.offsetY*.5*n}}applyShadowToFabricGroup(e,t){let n=e.getObjects();if(!t){n.forEach(a=>{a.set("shadow",void 0),a.dirty=!0}),e.set("shadow",void 0),e.dirty=!0;return}let r=Math.max(t.blur,0),o=t.offsetX,s=t.offsetY;n.forEach(a=>{a.set("shadow",new Ia({color:t.color,blur:r,offsetX:o,offsetY:s,affectStroke:!0})),a.dirty=!0}),e.set("shadow",void 0),e.dirty=!0}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var t_=class i{stack=N([]);manualOrderingEnabled=N(!1);buildCatalog(e){let t=new Map,n=e.svgDoc?.documentElement;return e.overlays.forEach(r=>{let o=r.placementKey?e.placementNameByKey.get(r.placementKey)??r.placementKey:null;if(r.kind==="text"){let s=r.text?.trim();t.set(`overlay:${r.id}`,{id:`overlay:${r.id}`,title:s?`Text: ${s}`:"Text",subtitle:o??"Overlay"});return}t.set(`overlay:${r.id}`,{id:`overlay:${r.id}`,title:r.imageName?.trim()||"Logo",subtitle:o??"Overlay"})}),e.patternOverlays.forEach(r=>{t.set(`pattern:${r.id}`,{id:`pattern:${r.id}`,title:`Pattern: ${r.label||r.id}`,subtitle:r.placementId??"Pattern Overlay"})}),e.svgDoc&&n&&Array.from(e.svgDoc.querySelectorAll("[id]")).filter(o=>o.closest("defs")||o.parentElement!==n?!1:!!this.resolvePatternFillReference(o)).forEach(o=>{let s=o.id?.trim();if(!s)return;let a=`pattern:${s}`;if(t.has(a))return;let l=this.resolvePatternFillReference(o);t.set(a,{id:a,title:`Pattern: ${s}`,subtitle:l?`Fill ${l}`:"Pattern Fill"})}),e.backgroundTemplates.forEach(r=>{let o=e.backgroundImages[r.actionItemId];o?.src&&t.set(`background:${r.actionItemId}`,{id:`background:${r.actionItemId}`,title:`Background: ${r.name||r.actionItemId}`,subtitle:o.fileName??"Image"})}),e.renderLayers.forEach((r,o)=>{let s=r.id?.trim()||r.name?.trim()||`${o}`;t.set(`render-layer:${s}`,{id:`render-layer:${s}`,title:`Render Layer: ${r.name||s}`,subtitle:r.actionPathIdsCsv||""})}),t}synchronizeStack(e,t,n=[]){let r=Array.from(e.keys()),o=this.stack(),s=this.manualOrderingEnabled(),a=this.resolveStackFromSvg(r,t,n);if(!s){let p=[...a],v=new Set(p);r.filter(g=>!v.has(g)).forEach(g=>this.insertRenderItemByDefaultBand(p,g)),this.areStringArraysEqual(o,p)||this.stack.set(p);return}let l=new Set(r),c=o.filter(p=>l.has(p)),d=new Set(c),u=a.filter(p=>!d.has(p)),f=[...u,...r.filter(p=>!d.has(p)&&!u.includes(p))],h=[...c];f.forEach(p=>this.insertRenderItemByDefaultBand(h,p)),this.areStringArraysEqual(o,h)||this.stack.set(h)}resolveStackFromSvg(e,t,n=[]){if(!t?.documentElement)return[];let r=t.documentElement,o=this.buildRenderLayerNodeIdMap(n,t),s=this.buildSvgPaintOrder(r);return e.map(a=>({id:a,index:this.resolveRenderItemPaintIndex(a,r,o,s)})).filter(a=>a.index>=0).sort((a,l)=>l.index-a.index).map(a=>a.id)}moveInStack(e,t){let n=[...this.stack()],r=n.findIndex(a=>a===e);if(r<0)return null;let o=Math.min(Math.max(r+t,0),n.length-1);if(o===r)return null;let[s]=n.splice(r,1);return n.splice(o,0,s),n}reorderInStack(e){if(!e.length)return null;let t=this.stack(),n=new Set(t),r=e.filter((a,l)=>n.has(a)&&e.indexOf(a)===l);if(!r.length)return null;let o=new Set(r),s=t.filter(a=>!o.has(a));return[...r,...s]}setStack(e){let t=this.stack();return this.areStringArraysEqual(t,e)?!1:(this.stack.set(e),!0)}enableManualOrdering(){this.manualOrderingEnabled.set(!0)}reset(){this.stack.set([]),this.manualOrderingEnabled.set(!1)}resolveFabricVisibleOverlayIds(e){let t=this.stack();if(!t.length)return new Set(e.map(o=>o.id));let n=t.findIndex(o=>this.parseRenderItemId(o)[0]!=="overlay");if(n<0)return new Set(e.map(o=>o.id));let r=t.slice(0,n).map(o=>this.parseRenderItemId(o)).filter(([o])=>o==="overlay").map(([,o])=>o);return new Set(r)}syncOverlayOrderFromStack(e,t){let n=t.map(c=>this.parseRenderItemId(c)).filter(([c])=>c==="overlay").map(([,c])=>c);if(!n.length)return e;let r=new Map(e.map(c=>[c.id,c])),o=[...n].reverse().map(c=>r.get(c)).filter(c=>!!c),a=[...e.filter(c=>!n.includes(c.id)),...o];return a.length!==e.length||e.every((c,d)=>a[d]?.id===c.id)?e:a}applyStackToSvg(e,t){if(!this.manualOrderingEnabled())return!1;let n=this.stack();if(!n.length)return!1;let r=this.buildRenderLayerNodeIdMap(t,e.ownerDocument),o=this.resolveStackFromSvg(n,e.ownerDocument,t),s=n.filter(l=>this.resolveNodesForRenderItem(l,e,r).length>0);return this.areStringArraysEqual(o,s)?!1:([...s].reverse().forEach(l=>{this.resolveNodesForRenderItem(l,e,r).forEach(d=>e.appendChild(d))}),!0)}resolveNodeIndex(e,t,n=[]){if(!t)return-1;let r=this.buildRenderLayerNodeIdMap(n,t),o=t.documentElement,s=this.resolveNodesForRenderItem(e,o,r);return s.length?Math.max(...s.map(a=>a.parentElement?a.parentElement===o?this.resolveSvgElementSiblingIndex(a):this.resolveSvgElementSiblingIndex(a.parentElement):-1)):-1}parseRenderItemId(e){let t=e.indexOf(":");if(t<0)return["overlay",e];let n=e.slice(0,t),r=e.slice(t+1);return n==="pattern"?["pattern",r]:n==="background"?["background",r]:n==="render-layer"?["render-layer",r]:["overlay",r]}resolvePatternFillReference(e){let t=e.getAttribute("data-pattern-fill")?.trim();if(t)return t;let r=(e.getAttribute("fill")?.trim()??"").match(/^url\(#([^)]+)\)$/i);return r?.[1]?r[1]:null}insertRenderItemByDefaultBand(e,t){let[n]=this.parseRenderItemId(t);if(n==="overlay"){e.unshift(t);return}if(n==="render-layer"){e.unshift(t);return}if(n==="pattern"){let r=e.findIndex(o=>this.parseRenderItemId(o)[0]==="background");r<0?e.push(t):e.splice(r,0,t);return}e.push(t)}resolveRenderItemPaintIndex(e,t,n,r){let o=this.resolveIndexNodesForRenderItem(e,t,n);return o.length?Math.max(...o.map(s=>this.resolveElementPaintOrder(s,r))):-1}buildSvgPaintOrder(e){let t=new Map,n=0,r=o=>{o.tagName.toLowerCase()!=="defs"&&(t.set(o,n),n+=1,Array.from(o.children).forEach(s=>{r(s)}))};return r(e),t}resolveElementPaintOrder(e,t){let n=t.get(e)??-1;return e.querySelectorAll("*").forEach(o=>{let s=t.get(o)??-1;s>n&&(n=s)}),n}resolveIndexNodesForRenderItem(e,t,n){let[r,o]=this.parseRenderItemId(e),s=t.ownerDocument;if(!s)return[];if(r!=="render-layer"){let l=s.getElementById(o);if(!l)return[];let c=this.resolveMovableNodeForKind(r,l,t);return c?[c]:[]}let a=new Set(n.get(e)??[]);return a.size?[...a].map(l=>s.getElementById(l)).filter(l=>!!l):[]}buildRenderLayerNodeIdMap(e,t){let n=new Map;return e.forEach((r,o)=>{let s=r.id?.trim()||r.name?.trim()||`${o}`,a=`render-layer:${s}`,l=this.parseCsvIds(r.actionPathIdsCsv,t);l.length&&n.set(a,l)}),n}resolveNodesForRenderItem(e,t,n){let[r,o]=this.parseRenderItemId(e),s=t.ownerDocument;if(!s)return[];if(r!=="render-layer"){let l=s.getElementById(o);if(!l)return[];let c=this.resolveMovableNodeForKind(r,l,t);return c?[c]:[]}let a=new Set(n.get(e)??[]);return a.size?Array.from(t.children).filter(l=>{let c=l.getAttribute("id")?.trim();return!!c&&a.has(c)}):[]}resolveMovableNodeForKind(e,t,n){if(e!=="background")return t;let r=t;for(;r?.parentElement&&r.parentElement!==n;)r=r.parentElement;return r}parseCsvIds(e,t){if(!e)return[];let n=e.trim();if(n.includes("[")&&t){try{let r=t.querySelectorAll(n);if(r.length>0){let o=[];r.forEach(a=>{let l=a.getAttribute("id")?.trim();l&&l.length>0&&o.push(l)});let s=Array.from(new Set(o));if(s.length>0)return s}}catch(r){console.warn("CSS selector parsing failed, trying alternative approach:",n,r)}try{let r=n.split(",").map(s=>s.trim()).filter(s=>s.length>0),o=[];for(let s of r)if(s.includes("["))t.querySelectorAll(s).forEach(l=>{let c=l.getAttribute("id")?.trim();c&&c.length>0&&!o.includes(c)&&o.push(c)});else{let a=s.replace(/^#/,"").trim();a.length>0&&!o.includes(a)&&o.push(a)}if(o.length>0)return o}catch(r){console.error("Error parsing mixed CSS selectors:",n,r)}}return n.split(",").map(r=>r.trim().replace(/^#/,"")).filter((r,o,s)=>!!r&&s.indexOf(r)===o)}areStringArraysEqual(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}resolveSvgElementSiblingIndex(e){return e?.parentElement?Array.from(e.parentElement.children).indexOf(e):-1}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var ane=["*"],Ni=class i{value=Me(null);multiple=Me(!1);expandedValues=N(new Set);lastSyncedInputSignature=null;constructor(){Yt(()=>{let e=this.value(),t=this.buildInputSignature(e,this.multiple());t!==this.lastSyncedInputSignature&&(this.lastSyncedInputSignature=t,this.syncFromInput(e))})}isExpanded(e){return this.expandedValues().has(this.toKey(e))}toggle(e){let t=this.toKey(e),n=new Set(this.expandedValues());if(n.has(t)){n.delete(t),this.expandedValues.set(n);return}this.multiple()||n.clear(),n.add(t),this.expandedValues.set(n)}syncFromInput(e){if(e==null)return;let t=new Set;if(Array.isArray(e))for(let n of e)t.add(this.toKey(n));else t.add(this.toKey(e));t.size&&this.expandedValues.set(t)}buildInputSignature(e,t){return Array.isArray(e)?`${t}:${e.map(n=>this.toKey(n)).join("|")}`:`${t}:${this.toKey(e)}`}toKey(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):e==null?"__null__":JSON.stringify(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-accordion"]],inputs:{value:[1,"value"],multiple:[1,"multiple"]},ngContentSelectors:ane,decls:1,vars:0,template:function(t,n){t&1&&(_i(),Si(0))},encapsulation:2,changeDetection:0})};var lne=["*"],bi=class i{value=Me(null);accordion=Q(Ni,{host:!0});expanded=De(()=>this.accordion.isExpanded(this.value()));toggle(){this.accordion.toggle(this.value())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-accordion-panel"]],inputs:{value:[1,"value"]},ngContentSelectors:lne,decls:2,vars:2,consts:[[1,"ui-accordion-panel"]],template:function(t,n){t&1&&(_i(),re(0,"section",0),Si(1),he()),t&2&&pt("ui-accordion-panel--expanded",n.expanded())},styles:[".ui-accordion-panel[_ngcontent-%COMP%]{border:0;border-radius:0;background:transparent;margin-bottom:0;overflow:visible;box-shadow:none;transition:background-color .2s ease}.ui-accordion-panel--expanded[_ngcontent-%COMP%]{background:transparent}"],changeDetection:0})};var cne=["*"];function dne(i,e){i&1&&(re(0,"div",0),Si(1),he())}var mr=class i{panel=Q(bi,{host:!0});static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-accordion-content"]],ngContentSelectors:cne,decls:1,vars:1,consts:[[1,"ui-accordion-content"]],template:function(t,n){t&1&&(_i(),pe(0,dne,2,0,"div",0)),t&2&&me(n.panel.expanded()?0:-1)},styles:[".ui-accordion-content[_ngcontent-%COMP%]{padding:.8rem .2rem 1rem;overscroll-behavior:contain;background:transparent}.ui-accordion-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.ui-accordion-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:rgb(var(--surface-300, 203 213 225));border-radius:9999px}"],changeDetection:0})};var une=["*"],gr=class i{panel=Q(bi,{host:!0});static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-accordion-header"]],ngContentSelectors:une,decls:5,vars:3,consts:[["type","button",1,"ui-accordion-header",3,"click"],[1,"ui-accordion-header__content"],[1,"ui-accordion-header__icon"],["aria-hidden","true",1,"ri-arrow-down-s-line"]],template:function(t,n){t&1&&(_i(),re(0,"button",0),Gn("click",function(){return n.panel.toggle()}),re(1,"span",1),Si(2),he(),re(3,"span",2),bt(4,"i",3),he()()),t&2&&(Pn("aria-expanded",n.panel.expanded()),P(3),pt("ui-accordion-header__icon--expanded",n.panel.expanded()))},styles:[".ui-accordion-header[_ngcontent-%COMP%]{width:100%;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.85rem .2rem;border:0;border-bottom:1px solid rgb(var(--surface-200, 226 232 240));background:transparent;color:rgb(var(--text-color, 15 23 42));cursor:pointer;font-weight:500;transition:background-color .2s ease,color .2s ease,border-color .2s ease}.ui-accordion-header[_ngcontent-%COMP%]:hover{background:transparent}.ui-accordion-header[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgb(var(--primary-color, 98 101 241));outline-offset:-2px}.ui-accordion-header__content[_ngcontent-%COMP%]{min-width:0;flex:1}.ui-accordion-header__icon[_ngcontent-%COMP%]{width:1.65rem;height:1.65rem;display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));transition:transform .2s ease,background-color .2s ease,color .2s ease}.ui-accordion-header__icon--expanded[_ngcontent-%COMP%]{transform:rotate(180deg);color:rgb(var(--primary-color, 98 101 241));background:transparent}"],changeDetection:0})};function fne(i,e){if(i&1&&bt(0,"span",3),i&2){let t=M();di("innerHTML",t.previewMarkup(),P0)}}function hne(i,e){i&1&&(re(0,"div",4),bt(1,"i",18),he())}function pne(i,e){i&1&&(re(0,"span",5),bt(1,"span",19),he())}function mne(i,e){if(i&1&&bt(0,"span",14),i&2){let t=M();di("innerHTML",t.previewMarkup(),P0)}}function gne(i,e){i&1&&(re(0,"div",15),bt(1,"i",20),re(2,"span"),k(3,"No preview"),he()())}var n_=class i{previewMarkup=Me(null);label=Me("Preview");isLoading=Me(!1);static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-svg-preview"]],hostVars:1,hostBindings:function(t,n){t&2&&Pn("role","button")},inputs:{previewMarkup:[1,"previewMarkup"],label:[1,"label"],isLoading:[1,"isLoading"]},decls:20,vars:6,consts:[["tabindex","0",1,"svg-preview"],[1,"svg-preview__trigger"],[1,"svg-preview__thumb"],[1,"svg-preview__content",3,"innerHTML"],[1,"svg-preview__empty"],[1,"svg-preview__loader"],[1,"svg-preview__indicator"],["role","tooltip","aria-hidden","true",1,"svg-preview__popover"],[1,"svg-preview__arrow"],[1,"svg-preview__panel"],[1,"svg-preview__popover-header"],[1,"ri-eye-line","svg-preview__popover-icon"],[1,"svg-preview__popover-label"],[1,"svg-preview__canvas"],[1,"svg-preview__canvas-content",3,"innerHTML"],[1,"svg-preview__canvas-empty"],[1,"svg-preview__popover-footer"],[1,"svg-preview__info-text"],[1,"ri-image-add-line"],[1,"svg-preview__spinner"],[1,"ri-image-off-line"]],template:function(t,n){t&1&&(re(0,"span",0)(1,"span",1)(2,"span",2),pe(3,fne,1,1,"span",3)(4,hne,2,0,"div",4),he(),pe(5,pne,2,0,"span",5),bt(6,"span",6),he(),re(7,"div",7),bt(8,"div",8),re(9,"div",9)(10,"div",10),bt(11,"i",11),re(12,"span",12),k(13),he()(),re(14,"div",13),pe(15,mne,1,1,"span",14)(16,gne,4,0,"div",15),he(),re(17,"div",16)(18,"span",17),k(19,"Hover or focus to see detailed preview"),he()()()()()),t&2&&(Pn("aria-label",n.label()+" color region preview")("data-loading",n.isLoading()),P(3),me(n.previewMarkup()?3:4),P(2),me(n.isLoading()?5:-1),P(8),Ye(n.label()),P(2),me(n.previewMarkup()?15:16))},dependencies:[qt],styles:['[_nghost-%COMP%]{display:inline-flex;align-items:center;justify-content:center}.svg-preview[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;outline:none}.svg-preview__trigger[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer}.svg-preview__thumb[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:10px;border:1.5px solid #cbd5e1;background:linear-gradient(135deg,#fff,#f8fafc);box-shadow:inset 0 1px #fffc,0 2px 4px #0f172a14,0 1px 2px #0f172a0a;transition:all .2s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease;overflow:hidden}.svg-preview__content[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border-radius:8px}.svg-preview__content[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%;overflow:visible}.svg-preview__empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:#cbd5e1;font-size:14px;background:linear-gradient(135deg,#f3f4f6,#e5e7eb);border-radius:8px}.svg-preview__loader[_ngcontent-%COMP%]{position:absolute;top:3px;right:3px;width:8px;height:8px;display:flex;align-items:center;justify-content:center}.svg-preview__spinner[_ngcontent-%COMP%]{display:block;width:100%;height:100%;border-radius:50%;border:1.5px solid #cbd5e1;border-top-color:#6265f1;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.svg-preview__indicator[_ngcontent-%COMP%]{position:absolute;bottom:-3px;right:-3px;width:6px;height:6px;border-radius:50%;background:#6265f1;box-shadow:0 0 0 1.5px #fff,0 2px 4px #6265f14d;opacity:0;transform:scale(0);transition:opacity .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1)}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__thumb[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__thumb[_ngcontent-%COMP%]{border-color:#94a3b8;background:linear-gradient(135deg,#fff,#f0f4f8);box-shadow:inset 0 1px #fffc,0 6px 16px #6265f129,0 2px 6px #0f172a1f;transform:translateY(-2px) scale(1.08)}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__indicator[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__indicator[_ngcontent-%COMP%]{opacity:1;transform:scale(1)}.svg-preview[_ngcontent-%COMP%]:active .svg-preview__thumb[_ngcontent-%COMP%]{transform:translateY(-1px) scale(1.04)}.svg-preview__popover[_ngcontent-%COMP%]{position:absolute;left:50%;top:calc(100% + 14px);transform:translate(-50%) translateY(-8px) scale(.92);transform-origin:top center;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .2s ease,transform .2s cubic-bezier(.34,1.56,.64,1),visibility .2s ease;z-index:1000}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__popover[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__popover[_ngcontent-%COMP%]{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%) translateY(0) scale(1)}.svg-preview__arrow[_ngcontent-%COMP%]{position:absolute;left:50%;top:-6px;transform:translate(-50%);width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ffffff;filter:drop-shadow(0 -1px 2px rgba(15,23,42,.08))}.svg-preview__panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;min-width:120px;padding:12px;border-radius:14px;border:1px solid #e2e8f0;background:linear-gradient(180deg,#fff,#f8fafc);box-shadow:0 20px 40px #0f172a38,0 4px 10px #0f172a1a,inset 0 1px #fff9;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.svg-preview__popover-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding-bottom:6px;border-bottom:1px solid #e5e7eb}.svg-preview__popover-icon[_ngcontent-%COMP%]{font-size:13px;color:#6265f1;flex-shrink:0}.svg-preview__popover-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#1f2937;text-transform:uppercase;letter-spacing:.4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.svg-preview__canvas[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:120px;height:120px;border-radius:12px;border:1px solid #e5e7eb;background:linear-gradient(135deg,#f9fafb,#f0f4f8);box-shadow:inset 0 1px 2px #0f172a0a;overflow:hidden;position:relative}.svg-preview__canvas[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;background-image:repeating-linear-gradient(45deg,transparent,transparent 10px,rgba(226,232,240,.4) 10px,rgba(226,232,240,.4) 20px);pointer-events:none;opacity:.3}.svg-preview__canvas-content[_ngcontent-%COMP%]{display:block;width:100%;height:100%;position:relative;z-index:1}.svg-preview__canvas-content[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:100%;overflow:visible}.svg-preview__canvas-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#94a3b8;font-size:12px;text-align:center;position:relative;z-index:2}.svg-preview__canvas-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:20px;opacity:.6}.svg-preview__popover-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding-top:6px;border-top:1px solid #e5e7eb}.svg-preview__info-text[_ngcontent-%COMP%]{font-size:11px;color:#94a3b8;font-style:italic;text-align:center;letter-spacing:.2px}@media(max-width:768px){.svg-preview__thumb[_ngcontent-%COMP%]{width:30px;height:30px}.svg-preview[_ngcontent-%COMP%]:hover .svg-preview__thumb[_ngcontent-%COMP%], .svg-preview[_ngcontent-%COMP%]:focus-within .svg-preview__thumb[_ngcontent-%COMP%]{transform:translateY(-1px) scale(1.05)}.svg-preview__panel[_ngcontent-%COMP%]{min-width:120px;padding:10px;gap:8px}.svg-preview__canvas[_ngcontent-%COMP%]{width:110px;height:110px}}@media(max-width:480px){.svg-preview__thumb[_ngcontent-%COMP%]{width:28px;height:28px}.svg-preview__panel[_ngcontent-%COMP%]{min-width:120px;padding:9px;gap:7px}.svg-preview__popover[_ngcontent-%COMP%]{top:calc(100% + 12px)}.svg-preview__canvas[_ngcontent-%COMP%]{width:100px;height:100px}.svg-preview__popover-label[_ngcontent-%COMP%]{font-size:11px}.svg-preview__info-text[_ngcontent-%COMP%]{font-size:10px}}.svg-preview[_ngcontent-%COMP%]:focus-within{outline:2px solid #6265f1;outline-offset:2px;border-radius:10px}@media(prefers-reduced-motion:reduce){.svg-preview__thumb[_ngcontent-%COMP%], .svg-preview__indicator[_ngcontent-%COMP%], .svg-preview__popover[_ngcontent-%COMP%], .svg-preview__spinner[_ngcontent-%COMP%]{transition:none}@keyframes spin{to{transform:rotate(0)}}}'],changeDetection:0})};var rh=class i{constructor(e){this.customizerState=e}isActiveColor(e,t){let n=this.customizerState.svgDoc();if(!n)return!1;let r=this.parseTargets(e);return r.length===0?!1:r.every(({selector:o,stopIndex:s})=>{let a=Array.from(n.querySelectorAll(o));return a.length===0?!1:a.every(l=>{if(l.tagName==="linearGradient"){let d=Array.from(l.querySelectorAll("stop"));return d.length===0?!1:this.resolveStops(d,s).every(f=>(f.getAttribute("stop-color")??f.style.stopColor??"").toLowerCase()===t.toLowerCase())}return(l.getAttribute("fill")||l.style.fill||"").toLowerCase()===t.toLowerCase()})})}applyColor(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=this.parseTargets(e),o=!1;r.forEach(({selector:s,stopIndex:a})=>{let l=Array.from(n.querySelectorAll(s));l.length!==0&&l.forEach(c=>{if(c.tagName==="linearGradient"){let d=Array.from(c.querySelectorAll("stop"));if(!d.length)return;this.resolveStops(d,a).forEach(f=>{let h=f.getAttribute("stop-opacity")??f.style.stopOpacity??null;f.removeAttribute("style"),f.setAttribute("stop-color",t),h!==null&&h!==""&&f.setAttribute("stop-opacity",h),o=!0});return}c.removeAttribute("style"),c.setAttribute("fill",t),o=!0})}),o&&this.customizerState.markSvgMutated(n)}parseTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}resolveStopIndex(e,t){let n=Number.isFinite(e)?e:1;return Math.min(Math.max(n,0),t-1)}resolveStops(e,t){if(t===void 0)return e;let n=this.resolveStopIndex(t,e.length);return[e[n]]}static \u0275fac=function(t){return new(t||i)(Xe(Bn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var vne=(i,e)=>e.color,NB=(i,e)=>e.actionPathIdsCsv,LB=(i,e)=>e.colorCode;function bne(i,e){if(i&1&&Y(0,"i",10),i&2){let t=M().$implicit,n=M(2);pt("swatch-check--dark",n.isLightColor(t.color))}}function yne(i,e){if(i&1){let t=Ne();w(0,"button",7),ie("click",function(){let r=Z(t).$implicit,o=M(2);return J(o.onColorSelect(null,r.color))}),w(1,"span",8),pe(2,bne,1,2,"i",9),T()()}if(i&2){let t,n,r=e.$implicit,o=M(2);oo("border-color",o.getBorderColor(r.color)),pt("swatch-btn--active",((t=o.activeColor())==null?null:t.toLowerCase())===r.color.toLowerCase()),ne("appTooltip",r.label??r.color),P(),oo("background-color",r.color),P(),me(((n=o.activeColor())==null?null:n.toLowerCase())===r.color.toLowerCase()?2:-1)}}function xne(i,e){if(i&1){let t=Ne();w(0,"button",11),ie("click",function(){Z(t);let r=M(2);return J(r.toggleShowAllPalette())}),w(1,"span",12),k(2),T()()}if(i&2){let t=M(2);P(2),zt("+",t.remainingPaletteCount())}}function _ne(i,e){if(i&1){let t=Ne();w(0,"button",13),ie("click",function(){Z(t);let r=M(2);return J(r.toggleShowAllPalette())}),Y(1,"i",14),k(2," Show less "),T()}}function Sne(i,e){if(i&1&&(w(0,"div",1)(1,"div",3),Dt(2,yne,3,8,"button",4,vne),pe(4,xne,3,1,"button",5),T(),pe(5,_ne,3,0,"button",6),T()),i&2){let t=M();P(2),It(t.visiblePalette()),P(2),me(!t.showAllPalette()&&t.remainingPaletteCount()>0?4:-1),P(),me(t.shouldShowPaletteLessButton()?5:-1)}}function Cne(i,e){if(i&1&&Y(0,"i",10),i&2){let t=M().$implicit,n=M(3);pt("swatch-check--dark",n.isLightColor(t.colorCode))}}function wne(i,e){if(i&1){let t=Ne();w(0,"button",7),ie("click",function(){let r=Z(t).$implicit,o=M().$implicit,s=M(2);return J(s.onColorSelect(o.actionPathIdsCsv,r.colorCode))}),w(1,"span",8),pe(2,Cne,1,2,"i",9),T()()}if(i&2){let t=e.$implicit,n=M().$implicit,r=M(2);oo("border-color",r.getBorderColor(t.colorCode)),pt("swatch-btn--active",r.isActive(n.actionPathIdsCsv,t.colorCode)),ne("appTooltip",t.name),P(),oo("background-color",t.colorCode),P(),me(r.isActive(n.actionPathIdsCsv,t.colorCode)?2:-1)}}function Ene(i,e){if(i&1){let t=Ne();w(0,"button",11),ie("click",function(){Z(t);let r=M().$implicit,o=M(2);return J(o.toggleShowAllColors(r.actionPathIdsCsv))}),w(1,"span",12),k(2),T()()}if(i&2){let t=M().$implicit,n=M(2);P(2),zt("+",n.remainingColorCount(t))}}function Mne(i,e){if(i&1){let t=Ne();w(0,"button",13),ie("click",function(){Z(t);let r=M().$implicit,o=M(2);return J(o.toggleShowAllColors(r.actionPathIdsCsv))}),Y(1,"i",14),k(2," Show less "),T()}}function Tne(i,e){if(i&1&&(w(0,"div",1)(1,"div",3),Dt(2,wne,3,8,"button",4,LB),pe(4,Ene,3,1,"button",5),T(),pe(5,Mne,3,0,"button",6),T()),i&2){let t=e.$implicit,n=M(2);P(2),It(n.visibleColors(t)),P(2),me(n.shouldShowMoreButton(t)?4:-1),P(),me(n.shouldShowLessButton(t)?5:-1)}}function Dne(i,e){if(i&1&&Dt(0,Tne,6,2,"div",1,NB),i&2){let t=M();It(t.colorItems())}}function Ine(i,e){if(i&1&&Y(0,"app-svg-preview",20),i&2){let t=M(),n=M().$implicit;ne("previewMarkup",t)("label",n.name)}}function Pne(i,e){if(i&1&&pe(0,Ine,1,2,"app-svg-preview",20),i&2){let t=M(3);me(t.hasVisiblePreviewContent(e)?0:-1)}}function Ane(i,e){if(i&1&&Y(0,"i",10),i&2){let t=M().$implicit,n=M(3);pt("swatch-check--dark",n.isLightColor(t.colorCode))}}function One(i,e){if(i&1){let t=Ne();w(0,"button",7),ie("click",function(){let r=Z(t).$implicit,o=M().$implicit,s=M(2);return J(s.onColorSelect(o.actionPathIdsCsv,r.colorCode))}),w(1,"span",8),pe(2,Ane,1,2,"i",9),T()()}if(i&2){let t=e.$implicit,n=M().$implicit,r=M(2);oo("border-color",r.getBorderColor(t.colorCode)),pt("swatch-btn--active",r.isActive(n.actionPathIdsCsv,t.colorCode)),ne("appTooltip",t.name),P(),oo("background-color",t.colorCode),P(),me(r.isActive(n.actionPathIdsCsv,t.colorCode)?2:-1)}}function Rne(i,e){if(i&1){let t=Ne();w(0,"button",11),ie("click",function(){Z(t);let r=M().$implicit,o=M(2);return J(o.toggleShowAllColors(r.actionPathIdsCsv))}),w(1,"span",12),k(2),T()()}if(i&2){let t=M().$implicit,n=M(2);P(2),zt("+",n.remainingColorCount(t))}}function kne(i,e){if(i&1){let t=Ne();w(0,"button",13),ie("click",function(){Z(t);let r=M().$implicit,o=M(2);return J(o.toggleShowAllColors(r.actionPathIdsCsv))}),Y(1,"i",14),k(2," Show less "),T()}}function Fne(i,e){if(i&1&&(w(0,"app-ui-accordion-panel",15)(1,"app-ui-accordion-header")(2,"div",16)(3,"div",17),Y(4,"i",18),w(5,"span",19),k(6),T()(),pe(7,Pne,1,1),T()(),w(8,"app-ui-accordion-content")(9,"div",1)(10,"div",3),Dt(11,One,3,8,"button",4,LB),pe(13,Rne,3,1,"button",5),T(),pe(14,kne,3,0,"button",6),T()()()),i&2){let t,n=e.$implicit,r=M(2);ne("value",n.actionPathIdsCsv),P(6),Ye(n.name),P(),me((t=r.getStepPreview(n))?7:-1,t),P(4),It(r.visibleColors(n)),P(2),me(r.shouldShowMoreButton(n)?13:-1),P(),me(r.shouldShowLessButton(n)?14:-1)}}function Nne(i,e){if(i&1&&(w(0,"app-ui-accordion",2),Dt(1,Fne,15,5,"app-ui-accordion-panel",15,NB),T()),i&2){let t,n=M();ne("value",(t=n.colorItems()[0])==null?null:t.actionPathIdsCsv),P(),It(n.colorItems())}}var Jl=class i{constructor(e,t,n){this.colorState=e;this.customizerState=t;this.sanitizer=n}static SVG_NS="http://www.w3.org/2000/svg";static XLINK_NS="http://www.w3.org/1999/xlink";static PREVIEW_CACHE_VERSION="v1";items=Me([]);palette=Me([]);activeColor=Me(null);colorSelected=kt();COLOR_LIMIT=15;showAllPalette=N(!1);showAllColorItems=N({});previewCache=new Map;lastPreviewSnapshotKey=null;svgSnapshotKey=De(()=>{let e=this.customizerState.svgText();if(!e)return"empty";let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return`${e.length}:${(t>>>0).toString(16)}`});usePalette=De(()=>(this.palette()??[]).length>0);colorItems=De(()=>this.items().filter(e=>e.type==="Color"));visiblePalette=De(()=>{let e=this.palette();return this.showAllPalette()||e.length<=this.COLOR_LIMIT?e:e.slice(0,this.COLOR_LIMIT)});remainingPaletteCount=De(()=>{let e=this.palette();return Math.max(0,e.length-this.COLOR_LIMIT)});visibleColors(e){let t=e.pack.dataSources;return this.showAllColorItems()[e.actionPathIdsCsv||""]||t.length<=this.COLOR_LIMIT?t:t.slice(0,this.COLOR_LIMIT)}remainingColorCount(e){let t=e.pack.dataSources;return Math.max(0,t.length-this.COLOR_LIMIT)}toggleShowAllPalette(){this.showAllPalette.update(e=>!e)}toggleShowAllColors(e){this.showAllColorItems.update(t=>ue(R({},t),{[e]:!t[e]}))}shouldShowMoreButton(e){let t=e.pack.dataSources;return!this.showAllColorItems()[e.actionPathIdsCsv||""]&&t.length>this.COLOR_LIMIT}shouldShowLessButton(e){let t=e.pack.dataSources;return this.showAllColorItems()[e.actionPathIdsCsv||""]&&t.length>this.COLOR_LIMIT}shouldShowPaletteLessButton(){return this.showAllPalette()&&this.palette().length>this.COLOR_LIMIT}getStepPreview(e){let t=this.customizerState.svgDoc(),n=e.actionPathIdsCsv?.trim()??"";if(!t||!n||!this.customizerState.isBrowser())return null;let r=this.svgSnapshotKey();this.lastPreviewSnapshotKey!==r&&(this.previewCache.clear(),this.lastPreviewSnapshotKey=r);let o=`${i.PREVIEW_CACHE_VERSION}|${r}|${n}`;if(this.previewCache.has(o))return this.previewCache.get(o)??null;let s=this.buildPreviewMarkup(t,n),a=s?this.sanitizer.bypassSecurityTrustHtml(s):null;return this.previewCache.set(o,a),a}hasVisiblePreviewContent(e){if(!e)return!1;let t=e.toString();return t?!t.includes('opacity="0"')||/opacity="[1-9]/.test(t)||/opacity="0\.[1-9]/.test(t):!1}onColorSelect(e,t){t&&(e&&this.colorState.applyColor(e,t),this.colorSelected.emit(t))}isActive(e,t){return t?this.colorState.isActiveColor(e,t):!1}getBorderColor(e){return this.isLightColor(e)?"#000000":e}isLightColor(e){if(!e)return!1;let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),o=parseInt(t.substring(4,6),16);return(n*299+r*587+o*114)/1e3>220}buildPreviewMarkup(e,t){let n=e.documentElement;if(!n)return null;let r=this.parseTargets(t);if(!r.length)return null;let o=n.cloneNode(!0);o.setAttribute("xmlns",i.SVG_NS),o.setAttribute("xmlns:xlink",i.XLINK_NS),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("focusable","false"),o.setAttribute("aria-hidden","true"),o.setAttribute("style","display:block;");let s=this.collectTargetGraphics(o,r);if(!s.length)return null;this.isolateTargetGraphics(o,new Set(s));let a=n.getAttribute("viewBox");return a&&o.setAttribute("viewBox",a),new XMLSerializer().serializeToString(o)}isolateTargetGraphics(e,t){let n=new Set(t);t.forEach(o=>{let s=o.parentElement;for(;s&&s!==e;)this.isGraphicsElement(s)&&n.add(s),s=s.parentElement}),Array.from(e.querySelectorAll("*")).filter(o=>this.isGraphicsElement(o)&&!this.isInsideDefs(o)).forEach(o=>{if(n.has(o)){o.setAttribute("opacity","1"),o.removeAttribute("display"),o.removeAttribute("visibility");return}o.setAttribute("opacity","0"),o.setAttribute("pointer-events","none")})}collectTargetGraphics(e,t){let n=new Set;return t.forEach(({selector:r})=>{this.safeQueryAll(e,r).forEach(s=>{if(this.isDefElement(s)){let a=s.id;if(!a)return;this.findReferencingGraphics(e,a).forEach(l=>{n.add(l)});return}this.isGraphicsElement(s)&&n.add(s)})}),Array.from(n)}safeQueryAll(e,t){try{return Array.from(e.querySelectorAll(t))}catch{return[]}}findReferencingGraphics(e,t){let n=this.escapeForAttributeSelector(t),r=e.querySelectorAll(`[fill*="url(#${n})"],[stroke*="url(#${n})"],[filter*="url(#${n})"],[clip-path*="url(#${n})"],[mask*="url(#${n})"],[marker-start*="url(#${n})"],[marker-mid*="url(#${n})"],[marker-end*="url(#${n})"],[style*="url(#${n})"]`);return Array.from(r).filter(o=>this.isGraphicsElement(o)&&!this.isInsideDefs(o))}isInsideDefs(e){return!!e.closest("defs")}isDefElement(e){let t=e.tagName.toLowerCase();return t==="lineargradient"||t==="radialgradient"||t==="pattern"||t==="clippath"||t==="mask"||t==="filter"||t==="marker"}isGraphicsElement(e){return typeof e.getBBox=="function"}measureBounds(e){let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.forEach(s=>{try{let a=s.getBBox();if(!Number.isFinite(a.width)||!Number.isFinite(a.height))return;t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),o=Math.max(o,a.y+a.height)}catch{}}),!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(o)?null:{minX:t,minY:n,width:Math.max(r-t,1),height:Math.max(o-n,1)}}parseTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}escapeForAttributeSelector(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}static \u0275fac=function(t){return new(t||i)($t(rh),$t(Bn),$t(fp))};static \u0275cmp=at({type:i,selectors:[["app-customizer-color-panel"]],inputs:{items:[1,"items"],palette:[1,"palette"],activeColor:[1,"activeColor"]},outputs:{colorSelected:"colorSelected"},decls:4,vars:1,consts:[[1,"panel-body"],[1,"color-section"],[1,"child-accordion",3,"value"],[1,"swatch-grid"],["type","button",1,"swatch-btn",3,"swatch-btn--active","border-color","appTooltip"],["type","button",1,"swatch-btn","swatch-btn--more"],["type","button",1,"swatch-show-less"],["type","button",1,"swatch-btn",3,"click","appTooltip"],[1,"swatch-dot"],[1,"ri-check-line","swatch-check",3,"swatch-check--dark"],[1,"ri-check-line","swatch-check"],["type","button",1,"swatch-btn","swatch-btn--more",3,"click"],[1,"swatch-dot","swatch-dot--more"],["type","button",1,"swatch-show-less",3,"click"],[1,"ri-arrow-up-s-line"],[3,"value"],[1,"accordion-header-content"],[1,"accordion-header-title"],[1,"ri-palette-line","accordion-header-icon"],[1,"accordion-header-label"],[3,"previewMarkup","label"]],template:function(t,n){t&1&&(w(0,"div",0),pe(1,Sne,6,2,"div",1)(2,Dne,2,0)(3,Nne,3,1,"app-ui-accordion",2),T()),t&2&&(P(),me(n.usePalette()?1:n.colorItems().length<=1?2:3))},dependencies:[qt,fr,Ni,bi,gr,mr,n_],styles:["[_nghost-%COMP%]{display:block}.color-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:10px 12px}.swatch-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px}.swatch-btn[_ngcontent-%COMP%]{position:relative;display:inline-flex;align-items:center;justify-content:center;width:43px;height:43px;border-radius:10px;background:#fff;border:2px solid transparent;padding:3px;cursor:pointer;transition:border-color .16s,box-shadow .16s,transform .16s}.swatch-btn[_ngcontent-%COMP%]:active{transform:scale(.96)}.swatch-btn--active[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #6265f138}.swatch-dot[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;border:1px solid rgba(0,0,0,.06);transition:box-shadow .16s;flex-shrink:0}.swatch-btn[_ngcontent-%COMP%]:hover .swatch-dot[_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px #00000014}.swatch-check[_ngcontent-%COMP%]{font-size:14px;font-weight:900;color:#fff;line-height:1}.swatch-check--dark[_ngcontent-%COMP%]{color:#111827}.swatch-btn--more[_ngcontent-%COMP%]{border:2px dashed #d1d5db;background:#f9fafb}.swatch-btn--more[_ngcontent-%COMP%]:hover{border-color:#6265f1;background:#f5f3ff}.swatch-dot--more[_ngcontent-%COMP%]{background:transparent;border:none;font-size:11px;font-weight:700;color:#6b7280;letter-spacing:-.02em}.swatch-btn--more[_ngcontent-%COMP%]:hover .swatch-dot--more[_ngcontent-%COMP%]{color:#6265f1}.swatch-show-less[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;padding:4px 10px;border-radius:9999px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;font-size:11px;font-weight:500;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.swatch-show-less[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.swatch-show-less[_ngcontent-%COMP%]:hover{border-color:#6265f1;color:#6265f1;background:#f5f3ff}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px;width:100%}.accordion-header-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;min-width:0}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:#6265f1}.accordion-header-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.swatch-btn[_ngcontent-%COMP%]{width:36px;height:36px}.swatch-dot[_ngcontent-%COMP%]{width:24px;height:24px}}@media(max-width:480px){.color-section[_ngcontent-%COMP%]{padding:8px 10px}}"],changeDetection:0})};var Ws=class i{min=Me(0);max=Me(100);step=Me(1);disabled=Me(!1);onChange=kt();value=N(0);onModelChange=()=>{};onModelTouched=()=>{};writeValue(e){this.value.set(typeof e=="number"?e:0)}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){e!==this.disabled()&&this._runtimeDisabled.set(e)}_runtimeDisabled=N(!1);handleInput(e){let t=Number(e);Number.isFinite(t)&&(this.value.set(t),this.onModelChange(t),this.onChange.emit(t))}handleBlur(){this.onModelTouched()}isDisabled(){return this.disabled()||this._runtimeDisabled()}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-slider"]],inputs:{min:[1,"min"],max:[1,"max"],step:[1,"step"],disabled:[1,"disabled"]},outputs:{onChange:"onChange"},features:[ao([{provide:sl,useExisting:zi(()=>i),multi:!0}])],decls:2,vars:5,consts:[[1,"ui-slider-track"],["type","range",1,"ui-slider",3,"input","blur","min","max","step","value","disabled"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"input",1),Gn("input",function(o){return n.handleInput(o.target.value)})("blur",function(){return n.handleBlur()}),he()()),t&2&&(P(),di("min",n.min())("max",n.max())("step",n.step())("value",n.value())("disabled",n.isDisabled()))},dependencies:[qt,fo],styles:["[_nghost-%COMP%]{display:inline-flex;width:100%}.ui-slider-track[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center}.ui-slider[_ngcontent-%COMP%]{width:100%;accent-color:rgb(var(--primary-color, 98 101 241));cursor:pointer;height:.35rem;border-radius:9999px;background:linear-gradient(90deg,rgb(var(--primary-color, 98 101 241) / .25),rgb(var(--secondary-color, 16 185 129) / .25))}"],changeDetection:0})};var UB={removePattern:"Remove pattern"},Yr={patternFill:"data-pattern-fill",originalFill:"data-original-fill",originalStyleFill:"data-original-style-fill"},Bm="__empty__";var BB={type:"custom",closable:!0,backdrop:!0,buttons:[{label:"Cancel",action:"cancel"},{label:"Confirm",action:"confirm",isPrimary:!0}]};var $s=class i{dialogConfigs=N([]);activeDialogId=N(null);dialogCounter=0;resultCallbacks=new Map;isOpen=N(!1);currentConfig=N(null);showDialog(e){let t=e.id||`dialog-${++this.dialogCounter}`,n=ue(R(R({},BB),e),{id:t});return new Promise(r=>{this.resultCallbacks.set(t,r),this.currentConfig.set(n),this.activeDialogId.set(t),this.isOpen.set(!0)})}closeDialog(e){let t=this.activeDialogId();if(!t)return;let n=this.resultCallbacks.get(t);n&&(n(e),this.resultCallbacks.delete(t)),this.isOpen.set(!1),this.currentConfig.set(null),this.activeDialogId.set(null)}confirm(){this.closeDialog({action:"confirm"})}cancel(){this.closeDialog({action:"cancel"})}handleCustomAction(e,t){this.closeDialog({action:"custom",customId:e,data:t})}getActiveConfig(){return this.currentConfig()}getIsOpen(){return this.isOpen()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var oh=class i{constructor(e,t){this.customizerState=e;this.dialogService=t}minPatternOpacity=0;maxPatternOpacity=1;patternOpacityStep=.05;patternTransformMinScale=.25;patternTransformMaxScale=6;patternTransformScaleStep=.05;patternTransformMinRotation=-180;patternTransformMaxRotation=180;patternTransformRotationStep=1;patternTransformMinTranslate=-500;patternTransformMaxTranslate=500;patternTransformTranslateStep=1;uploadedPatternOptions=N([]);selectedUploadedPatternId=N(null);selectedPatternFileUrl=N(null);patternTargetsInput=N("");patternDefinitionState=N({});patternPivotCache=N(new Map);state=De(()=>({definition:this.patternDefinitionState(),uploadedOptions:this.uploadedPatternOptions(),selectedId:this.selectedUploadedPatternId(),selectedFileUrl:this.selectedPatternFileUrl()}));refreshFromSvg(){this.rebuildPatternOptionsFromSvgDoc()}isPatternSelected(e){return e?this.selectedPatternFileUrl()===e:!1}async applyPatternFromUrl(e,t,n=!1){let r=this.customizerState.svgDoc();if(!r){n||this.showErrorDialog(Ul.garmentSvgRequired,Us.garmentSvgRequired);return}if(!e){n||this.showErrorDialog(Ul.patternSvgUrlRequired,Us.patternSvgUrlRequired);return}let o=this.parsePatternTargetIds(t);if(!o||o.length===0){n||this.showErrorDialog(Ul.targetIdRequired,Us.targetIdRequired);return}try{let s=await fetch(e,{cache:"no-cache"});if(!s.ok)throw new Error(`Failed to load SVG (${s.status})`);let a=await s.text();if(!a||!a.includes(Ax)){this.showErrorDialog(Ul.invalidSvgContent,Us.invalidSvgContent);return}let l=this.ingestPatternSvgAndReturnIds(a);if(l.length===0){this.showErrorDialog(Ul.noPatternDefinitionsImported,Us.noPatternDefinitionsImported);return}let c=l[0];this.selectedUploadedPatternId.set(c),this.selectedPatternFileUrl.set(e);let d=`url(#${c})`,u=[],f=!1;if(o.forEach(h=>{let p=r.getElementById(h);if(!p){u.push(h);return}if(!p.hasAttribute(Yr.originalFill)){let v=p.getAttribute("fill");p.setAttribute(Yr.originalFill,v&&v.trim().length>0?v:Bm)}if(!p.hasAttribute(Yr.originalStyleFill)){let v=this.readStyleProperty(p,"fill");p.setAttribute(Yr.originalStyleFill,v&&v.trim().length>0?v:Bm)}this.stripStyleProperty(p,"fill"),p.setAttribute("fill",d),p.setAttribute(Yr.patternFill,c),f=!0}),!f){n||this.showErrorDialog(Ul.noMatchingTargetIds,Us.noMatchingTargetIds);return}u.length>0&&console.warn(Us.skippedMissingTargetIds,u.join(", ")),this.customizerState.markSvgMutated(r)}catch(s){console.error(Us.applyPatternFromUrlFailed,s),n||this.showErrorDialog(Ul.failedApplyPattern,Us.failedApplyPattern)}}removePatternFromTargets(e){let t=this.customizerState.svgDoc();if(!t)return;let n=this.parsePatternTargetIds(e);if(n.length===0)return;let r=!1;if(n.forEach(s=>{let a=t.getElementById(s);if(!a)return;let l=a.getAttribute(Yr.originalFill),c=a.getAttribute(Yr.originalStyleFill);l&&l!==Bm?a.setAttribute("fill",l):a.removeAttribute("fill"),c&&c!==Bm?this.setStyleProperty(a,"fill",c):this.stripStyleProperty(a,"fill"),a.removeAttribute(Yr.patternFill),a.removeAttribute(Yr.originalFill),a.removeAttribute(Yr.originalStyleFill),r=!0}),!r)return;let o=this.selectedUploadedPatternId();o&&!this.isPatternDefinitionApplied(t,o)&&(this.selectedUploadedPatternId.set(null),this.selectedPatternFileUrl.set(null)),this.customizerState.markSvgMutated(t)}hasPatternAppliedToTargets(e){let t=this.customizerState.svgDoc();if(!t)return!1;let n=this.parsePatternTargetIds(e);return n.length===0?!1:n.some(r=>{let o=t.getElementById(r);if(!o)return!1;let s=o.getAttribute("data-pattern-fill");if(s&&s.trim().length>0)return!0;let a=o.getAttribute("fill")??"";return/^url\(#.+\)$/.test(a.trim())})}onPatternDefinitionScaleChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{scale:n})}onPatternDefinitionRotationChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{rotation:n})}onPatternDefinitionTranslateXChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{translateX:n})}onPatternDefinitionTranslateYChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{translateY:n})}onPatternDefinitionOpacityChange(e,t){let n=typeof t=="number"?t:Number.parseFloat(t);!Number.isFinite(n)||!e||this.updatePatternDefinitionState(e,{opacity:n})}updatePatternTargetsInput(e){this.patternTargetsInput.set(e)}setSelectedUploadedPattern(e){this.selectedUploadedPatternId.set(e)}setSelectedPatternFileUrl(e){let t=e?.trim();this.selectedPatternFileUrl.set(t&&t.length>0?t:null)}updatePatternDefinitionState(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=n.getElementById(e);if(!(r instanceof SVGPatternElement))return;let o=this.patternDefinitionState()[e]??R({},Bs),s={scale:t.scale!==void 0?this.normalizePatternDefinitionScale(t.scale):o.scale,rotation:t.rotation!==void 0?this.normalizePatternDefinitionRotation(t.rotation):o.rotation,translateX:t.translateX!==void 0?this.normalizePatternDefinitionTranslate(t.translateX):o.translateX,translateY:t.translateY!==void 0?this.normalizePatternDefinitionTranslate(t.translateY):o.translateY,opacity:t.opacity!==void 0?this.normalizePatternDefinitionOpacity(t.opacity):o.opacity};this.patternDefinitionState.set(ue(R({},this.patternDefinitionState()),{[e]:s})),this.applyPatternDefinitionAttributes(r,s),this.customizerState.markSvgMutated(n)}rebuildPatternOptionsFromSvgDoc(){let e=this.customizerState.svgDoc();if(!e){this.uploadedPatternOptions.set([]),this.selectedUploadedPatternId.set(null),this.selectedPatternFileUrl.set(null),this.patternDefinitionState.set({});return}let t=Array.from(e.querySelectorAll("pattern[id]")),n={},r=Array.from(new Set(t.map(o=>o.getAttribute("id")).filter(o=>!!o&&o.trim().length>0).map(o=>o.trim())));r.forEach(o=>{let s=e.getElementById(o);if(!s)return;let a=this.readPatternDefinitionState(s);n[o]=a,this.applyPatternDefinitionAttributes(s,a)}),this.patternDefinitionState.set(n),this.uploadedPatternOptions.set(r.map(o=>({id:o,label:o}))),(!this.selectedUploadedPatternId()||!r.includes(this.selectedUploadedPatternId()))&&(this.selectedUploadedPatternId.set(r[0]??null),r.length===0&&this.selectedPatternFileUrl.set(null))}ingestPatternSvgAndReturnIds(e){let t=this.customizerState.svgDoc();if(!t)return[];let r=new DOMParser().parseFromString(e,Qo);if(r.querySelector(Ld))return[];let o=Array.from(r.querySelectorAll("pattern[id]"));if(o.length===0)return[];let s=this.ensureDefsElement(),a=[];return o.forEach(l=>{let c=l.getAttribute("id")?.trim();if(!c)return;let d=t.importNode(l,!0),u=t.getElementById(c);if(u instanceof SVGPatternElement)u.parentNode?.replaceChild(d,u);else if(!u)s.appendChild(d);else return;a.push(c)}),this.rebuildPatternOptionsFromSvgDoc(),a}parsePatternTargetIds(e){if(!e||e.trim().length===0)return[];let t=e.trim(),n=this.customizerState.svgDoc();if(!n)return[];if(t.includes("[")){try{let r=n.querySelectorAll(t);if(r.length>0){let o=[];r.forEach(a=>{let l=a.getAttribute("id");l&&l.trim().length>0&&o.push(l.trim())});let s=Array.from(new Set(o));if(s.length>0)return s}}catch(r){console.warn("CSS selector parsing failed, trying alternative approach:",t,r)}try{let r=t.split(",").map(s=>s.trim()).filter(s=>s.length>0),o=[];for(let s of r)if(s.includes("["))n.querySelectorAll(s).forEach(l=>{let c=l.getAttribute("id")?.trim();c&&c.length>0&&!o.includes(c)&&o.push(c)});else{let a=s.replace(/^#/,"").trim();a.length>0&&!o.includes(a)&&o.push(a)}if(o.length>0)return o}catch(r){console.error("Error parsing mixed CSS selectors:",t,r)}}return t.split(",").map(r=>r.trim()).filter(r=>r.length>0).map(r=>r.startsWith("#")?r.slice(1):r)}isPatternDefinitionApplied(e,t){let n=e.querySelectorAll(`[${Yr.patternFill}]`);return Array.from(n).some(r=>r.getAttribute(Yr.patternFill)?.trim()===t)}ensureDefsElement(){let e=this.customizerState.svgDoc();if(!e)throw new Error("SVG document not loaded");let t=e.documentElement,n=t.namespaceURI||Ci,r=t.querySelector("defs");return r||(r=e.createElementNS(n,"defs"),t.insertBefore(r,t.firstChild)),r}clampPatternOpacity(e){return Number.isFinite(e)?Math.min(this.maxPatternOpacity,Math.max(this.minPatternOpacity,e)):1}normalizePatternDefinitionScale(e){if(!Number.isFinite(e))return Bs.scale;let t=Math.min(this.patternTransformMaxScale,Math.max(this.patternTransformMinScale,e));return Math.round(t*1e3)/1e3}normalizePatternDefinitionRotation(e){if(!Number.isFinite(e))return Bs.rotation;let t=Math.min(this.patternTransformMaxRotation,Math.max(this.patternTransformMinRotation,e));return Math.round(t*10)/10}normalizePatternDefinitionTranslate(e){if(!Number.isFinite(e))return Bs.translateX;let t=Math.min(this.patternTransformMaxTranslate,Math.max(this.patternTransformMinTranslate,e));return Math.round(t*10)/10}normalizePatternDefinitionOpacity(e){return this.clampPatternOpacity(e)}readPatternDefinitionState(e){let t=(p,v)=>{let g=p!==null?Number.parseFloat(p):NaN;return Number.isFinite(g)?g:v},n=t(e.getAttribute("data-pattern-scale"),Bs.scale),r=t(e.getAttribute("data-pattern-rotation"),Bs.rotation),o=t(e.getAttribute("data-pattern-translate-x"),Bs.translateX),s=t(e.getAttribute("data-pattern-translate-y"),Bs.translateY),a=n,l=r,c=o,d=s,u=e.getAttribute("patternTransform");if(u){let p=u.match(/translate\(([^)]+)\)/i);if(p){let m=p[1].split(/[\s,]+/).map(b=>Number.parseFloat(b)).filter(b=>Number.isFinite(b));m.length>=1&&(c=m[0],d=m.length>=2?m[1]:m[0])}let v=u.match(/rotate\(([^)]+)\)/i);if(v){let m=Number.parseFloat(v[1].split(/[\s,]+/)[0]??"");Number.isFinite(m)&&(l=m)}let g=u.match(/scale\(([^)]+)\)/i);if(g){let m=Number.parseFloat(g[1].split(/[\s,]+/)[0]??"");Number.isFinite(m)&&(a=m)}}let f=e.getAttribute("data-pattern-opacity")??e.getAttribute("opacity"),h=this.normalizePatternDefinitionOpacity(f!==null?Number.parseFloat(f):Bs.opacity);return{scale:this.normalizePatternDefinitionScale(a),rotation:this.normalizePatternDefinitionRotation(l),translateX:this.normalizePatternDefinitionTranslate(c),translateY:this.normalizePatternDefinitionTranslate(d),opacity:h}}composePatternDefinitionTransform(e,t){let n=this.computePatternPivot(e),r=this.composeCenteredTransformMatrix({scale:t.scale,rotation:t.rotation,translateX:t.translateX,translateY:t.translateY},n);return this.matrixToTransform(r)}computePatternPivot(e){let t=e.id??"";if(t&&this.patternPivotCache().has(t))return this.patternPivotCache().get(t);let n=null,r=e.getAttribute("viewBox");if(r){let o=r.split(/[\s,]+/).map(s=>Number.parseFloat(s)).filter(s=>Number.isFinite(s));if(o.length===4){let[s,a,l,c]=o;n={cx:s+l/2,cy:a+c/2}}}if(!n){let o=this.parseNumericAttribute(e.getAttribute("width"),1),s=this.parseNumericAttribute(e.getAttribute("height"),1),a=this.parseNumericAttribute(e.getAttribute("x"),0),l=this.parseNumericAttribute(e.getAttribute("y"),0);n={cx:a+o/2,cy:l+s/2}}return t&&this.patternPivotCache.update(o=>{let s=new Map(o);return s.set(t,n),s}),n}parseNumericAttribute(e,t){if(!e)return t;let n=Number.parseFloat(e);return Number.isFinite(n)?n:t}applyPatternOpacity(e,t){let n=this.normalizePatternDefinitionOpacity(t);this.resolvePatternReferenceChain(e).forEach(o=>{o.querySelectorAll("path, rect, circle, ellipse, polygon, polyline, image, g").forEach(a=>{if(this.stripStyleProperty(a,"opacity"),Math.abs(n-1)<1e-4){a.removeAttribute("opacity");return}a.setAttribute("opacity",n.toString())})})}resolvePatternReferenceChain(e){let t=this.customizerState.svgDoc();if(!t)return[e];let n=[],r=new Set,o=e;for(;o;){let s=o.id?.trim()||`__inline-${n.length}`;if(r.has(s))break;r.add(s),n.push(o);let a=this.extractPatternRefId(o);if(!a)break;let l=t.getElementById(a);o=l instanceof SVGPatternElement?l:null}return n}extractPatternRefId(e){let t=e.getAttribute("href")??e.getAttributeNS("http://www.w3.org/1999/xlink","href")??e.getAttribute("xlink:href");if(!t)return null;let n=t.trim();if(!n)return null;let r=n.indexOf("#");if(r===-1)return null;let o=n.slice(r+1).trim();return o.length>0?o:null}applyPatternDefinitionAttributes(e,t){let n={scale:this.normalizePatternDefinitionScale(t.scale),rotation:this.normalizePatternDefinitionRotation(t.rotation),translateX:this.normalizePatternDefinitionTranslate(t.translateX),translateY:this.normalizePatternDefinitionTranslate(t.translateY),opacity:this.normalizePatternDefinitionOpacity(t.opacity)};e.setAttribute("data-pattern-scale",n.scale.toString()),e.setAttribute("data-pattern-rotation",n.rotation.toString()),e.setAttribute("data-pattern-translate-x",n.translateX.toString()),e.setAttribute("data-pattern-translate-y",n.translateY.toString()),e.setAttribute("data-pattern-opacity",n.opacity.toString()),e.removeAttribute("opacity");let r=this.composePatternDefinitionTransform(e,n);r?e.setAttribute("patternTransform",r):e.removeAttribute("patternTransform"),this.applyPatternOpacity(e,n.opacity)}stripStyleProperty(e,t){let n=e.getAttribute("style");if(!n)return;let r=t.toLowerCase(),o=n.split(";").map(s=>s.trim()).filter(s=>s&&!s.toLowerCase().startsWith(`${r}:`));o.length>0?e.setAttribute("style",o.join(";")):e.removeAttribute("style")}readStyleProperty(e,t){let n=e.getAttribute("style");if(!n)return null;let r=t.toLowerCase(),o=n.split(";").map(a=>a.trim()).find(a=>a.toLowerCase().startsWith(`${r}:`));if(!o)return null;let s=o.slice(o.indexOf(":")+1).trim();return s.length>0?s:null}setStyleProperty(e,t,n){let r=e.getAttribute("style"),o=t.toLowerCase(),s=(r??"").split(";").map(a=>a.trim()).filter(a=>a.length>0).filter(a=>!a.toLowerCase().startsWith(`${o}:`));s.push(`${t}: ${n}`),e.setAttribute("style",s.join("; "))}composeCenteredTransformMatrix(e,t){let n=this.identityMatrix();return e.scale!==void 0&&!this.isNearlyZero(e.scale-1)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.scaleMatrix(e.scale,e.scale)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),e.rotation!==void 0&&!this.isNearlyZero(e.rotation)&&(n=this.multiplyMatrices(n,this.translateMatrix(t.cx,t.cy)),n=this.multiplyMatrices(n,this.rotateMatrix(e.rotation)),n=this.multiplyMatrices(n,this.translateMatrix(-t.cx,-t.cy))),(e.translateX!==void 0&&!this.isNearlyZero(e.translateX)||e.translateY!==void 0&&!this.isNearlyZero(e.translateY))&&(n=this.multiplyMatrices(n,this.translateMatrix(e.translateX??0,e.translateY??0))),n}matrixToTransform(e){if(this.isNearlyZero(e.a-1)&&this.isNearlyZero(e.b)&&this.isNearlyZero(e.c)&&this.isNearlyZero(e.d-1)&&this.isNearlyZero(e.e)&&this.isNearlyZero(e.f))return null;let n=this.roundMatrixValue(e.a),r=this.roundMatrixValue(e.b),o=this.roundMatrixValue(e.c),s=this.roundMatrixValue(e.d),a=this.roundMatrixValue(e.e),l=this.roundMatrixValue(e.f);return`matrix(${n} ${r} ${o} ${s} ${a} ${l})`}isNearlyZero(e,t=1e-4){return Math.abs(e)<=t}roundMatrixValue(e,t=6){if(this.isNearlyZero(e))return 0;let n=Math.pow(10,t);return Math.round(e*n)/n}identityMatrix(){return{a:1,b:0,c:0,d:1,e:0,f:0}}multiplyMatrices(e,t){return{a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d,e:e.a*t.e+e.c*t.f+e.e,f:e.b*t.e+e.d*t.f+e.f}}translateMatrix(e,t){return{a:1,b:0,c:0,d:1,e,f:t}}scaleMatrix(e,t){return{a:e,b:0,c:0,d:t,e:0,f:0}}rotateMatrix(e){let t=e*Math.PI/180,n=Math.cos(t),r=Math.sin(t);return{a:n,b:r,c:-r,d:n,e:0,f:0}}reset(){this.uploadedPatternOptions.set([]),this.selectedUploadedPatternId.set(null),this.selectedPatternFileUrl.set(null),this.patternTargetsInput.set(""),this.patternDefinitionState.set({})}showErrorDialog(e,t){this.dialogService.showDialog({type:"error",title:e,message:t,buttons:[{label:"Dismiss",action:"confirm",isPrimary:!0}]})}static \u0275fac=function(t){return new(t||i)(Xe(Bn),Xe($s))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function Une(i,e){if(i&1){let t=Ne();w(0,"div",9)(1,"button",12),ie("click",function(){Z(t);let r=M(2).$implicit,o=M(2);return J(o.patternState.removePatternFromTargets(r.actionPathIdsCsv))}),Y(2,"i",13),w(3,"span"),k(4),T()()()}if(i&2){let t=M(4);P(4),Ye(t.labels.removePattern)}}function Bne(i,e){i&1&&(w(0,"div",18),Y(1,"i",19),T())}function zne(i,e){if(i&1){let t=Ne();w(0,"div",14),ie("click",function(){let r=Z(t).$implicit,o=M(2).$implicit,s=M(2);return J(s.patternState.applyPatternFromUrl(r.fileUrl,o.actionPathIdsCsv))}),Y(1,"img",15),w(2,"div",16)(3,"span",17),k(4),T()(),pe(5,Bne,2,0,"div",18),T()}if(i&2){let t=e.$implicit,n=M(4);pt("pattern-pick-card--selected",n.patternState.isPatternSelected(t.fileUrl)),P(),ne("src",t.thumbnailUrl,ji)("alt",t.name),P(3),Ye(t.name),P(),me(n.patternState.isPatternSelected(t.fileUrl)?5:-1)}}function Vne(i,e){if(i&1){let t=Ne();w(0,"div",22)(1,"p",23),Y(2,"i",24),k(3," Adjust the transform for the selected pattern. Changes affect every garment area using this pattern. "),T(),w(4,"div",25)(5,"span",26),Y(6,"i",27),k(7," Scale "),T(),w(8,"div",28)(9,"app-ui-slider",29),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(5);return J(s.patternState.onPatternDefinitionScaleChange(o,r))}),T(),w(10,"span",30),k(11),Ii(12,"number"),T()()(),w(13,"div",25)(14,"span",26),Y(15,"i",31),k(16," Rotation "),T(),w(17,"div",28)(18,"app-ui-slider",29),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(5);return J(s.patternState.onPatternDefinitionRotationChange(o,r))}),T(),w(19,"span",30),k(20),Ii(21,"number"),T()()(),w(22,"div",25)(23,"span",26),Y(24,"i",32),k(25," Offset X "),T(),w(26,"div",28)(27,"app-ui-slider",29),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(5);return J(s.patternState.onPatternDefinitionTranslateXChange(o,r))}),T(),w(28,"span",30),k(29),Ii(30,"number"),T()()(),w(31,"div",25)(32,"span",26),Y(33,"i",33),k(34," Offset Y "),T(),w(35,"div",28)(36,"app-ui-slider",29),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(5);return J(s.patternState.onPatternDefinitionTranslateYChange(o,r))}),T(),w(37,"span",30),k(38),Ii(39,"number"),T()()(),w(40,"div",25)(41,"span",26),Y(42,"i",34),k(43," Opacity "),T(),w(44,"div",28)(45,"app-ui-slider",29),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(5);return J(s.patternState.onPatternDefinitionOpacityChange(o,r))}),T(),w(46,"span",30),k(47),Ii(48,"number"),T()()()()}if(i&2){let t=e,n=M(6);P(9),ne("min",n.patternState.patternTransformMinScale)("max",n.patternState.patternTransformMaxScale)("step",n.patternState.patternTransformScaleStep)("ngModel",t.scale),P(2),zt("",Wi(12,25,t.scale,"1.2-2"),"\xD7"),P(7),ne("min",n.patternState.patternTransformMinRotation)("max",n.patternState.patternTransformMaxRotation)("step",n.patternState.patternTransformRotationStep)("ngModel",t.rotation),P(2),zt("",Wi(21,28,t.rotation,"1.0-1"),"\xB0"),P(7),ne("min",n.patternState.patternTransformMinTranslate)("max",n.patternState.patternTransformMaxTranslate)("step",n.patternState.patternTransformTranslateStep)("ngModel",t.translateX),P(2),zt("",Wi(30,31,t.translateX,"1.0-1"),"px"),P(7),ne("min",n.patternState.patternTransformMinTranslate)("max",n.patternState.patternTransformMaxTranslate)("step",n.patternState.patternTransformTranslateStep)("ngModel",t.translateY),P(2),zt("",Wi(39,34,t.translateY,"1.0-1"),"px"),P(7),ne("min",n.patternState.minPatternOpacity)("max",n.patternState.maxPatternOpacity)("step",n.patternState.patternOpacityStep)("ngModel",t.opacity),P(2),Ye(Wi(48,37,t.opacity,"1.2-2"))}}function Gne(i,e){if(i&1&&pe(0,Vne,49,40,"div",22),i&2){let t,n=M(5);me((t=n.patternState.patternDefinitionState()[e])?0:-1,t)}}function Hne(i,e){i&1&&(w(0,"div",21),Y(1,"i",35),w(2,"p",36),k(3,"No pattern selected"),T(),w(4,"p",37),k(5," Apply a pattern first, then adjust its scale, rotation, move, or opacity here. "),T()())}function jne(i,e){if(i&1&&(w(0,"app-ui-accordion-panel",4)(1,"app-ui-accordion-header")(2,"div",5),Y(3,"i",20),w(4,"span",7),k(5,"Transformation"),T()()(),w(6,"app-ui-accordion-content"),pe(7,Gne,1,1)(8,Hne,6,0,"div",21),T()()),i&2){let t,n=M(2).$implicit,r=M(2);ne("value",n.id+"-transform"),P(7),me((t=r.patternState.selectedUploadedPatternId())?7:8,t)}}function Wne(i,e){if(i&1&&(w(0,"app-ui-accordion-panel",4)(1,"app-ui-accordion-header")(2,"div",5),Y(3,"i",6),w(4,"span",7),k(5),T()()(),w(6,"app-ui-accordion-content")(7,"div",8),pe(8,Une,5,1,"div",9),w(9,"div",10),Dt(10,zne,6,6,"div",11,tl().trackByFileUrl,!0),T()()()(),pe(12,jne,9,2,"app-ui-accordion-panel",4)),i&2){let t=M().$implicit,n=M(2);ne("value",t.id),P(5),Ye(t.name),P(3),me(t.actionPathIdsCsv&&n.patternState.hasPatternAppliedToTargets(t.actionPathIdsCsv)?8:-1),P(2),It(t.pack.dataSources),P(2),me(t.isTransformationRequired?12:-1)}}function $ne(i,e){if(i&1&&pe(0,Wne,13,4),i&2){let t=e.$implicit;me(t.type==="Pattern"?0:-1)}}function Xne(i,e){if(i&1&&(w(0,"app-ui-accordion",2),Dt(1,$ne,1,1,null,null,Iu),T()),i&2){let t=M();ne("value",t.firstPatternPanel()),P(),It(t.items())}}function Yne(i,e){if(i&1){let t=Ne();w(0,"div",9)(1,"button",12),ie("click",function(){Z(t);let r=M(2).$implicit,o=M(2);return J(o.patternState.removePatternFromTargets(r.actionPathIdsCsv))}),Y(2,"i",13),w(3,"span"),k(4),T()()()}if(i&2){let t=M(4);P(4),Ye(t.labels.removePattern)}}function qne(i,e){i&1&&(w(0,"div",18),Y(1,"i",19),T())}function Kne(i,e){if(i&1){let t=Ne();w(0,"div",14),ie("click",function(){let r=Z(t).$implicit,o=M(2).$implicit,s=M(2);return J(s.patternState.applyPatternFromUrl(r.fileUrl,o.actionPathIdsCsv))}),Y(1,"img",15),w(2,"div",16)(3,"span",17),k(4),T()(),pe(5,qne,2,0,"div",18),T()}if(i&2){let t=e.$implicit,n=M(4);pt("pattern-pick-card--selected",n.patternState.isPatternSelected(t.fileUrl)),P(),ne("src",t.thumbnailUrl,ji)("alt",t.name),P(3),Ye(t.name),P(),me(n.patternState.isPatternSelected(t.fileUrl)?5:-1)}}function Zne(i,e){if(i&1&&(w(0,"div",38)(1,"div",39),Y(2,"i",40),w(3,"span"),k(4),T()(),w(5,"div",8),pe(6,Yne,5,1,"div",9),w(7,"div",10),Dt(8,Kne,6,6,"div",11,tl().trackByFileUrl,!0),T()()()),i&2){let t=M().$implicit,n=M(2);P(4),Ye(t.name),P(2),me(t.actionPathIdsCsv&&n.patternState.hasPatternAppliedToTargets(t.actionPathIdsCsv)?6:-1),P(2),It(t.pack.dataSources)}}function Jne(i,e){if(i&1&&pe(0,Zne,10,2,"div",38),i&2){let t=e.$implicit;me(t.type==="Pattern"?0:-1)}}function Qne(i,e){if(i&1&&(w(0,"div",3),Dt(1,Jne,1,1,null,null,Iu),T()),i&2){let t=M();P(),It(t.items())}}var i_=class i{constructor(e){this.patternState=e}items=Me.required();labels=UB;useAccordion=De(()=>{let e=this.items()??[];if(e.length===0)return!1;let t=e.some(n=>n.type==="Pattern"&&n.isTransformationRequired);return e.length>1||t});firstPatternPanel=()=>{let e=(this.items()??[]).find(t=>t.type==="Pattern"||t.type==="Overlay");return e?e.id??e.actionPathIdsCsv??null:null};trackByFileUrl(e,t){return t.fileUrl??e}static \u0275fac=function(t){return new(t||i)($t(oh))};static \u0275cmp=at({type:i,selectors:[["app-customizer-pattern-panel"]],inputs:{items:[1,"items"]},decls:4,vars:1,consts:[[1,"panel-body"],[1,"pattern-panel"],[1,"w-full",3,"value"],[1,"placement-list"],[3,"value"],[1,"accordion-header-content"],[1,"ri-image-line","accordion-header-icon"],[1,"accordion-header-label"],[1,"pattern-picker-section"],[1,"pattern-picker-toolbar"],[1,"pattern-pick-grid"],[1,"pattern-pick-card",3,"pattern-pick-card--selected"],["type","button",1,"pattern-remove",3,"click"],[1,"ri-delete-bin-6-fill"],[1,"pattern-pick-card",3,"click"],[1,"pattern-pick-card__img",3,"src","alt"],[1,"pattern-pick-card__hover"],[1,"pattern-pick-card__name"],[1,"pattern-pick-card__check"],[1,"ri-check-line"],[1,"ri-settings-3-line","accordion-header-icon"],[1,"transform-empty"],[1,"transform-section"],[1,"transform-hint"],[1,"ri-information-line"],[1,"prop-row"],[1,"prop-label"],[1,"ri-zoom-in-line","prop-icon"],[1,"slider-row"],[1,"flex-1",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"ri-refresh-line","prop-icon"],[1,"ri-draggable","prop-icon"],[1,"ri-draggable","prop-icon",2,"transform","rotate(90deg)"],[1,"ri-contrast-line","prop-icon"],[1,"ri-image-edit-line","transform-empty__icon"],[1,"transform-empty__title"],[1,"transform-empty__hint"],[1,"placement-section"],[1,"placement-section-header"],[1,"ri-image-line"]],template:function(t,n){t&1&&(w(0,"div",0)(1,"div",1),pe(2,Xne,3,1,"app-ui-accordion",2)(3,Qne,3,0,"div",3),T()()),t&2&&(P(2),me(n.useAccordion()?2:3))},dependencies:[qt,fo,al,ua,Ni,bi,gr,mr,Ws,Nc],styles:['.panel-body[_ngcontent-%COMP%], .pattern-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:#6265f1}.accordion-header-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.pattern-picker-section[_ngcontent-%COMP%]{padding:10px 12px;display:flex;flex-direction:column;gap:10px}.pattern-picker-toolbar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.pattern-remove[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:9999px;border:1px solid #fca5a5;background:#fff1f2;color:#b91c1c;font-weight:600;font-size:11px;cursor:pointer;transition:background .15s,box-shadow .15s,transform .15s}.pattern-remove[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.pattern-remove[_ngcontent-%COMP%]:hover{background:#ffe4e6;box-shadow:0 4px 12px #ef44442e}.pattern-remove[_ngcontent-%COMP%]:active{transform:translateY(0)}.pattern-pick-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pattern-pick-card[_ngcontent-%COMP%]{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;border:1.5px solid #e5e7eb;background:#f9fafb;cursor:pointer;box-shadow:0 1px 3px #0000000f;transition:border-color .18s,transform .18s,box-shadow .18s}.pattern-pick-card[_ngcontent-%COMP%]:hover{border-color:#6265f1;transform:translateY(-2px) scale(1.02);box-shadow:0 6px 18px #6265f12e}.pattern-pick-card[_ngcontent-%COMP%]:active{transform:scale(.97)}.pattern-pick-card--selected[_ngcontent-%COMP%]{border-color:#6265f1;box-shadow:0 0 0 3px #6265f138}.pattern-pick-card__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.pattern-pick-card__hover[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:6px;background:linear-gradient(to top,rgba(17,24,39,.65) 0%,transparent 55%);opacity:0;transition:opacity .2s ease}.pattern-pick-card[_ngcontent-%COMP%]:hover .pattern-pick-card__hover[_ngcontent-%COMP%]{opacity:1}@media(max-width:991px){.pattern-pick-card__hover[_ngcontent-%COMP%]{opacity:.75}.pattern-pick-card[_ngcontent-%COMP%]:hover .pattern-pick-card__hover[_ngcontent-%COMP%]{opacity:1}}.pattern-pick-card__name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:0 1px 3px rgba(0,0,0,.5)}.pattern-pick-card__check[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#6265f12e}.pattern-pick-card__check[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#6265f1;color:#fff;font-size:16px;font-weight:700;box-shadow:0 2px 8px #6265f166}.transform-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:10px 12px}.transform-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:5px;font-size:11px;color:#64748b;line-height:1.5;margin:0;font-weight:500}.transform-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:#d1d5db;flex-shrink:0;margin-top:1px}.prop-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-height:28px}.prop-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;flex-shrink:0;width:76px;font-size:11px;font-weight:500;color:#6b7280}.prop-icon[_ngcontent-%COMP%]{font-size:13px;color:#9ca3af}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:8px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:42px;text-align:right;font-size:11px;color:#6b7280;font-variant-numeric:tabular-nums}.transform-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;padding:20px 16px;margin:10px 12px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.transform-empty__icon[_ngcontent-%COMP%]{font-size:26px;color:#d1d5db}.transform-empty__title[_ngcontent-%COMP%]{margin:0;font-size:13px;font-weight:700;color:#374151}.transform-empty__hint[_ngcontent-%COMP%]{margin:0;font-size:11px;color:#9ca3af;line-height:1.55}.placement-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.placement-section[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.placement-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.placement-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#374151;border-left:3px solid #6265f1}.placement-section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#6265f1}.grid[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:cover}.panel-content[_ngcontent-%COMP%]{flex:1;flex-direction:column}.panel-content[style*="display: flex"][_ngcontent-%COMP%]{display:flex!important}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #f0f0f0}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.panel-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;margin:0}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:991px){.pattern-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(6,1fr)}}@media(max-width:640px){.pattern-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}.prop-label[_ngcontent-%COMP%]{width:62px}.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%], .pattern-picker-section[_ngcontent-%COMP%]{padding:8px 10px}}'],changeDetection:0})};var eie=["*"];function tie(i,e){if(i&1&&bt(0,"i"),i&2){let t=M();so(t.icon())}}function nie(i,e){if(i&1&&(re(0,"span"),k(1),he()),i&2){let t=M();P(),Ye(t.label())}}var Xs=class i{label=Me("");text=Me(!1);rounded=Me(!1);disabled=Me(!1);severity=Me("primary");icon=Me("");type=Me("button");onClick=kt();classes=De(()=>{let e=["ui-btn"];this.text()?e.push("ui-btn--text"):e.push("ui-btn--filled"),this.rounded()&&e.push("ui-btn--rounded");let t=this.severity();return t==="secondary"?e.push("ui-btn--secondary"):t==="danger"?e.push("ui-btn--danger"):t==="success"?e.push("ui-btn--success"):e.push("ui-btn--primary"),e.join(" ")});emitClick(e){if(this.disabled()){e.preventDefault(),e.stopPropagation();return}this.onClick.emit(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-button"]],inputs:{label:[1,"label"],text:[1,"text"],rounded:[1,"rounded"],disabled:[1,"disabled"],severity:[1,"severity"],icon:[1,"icon"],type:[1,"type"]},outputs:{onClick:"onClick"},ngContentSelectors:eie,decls:4,vars:6,consts:[[3,"click","type","disabled"],[3,"class"]],template:function(t,n){t&1&&(_i(),re(0,"button",0),Gn("click",function(o){return n.emitClick(o)}),pe(1,tie,1,2,"i",1),pe(2,nie,2,1,"span"),Si(3),he()),t&2&&(so(n.classes()),di("type",n.type())("disabled",n.disabled()),P(),me(n.icon()?1:-1),P(),me(n.label()?2:-1))},dependencies:[qt],styles:["[_nghost-%COMP%]{display:inline-flex}.ui-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;border-radius:.65rem;border:1px solid transparent;font-size:.8125rem;font-weight:600;line-height:1;padding:.5rem .8rem;cursor:pointer;transition:background-color .2s ease,color .2s ease,border-color .2s ease,transform .12s ease,box-shadow .2s ease}.ui-btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.ui-btn--rounded[_ngcontent-%COMP%]{border-radius:9999px;width:2rem;height:2rem;padding:0}.ui-btn--filled.ui-btn--primary[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 6px 14px rgb(var(--primary-color, 98 101 241) / .25)}.ui-btn--filled.ui-btn--secondary[_ngcontent-%COMP%]{background:rgb(var(--secondary-color, 16 185 129));color:#fff;box-shadow:0 6px 14px rgb(var(--secondary-color, 16 185 129) / .22)}.ui-btn--filled.ui-btn--danger[_ngcontent-%COMP%]{background:#ef4444;color:#fff}.ui-btn--filled.ui-btn--success[_ngcontent-%COMP%]{background:rgb(var(--accent-color, 245 158 11));color:#fff;box-shadow:0 6px 14px rgb(var(--accent-color, 245 158 11) / .22)}.ui-btn--text[_ngcontent-%COMP%]{background:transparent;border-color:transparent}.ui-btn--text.ui-btn--primary[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241))}.ui-btn--text.ui-btn--secondary[_ngcontent-%COMP%]{color:rgb(var(--text-color-secondary, 100 116 139))}.ui-btn--text.ui-btn--danger[_ngcontent-%COMP%]{color:#ef4444}.ui-btn[_ngcontent-%COMP%]:focus-visible{outline:2px solid rgb(var(--primary-color, 98 101 241));outline-offset:1px}"],changeDetection:0})};function iie(i,e){if(i&1&&(re(0,"span",3),k(1),he()),i&2){let t=M();P(),Ye(t.secondaryLabel())}}var sh=class i{mode=Me("basic");chooseLabel=Me("Choose");secondaryLabel=Me(null);accept=Me("");customUpload=Me(!1);disabled=Me(!1);onSelect=kt();inputId=`ui-upload-${Math.random().toString(36).slice(2)}`;isDraggingOver=!1;onDragOver(e){this.disabled()||(e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect="copy"),this.isDraggingOver=!0)}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1}onDrop(e){if(e.preventDefault(),e.stopPropagation(),this.isDraggingOver=!1,this.disabled())return;let t=e.dataTransfer?.files?Array.from(e.dataTransfer.files):[];if(!t.length)return;let n=this.accept(),r=n?t.filter(o=>this._matchesAccept(o,n)):t;r.length&&this.onSelect.emit({files:r,originalEvent:e})}_matchesAccept(e,t){return t.split(",").some(n=>{let r=n.trim();return r.startsWith(".")?e.name.toLowerCase().endsWith(r.toLowerCase()):r.endsWith("/*")?e.type.startsWith(r.slice(0,-1)):e.type===r})}handleSelection(e){let t=e.target,n=t?.files?Array.from(t.files):[];n.length&&(this.onSelect.emit({files:n,originalEvent:e}),t&&(t.value=""))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-fileupload"]],inputs:{mode:[1,"mode"],chooseLabel:[1,"chooseLabel"],secondaryLabel:[1,"secondaryLabel"],accept:[1,"accept"],customUpload:[1,"customUpload"],disabled:[1,"disabled"]},outputs:{onSelect:"onSelect"},decls:6,vars:10,consts:[[1,"bg-upload-zone",3,"dragover","dragleave","drop"],[1,"ri-upload-cloud-2-line","bg-upload-icon"],[1,"bg-upload-text"],[1,"bg-upload-hint"],["type","file",1,"sr-only",3,"change","id","accept","disabled"]],template:function(t,n){t&1&&(re(0,"label",0),Gn("dragover",function(o){return n.onDragOver(o)})("dragleave",function(o){return n.onDragLeave(o)})("drop",function(o){return n.onDrop(o)}),bt(1,"i",1),re(2,"span",2),k(3),he(),pe(4,iie,2,1,"span",3),re(5,"input",4),Gn("change",function(o){return n.handleSelection(o)}),he()()),t&2&&(pt("ui-fileupload--disabled",n.disabled())("drag-over",n.isDraggingOver),Pn("for",n.inputId),P(3),zt(" ",n.isDraggingOver?"Drop files here":n.chooseLabel()," "),P(),me(n.secondaryLabel()&&!n.isDraggingOver?4:-1),P(),di("id",n.inputId)("accept",n.accept())("disabled",n.disabled()))},dependencies:[qt],styles:["[_nghost-%COMP%]{display:inline-flex}.bg-upload-zone[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:14px 12px;border:1px dashed rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color-secondary, 71 85 105));border-radius:10px;cursor:pointer;text-align:center;transition:border-color .18s,background .18s,transform .18s,box-shadow .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover{border-color:rgb(var(--secondary-color, 16 185 129));color:rgb(var(--secondary-color, 16 185 129));background:rgb(var(--secondary-color, 16 185 129) / .08)}.bg-upload-zone.drag-over[_ngcontent-%COMP%]{border-color:rgb(var(--secondary-color, 16 185 129));border-style:dashed;border-width:2px;background:rgb(var(--secondary-color, 16 185 129) / .12);color:rgb(var(--secondary-color, 16 185 129));transform:scale(1.015);box-shadow:0 0 0 3px rgb(var(--secondary-color, 16 185 129) / .18)}.bg-upload-icon[_ngcontent-%COMP%]{font-size:24px;color:rgb(var(--text-color-secondary, 71 85 105));transition:color .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover .bg-upload-icon[_ngcontent-%COMP%]{color:rgb(var(--secondary-color, 16 185 129))}.bg-upload-text[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#111827}.bg-upload-hint[_ngcontent-%COMP%]{font-size:11px;color:#64748b}.ui-fileupload--disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.55}"]})};var VB=i=>({$implicit:i}),GB=(i,e)=>({$implicit:i,tpl:e}),HB=(i,e)=>e.actionItemId;function rie(i,e){if(i&1){let t=Ne();w(0,"div",3),Y(1,"i",5),w(2,"span"),k(3),T(),w(4,"button",6),ie("click",function(){Z(t);let r=M();return J(r.clearUploadError())}),Y(5,"i",7),T()()}if(i&2){let t=M();P(3),Ye(t.uploadError())}}function oie(i,e){if(i&1){let t=Ne();w(0,"div",12),Y(1,"img",14),w(2,"button",15),ie("click",function(){Z(t);let r=M().$implicit,o=M();return J(o.remove(r.actionItemId))}),Y(3,"i",16),T()()}if(i&2){let t,n=M().$implicit,r=M();P(),ne("src",(t=r.state().images[n.actionItemId])==null?null:t.src,ji)}}function sie(i,e){if(i&1&&(Y(0,"i",17),w(1,"span"),k(2),T()),i&2){let t,n=M().$implicit,r=M();P(2),Ye((t=r.state().images[n.actionItemId])==null?null:t.fileName)}}function aie(i,e){i&1&&(Y(0,"i",18),w(1,"span"),k(2,"No file chosen"),T())}function lie(i,e){if(i&1){let t=Ne();w(0,"div",8)(1,"div",9)(2,"app-ui-fileupload",10),ie("onSelect",function(r){let o=Z(t).$implicit,s=M();return J(s.onFileChange(o.actionItemId,r))}),T(),w(3,"div",11),k(4,"Max file size: 25MB"),T()(),pe(5,oie,4,1,"div",12),T(),w(6,"div",13),pe(7,sie,3,1)(8,aie,3,0),T()}if(i&2){let t,n,r=e.$implicit,o=M();P(5),me((t=o.state().images[r.actionItemId])!=null&&t.src?5:-1),P(),Pn("aria-live","polite"),P(),me((n=o.state().images[r.actionItemId])!=null&&n.fileName?7:8)}}function cie(i,e){if(i&1){let t=Ne();w(0,"button",44),ie("click",function(){Z(t);let r=M().tpl,o=M();return J(o.applyToAll(r.actionItemId))}),Y(1,"i",45),k(2," Apply to All "),T()}}function die(i,e){if(i&1){let t=Ne();w(0,"div",19)(1,"div",20)(2,"span",21),Y(3,"i",22),k(4),T(),w(5,"div",23),pe(6,cie,3,0,"button",24),w(7,"button",25),ie("click",function(){let r=Z(t).tpl,o=M();return J(o.resetTransform(r.actionItemId))}),Y(8,"i",26),k(9," Reset "),T()()(),w(10,"div",27)(11,"span",28),Y(12,"i",29),k(13," Scale "),T(),w(14,"div",30)(15,"div",31)(16,"app-ui-slider",32),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"scale",r))}),T(),w(17,"span",33),k(18),Ii(19,"number"),T()(),w(20,"div",34)(21,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"scale",-o.scaleStep))}),Y(22,"i",36),T(),w(23,"input",37),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"scale",r))}),T(),w(24,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"scale",o.scaleStep))}),Y(25,"i",38),T()()()(),Y(26,"div",39),w(27,"div",27)(28,"span",28),Y(29,"i",40),k(30," Rotation "),T(),w(31,"div",30)(32,"div",31)(33,"app-ui-slider",32),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"rotation",r))}),T(),w(34,"span",33),k(35),Ii(36,"number"),T()(),w(37,"div",34)(38,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"rotation",-o.rotationStep))}),Y(39,"i",36),T(),w(40,"input",37),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"rotation",r))}),T(),w(41,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"rotation",o.rotationStep))}),Y(42,"i",38),T(),w(43,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.updateTransform(r.actionItemId,"rotation",0))}),Y(44,"i",26),T()()()(),Y(45,"div",39),w(46,"div",27)(47,"span",28),Y(48,"i",41),k(49," Offset X "),T(),w(50,"div",30)(51,"div",31)(52,"app-ui-slider",32),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"translateX",r))}),T(),w(53,"span",33),k(54),Ii(55,"number"),T()(),w(56,"div",34)(57,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"translateX",-o.translateStep))}),Y(58,"i",36),T(),w(59,"input",37),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"translateX",r))}),T(),w(60,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"translateX",o.translateStep))}),Y(61,"i",38),T()()()(),w(62,"div",27)(63,"span",28),Y(64,"i",42),k(65," Offset Y "),T(),w(66,"div",30)(67,"div",31)(68,"app-ui-slider",32),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"translateY",r))}),T(),w(69,"span",33),k(70),Ii(71,"number"),T()(),w(72,"div",34)(73,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"translateY",-o.translateStep))}),Y(74,"i",36),T(),w(75,"input",37),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"translateY",r))}),T(),w(76,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"translateY",o.translateStep))}),Y(77,"i",38),T()()()(),Y(78,"div",39),w(79,"div",27)(80,"span",28),Y(81,"i",43),k(82," Opacity "),T(),w(83,"div",30)(84,"div",31)(85,"app-ui-slider",32),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"opacity",r))}),T(),w(86,"span",33),k(87),Ii(88,"number"),T()(),w(89,"div",34)(90,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"opacity",-o.opacityStep))}),Y(91,"i",36),T(),w(92,"input",37),ie("ngModelChange",function(r){let o=Z(t).tpl,s=M();return J(s.updateTransform(o.actionItemId,"opacity",r))}),T(),w(93,"app-ui-button",35),ie("onClick",function(){let r=Z(t).tpl,o=M();return J(o.step(r.actionItemId,"opacity",o.opacityStep))}),Y(94,"i",38),T()()()()()}if(i&2){let t=e.$implicit,n=e.tpl,r=M();P(4),zt(" ",r.resolveLabel(n.actionItemId)," Transform "),P(2),me(r.state().templates.length>1?6:-1),P(10),ne("min",r.minScale)("max",r.maxScale)("step",r.scaleStep)("ngModel",t.transform.scale),P(2),zt("",Wi(19,58,t.transform.scale,"1.2-2"),"\xD7"),P(3),ne("text",!0),P(2),ne("min",r.minScale)("max",r.maxScale)("step",r.scaleStep)("ngModel",t.transform.scale),P(),ne("text",!0),P(9),ne("min",r.minRotation)("max",r.maxRotation)("step",r.rotationStep)("ngModel",t.transform.rotation),P(2),zt("",Wi(36,61,t.transform.rotation,"1.0-1"),"\xB0"),P(3),ne("text",!0),P(2),ne("min",r.minRotation)("max",r.maxRotation)("step",r.rotationStep)("ngModel",t.transform.rotation),P(),ne("text",!0),P(2),ne("text",!0),P(9),ne("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateX),P(2),zt("",Wi(55,64,t.transform.translateX,"1.0-1"),"px"),P(3),ne("text",!0),P(2),ne("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateX),P(),ne("text",!0),P(8),ne("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateY),P(2),zt("",Wi(71,67,t.transform.translateY,"1.0-1"),"px"),P(3),ne("text",!0),P(2),ne("min",r.minTranslate)("max",r.maxTranslate)("step",r.translateStep)("ngModel",t.transform.translateY),P(),ne("text",!0),P(9),ne("min",r.minOpacity)("max",r.maxOpacity)("step",r.opacityStep)("ngModel",t.transform.opacity),P(2),Ye(Wi(88,70,t.transform.opacity,"1.2-2")),P(3),ne("text",!0),P(2),ne("min",r.minOpacity)("max",r.maxOpacity)("step",r.opacityStep)("ngModel",t.transform.opacity),P(),ne("text",!0)}}function uie(i,e){if(i&1&&Pr(0,49),i&2){let t=M(2).$implicit;M(2);let n=ro(5);ne("ngTemplateOutlet",n)("ngTemplateOutletContext",q0(2,GB,e,t))}}function fie(i,e){if(i&1&&pe(0,uie,1,5,"ng-container",49),i&2){let t,n=M().$implicit,r=M(2);me((t=r.state().images[n.actionItemId])?0:-1,t)}}function hie(i,e){if(i&1&&(w(0,"div",46)(1,"div",47),Y(2,"i",48),k(3," Background "),T(),Pr(4,49),pe(5,fie,1,1),T()),i&2){let t,n=e.$implicit,r=M(2),o=ro(3);P(4),ne("ngTemplateOutlet",o)("ngTemplateOutletContext",ys(3,VB,n)),P(),me(n.isTransformationRequired&&((t=r.state().images[n.actionItemId])!=null&&t.src)?5:-1)}}function pie(i,e){if(i&1&&Dt(0,hie,6,5,"div",46,HB),i&2){let t=M();It(t.templates())}}function mie(i,e){if(i&1&&Pr(0,49),i&2){let t=M(3).$implicit;M(2);let n=ro(5);ne("ngTemplateOutlet",n)("ngTemplateOutletContext",q0(2,GB,e,t))}}function gie(i,e){if(i&1&&pe(0,mie,1,5,"ng-container",49),i&2){let t,n=M(2).$implicit,r=M(2);me((t=r.state().images[n.actionItemId])?0:-1,t)}}function vie(i,e){if(i&1&&pe(0,gie,1,1),i&2){let t,n=M().$implicit,r=M(2);me((t=r.state().images[n.actionItemId])!=null&&t.src?0:-1)}}function bie(i,e){if(i&1){let t=Ne();w(0,"app-ui-accordion-panel",51),ie("click",function(){let r=Z(t).$implicit,o=M(2);return J(o.onSelectEntry(r.actionItemId))}),w(1,"app-ui-accordion-header")(2,"div",52),Y(3,"i",53),w(4,"span",54),k(5),T(),k(6),T()(),w(7,"app-ui-accordion-content")(8,"div",46),Pr(9,49),pe(10,vie,1,1),T()()()}if(i&2){let t=e.$implicit,n=M(2),r=ro(3);ne("value",t.id),P(5),zt(" Background \u2014 ",n.resolveLabel(t.actionItemId)," "),P(),zt(" ",t.isTransformationRequired," "),P(3),ne("ngTemplateOutlet",r)("ngTemplateOutletContext",ys(6,VB,t)),P(),me(t.isTransformationRequired?10:-1)}}function yie(i,e){if(i&1&&(w(0,"app-ui-accordion",4),Dt(1,bie,11,8,"app-ui-accordion-panel",50,HB),T()),i&2){let t,n=M();ne("value",((t=n.templates()[0])==null?null:t.id)??((t=n.templates()[0])==null?null:t.actionItemId)),P(),It(n.templates())}}var r_=class i{templates=Me([]);uploadError=N(null);backgroundState=Q(Jf);state=this.backgroundState.state;minScale=this.backgroundState.minScale;maxScale=this.backgroundState.maxScale;scaleStep=this.backgroundState.scaleStep;minRotation=this.backgroundState.minRotation;maxRotation=this.backgroundState.maxRotation;rotationStep=this.backgroundState.rotationStep;minTranslate=this.backgroundState.minTranslate;maxTranslate=this.backgroundState.maxTranslate;translateStep=this.backgroundState.translateStep;minOpacity=this.backgroundState.minOpacity;maxOpacity=this.backgroundState.maxOpacity;opacityStep=this.backgroundState.opacityStep;onSelectEntry(e){this.backgroundState.select(e)}resolveLabel(e){return this.backgroundState.resolveLabel(e)}onFileChange(e,t){let n=t.files?.[0];n&&this.backgroundState.onFileSelected(e,n).then(r=>{r?this.uploadError.set(r):this.uploadError.set(null)})}clearUploadError(){this.uploadError.set(null)}remove(e){this.backgroundState.remove(e)}applyToAll(e){this.backgroundState.applyToAll(e)}updateTransform(e,t,n){this.backgroundState.updateTransform(t,n,e)}step(e,t,n){this.backgroundState.stepTransform(t,n,e)}resetTransform(e){this.backgroundState.resetTransform(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-customizer-background-panel"]],inputs:{templates:[1,"templates"]},decls:8,vars:2,consts:[["uploadArea",""],["transformContent",""],[1,"panel-body"],["role","alert",1,"error-message"],[1,"child-accordion",3,"value"],[1,"ri-error-warning-line"],["type","button","aria-label","Close error message",1,"error-close-btn",3,"click"],[1,"ri-close-line"],[1,"bg-upload-row"],[1,"bg-upload-wrapper"],["mode","basic","chooseLabel","Upload Background","secondaryLabel","PNG, JPG, SVG, WebP","accept","image/png,image/jpeg,image/webp,image/svg+xml","customUpload","true",1,"w-full","upload-logo-btn",3,"onSelect"],[1,"bg-upload-hint"],[1,"bg-preview"],[1,"bg-filename"],["alt","Background preview",1,"bg-preview__img",3,"src"],["type","button",1,"bg-remove",3,"click"],[1,"ri-delete-bin-6-fill"],[1,"ri-file-image-line"],[1,"ri-image-line"],[1,"bg-transform"],[1,"bg-transform-header"],[1,"bg-transform-title"],[1,"ri-crop-line"],[1,"bg-transform-actions"],["type","button",1,"bg-apply-all-btn"],["type","button",1,"bg-reset-btn",3,"click"],[1,"ri-reset-left-line"],[1,"prop-row"],[1,"prop-label"],[1,"ri-zoom-in-line","prop-icon"],[1,"flex-1"],[1,"slider-row"],[1,"flex-1",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"stepper","mt-3"],[3,"onClick","text"],[1,"ri-subtract-line"],["type","number",1,"stepper-input",3,"ngModelChange","min","max","step","ngModel"],[1,"ri-add-line"],[1,"section-divider"],[1,"ri-refresh-line","prop-icon"],[1,"ri-arrow-left-right-line","prop-icon"],[1,"ri-arrow-up-down-line","prop-icon"],[1,"ri-contrast-line","prop-icon"],["type","button",1,"bg-apply-all-btn",3,"click"],[1,"ri-stack-fill"],[1,"bg-section"],[1,"bg-section-label"],[1,"ri-image-fill"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"value"],[3,"click","value"],[1,"accordion-header-content"],[1,"ri-image-fill","accordion-header-icon"],[1,"accordion-header-label"]],template:function(t,n){t&1&&(w(0,"div",2),pe(1,rie,6,1,"div",3),el(2,lie,9,3,"ng-template",null,0,il)(4,die,95,73,"ng-template",null,1,il),pe(6,pie,2,0)(7,yie,3,1,"app-ui-accordion",4),T()),t&2&&(P(),me(n.uploadError()?1:-1),P(5),me(n.templates().length<=1?6:7))},dependencies:[qt,Fc,fo,Uu,xp,al,Sp,_p,ua,Xs,Ni,sh,bi,gr,mr,Ws,Nc],styles:['[_nghost-%COMP%]{display:block}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 12px;margin-bottom:12px;background-color:#fee2e2;border:1px solid #fca5a5;border-radius:4px;color:#991b1b;font-size:13px;line-height:1.4;animation:_ngcontent-%COMP%_slideDown .3s ease-in-out}.error-message[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:16px;flex-shrink:0}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.error-close-btn[_ngcontent-%COMP%]{flex-shrink:0;background:none;border:none;padding:2px;cursor:pointer;color:#991b1b;font-size:16px;display:flex;align-items:center;justify-content:center;transition:opacity .2s}.error-close-btn[_ngcontent-%COMP%]:hover{opacity:.7}@keyframes _ngcontent-%COMP%_slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.bg-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;padding:12px 14px}.bg-section-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;text-transform:uppercase;color:#111827;letter-spacing:.07em;margin-bottom:10px}.bg-section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.bg-upload-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;margin-bottom:8px}.bg-upload-wrapper[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:4px}.bg-upload-hint[_ngcontent-%COMP%]{font-size:12px;color:#64748b;font-style:italic;font-weight:500}.bg-upload-zone[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:14px 12px;border:1.5px dashed #d1d5db;border-radius:10px;background:#fafafa;cursor:pointer;text-align:center;transition:border-color .18s,background .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));background:#f5f3ff}.bg-upload-icon[_ngcontent-%COMP%]{font-size:24px;color:#9ca3af;transition:color .18s}.bg-upload-zone[_ngcontent-%COMP%]:hover .bg-upload-icon[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241))}.bg-upload-text[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#111827}.bg-upload-hint[_ngcontent-%COMP%]{font-size:11px;color:#64748b}.bg-preview[_ngcontent-%COMP%]{position:relative;width:72px;height:72px;flex-shrink:0;border-radius:10px;overflow:hidden;border:1.5px solid #e5e7eb;box-shadow:0 2px 8px #00000014}.bg-preview__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.bg-remove[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;border:none;background:#ef4444d9;color:#fff;font-size:11px;cursor:pointer;transition:background .15s,transform .15s}.bg-remove[_ngcontent-%COMP%]:hover{background:#ef4444;transform:scale(1.1)}.bg-filename[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:12px;color:#475569;margin-bottom:4px;min-height:18px}.bg-filename[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;flex-shrink:0}.bg-transform[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid #f0f0f0}.bg-transform-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:4px}.bg-transform-actions[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}.bg-transform-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.bg-transform-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.bg-reset-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:9999px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;font-size:11px;font-weight:500;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.bg-apply-all-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:9999px;border:1px solid rgb(var(--primary-color, 98 101 241) / .28);background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241));font-size:11px;font-weight:600;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.bg-apply-all-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.bg-apply-all-btn[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241) / .65);background:rgb(var(--primary-color, 98 101 241) / .16);color:rgb(var(--primary-color, 98 101 241))}.bg-reset-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.bg-reset-btn[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-color, 98 101 241));background:#f5f3ff}.prop-row[_ngcontent-%COMP%]{display:flex;align-items:start;gap:8px;min-height:28px}.prop-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;flex-shrink:0;width:72px;font-size:12px;font-weight:600;color:#111827}.prop-icon[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:6px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:42px;text-align:right;font-size:12px;color:#334155;font-variant-numeric:tabular-nums}.stepper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:25px;flex-shrink:0}.stepper-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid #e5e7eb;border-radius:50%;background:#fff;color:#6b7280;font-size:13px;cursor:pointer;transition:border-color .15s,color .15s}.stepper-btn[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));border-radius:50%;color:rgb(var(--primary-color, 98 101 241))}.stepper-input[_ngcontent-%COMP%]{flex:1;border:1px solid #d1d5db;border-radius:6px;padding:3px 6px;font-size:12px;text-align:center;color:#111827;outline:none;transition:border-color .15s}.stepper-input[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.stepper-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .stepper-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none}.stepper-reset[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#64748b;font-size:13px;cursor:pointer;transition:border-color .15s,color .15s}.stepper-reset[_ngcontent-%COMP%]:hover{border-color:#fca5a5;color:#ef4444}.section-divider[_ngcontent-%COMP%]{height:1px;background:#f0f0f0;margin:2px 0}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.panel-content[_ngcontent-%COMP%]{flex:1;flex-direction:column}.panel-content[style*="display: flex"][_ngcontent-%COMP%]{display:flex!important}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #f0f0f0}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.panel-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;margin:0}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}.bg-section[_ngcontent-%COMP%]{padding:10px}.prop-label[_ngcontent-%COMP%]{width:60px}.stepper-input[_ngcontent-%COMP%]{width:42px}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%]{padding:8px 10px}.bg-section[_ngcontent-%COMP%]{padding:8px}}'],changeDetection:0})};var zm={whiteThreshold:242,fadeRange:24},Ql=class i{minOverlayScale=.1;maxOverlayScale=8;defaultLetterSpacing=0;minLetterSpacing=-50;maxLetterSpacing=150;textMeasureContext=null;customizerState=Q(Bn);imageCompressionService=Q(zs);printAreaMeasurementService=Q(Bl);placements=N([]);showPlacementGuides=N(!1);placementZones=N([]);placementZoneBounds=N(new Map);placementZoneNormalizedBounds=N(new Map);definedPlacementZoneCache=N(new Map);textWarpEnvelope=N(null);warpEnvelopeFileName=N(null);warpUploadError=N(null);selectedEffectByOverlayId=N(new Map);warpEffectRequestSerial=0;minTextFontSize=6;hasBoundary=De(()=>this.placements().some(e=>e.specificAreaSvgLink&&e.type!=="BACKGROUND"));warpEnvelopeReady=De(()=>!!this.textWarpEnvelope());warpEnvelopeSummary=De(()=>{let e=this.textWarpEnvelope();if(!e)return null;let{viewBox:t}=e;return`${t.minX.toFixed(0)}, ${t.minY.toFixed(0)}, ${t.width.toFixed(0)}, ${t.height.toFixed(0)}`});activeOverlayId=this.customizerState.activeOverlayId;setPlacements(e){let t=e??[];this.placements.set(t),this.customizerState.setPersonalizationPlacements(t)}setShowPlacementGuides(e){this.showPlacementGuides.set(!!e),this.customizerState.render2d()}setPlacementZones(e){this.placementZones.set(e??[])}refreshFromSvg(){this.refreshPlacementZonesFromSvg(),this.loadDefinedZonesFromPersonalizations()}onTextInput(e,t,n){let r=t?.target?.value?.trim()??"",o=this.getTextOverlaysForPlacement(e.placementKey)[0]??null;if(o){this.updateTextOverlayText(o,r);return}this.createTextOverlay(e,n??pr,r)}createTextOverlay(e,t,n=""){if(!this.customizerState.svgDoc())return null;let r=!!e.specificAreaSvgLink,o=r?this.findPlacementZoneByKey(e.placementKey):null,s=this.getOverlayBoundingRect();if(!s.width||!s.height)return null;let a=this.computeDefaultFontSize(s,o),l=r&&o?this.getPlacementZoneCenter(o,s):this.normalizeSvgPoint(typeof e.x=="number"?e.x:s.width*.5,typeof e.y=="number"?e.y:s.height*.6),c={kind:"text",id:`${e.placementKey}-${Date.now()}`,text:n,fill:"#1f2937",fontSize:a,horizontalScale:1,verticalScale:1,normalizedX:l.nx,normalizedY:l.ny,angle:0,lockAspectRatio:!0,fontFamily:t??pr,fontWeight:"normal",fontStyle:"normal",lineHeight:1.2,letterSpacing:0,stroke:qf,strokeWidth:0,secondStroke:Kf,secondStrokeWidth:0,curveAmount:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:wm,warpEnabled:!1,placementKey:e.placementKey},d=r&&o?this.applyPlacementZoneTextBounds(c):c;return this.customizerState.overlays.set([...this.customizerState.overlays(),d]),this.customizerState.setActiveOverlay(d),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()}),d}updateTextOverlayText(e,t){let n=this.customizerState.overlays(),r=n.findIndex(l=>l.id===e.id);if(r<0)return;let o=n[r],s=this.applyPlacementZoneTextBounds(ue(R({},o),{text:t?.trim()??""})),a=[...n];a[r]=s,this.customizerState.overlays.set(a),this.customizerState.setActiveOverlay(s),this.customizerState.clearTextGlyphPlan(s.id),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}onLogoFileSelected(e,t){if(!this.customizerState.svgDoc())return null;let n=e.files?.[0];if(!n)return null;if(n.size>26214400){let s=`Logo file size must not exceed ${25}MB`;return console.warn(`[PersonalizationService] Logo upload rejected: file exceeds ${25} MB limit.`),s}if(!(n.type.startsWith("image/")||/\.(png|jpg|jpeg|webp|svg)$/i.test(n.name)))return null;let o=new FileReader;return o.onload=()=>{let s=o.result;if(typeof s!="string")return;let a=new Image;a.onload=()=>{let l=a.naturalWidth||a.width,c=a.naturalHeight||a.height;if(l<=0||c<=0)return;let d=this.buildLogoOverlay(s,n.name,l,c,t);d&&this.imageCompressionService.compressImageToDataUrl(s).then(u=>{d.imageSrc3d=u,this.customizerState.overlays.set([...this.customizerState.overlays(),d]),this.customizerState.setActiveOverlay(d),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}).catch(u=>{console.warn("[PersonalizationService] Failed to compress logo image, using original",u),this.customizerState.overlays.set([...this.customizerState.overlays(),d]),this.customizerState.setActiveOverlay(d),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})})},a.src=s},o.readAsDataURL(n),null}async removeWhiteBackgroundFromLogo(e){if(!e)return;let t=this.customizerState.overlays(),n=t.findIndex(c=>c.id===e);if(n<0)return;let r=t[n];if(r.kind!=="logo")return;let o=await this.removeWhiteBackgroundFromImage(r.imageSrc);if(!o)return;let s=await this.imageCompressionService.compressImageToDataUrl(o).catch(c=>(console.error("[PersonalizationService] Failed to compress processed logo:",c),o)),a=ue(R({},r),{imageSrc:o,imageSrc3d:s}),l=[...t];l[n]=a,this.customizerState.overlays.set(l),this.customizerState.setActiveOverlay(a),this.customizerState.refreshFabricOverlays(),await this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}togglePlacementGuides(e){this.setShowPlacementGuides(e),this.customizerState.render2d()}trackPlacementZone(e,t){return t.id}updateOverlayProperty(e,t,n){let r=this.customizerState.overlays(),o=r.findIndex(s=>s.id===e.id);if(o>=0){let s=ue(R({},r[o]),{[t]:n}),a=[...r];a[o]=s,this.customizerState.overlays.set(a),this.customizerState.setActiveOverlay(s),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}}updateOverlayProperties(e,t){let n=this.customizerState.overlays(),r=n.findIndex(l=>l.id===e.id);if(r<0)return;let o=n[r];this.customizerState.clearOverlayRuntimeDimensions(o.id),Et(o)&&this.customizerState.clearTextGlyphPlan(e.id);let s=R(R({},o),t);Et(s)?(s=ue(R({},s),{horizontalScale:this.normalizeScale(s.horizontalScale),verticalScale:this.normalizeScale(s.verticalScale)}),s=this.applyPlacementZoneTextBounds(s)):oi(s)&&(s=this.applyPlacementZoneLogoBounds(s));let a=[...n];a[r]=s,this.customizerState.overlays.set(a),this.customizerState.setActiveOverlay(s),this.customizerState.refreshFabricOverlays(),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild()})}getOverlayDimensionsPx(e){if(!e)return{width:0,height:0};let t=this.customizerState.overlayRuntimeDimensionsPx().get(e.id);if(t)return{width:Math.max(t.width,1),height:Math.max(t.height,1)};let n=this.getOverlayBoundingRect();if(n.width<=0||n.height<=0)return{width:0,height:0};let r=this.resolveOverlayNormalizedSize(e);return{width:Math.max(r.width*n.width,1),height:Math.max(r.height*n.height,1)}}getOverlayDimensionsInches(e){if(!e)return{width:0,height:0};let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches(),r=this.customizerState.printAreaHeightInches(),o=r&&r>0?r:n;if(t.width<=0||!n||n<=0||!o||o<=0)return{width:0,height:0};let s=this.getOverlayDimensionsPx(e),a=t.height>0?t.height:t.width;return{width:this.printAreaMeasurementService.svgUnitsToInchesX(s.width,t.width,n),height:this.printAreaMeasurementService.svgUnitsToInchesY(s.height,a,o)}}getOverlayLetterSpacingInches(e){if(!e||e.kind!=="text")return 0;let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches();return t.width<=0||!n||n<=0?0:this.printAreaMeasurementService.svgUnitsToInchesX(e.letterSpacing??0,t.width,n)}updateOverlayDimensionsPx(e,t){let n=this.getOverlayBoundingRect();if(n.width<=0||n.height<=0)return;let r=this.getOverlayDimensionsPx(e);if(r.width<=0||r.height<=0)return;let o={width:r.width/n.width,height:r.height/n.height},s=e.lockAspectRatio??!0,a=o.width/o.height,l=this.normalizeNormalizedDimension(t.widthPx!==void 0?t.widthPx/n.width:o.width),c=this.normalizeNormalizedDimension(t.heightPx!==void 0?t.heightPx/n.height:o.height);if(s&&Number.isFinite(a)&&a>0&&(t.widthPx!==void 0&&t.heightPx===void 0?c=this.normalizeNormalizedDimension(l/a):t.heightPx!==void 0&&t.widthPx===void 0?l=this.normalizeNormalizedDimension(c*a):t.widthPx!==void 0&&t.heightPx!==void 0&&(c=this.normalizeNormalizedDimension(l/a))),oi(e)){this.updateOverlayProperties(e,{normalizedWidth:l,normalizedHeight:c}),this.customizerState.setOverlayRuntimeDimensionsPx(e.id,l*n.width,c*n.height);return}if(!Et(e))return;let d=this.normalizeScale(e.horizontalScale),u=this.normalizeScale(e.verticalScale),f=o.width/d,h=o.height/u;if(f<=0||h<=0)return;let p=this.normalizeScale(l/f),v=this.normalizeScale(c/h);if(s)if(t.widthPx!==void 0&&t.heightPx===void 0)v=p;else if(t.heightPx!==void 0&&t.widthPx===void 0)p=v;else{let g=this.normalizeScale((p+v)/2);p=g,v=g}this.updateOverlayProperties(e,{horizontalScale:p,verticalScale:v}),this.customizerState.setOverlayRuntimeDimensionsPx(e.id,l*n.width,c*n.height)}updateOverlayDimensionsInches(e,t){let n=this.getOverlayBoundingRect(),r=this.customizerState.printAreaWidthInches(),o=this.customizerState.printAreaHeightInches(),s=o&&o>0?o:r;if(n.width<=0||!r||r<=0||!s||s<=0)return;let a=n.height>0?n.height:n.width,l=t.widthInches!==void 0?this.printAreaMeasurementService.inchesToSvgUnitsX(t.widthInches,n.width,r):void 0,c=t.heightInches!==void 0?this.printAreaMeasurementService.inchesToSvgUnitsY(t.heightInches,a,s):void 0;this.updateOverlayDimensionsPx(e,{widthPx:l,heightPx:c})}updateOverlayLetterSpacingInches(e,t){if(e.kind!=="text")return;let n=this.getOverlayBoundingRect(),r=this.customizerState.printAreaWidthInches();if(n.width<=0||!r||r<=0)return;let o=this.printAreaMeasurementService.inchesToSvgUnitsX(t,n.width,r);this.updateOverlayProperties(e,{letterSpacing:Math.max(this.minLetterSpacing,Math.min(this.maxLetterSpacing,o))})}setOverlayAspectRatioLock(e,t){this.updateOverlayProperties(e,{lockAspectRatio:!!t})}getOverlayDimensionLimitsPx(e){if(!e)return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0)return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};if(oi(e))return{minWidth:Math.max(.02*t.width,1),maxWidth:Math.max(t.width,1),minHeight:Math.max(.02*t.height,1),maxHeight:Math.max(t.height,1)};if(!Et(e))return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};let n=this.resolveOverlayNormalizedSize(e),r=this.normalizeScale(e.horizontalScale),o=this.normalizeScale(e.verticalScale),s=n.width/r,a=n.height/o,l=Math.max(s*this.minOverlayScale*t.width,1),c=Math.max(s*this.maxOverlayScale*t.width,l),d=Math.max(a*this.minOverlayScale*t.height,1),u=Math.max(a*this.maxOverlayScale*t.height,d);return{minWidth:l,maxWidth:c,minHeight:d,maxHeight:u}}getOverlayDimensionLimitsInches(e){let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches(),r=this.customizerState.printAreaHeightInches(),o=r&&r>0?r:n;if(t.width<=0||!n||n<=0||!o||o<=0)return{minWidth:0,maxWidth:0,minHeight:0,maxHeight:0};let s=this.getOverlayDimensionLimitsPx(e),a=t.height>0?t.height:t.width;return{minWidth:this.printAreaMeasurementService.svgUnitsToInchesX(s.minWidth,t.width,n),maxWidth:this.printAreaMeasurementService.svgUnitsToInchesX(s.maxWidth,t.width,n),minHeight:this.printAreaMeasurementService.svgUnitsToInchesY(s.minHeight,a,o),maxHeight:this.printAreaMeasurementService.svgUnitsToInchesY(s.maxHeight,a,o)}}getOverlayLetterSpacingLimitsInches(e){let t=this.getOverlayBoundingRect(),n=this.customizerState.printAreaWidthInches();return!e||t.width<=0||!n||n<=0?{min:0,max:0}:{min:this.printAreaMeasurementService.svgUnitsToInchesX(this.minLetterSpacing,t.width,n),max:this.printAreaMeasurementService.svgUnitsToInchesX(this.maxLetterSpacing,t.width,n)}}getActiveOverlay(){let e=this.customizerState.activeOverlayId();return e?this.customizerState.overlays().find(t=>t.id===e)??null:null}setActiveOverlay(e){this.customizerState.setActiveOverlay(e),e&&(this.customizerState.refreshFabricOverlays(),this.customizerState.render2d())}getOverlayForPlacement(e){if(!e)return null;let t=this.customizerState.overlays(),n=this.customizerState.activeOverlayId(),r=n&&t.find(s=>s.id===n&&s.placementKey===e);if(r)return r;let o=t.find(s=>s.kind==="text"&&s.placementKey===e);return o||(t.find(s=>s.placementKey===e)??null)}getLogosForPlacement(e){return e?this.customizerState.overlays().filter(t=>t.kind==="logo").filter(t=>t.placementKey===e):[]}getTextOverlaysForPlacement(e){return e?this.customizerState.overlays().filter(t=>t.kind==="text"&&t.placementKey===e):[]}removeOverlay(e){let t=this.customizerState.overlays(),n=t.filter(o=>o.id!==e);if(n.length===t.length)return;this.customizerState.overlays.set(n),this.customizerState.clearOverlayRuntimeDimensions(e),this.customizerState.activeOverlayId()===e&&this.customizerState.setActiveOverlay(n[0]??null),this.customizerState.refreshFabricOverlays(),this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()}),this.selectedEffectByOverlayId.update(o=>{if(!o.has(e))return o;let s=new Map(o);return s.delete(e),s})}getSelectedEffectIdForOverlay(e){return e?this.selectedEffectByOverlayId().get(e)??null:null}setSelectedEffectByOverlay(e){let t=new Map;e.forEach(n=>{n?.overlayId&&t.set(n.overlayId,n.effectId??null)}),this.selectedEffectByOverlayId.set(t)}async applyTextEffect(e,t){if(!e||!Et(e))return;let n=t?.fileUrl?.trim();if(!t||!n){this.warpUploadError.set(null),this.setEffectForOverlay(e.id,null),this.updateOverlayProperties(e,{warpEnabled:!1,warpEnvelope:null});return}let r=++this.warpEffectRequestSerial;try{this.warpUploadError.set(null);let o=await fetch(n);if(!o.ok)throw new Error(`HTTP ${o.status}`);let s=await o.text();if(r!==this.warpEffectRequestSerial)return;let a=this.parseWarpEnvelope(s);if(!a){this.setEffectForOverlay(e.id,null),this.updateOverlayProperties(e,{warpEnabled:!1,warpEnvelope:null});return}this.applyWarpEnvelope(a,t.name||n,!1),this.setEffectForOverlay(e.id,t.id??null),this.updateOverlayProperties(e,{warpEnabled:!0,warpEnvelope:a})}catch(o){if(console.error(Na.failedFetchEffectSvg,o),r!==this.warpEffectRequestSerial)return;this.warpUploadError.set(Na.unableLoadEffectSvgUrl),this.setEffectForOverlay(e.id,null),this.updateOverlayProperties(e,{warpEnabled:!1,warpEnvelope:null})}}setEffectForOverlay(e,t){this.selectedEffectByOverlayId.update(n=>{let r=new Map(n);return r.set(e,t),r})}ingestWarpEnvelope(e,t){let n=this.parseWarpEnvelope(e);n&&this.applyWarpEnvelope(n,t)}parseWarpEnvelope(e){try{let n=new DOMParser().parseFromString(e,Qo);if(n.querySelector(Ld))return this.warpUploadError.set(Na.warpSvgParsingError),null;let o=n.documentElement?.getAttribute("viewBox");if(!o)return this.warpUploadError.set(Na.warpSvgNeedsViewBox),null;let s=this.parseWarpViewBox(o);if(!s)return this.warpUploadError.set(Na.warpSvgInvalidViewBox),null;let a=n.getElementById("top"),l=n.getElementById("bottom"),c=a?.getAttribute("d")?.trim(),d=l?.getAttribute("d")?.trim();return!c||!d?(this.warpUploadError.set(Na.warpSvgNeedsTopBottomPath),null):(this.warpUploadError.set(null),{viewBox:s,topPathD:c,bottomPathD:d})}catch(t){return console.error(Na.failedIngestWarpEnvelope,t),this.warpUploadError.set(Na.warpEnvelopeReadFailed),null}}applyWarpEnvelope(e,t,n=!0){this.textWarpEnvelope.set(e),this.warpEnvelopeFileName.set(t),this.customizerState.setTextWarpEnvelope(e),this.customizerState.clearAllTextGlyphPlans(),this.customizerState.refreshFabricOverlays(),n&&this.customizerState.syncOverlaysToSvgDoc().finally(()=>{this.customizerState.requestTextureRebuild(),this.customizerState.render2d()})}parseWarpViewBox(e){let t=e.split(/[,\s]+/).map(a=>Number.parseFloat(a)).filter(a=>Number.isFinite(a));if(t.length!==4)return null;let[n,r,o,s]=t;return o<=0||s<=0?null:{minX:n,minY:r,width:o,height:s}}isSupportedFontFile(e){if(!e)return!1;if(/\.otf$/i.test(e.name))return!0;let n=(e.type||"").toLowerCase();return n==="font/otf"||n==="application/x-font-otf"||n==="application/font-sfnt"}resolveOverlayLabel(e){if(e.placementKey){let t=this.findPlacementZoneByKey(e.placementKey);if(t)return t.label}return e.kind==="text"?"Enter Name":e.kind==="logo"?e.imageName??"Logo":e.id}clampNormalizedToPlacementZone(e,t,n){let s=nn.clamp(t,0,1),a=nn.clamp(n,0,1),l=e.placementKey;if(!l)return{x:s,y:a};let c=this.getPlacementZoneNormalizedBoundsByKey(l);if(!c)return{x:s,y:a};let d=this.estimateOverlayNormalizedSize(e),u=Math.max(d.width/2-0,0),f=Math.max(d.height/2-0,0),h=c.minX+u-0,p=c.maxX-u+0,v=c.minY+f-0,g=c.maxY-f+0;return h<p?s=nn.clamp(s,h,p):s=(c.minX+c.maxX)/2,v<g?a=nn.clamp(a,v,g):a=(c.minY+c.maxY)/2,{x:s,y:a}}applyPlacementZoneTextBounds(e){if(!e.placementKey)return e;let t=this.getPlacementZoneNormalizedBoundsByKey(e.placementKey);if(!t)return e;let n=t.maxX-t.minX,r=t.maxY-t.minY;if(n<=0||r<=0)return e;let o=R({},e),s=this.estimateOverlayNormalizedSize(o);if(s.width>n||s.height>r){let m=Math.min(n/s.width,r/s.height),b=Math.max((o.fontSize??this.minTextFontSize)*m,this.minTextFontSize),y=b/(o.fontSize||1);o=ue(R({},o),{fontSize:b,letterSpacing:(o.letterSpacing??0)*y,strokeWidth:(o.strokeWidth??0)*y,secondStrokeWidth:(o.secondStrokeWidth??0)*y,shadowBlur:(o.shadowBlur??0)*y,shadowOffsetX:(o.shadowOffsetX??0)*y,shadowOffsetY:(o.shadowOffsetY??0)*y}),s=this.estimateOverlayNormalizedSize(o)}let a=0,l=0,c=Math.max(s.width/2-a,0),d=Math.max(s.height/2-l,0),u=t.minX+c-a,f=t.maxX-c+a,h=t.minY+d-l,p=t.maxY-d+l,v=u<=f?nn.clamp(o.normalizedX,u,f):(t.minX+t.maxX)/2,g=h<=p?nn.clamp(o.normalizedY,h,p):(t.minY+t.maxY)/2;return ue(R({},o),{normalizedX:v,normalizedY:g})}applyPlacementZoneLogoBounds(e){if(!e.placementKey)return e;let t=this.getPlacementZoneNormalizedBoundsByKey(e.placementKey);if(!t)return e;let n=t.maxX-t.minX,r=t.maxY-t.minY;if(n<=0||r<=0)return e;let o=Math.min(.02,n),s=Math.min(.02,r),a=Math.max(e.normalizedWidth,o),l=Math.max(e.normalizedHeight,s),c=a>0?n/a:1,d=l>0?r/l:1,u=Math.min(c,d,1);u<1&&(a*=u,l*=u),a=Math.min(Math.max(a,o),n),l=Math.min(Math.max(l,s),r);let f=a/2,h=l/2,p=t.minX+f,v=t.maxX-f,g=t.minY+h,m=t.maxY-h,b=p<=v?nn.clamp(e.normalizedX,p,v):(t.minX+t.maxX)/2,y=g<=m?nn.clamp(e.normalizedY,g,m):(t.minY+t.maxY)/2;return ue(R({},e),{normalizedWidth:a,normalizedHeight:l,normalizedX:b,normalizedY:y})}getPlacementZoneBoundsByKey(e){return this.placementZoneBounds().get(e)??null}getPlacementZoneNormalizedBoundsByKey(e){return this.placementZoneNormalizedBounds().get(e)??null}findPlacementZoneByKey(e){return this.placementZones().find(t=>t.placementKey===e)??null}refreshPlacementZonesFromSvg(){let e=this.customizerState.svgDoc();if(!e){this.placementZones.set([]),this.placementZoneBounds.set(new Map),this.placementZoneNormalizedBounds.set(new Map);return}let t=this.getOverlayBoundingRect();if(!t.width||!t.height){this.placementZones.set([]);return}let n=Array.from(e.querySelectorAll("[placement-key]")),r=[],o=new Map,s=new Map;for(let a of n){let l=a.getAttribute("placement-key")?.trim();if(!l)continue;let c=this.readElementBounds(a);if(!c)continue;let d=this.computePlacementZoneNormalizedBounds(c,t);if(!d)continue;let u=a.getAttribute("id")?.trim();u||(u=this.generatePlacementZoneId(l,e),a.setAttribute("id",u));let f=this.extractPlacementPathData(a);if(!f)continue;let h=this.normalizePlacementAllowedKinds(a.getAttribute("data-allowed")),p={id:u,placementKey:l,label:a.getAttribute("data-label")?.trim()??u??l,elementName:a.tagName.toLowerCase(),allowedKinds:h,required:(a.getAttribute("data-required")??"false").toLowerCase()==="true",pathData:f,bounds:c};r.push(p),s.set(l,c),o.set(l,d)}r.sort((a,l)=>a.label.localeCompare(l.label)),this.placementZones.set(r),this.placementZoneBounds.set(s),this.placementZoneNormalizedBounds.set(o),this.reapplyDefinedPlacementZonesFromCache()}async loadDefinedZonesFromPersonalizations(){let e=this.customizerState.svgDoc();if(!e)return;let t=this.getOverlayBoundingRect();if(!t.width||!t.height)return;let n=this.placements().filter(r=>r.specificAreaSvgLink&&r.type!=="BACKGROUND");for(let r of n)try{let o=this.definedPlacementZoneCache().get(r.placementKey);if(o){this.upsertPlacementZoneDefinition(o.zone,o.bounds,o.normalized);continue}if(!r.specificAreaSvgLink)continue;let s=await fetch(r.specificAreaSvgLink);if(!s.ok)continue;let a=await s.text(),c=new DOMParser().parseFromString(a,Qo);if(c.documentElement.nodeName.toLowerCase()!=="svg")continue;let d=c.documentElement.querySelector("path, circle, rect, polygon, ellipse, g");if(!d)continue;let u=this.extractPlacementPathData(d);if(!u)continue;let f=this.measurePathBounds(u)??this.readElementBounds(d);if(!f)continue;let h=this.computePlacementZoneNormalizedBounds(f,t);if(!h)continue;let p=this.generatePlacementZoneId(r.placementKey,e),v=["text","logo"],g={id:p,placementKey:r.placementKey,label:r.name||r.placementKey,elementName:"path",allowedKinds:v,required:!1,pathData:u,bounds:f};this.cacheDefinedPlacementZone(g,f,h),this.upsertPlacementZoneDefinition(g,f,h)}catch{}this.sortPlacementZones(),this.customizerState.render2d()}computePlacementZoneNormalizedBounds(e,t){if(!t.width||!t.height)return null;let n=(e.x-t.x)/t.width,r=(e.x+e.width-t.x)/t.width,o=(e.y-t.y)/t.height,s=(e.y+e.height-t.y)/t.height;return r<=n||s<=o?null:{minX:nn.clamp(n,0,1),maxX:nn.clamp(r,0,1),minY:nn.clamp(o,0,1),maxY:nn.clamp(s,0,1)}}measurePathBounds(e){if(!e||typeof document>"u")return null;let t=document.createElementNS(Ci,"svg");t.setAttribute("width","0"),t.setAttribute("height","0"),t.style.position="absolute",t.style.width="0",t.style.height="0",t.style.opacity="0",t.style.pointerEvents="none";let n=document.createElementNS(t.namespaceURI,"path");n.setAttribute("d",e),t.appendChild(n),document.body.appendChild(t);try{let r=n.getBBox();return!r||r.width<=0||r.height<=0?null:{x:r.x,y:r.y,width:r.width,height:r.height}}catch{return null}finally{t.parentNode?.removeChild(t)}}upsertPlacementZoneDefinition(e,t,n){this.placementZones.update(r=>{let o=[...r],s=o.findIndex(a=>a.placementKey===e.placementKey);return s>=0?o[s]=e:o.push(e),o}),this.placementZoneBounds.update(r=>{let o=new Map(r);return o.set(e.placementKey,t),o}),this.placementZoneNormalizedBounds.update(r=>{let o=new Map(r);return o.set(e.placementKey,n),o})}cacheDefinedPlacementZone(e,t,n){this.definedPlacementZoneCache.update(r=>{let o=new Map(r);return o.set(e.placementKey,{zone:e,bounds:t,normalized:n}),o})}reapplyDefinedPlacementZonesFromCache(){this.definedPlacementZoneCache().size&&(this.definedPlacementZoneCache().forEach(({zone:e,bounds:t,normalized:n})=>{this.findPlacementZoneByKey(e.placementKey)||this.upsertPlacementZoneDefinition(e,t,n)}),this.sortPlacementZones())}sortPlacementZones(){this.placementZones.update(e=>[...e].sort((t,n)=>t.label.localeCompare(n.label)))}normalizePlacementAllowedKinds(e){let t=(e??"").split(/[\s,]+/).map(r=>r.trim().toLowerCase()).filter(Boolean),n=new Set;return t.forEach(r=>{r==="text"||r==="texts"?n.add("text"):(r==="logo"||r==="logos"||r==="image")&&n.add("logo")}),n.size||n.add("text"),Array.from(n)}generatePlacementZoneId(e,t){let n=e&&e.trim().length?e.trim():"placement-zone",r=n,o=1;for(;t.getElementById(r);)r=`${n}-${o}`,o+=1;return r}readElementBounds(e){if(!e)return null;try{let t=e.getBBox();return!t||t.width<=0||t.height<=0?null:{x:t.x,y:t.y,width:t.width,height:t.height}}catch{return null}}extractPlacementPathData(e){let t=e.tagName.toLowerCase();if(t==="path")return e.getAttribute("d")?.trim()??null;if(t==="rect")return this.rectElementToPathData(e);if(t==="polygon")return this.polygonElementToPathData(e);if(t==="circle"){let n=e,r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),s=parseFloat(n.getAttribute("r")??"50");return this.circleToPath(r,o,s)}if(t==="ellipse"){let n=e,r=parseFloat(n.getAttribute("cx")??"0"),o=parseFloat(n.getAttribute("cy")??"0"),s=parseFloat(n.getAttribute("rx")??"50"),a=parseFloat(n.getAttribute("ry")??"50");return this.ellipseToPath(r,o,s,a)}return null}rectElementToPathData(e){let t=Number.parseFloat(e.getAttribute("x")??"0"),n=Number.parseFloat(e.getAttribute("y")??"0"),r=Number.parseFloat(e.getAttribute("width")??"0"),o=Number.parseFloat(e.getAttribute("height")??"0");return!Number.isFinite(r)||!Number.isFinite(o)||r<=0||o<=0?null:`M${t},${n} h${r} v${o} h${-r} Z`}polygonElementToPathData(e){let t=e.getAttribute("points")?.trim().split(/[\s,]+/).map(r=>Number.parseFloat(r))??[];if(t.length<4||t.length%2!==0)return null;let n=[];for(let r=0;r<t.length;r+=2)n.push(`${t[r]},${t[r+1]}`);return n.length===0?null:`M${n[0]} L${n.slice(1).join(" ")} Z`}circleToPath(e,t,n){let r=e+n,o=e-n;return`M ${r} ${t} A ${n} ${n} 0 1 0 ${o} ${t} A ${n} ${n} 0 1 0 ${r} ${t}`}ellipseToPath(e,t,n,r){let o=e+n,s=e-n;return`M ${o} ${t} A ${n} ${r} 0 1 0 ${s} ${t} A ${n} ${r} 0 1 0 ${o} ${t}`}getOverlayBoundingRect(){let e=this.customizerState.svgDoc();if(!e)return{x:0,y:0,width:0,height:0};let t=e.documentElement,n=t.viewBox?.baseVal;if(n&&n.width>0&&n.height>0)return{x:n.x,y:n.y,width:n.width,height:n.height};let r=Number.parseFloat(t.getAttribute("width")??"0"),o=Number.parseFloat(t.getAttribute("height")??"0");return r>0&&o>0?{x:0,y:0,width:r,height:o}:{x:0,y:0,width:1e3,height:1e3}}normalizeSvgPoint(e,t){let n=this.getOverlayBoundingRect();return!n.width||!n.height?{nx:.5,ny:.5}:{nx:e/n.width,ny:t/n.height}}computeDefaultFontSize(e,t){let n=t?Math.min(t.bounds.width,t.bounds.height):Math.min(e.width,e.height);return Math.min(Math.max(n*.12,20),150)}estimateOverlayNormalizedSize(e){let t=this.getOverlayBoundingRect();if(!t.width||!t.height)return{width:0,height:0};if(e.kind==="logo")return{width:e.normalizedWidth,height:e.normalizedHeight};let n=this.measureTextOverlaySizeInSvgUnits(e);return{width:n.width/t.width,height:n.height/t.height}}getTextMeasureContext(){if(this.textMeasureContext)return this.textMeasureContext;if(typeof document>"u")return null;let e=document.createElement("canvas");return this.textMeasureContext=e.getContext("2d"),this.textMeasureContext}measureTextOverlaySizeInSvgUnits(e){let t=Math.max(e.fontSize,1),n=e.lineHeight??1.2,r=Math.max(t*n,t),o=(e.text||"").split(/\r?\n/),s=o.length?o:[""],a=e.letterSpacing??0,l=e.fontStyle??"normal",c=e.fontWeight??"normal",d=(e.fontFamily??"sans-serif").trim()||"sans-serif",u=t*.6,f=this.getTextMeasureContext();f&&(f.font=`${l} ${c} ${t}px ${d}`);for(let x of s){let _=x.length?x:" ",E=f?f.measureText(_).width:_.length*t*.58,D=Math.max(_.length-1,0)*a;u=Math.max(u,E+D)}let h=this.normalizeScale(e.horizontalScale),p=this.normalizeScale(e.verticalScale),v=Number.isFinite(e.strokeWidth)?e.strokeWidth:0,g=Number.isFinite(e.secondStrokeWidth)?e.secondStrokeWidth:0,m=g>0?(v+g)*2:v*2,b=Math.max(u+m,t*.6),y=Math.max(r*s.length+m,r);return{width:Math.max(b*h,1),height:Math.max(y*p,1)}}buildLogoOverlay(e,t,n,r,o){if(!this.customizerState.svgDoc())return null;let s=!!o.specificAreaSvgLink,a=s?this.findPlacementZoneByKey(o.placementKey):null,l=this.getOverlayBoundingRect(),c=r>0?n/r:1,d,u;if(s&&a){let p=this.getPlacementZoneNormalizedBoundsByKey(a.placementKey);if(p){let v=p.maxX-p.minX,g=p.maxY-p.minY,m=Math.min(v*.8,g*.8,1);d=m,u=m/c;let b=Math.min((p.maxX-p.minX)/d,(p.maxY-p.minY)/u,1);d*=b,u*=b}else d=.28,u=d/c}else if(o.width&&o.height){let p=o.width,v=o.height,g=Math.min(p/n,v/r,1);d=g,u=g}else d=.28,u=d/c,u>.6&&(u=.6,d=u*c),d>.6&&(d=.6,u=d/c);d=Math.max(Math.min(d,.9),.05),u=Math.max(Math.min(u,.9),.05);let f;if(s&&a){let p=this.getPlacementZoneCenter(a,l);f={nx:p.nx,ny:p.ny}}else f=typeof o.x=="number"&&typeof o.y=="number"?this.normalizeSvgPoint(o.x,o.y):{nx:.5,ny:.42};let h={kind:"logo",id:`logo-${Date.now()}`,normalizedX:f.nx,normalizedY:f.ny,angle:0,lockAspectRatio:!0,imageSrc:e,imageName:t,originalWidth:n,originalHeight:r,normalizedWidth:d,normalizedHeight:u,opacity:1,placementKey:o.placementKey};return s&&a&&(h=this.applyPlacementZoneLogoBounds(h)),h}async removeWhiteBackgroundFromImage(e){let t=await this.loadImage(e);if(!t)return null;let n=t.naturalWidth||t.width,r=t.naturalHeight||t.height;if(n<=0||r<=0)return null;let o=document.createElement("canvas");o.width=n,o.height=r;let s=o.getContext("2d",{willReadFrequently:!0});if(!s)return null;s.drawImage(t,0,0,n,r);let a=s.getImageData(0,0,n,r),l=a.data;for(let c=0;c<l.length;c+=4){let d=l[c],u=l[c+1],f=l[c+2],h=l[c+3];if(h===0)continue;let p=Math.min(d,u,f),v=zm.whiteThreshold-zm.fadeRange;if(p>=zm.whiteThreshold){l[c+3]=0;continue}if(p>v){let g=(zm.whiteThreshold-p)/zm.fadeRange;l[c+3]=Math.max(0,Math.min(255,Math.round(h*g)))}}return s.putImageData(a,0,0),o.toDataURL("image/png")}normalizeScale(e){return Number.isFinite(e)?nn.clamp(e,this.minOverlayScale,this.maxOverlayScale):1}normalizeNormalizedDimension(e){return Number.isFinite(e)?nn.clamp(e,.02,1):.02}resolveOverlayNormalizedSize(e){return this.estimateOverlayNormalizedSize(e)}loadImage(e){return new Promise(t=>{let n=new Image;n.onload=()=>t(n),n.onerror=()=>t(null),n.src=e})}getPlacementZoneCenter(e,t){let n=e.bounds.x+e.bounds.width/2,r=e.bounds.y+e.bounds.height/2;return{nx:t.width?(n-t.x)/t.width:.5,ny:t.height?(r-t.y)/t.height:.5}}reset(){this.placementZoneNormalizedBounds.set(new Map)}refreshTextOverlays(){this.customizerState.refreshFabricOverlays(),this.customizerState.render2d(),this.customizerState.requestTextureRebuild()}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var xie=()=>[],jB=i=>({$implicit:i}),s_=(i,e)=>e.id,_ie=(i,e)=>e.value,WB=(i,e)=>e.placementKey;function Sie(i,e){if(i&1){let t=Ne();w(0,"div",2)(1,"label",4)(2,"input",5),ie("ngModelChange",function(r){Z(t);let o=M();return J(o.onToggleGuides(r))}),T(),w(3,"span",6),Y(4,"span",7),T(),w(5,"span",8),Y(6,"i",9),k(7," Show Text Guides "),T()()()}if(i&2){let t=M();P(),pt("is-on",t.showGuides()),P(),ne("ngModel",t.showGuides())}}function Cie(i,e){i&1&&(w(0,"div",16),Y(1,"i",21),w(2,"span",22),k(3,"No text lines yet"),T(),w(4,"span",23),k(5,'Click "Add Name" to start a new text line for this placement.'),T()())}function wie(i,e){if(i&1){let t=Ne();w(0,"div",25)(1,"input",26),ie("ngModelChange",function(r){let o=Z(t).$implicit,s=M(4);return J(s.onTextModelChange(o,r))})("focus",function(){let r=Z(t).$implicit,o=M(4);return J(o.onSelectOverlay(r))})("click",function(){let r=Z(t).$implicit,o=M(4);return J(o.onSelectOverlay(r))}),T(),w(2,"div",27)(3,"app-ui-button",28),ie("onClick",function(){let r=Z(t).$implicit,o=M(4);return J(o.onSelectOverlay(r))}),Y(4,"i",29),T(),w(5,"app-ui-button",30),ie("onClick",function(){let r=Z(t).$implicit,o=M(4);return J(o.onRemoveTextOverlay(r))}),Y(6,"i",31),T()()()}if(i&2){let t=e.$implicit,n=M(3).$implicit,r=M();pt("is-active",t.id===r.activeOverlayId()),P(),ne("placeholder","Enter "+n.name)("ngModel",t.text),P(2),ne("severity",t.id===r.activeOverlayId()?"primary":"secondary"),P(2),ne("text",!0)}}function Eie(i,e){if(i&1&&(w(0,"div",17),Dt(1,wie,7,6,"div",24,s_),T()),i&2){let t=M(2).$implicit,n=M();P(),It(n.textOverlaysForPlacement(t))}}function Mie(i,e){if(i&1&&(w(0,"span",35),k(1),T()),i&2){let t=M();P(),Ye(t.imageName)}}function Tie(i,e){i&1&&(w(0,"div",53),k(1),T()),i&2&&(P(),Ye(e))}function Die(i,e){i&1&&(w(0,"div",53),k(1),T()),i&2&&(P(),Ye(e))}function Iie(i,e){if(i&1&&(w(0,"option",67),k(1),T()),i&2){let t=e.$implicit;ne("value",t.value),P(),Ye(t.label)}}function Pie(i,e){if(i&1){let t=Ne();Y(0,"div",59),w(1,"div",38),Y(2,"i",65),k(3," Typography"),T(),w(4,"div",40)(5,"span",41),k(6,"Font"),T(),w(7,"select",66),ie("ngModelChange",function(r){Z(t);let o=M(2),s=M(3);return J(s.onFontFamilyChange(o,r))}),Dt(8,Iie,2,2,"option",67,_ie),T()()}if(i&2){let t=M(2),n=M(2).$implicit,r=M();P(7),ne("ngModel",t.fontFamily??r.defaultFontFamilyByPlacement().get(n.placementKey)??r.defaultCustomFontFamily),P(),It(r.fontOptionsByPlacement().get(n.placementKey)??cw(1,xie))}}function Aie(i,e){if(i&1){let t=Ne();Y(0,"div",59),w(1,"div",38),Y(2,"i",68),k(3," Colour"),T(),w(4,"div",69)(5,"span",41),k(6,"Fill"),T(),w(7,"div",70)(8,"app-customizer-color-panel",71),ie("colorSelected",function(r){Z(t);let o=M(2),s=M(3);return J(s.onFillChange(o,r))}),T()()(),w(9,"div",69)(10,"span",41),k(11,"Outline"),T(),w(12,"div",70)(13,"app-customizer-color-panel",71),ie("colorSelected",function(r){Z(t);let o=M(2),s=M(3);return J(s.onStrokeChange(o,r))}),T(),w(14,"div",62)(15,"app-ui-slider",63),ie("ngModelChange",function(r){Z(t);let o=M(2),s=M(3);return J(s.onStrokeWidthChange(o,r))}),T(),w(16,"span",64),k(17),T()()()(),w(18,"div",69)(19,"span",41),k(20,"Outline 2"),T(),w(21,"div",70)(22,"app-customizer-color-panel",71),ie("colorSelected",function(r){Z(t);let o=M(2),s=M(3);return J(s.onSecondStrokeChange(o,r))}),T(),w(23,"div",62)(24,"app-ui-slider",63),ie("ngModelChange",function(r){Z(t);let o=M(2),s=M(3);return J(s.onSecondStrokeWidthChange(o,r))}),T(),w(25,"span",64),k(26),T()()()()}if(i&2){let t=M(2),n=M(2).$implicit,r=M();P(8),ne("palette",r.paletteByItemId().get(n.id))("activeColor",t.fill),P(5),ne("palette",r.paletteByItemId().get(n.id))("activeColor",t.stroke),P(2),ne("min",r.minStrokeWidth())("max",r.maxStrokeWidth())("step",r.strokeWidthStep())("ngModel",t.strokeWidth??r.minStrokeWidth()),P(2),zt("",t.strokeWidth??r.minStrokeWidth(),"px"),P(5),ne("palette",r.paletteByItemId().get(n.id))("activeColor",t.secondStroke),P(2),ne("min",r.minStrokeWidth())("max",r.maxStrokeWidth())("step",r.strokeWidthStep())("ngModel",t.secondStrokeWidth??r.minStrokeWidth()),P(2),zt("",t.secondStrokeWidth??r.minStrokeWidth(),"px")}}function Oie(i,e){if(i&1&&(w(0,"option",73),k(1),T()),i&2){let t=e.$implicit;ne("ngValue",t.id),P(),Ye(t.name)}}function Rie(i,e){if(i&1){let t=Ne();Y(0,"div",59),w(1,"div",38),Y(2,"i",72),k(3," Effect"),T(),w(4,"div",40)(5,"span",41),k(6,"Style"),T(),w(7,"select",66),ie("ngModelChange",function(r){Z(t);let o=M(2),s=M(2).$implicit,a=M();return J(a.onEffectChange(o,s,r))}),w(8,"option",73),k(9,"\u2014 None \u2014"),T(),Dt(10,Oie,2,2,"option",73,s_),T()()}if(i&2){let t=M(2),n=M(2).$implicit,r=M();P(7),ne("ngModel",r.selectedEffectIdForOverlay(t)),P(),ne("ngValue",null),P(2),It(r.effectsByItemId().get(n.id))}}function kie(i,e){if(i&1){let t=Ne();w(0,"div",36)(1,"div",38),Y(2,"i",39),k(3," Sizing"),T(),w(4,"div",40)(5,"span",41),k(6,"Font Size"),T(),w(7,"div",42)(8,"app-ui-button",43),ie("onClick",function(){Z(t);let r=M(),o=M(3);return J(o.onFontSizeStep(r,-o.fontSizeStep()))}),Y(9,"i",44),T(),w(10,"input",45),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(3);return J(s.onFontSizeChange(o,r))}),T(),w(11,"span",46),k(12,"px"),T(),w(13,"app-ui-button",43),ie("onClick",function(){Z(t);let r=M(),o=M(3);return J(o.onFontSizeStep(r,o.fontSizeStep()))}),Y(14,"i",47),T()()(),w(15,"div",40)(16,"span",41),k(17,"Rotation"),T(),w(18,"div",42)(19,"app-ui-button",48),ie("onClick",function(){Z(t);let r=M(),o=M(3);return J(o.onRotationStep(r,-o.rotationStep()))}),Y(20,"i",44),T(),w(21,"input",49),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(3);return J(s.onRotationChange(o,r))}),T(),w(22,"span",46),k(23,"\xB0"),T(),w(24,"app-ui-button",48),ie("onClick",function(){Z(t);let r=M(),o=M(3);return J(o.onRotationStep(r,o.rotationStep()))}),Y(25,"i",47),T(),w(26,"app-ui-button",50),ie("onClick",function(){Z(t);let r=M(),o=M(3);return J(o.onRotationReset(r))}),Y(27,"i",51),T()()(),w(28,"div",40)(29,"span",41),k(30,"Spacing"),T(),w(31,"div",42)(32,"input",45),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(3);return J(s.onLetterSpacingChange(o,r))}),T(),w(33,"span",46),k(34,"in"),T()()(),w(35,"div",40)(36,"span",41),k(37,"Width"),T(),w(38,"div",42)(39,"input",52),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(3);return J(s.onOverlayWidthChange(o,r))}),T(),w(40,"span",46),k(41,"in"),T()()(),pe(42,Tie,2,1,"div",53),w(43,"div",40)(44,"span",41),k(45,"Height"),T(),w(46,"div",42)(47,"input",52),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(3);return J(s.onOverlayHeightChange(o,r))}),T(),w(48,"span",46),k(49,"in"),T()()(),pe(50,Die,2,1,"div",53),w(51,"label",54)(52,"input",55),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(3);return J(s.onAspectRatioToggle(o,r))}),T(),Y(53,"i",56),w(54,"span"),k(55,"Lock Ratio"),T()(),w(56,"app-ui-button",57),ie("onClick",function(){Z(t);let r=M(),o=M(3);return J(o.onResetTextDimensions(r))}),Y(57,"i",58),k(58),T(),pe(59,Pie,10,2),pe(60,Aie,27,16),pe(61,Rie,12,2),Y(62,"div",59),w(63,"div",38),Y(64,"i",60),k(65," Shadow"),T(),w(66,"div",61)(67,"div",40)(68,"span",41),k(69,"Blur"),T(),w(70,"div",62)(71,"app-ui-slider",63),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(3);return J(s.onShadowBlurChange(o,r))}),T(),w(72,"span",64),k(73),T()()(),w(74,"div",40)(75,"span",41),k(76,"Offset X"),T(),w(77,"div",62)(78,"app-ui-slider",63),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(3);return J(s.onShadowOffsetXChange(o,r))}),T(),w(79,"span",64),k(80),T()()(),w(81,"div",40)(82,"span",41),k(83,"Offset Y"),T(),w(84,"div",62)(85,"app-ui-slider",63),ie("ngModelChange",function(r){Z(t);let o=M(),s=M(3);return J(s.onShadowOffsetYChange(o,r))}),T(),w(86,"span",64),k(87),T()()()()()}if(i&2){let t,n,r,o,s,a=M(),l=M(2).$implicit,c=M();P(8),ne("text",!0)("disabled",a.fontSize<=c.minFontSize()),P(2),ne("ngModel",a.fontSize)("min",c.minFontSize())("max",c.maxFontSize())("step",c.fontSizeStep()),P(3),ne("text",!0)("disabled",a.fontSize>=c.maxFontSize()),P(6),ne("text",!0),P(2),ne("ngModel",a.angle),P(3),ne("text",!0),P(2),ne("text",!0),P(6),ne("ngModel",c.overlayLetterSpacingInches(a))("min",c.overlayLetterSpacingLimitsInches(a).min)("max",c.overlayLetterSpacingLimitsInches(a).max)("step",c.letterSpacingStep()),P(7),ne("ngModel",c.overlayWidthInches(a))("min",c.minDimensionInches())("max",c.maxDimensionInches()),P(3),me((t=c.overlayDimensionError(a,"width"))?42:-1,t),P(5),ne("ngModel",c.overlayHeightInches(a))("min",c.minDimensionInches())("max",c.maxDimensionInches()),P(3),me((n=c.overlayDimensionError(a,"height"))?50:-1,n),P(),pt("ratio-lock--on",c.isAspectRatioLocked(a)),P(),ne("ngModel",c.isAspectRatioLocked(a)),P(4),ne("text",!0),P(2),zt(" ",c.labels.resetTextDimensions," "),P(),me((r=c.fontOptionsByPlacement().get(l.placementKey))!=null&&r.length?59:-1),P(),me((o=c.paletteByItemId().get(l.id))!=null&&o.length?60:-1),P(),me((((s=c.effectsByItemId().get(l.id))==null?null:s.length)??0)>0?61:-1),P(10),ne("min",c.minShadowBlur())("max",c.maxShadowBlur())("step",c.shadowBlurStep())("ngModel",a.shadowBlur??c.defaultShadowBlur()),P(2),zt("",a.shadowBlur??c.defaultShadowBlur(),"px"),P(5),ne("min",c.minShadowOffset())("max",c.maxShadowOffset())("step",c.shadowOffsetStep())("ngModel",a.shadowOffsetX??c.defaultShadowOffsetX()),P(2),zt("",a.shadowOffsetX??c.defaultShadowOffsetX(),"px"),P(5),ne("min",c.minShadowOffset())("max",c.maxShadowOffset())("step",c.shadowOffsetStep())("ngModel",a.shadowOffsetY??c.defaultShadowOffsetY()),P(2),zt("",a.shadowOffsetY??c.defaultShadowOffsetY(),"px")}}function Fie(i,e){i&1&&(w(0,"div",37),Y(1,"i",74),w(2,"p",75),k(3," Drag the logo inside any 2D view or directly on the 3D model to reposition it. Use the corner handles in the 2D preview to scale or rotate. "),T(),w(4,"p",76),Y(5,"i",77),k(6," Tip: Switch the selected view to drop additional logos onto other areas of the garment. "),T()())}function Nie(i,e){if(i&1&&(w(0,"div",19)(1,"div",32),Y(2,"i",33),w(3,"span",34),k(4),T(),pe(5,Mie,2,1,"span",35),T(),pe(6,kie,88,47,"div",36)(7,Fie,7,0,"div",37),T()),i&2){let t=e,n=M(3);P(4),Ye(n.resolveOverlayLabel(t)),P(),me(t.kind===n.overlayKind.LOGO&&t.imageName?5:-1),P(),me(t.kind===n.overlayKind.TEXT?6:7)}}function Lie(i,e){i&1&&(w(0,"div",20),Y(1,"i",78),w(2,"span",23),k(3,"Add text for this placement to unlock size & rotation controls."),T()())}function Uie(i,e){if(i&1){let t=Ne();w(0,"div",10)(1,"div",11)(2,"span",12),Y(3,"i",13),k(4," Text Lines "),T(),w(5,"app-ui-button",14),ie("onClick",function(){Z(t);let r=M().$implicit,o=M();return J(o.onAddTextOverlay(r))}),Y(6,"i",15),T()(),pe(7,Cie,6,0,"div",16)(8,Eie,3,0,"div",17),T(),w(9,"div",10)(10,"div",11)(11,"span",12),Y(12,"i",18),k(13," Overlay Transform "),T()(),pe(14,Nie,8,3,"div",19)(15,Lie,4,0,"div",20),T()}if(i&2){let t,n=M().$implicit,r=M();P(5),ne("label",Y0("Add ",n.name))("text",!0),P(2),me(r.textOverlaysForPlacement(n).length===0?7:8),P(7),me((t=r.overlayForPlacement(n))?14:15,t)}}function Bie(i,e){if(i&1){let t=Ne();w(0,"div",80),Y(1,"i",87),w(2,"span"),k(3),T(),w(4,"button",88),ie("click",function(){Z(t);let r=M(3);return J(r.clearLogoUploadError())}),Y(5,"i",89),T()()}if(i&2){let t=M(3);P(3),Ye(t.logoUploadError())}}function zie(i,e){if(i&1&&(w(0,"option",67),k(1),T()),i&2){let t=e.$implicit;ne("value",t.id),P(),Ye(t.imageName||"Logo")}}function Vie(i,e){if(i&1){let t=Ne();w(0,"div",40)(1,"span",41),k(2),T(),w(3,"select",66),ie("ngModelChange",function(r){Z(t);let o=M(3).$implicit,s=M();return J(s.onLogoSelectionChange(o,r))}),Dt(4,zie,2,2,"option",67,s_),T()()}if(i&2){let t=M(3).$implicit,n=M();P(2),Ye(n.labels.logoToEdit),P(),ne("ngModel",n.selectedLogoIdForPlacement(t)),P(),It(n.logosForPlacement(t))}}function Gie(i,e){i&1&&(w(0,"div",53),k(1),T()),i&2&&(P(),Ye(e))}function Hie(i,e){i&1&&(w(0,"div",53),k(1),T()),i&2&&(P(),Ye(e))}function jie(i,e){if(i&1){let t=Ne();w(0,"div",84)(1,"div",38),Y(2,"i",90),k(3," Logo Settings"),T(),pe(4,Vie,6,2,"div",40),w(5,"div",40)(6,"span",41),k(7,"Width"),T(),w(8,"div",42)(9,"input",52),ie("ngModelChange",function(r){let o=Z(t),s=M(3);return J(s.onOverlayWidthChange(o,r))}),T(),w(10,"span",46),k(11,"in"),T()()(),pe(12,Gie,2,1,"div",53),w(13,"div",40)(14,"span",41),k(15,"Height"),T(),w(16,"div",42)(17,"input",52),ie("ngModelChange",function(r){let o=Z(t),s=M(3);return J(s.onOverlayHeightChange(o,r))}),T(),w(18,"span",46),k(19,"in"),T()()(),pe(20,Hie,2,1,"div",53),w(21,"label",54)(22,"input",55),ie("ngModelChange",function(r){let o=Z(t),s=M(3);return J(s.onAspectRatioToggle(o,r))}),T(),Y(23,"i",56),w(24,"span"),k(25,"Lock Ratio"),T()()()}if(i&2){let t,n,r=e,o=M(2).$implicit,s=M();P(4),me(s.logosForPlacement(o).length>1?4:-1),P(5),ne("ngModel",s.overlayWidthInches(r))("min",s.minDimensionInches())("max",s.maxDimensionInches()),P(3),me((t=s.overlayDimensionError(r,"width"))?12:-1,t),P(5),ne("ngModel",s.overlayHeightInches(r))("min",s.minDimensionInches())("max",s.maxDimensionInches()),P(3),me((n=s.overlayDimensionError(r,"height"))?20:-1,n),P(),pt("ratio-lock--on",s.isAspectRatioLocked(r)),P(),ne("ngModel",s.isAspectRatioLocked(r))}}function Wie(i,e){i&1&&(w(0,"div",16),Y(1,"i",91),w(2,"span",22),k(3,"No logos yet"),T(),w(4,"span",23),k(5,"Upload a PNG, JPG, WebP, or SVG to place one."),T()())}function $ie(i,e){i&1&&Y(0,"i",97)}function Xie(i,e){i&1&&Y(0,"i",98)}function Yie(i,e){if(i&1){let t=Ne();w(0,"div",93),ie("click",function(){let r=Z(t).$implicit,o=M(3).$implicit,s=M();return J(s.onLogoSelectionChange(o,r.id))}),Y(1,"img",94),w(2,"div",95)(3,"button",96),ie("click",function(r){let o=Z(t).$implicit,s=M(4);return r.stopPropagation(),J(s.onRemoveWhiteBackground(o))}),pe(4,$ie,1,0,"i",97)(5,Xie,1,0,"i",98),T(),w(6,"button",99),ie("click",function(r){let o=Z(t).$implicit,s=M(4);return r.stopPropagation(),J(s.onLogoRemove(o))}),Y(7,"i",31),T()()()}if(i&2){let t=e.$implicit,n=M(4);P(),ne("src",t.imageSrc,ji)("alt",t.imageName||"Logo"),P(2),ne("disabled",n.isRemovingWhiteBackground(t.id))("appTooltip",n.labels.removeWhiteBgTooltip),Pn("aria-label",n.labels.removeWhiteBg),P(),me(n.isRemovingWhiteBackground(t.id)?4:5)}}function qie(i,e){if(i&1&&(w(0,"div",86),Dt(1,Yie,8,6,"div",92,s_),T()),i&2){let t=M(2).$implicit,n=M();P(),It(n.logosForPlacement(t))}}function Kie(i,e){if(i&1){let t=Ne();w(0,"div",10)(1,"div",11)(2,"span",12),Y(3,"i",79),k(4," Logo Upload "),T()(),pe(5,Bie,6,1,"div",80),w(6,"app-ui-fileupload",81),ie("onSelect",function(r){Z(t);let o=M().$implicit,s=M();return J(s.onLogoFileSelected(r,o))}),T(),w(7,"p",82),Y(8,"i",83),k(9," Logos drop onto the selected view. Adjust size and rotation from the 2D preview handles. Max file size: 25MB "),T(),pe(10,jie,26,12,"div",84),w(11,"div",85),pe(12,Wie,6,0,"div",16)(13,qie,3,0,"div",86),T()()}if(i&2){let t,n=M().$implicit,r=M();P(5),me(r.logoUploadError()?5:-1),P(5),me((t=r.logoOverlayForPlacement(n))?10:-1,t),P(2),me(r.logosForPlacement(n).length===0?12:13)}}function Zie(i,e){if(i&1&&(pe(0,Uie,16,5),pe(1,Kie,14,3,"div",10)),i&2){let t=e.$implicit,n=M();me(t.type===n.personalizationItemType.TEXT?0:-1),P(),me(t.type===n.personalizationItemType.LOGO?1:-1)}}function Jie(i,e){if(i&1&&(w(0,"app-ui-accordion-panel",67)(1,"app-ui-accordion-header")(2,"div",100),Y(3,"i"),w(4,"span",101),k(5),T()()(),w(6,"app-ui-accordion-content"),Pr(7,102),T()()),i&2){let t=e.$implicit,n=M(2),r=ro(3);ne("value",t.id),P(3),so(Y0("",t.type===n.personalizationItemType.TEXT?"ri-text":"ri-image-line"," accordion-header-icon")),P(2),Ye(t.name),P(2),ne("ngTemplateOutlet",r)("ngTemplateOutletContext",ys(7,jB,t))}}function Qie(i,e){if(i&1&&(w(0,"app-ui-accordion"),Dt(1,Jie,8,9,"app-ui-accordion-panel",67,WB),T()),i&2){let t=M();P(),It(t.placements())}}function ere(i,e){if(i&1&&(w(0,"div",103)(1,"div",104),Y(2,"i"),w(3,"span"),k(4),T()(),Pr(5,102),T()),i&2){let t=e.$implicit,n=M(2),r=ro(3);P(2),so(t.type===n.personalizationItemType.TEXT?"ri-text":"ri-image-line"),P(2),Ye(t.name),P(),ne("ngTemplateOutlet",r)("ngTemplateOutletContext",ys(5,jB,t))}}function tre(i,e){if(i&1&&(w(0,"div",3),Dt(1,ere,6,7,"div",103,WB),T()),i&2){let t=M();P(),It(t.placements())}}var o_=class i{overlayKind=Fa;personalizationItemType=Gl;defaultCustomFontFamily=pr;labels=Q3;fontSizeDebounceTimer;items=Me([]);useAccordion=De(()=>(this.items()??[]).length>1);paletteByItemId=De(()=>{let e=new Map;for(let t of this.items()){if(!t?.id)continue;let n=new Map,r=t.packs??[];for(let o of r)if((o.type??"").toLowerCase().includes(La.COLOR))for(let s of o.dataSources??[]){if(!s||s.isActive===!1)continue;let a=s.colorCode?.trim();!a||n.has(a)||n.set(a,{label:(s.name??a).trim()||a,color:a,position:s.position??n.size})}e.set(t.id,[...n.values()].sort((o,s)=>o.position-s.position).map(({label:o,color:s})=>({label:o,color:s})))}return e});effectsByItemId=De(()=>{let e=new Map;for(let t of this.items()){if(!t?.id)continue;let n=t.packs??[];e.set(t.id,n.filter(r=>(r.type??"").toLowerCase().includes(La.EFFECT)).flatMap(r=>r.dataSources).sort((r,o)=>r.position-o.position))}return e});personalization=Q(Ql);placements=this.personalization.placements;hasBoundary=this.personalization.hasBoundary;showGuides=this.personalization.showPlacementGuides;activeOverlayId=this.personalization.activeOverlayId;logoUploadError=N(null);fontSourceMap=N({});fontOptions=N([]);fontOptionsByPlacement=N(new Map);defaultFontFamilyByPlacement=De(()=>{let e=new Map;return this.fontOptionsByPlacement().forEach((t,n)=>{e.set(n,t[0]?.value??pr)}),e});fontBinaryPromises=N(new Map);fontFacePromises=N(new Map);fontFacesReady=N(new Set);removingWhiteBgLogoIds=N(new Set);selectedLogoIdByPlacement=N(new Map);dimensionErrorsByOverlayId=N(new Map);minFontSize=N(12);maxFontSize=N(400);fontSizeStep=N(2);rotationStep=N(5);defaultFontWeight=N("normal");defaultFontStyle=N("normal");defaultLetterSpacing=N(0);strokeWidthStep=N(.5);minStrokeWidth=N(0);maxStrokeWidth=N(30);letterSpacingStep=N(.01);defaultCurveAmount=N(0);minCurveAmount=N(-100);maxCurveAmount=N(150);curveAmountStep=N(1);defaultShadowBlur=N(0);minShadowBlur=N(0);maxShadowBlur=N(60);shadowBlurStep=N(1);defaultShadowOffsetX=N(0);defaultShadowOffsetY=N(0);minShadowOffset=N(-120);maxShadowOffset=N(120);shadowOffsetStep=N(1);minDimensionInches=N(.01);maxDimensionInches=N(4e3);constructor(){Yt(()=>{this.personalization.setPlacements(this.items())}),Yt(()=>{this.ingestFontPacks(this.items())})}overlayForPlacement(e){return this.personalization.getOverlayForPlacement(e.placementKey)}logosForPlacement(e){return this.personalization.getLogosForPlacement(e.placementKey)}textOverlaysForPlacement(e){return this.personalization.getTextOverlaysForPlacement(e.placementKey)}onToggleGuides(e){this.personalization.togglePlacementGuides(e)}onTextInput(e,t){let n=this.defaultFontFamilyByPlacement().get(e.placementKey)??pr;this.queueFontFaceLoad(n),this.personalization.onTextInput(e,t,n)}onAddTextOverlay(e){let t=this.defaultFontFamilyByPlacement().get(e.placementKey)??pr;this.queueFontFaceLoad(t),this.personalization.createTextOverlay(e,t)}onTextModelChange(e,t){this.personalization.updateTextOverlayText(e,t)}onSelectOverlay(e){if(Et(e)){let t=e.fontFamily?.trim()||pr;this.queueFontFaceLoad(t)}this.personalization.setActiveOverlay(e)}onRemoveTextOverlay(e){this.personalization.removeOverlay(e.id)}onLogoFileSelected(e,t){let n=this.personalization.onLogoFileSelected(e,t);n?this.logoUploadError.set(n):this.logoUploadError.set(null)}clearLogoUploadError(){this.logoUploadError.set(null)}onLogoRemove(e){this.personalization.removeOverlay(e.id)}async onRemoveWhiteBackground(e){if(!this.removingWhiteBgLogoIds().has(e.id)){this.removingWhiteBgLogoIds.update(t=>{let n=new Set(t);return n.add(e.id),n});try{await this.personalization.removeWhiteBackgroundFromLogo(e.id)}finally{this.removingWhiteBgLogoIds.update(t=>{let n=new Set(t);return n.delete(e.id),n})}}}isRemovingWhiteBackground(e){return this.removingWhiteBgLogoIds().has(e)}resolveOverlayLabel(e){return this.personalization.resolveOverlayLabel(e)}onFontSizeChange(e,t,n=!0){if(!e||!Et(e))return;let r=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(r)&&(n?(clearTimeout(this.fontSizeDebounceTimer),this.fontSizeDebounceTimer=setTimeout(()=>{this.personalization.updateOverlayProperties(e,{fontSize:Math.max(this.minFontSize(),Math.min(this.maxFontSize(),r))})},600)):this.personalization.updateOverlayProperties(e,{fontSize:Math.max(this.minFontSize(),Math.min(this.maxFontSize(),r))}))}onFontSizeStep(e,t){if(!e||!Et(e))return;let n=e.fontSize||this.minFontSize();this.onFontSizeChange(e,n+t,!1)}onRotationChange(e,t){if(!e||!Et(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{angle:n})}onRotationStep(e,t){if(!e||!Et(e))return;let n=e.angle||0;this.onRotationChange(e,n+t)}onRotationReset(e){!e||!Et(e)||this.personalization.updateOverlayProperties(e,{angle:0})}overlayWidthInches(e){return Math.round(this.personalization.getOverlayDimensionsInches(e).width*100)/100}overlayHeightInches(e){return Math.round(this.personalization.getOverlayDimensionsInches(e).height*100)/100}overlayLetterSpacingInches(e){return Math.round(this.personalization.getOverlayLetterSpacingInches(e)*100)/100}overlayLetterSpacingLimitsInches(e){return this.personalization.getOverlayLetterSpacingLimitsInches(e)}isAspectRatioLocked(e){return e.lockAspectRatio??!0}onAspectRatioToggle(e,t){this.personalization.setOverlayAspectRatioLock(e,!!t)}onOverlayWidthChange(e,t){this.applyOverlayDimensionChange(e,t,"width")}onOverlayHeightChange(e,t){this.applyOverlayDimensionChange(e,t,"height")}onResetTextDimensions(e){!e||!Et(e)||(this.personalization.updateOverlayProperties(e,{horizontalScale:1,verticalScale:1}),this.setOverlayDimensionError(e.id,"width",null),this.setOverlayDimensionError(e.id,"height",null))}overlayDimensionError(e,t){return this.dimensionErrorsByOverlayId().get(e.id)?.[t]??null}onFontFamilyChange(e,t){if(!e||!Et(e))return;let n=(t??"").trim();n&&this.queueFontFaceLoad(n),this.personalization.updateOverlayProperties(e,{fontFamily:t})}toggleFontWeight(e){if(!e||!Et(e))return;let n=(e.fontWeight??this.defaultFontWeight())==="bold"?"normal":"bold";this.personalization.updateOverlayProperties(e,{fontWeight:n})}toggleFontStyle(e){if(!e||!Et(e))return;let n=(e.fontStyle??this.defaultFontStyle())==="italic"?"normal":"italic";this.personalization.updateOverlayProperties(e,{fontStyle:n})}onFillChange(e,t){if(!e||!Et(e))return;let n=typeof t=="string"&&t.trim().length>0?t:e.fill;this.personalization.updateOverlayProperties(e,{fill:n})}onStrokeChange(e,t){if(!e||!Et(e))return;let n=e.stroke??"#111827",r=typeof t=="string"&&t.trim().length>0?t:n;this.personalization.updateOverlayProperties(e,{stroke:r})}onStrokeWidthChange(e,t){if(!e||!Et(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{strokeWidth:Math.max(this.minStrokeWidth(),Math.min(this.maxStrokeWidth(),n))})}onSecondStrokeChange(e,t){if(!e||!Et(e))return;let n=e.secondStroke??"#ffffff",r=typeof t=="string"&&t.trim().length>0?t:n;this.personalization.updateOverlayProperties(e,{secondStroke:r})}onSecondStrokeWidthChange(e,t){if(!e||!Et(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{secondStrokeWidth:Math.max(this.minStrokeWidth(),Math.min(this.maxStrokeWidth(),n))})}onLetterSpacingChange(e,t){if(!e||!Et(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);if(!Number.isFinite(n))return;let r=this.personalization.getOverlayLetterSpacingLimitsInches(e),o=Math.max(r.min,Math.min(r.max,n));this.personalization.updateOverlayLetterSpacingInches(e,o)}onCurveAmountChange(e,t){if(!e||!Et(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{curveAmount:Math.max(this.minCurveAmount(),Math.min(this.maxCurveAmount(),n))})}onShadowBlurChange(e,t){if(!e||!Et(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{shadowBlur:Math.max(this.minShadowBlur(),Math.min(this.maxShadowBlur(),n))})}onShadowOffsetXChange(e,t){if(!e||!Et(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{shadowOffsetX:Math.max(this.minShadowOffset(),Math.min(this.maxShadowOffset(),n))})}onShadowOffsetYChange(e,t){if(!e||!Et(e))return;let n=typeof t=="number"?t:Number.parseFloat(t);Number.isFinite(n)&&this.personalization.updateOverlayProperties(e,{shadowOffsetY:Math.max(this.minShadowOffset(),Math.min(this.maxShadowOffset(),n))})}selectedEffectIdForOverlay(e){return e?.id?this.personalization.getSelectedEffectIdForOverlay(e.id):null}onEffectChange(e,t,n){if(!e||!Et(e)||!t?.id)return;let o=(this.effectsByItemId().get(t.id)??[]).find(s=>s.id===n)??null;this.personalization.applyTextEffect(e,o)}logoOverlayForPlacement(e){let t=this.logosForPlacement(e);if(!t.length)return null;let n=this.selectedLogoIdByPlacement().get(e.placementKey);if(n){let o=t.find(s=>s.id===n);if(o)return o}let r=this.overlayForPlacement(e);return r&&oi(r)?r:t[0]??null}selectedLogoIdForPlacement(e){return this.logoOverlayForPlacement(e)?.id??null}onLogoSelectionChange(e,t){if(!e?.placementKey||!t)return;this.selectedLogoIdByPlacement.update(r=>{let o=new Map(r);return o.set(e.placementKey,t),o});let n=this.logosForPlacement(e).find(r=>r.id===t);n&&this.onSelectOverlay(n)}normalizeDimensionInput(e){let t=typeof e=="number"?e:Number.parseFloat(e);return Number.isFinite(t)?t:Number.NaN}applyOverlayDimensionChange(e,t,n){let r=n==="width"?this.labels.widthLabel:this.labels.heightLabel,o=this.normalizeDimensionInput(t);if(!Number.isFinite(o)){this.setOverlayDimensionError(e.id,n,`${r} is required.`);return}let s=this.personalization.getOverlayDimensionLimitsInches(e),a=n==="width"?s.minWidth:s.minHeight,l=n==="width"?s.maxWidth:s.maxHeight;if(o<a){this.setOverlayDimensionError(e.id,n,`Min required: ${a.toFixed(2)} in`);return}if(o>l){this.setOverlayDimensionError(e.id,n,`Max required: ${l.toFixed(2)} in`);return}if(this.setOverlayDimensionError(e.id,n,null),n==="width"){this.personalization.updateOverlayDimensionsInches(e,{widthInches:o});return}this.personalization.updateOverlayDimensionsInches(e,{heightInches:o})}setOverlayDimensionError(e,t,n){this.dimensionErrorsByOverlayId.update(r=>{let o=r.get(e)??{width:null,height:null};if(o[t]===n)return r;let s=new Map(r);return s.set(e,ue(R({},o),{[t]:n})),s})}ingestFontPacks(e){let t={},n=new Map,r=new Map;e.forEach(a=>{if(!a?.placementKey)return;let l=new Map;(a.packs??[]).filter(d=>(d.type??"").toLowerCase().includes("font")).forEach(d=>{(d.dataSources??[]).forEach(u=>{if(!u||u.isActive===!1)return;let f=(u.fontFamily??u.name??"").trim();if(!f)return;let h=this.resolveFontSource(u);h&&(t[f]=h,n.has(f)||n.set(f,{label:(u.name??f).trim()||f,value:f,position:u.position??n.size+1}),l.has(f)||l.set(f,{label:(u.name??f).trim()||f,value:f,position:u.position??l.size+1}))})}),l.size&&r.set(a.placementKey,l)});let o=new Map;r.forEach((a,l)=>{o.set(l,[...a.values()].sort((c,d)=>c.position-d.position).map(({label:c,value:d})=>({label:c,value:d})))});let s=[...n.values()].sort((a,l)=>a.position-l.position).map(({label:a,value:l})=>({label:a,value:l}));this.fontSourceMap.set(t),this.fontOptions.set(s),this.fontOptionsByPlacement.set(o),this.queueInitialFontFaceLoads(e,s,o)}queueInitialFontFaceLoads(e,t,n){let r=new Set;if(n.forEach(o=>{let s=o[0]?.value?.trim();s&&r.add(s)}),e.forEach(o=>{this.personalization.getTextOverlaysForPlacement(o.placementKey).forEach(a=>{let l=a.fontFamily?.trim();l&&r.add(l)})}),!r.size){let o=t[0]?.value?.trim();o&&r.add(o)}r.forEach(o=>this.queueFontFaceLoad(o))}resolveFontSource(e){let t=e.fontUrl?.trim();return t||(e.fileUrl?.trim()?e.fileUrl:null)}queueFontFaceLoad(e){if(!this.isBrowser()||!this.fontSourceMap()[e]||this.fontFacesReady().has(e))return;let n=this.fontFacePromises().get(e);if(!n){if(n=this.ensureFontFaceLoaded(e)??void 0,!n)return;this.fontFacePromises.update(r=>{let o=new Map(r);return o.set(e,n),o})}n.then(()=>{this.fontFacesReady().has(e)||this.fontFacesReady.update(r=>{let o=new Set(r);return o.add(e),o}),this.personalization.refreshTextOverlays()}).catch(r=>{console.error(Px(e),r)})}isBrowser(){return typeof window<"u"}ensureFontFaceLoaded(e){let t=this.fontBinaryPromises().get(e);return t?t.then(n=>new Promise((r,o)=>{let s=new FontFace(e,n,{style:"normal",weight:"normal",stretch:"normal"});s.load().then(()=>{document.fonts&&document.fonts.add(s),r()}).catch(o)})).catch(n=>{throw console.error(B3(e),n),n}):null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-customizer-personalization-panel"]],inputs:{items:[1,"items"]},decls:6,vars:2,consts:[["placementContent",""],[1,"panel-body"],[1,"guide-toggle-bar"],[1,"placement-list"],[1,"guide-toggle-label"],["type","checkbox",1,"guide-toggle-input",3,"ngModelChange","ngModel"],[1,"guide-toggle-track"],[1,"guide-toggle-knob"],[1,"guide-toggle-text"],[1,"ri-ruler-2-line","guide-toggle-icon"],[1,"ctrl-section"],[1,"ctrl-section-header"],[1,"ctrl-section-title"],[1,"ri-text-wrap"],["severity","secondary",1,"add-name-btn",3,"onClick","label","text"],[1,"ri-add-circle-line"],[1,"empty-state"],[1,"text-overlay-list"],[1,"ri-tools-line"],[1,"transform-box"],[1,"empty-state","empty-state--sm"],[1,"ri-cursor-line","empty-state-icon"],[1,"empty-state-heading"],[1,"empty-state-sub"],[1,"text-overlay-row",3,"is-active"],[1,"text-overlay-row"],["type","text",1,"text-overlay-input",3,"ngModelChange","focus","click","placeholder","ngModel"],[1,"text-overlay-actions"],["appTooltip","Select to transform","tooltipPosition","top",3,"onClick","severity"],[1,"ri-compasses-2-fill"],["severity","secondary","appTooltip","Remove text line","tooltipPosition","top",1,"remove-btn",3,"onClick","text"],[1,"ri-delete-bin-6-fill"],[1,"transform-overlay-label"],[1,"ri-focus-3-line"],[1,"font-medium"],[1,"transform-overlay-filename"],[1,"name-number-overlay-box"],[1,"logo-hint"],[1,"prop-group-heading"],[1,"ri-font-size"],[1,"prop-row"],[1,"prop-label"],[1,"stepper"],[3,"onClick","text","disabled"],[1,"ri-subtract-line"],["type","number",1,"stepper-input",3,"ngModelChange","ngModel","min","max","step"],[1,"stepper-unit"],[1,"ri-add-line"],[3,"onClick","text"],["type","number","step","0.5",1,"stepper-input",3,"ngModelChange","ngModel"],["severity","secondary","appTooltip","Reset rotation","tooltipPosition","top",3,"onClick","text"],[1,"ri-reset-left-line"],["type","number","step","0.01",1,"stepper-input",3,"ngModelChange","ngModel","min","max"],[1,"field-error"],[1,"ratio-lock"],["type","checkbox",1,"ratio-lock-input",3,"ngModelChange","ngModel"],[1,"ri-link"],["severity","secondary",1,"reset-size-btn",3,"onClick","text"],[1,"ri-restart-line"],[1,"section-divider"],[1,"ri-stack-line"],[1,"shadow-group"],[1,"slider-row"],[1,"flex-1",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"ri-font-family"],[1,"prop-select",3,"ngModelChange","ngModel"],[3,"value"],[1,"ri-palette-line"],[1,"prop-row","prop-row--top"],[1,"prop-control"],[3,"colorSelected","palette","activeColor"],[1,"ri-magic-line"],[3,"ngValue"],[1,"ri-drag-move-2-line","logo-hint-icon"],[1,"logo-hint-text"],[1,"logo-hint-tip"],[1,"ri-lightbulb-line"],[1,"ri-mouse-line","empty-state-icon"],[1,"ri-image-add-line"],["role","alert",1,"logo-error-message"],["mode","basic","chooseLabel","Upload Logo","accept","image/png,image/jpeg,image/webp,image/svg+xml","customUpload","true",1,"w-full","upload-logo-btn",3,"onSelect"],[1,"upload-hint"],[1,"ri-information-line"],[1,"logo-settings-box"],[1,"logo-grid-wrapper"],[1,"logo-grid"],[1,"ri-error-warning-line"],["type","button","aria-label","Close error message",1,"error-close-btn",3,"click"],[1,"ri-close-line"],[1,"ri-aspect-ratio-line"],[1,"ri-image-2-line","empty-state-icon"],[1,"logo-card"],[1,"logo-card",3,"click"],[1,"logo-card-img",3,"src","alt"],[1,"logo-card-overlay"],["type","button","tooltipPosition","top",1,"logo-card-action",3,"click","disabled","appTooltip"],[1,"ri-loader-4-line","animate-spin"],[1,"ri-eraser-line"],["type","button","appTooltip","Remove","tooltipPosition","top",1,"logo-card-action","logo-card-action--danger",3,"click"],[1,"accordion-header-content"],[1,"accordion-header-label"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"placement-section"],[1,"placement-section-header"]],template:function(t,n){t&1&&(w(0,"div",1),pe(1,Sie,8,3,"div",2),el(2,Zie,2,2,"ng-template",null,0,il),pe(4,Qie,3,0,"app-ui-accordion")(5,tre,3,0,"div",3),T()),t&2&&(P(),me(n.hasBoundary()?1:-1),P(3),me(n.useAccordion()?4:5))},dependencies:[qt,Fc,fo,kk,Nk,Uu,xp,Kw,Dv,al,Sp,_p,ua,Xs,sh,Ni,bi,gr,mr,Jl,Ws,fr],styles:['.logo-error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 12px;margin-bottom:12px;background-color:#fee2e2;border:1px solid #fca5a5;border-radius:4px;color:#991b1b;font-size:13px;line-height:1.4;animation:_ngcontent-%COMP%_slideDown .3s ease-in-out}.logo-error-message[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:16px;flex-shrink:0}.logo-error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}.error-close-btn[_ngcontent-%COMP%]{flex-shrink:0;background:none;border:none;padding:2px;cursor:pointer;color:#991b1b;font-size:16px;display:flex;align-items:center;justify-content:center;transition:opacity .2s}.error-close-btn[_ngcontent-%COMP%]:hover{opacity:.7}@keyframes _ngcontent-%COMP%_slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.guide-toggle-bar[_ngcontent-%COMP%]{padding:10px 14px 8px;border-bottom:1px solid #f0f0f0}.guide-toggle-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:10px;cursor:pointer;-webkit-user-select:none;user-select:none}.guide-toggle-input[_ngcontent-%COMP%]{position:absolute;opacity:0;width:0;height:0}.guide-toggle-track[_ngcontent-%COMP%]{position:relative;display:inline-block;width:36px;height:20px;background:#d1d5db;border-radius:9999px;transition:background .25s ease;flex-shrink:0}.guide-toggle-knob[_ngcontent-%COMP%]{position:absolute;top:3px;left:3px;width:14px;height:14px;background:#fff;border-radius:50%;box-shadow:0 1px 4px #0000002e;transition:transform .25s ease}.guide-toggle-label.is-on[_ngcontent-%COMP%] .guide-toggle-track[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241))}.guide-toggle-label.is-on[_ngcontent-%COMP%] .guide-toggle-knob[_ngcontent-%COMP%]{transform:translate(16px)}.guide-toggle-text[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#111827}.guide-toggle-icon[_ngcontent-%COMP%]{font-size:14px;color:#374151}.ctrl-section[_ngcontent-%COMP%]{padding:12px 14px;border-bottom:1px solid #f5f5f5}.ctrl-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.ctrl-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.ctrl-section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.ctrl-section-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.add-name-btn[_ngcontent-%COMP%]{font-size:13px!important}.text-overlay-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.text-overlay-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;transition:border-color .15s,box-shadow .15s}.text-overlay-row.is-active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.text-overlay-input[_ngcontent-%COMP%]{flex:1;min-width:0;border:none;outline:none;background:transparent;font-size:13px;color:#1f2937;padding:2px 0}.text-overlay-input[_ngcontent-%COMP%]::placeholder{color:#9ca3af}.text-overlay-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px;flex-shrink:0}.remove-btn[_ngcontent-%COMP%]{color:#ef4444!important}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 12px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.empty-state--sm[_ngcontent-%COMP%]{padding:12px}.empty-state-icon[_ngcontent-%COMP%]{font-size:22px;color:#d1d5db;margin-bottom:2px}.empty-state-heading[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#374151}.empty-state-sub[_ngcontent-%COMP%]{font-size:12px;color:#64748b;line-height:1.5}.transform-box[_ngcontent-%COMP%]{border:1px solid #e5e7eb;border-radius:10px;background:#f9fafb;overflow:hidden}.transform-overlay-label[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:6px;padding:8px 12px;background:#fff;border-bottom:1px solid #e5e7eb;font-size:13px;font-weight:600;color:#111827}.transform-overlay-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));font-size:13px}.transform-overlay-filename[_ngcontent-%COMP%]{font-size:11px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:160px}.name-number-overlay-box[_ngcontent-%COMP%]{padding:10px 12px;display:flex;flex-direction:column;gap:8px}.prop-group-heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:#64748b;margin-top:4px}.prop-group-heading[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px;color:rgb(var(--primary-color, 98 101 241))}.section-divider[_ngcontent-%COMP%]{height:1px;background:#e5e7eb;margin:4px -12px}.prop-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;min-height:28px}.prop-row--top[_ngcontent-%COMP%]{align-items:flex-start}.prop-label[_ngcontent-%COMP%]{flex-shrink:0;width:72px;font-size:12px;font-weight:600;color:#111827}.prop-control[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:6px}.prop-select[_ngcontent-%COMP%]{flex:1;border:1px solid #d1d5db;border-radius:6px;padding:4px 8px;font-size:12px;color:#1f2937;background:#fff;outline:none;transition:border-color .15s,box-shadow .15s}.prop-select[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .15)}.stepper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;width:100%}.stepper-input[_ngcontent-%COMP%]{width:100%;border:1px solid #d1d5db;border-radius:6px;padding:3px 6px;font-size:13px;text-align:center;color:#111827;outline:none;transition:border-color .15s}.stepper-input[_ngcontent-%COMP%]:focus{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .12)}.stepper-input[_ngcontent-%COMP%]::-webkit-inner-spin-button, .stepper-input[_ngcontent-%COMP%]::-webkit-outer-spin-button{-webkit-appearance:none}.stepper-unit[_ngcontent-%COMP%]{font-size:12px;color:#64748b;font-weight:500}.field-error[_ngcontent-%COMP%]{margin-top:-4px;margin-left:80px;font-size:11px;color:#dc2626;line-height:1.3}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:8px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:36px;text-align:right;font-size:12px;color:#374151;font-variant-numeric:tabular-nums}.shadow-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px 10px;border-radius:8px;background:#00000006;border:1px solid #e9eaec}.ratio-lock[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;width:fit-content;margin-top:2px;font-size:12px;font-weight:600;color:#374151;cursor:pointer;-webkit-user-select:none;user-select:none}.ratio-lock-input[_ngcontent-%COMP%]{margin:0}.ratio-lock--on[_ngcontent-%COMP%]{color:#111827;font-weight:700}.reset-size-btn[_ngcontent-%COMP%]{width:fit-content;font-size:12px!important}.logo-settings-box[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:4px;padding:10px;border-radius:8px;border:1px solid #e5e7eb;background:#f9fafb;display:flex;flex-direction:column;gap:8px}.logo-hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:12px}.logo-hint-icon[_ngcontent-%COMP%]{font-size:20px;color:#d1d5db;align-self:center}.logo-hint-text[_ngcontent-%COMP%]{font-size:12px;color:#374151;line-height:1.55;margin:0}.logo-hint-tip[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:4px;font-size:11px;color:#6b7280;margin:0}.logo-hint-tip[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#f59e0b;font-size:12px;flex-shrink:0;margin-top:1px}.upload-hint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:12px;color:#64748b;margin:6px 0 0}.upload-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:#94a3b8;flex-shrink:0}.upload-logo-btn[_ngcontent-%COMP%] button.p-button[_ngcontent-%COMP%]{font-size:14px!important}.logo-grid-wrapper[_ngcontent-%COMP%]{margin-top:10px}.logo-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.logo-card[_ngcontent-%COMP%]{position:relative;aspect-ratio:1;overflow:hidden;border-radius:10px;border:1px solid #e5e7eb;background:#fff;box-shadow:0 1px 3px #0000000f}.logo-card-img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.logo-card-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:space-between;padding:6px;opacity:.7;background:linear-gradient(160deg,rgba(0,0,0,.32) 0%,transparent 60%);transition:opacity .2s ease}.logo-card[_ngcontent-%COMP%]:hover .logo-card-overlay[_ngcontent-%COMP%]{opacity:1}.logo-card-action[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;border:none;background:#ffffffe0;color:#374151;font-size:13px;cursor:pointer;box-shadow:0 1px 4px #0000002e;transition:background .15s,color .15s,transform .15s}.logo-card-action[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241));color:#fff;transform:scale(1.1)}.logo-card-action--danger[_ngcontent-%COMP%]:hover{background:#ef4444;color:#fff}.logo-card-action[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:not-allowed}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#111827}.placement-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.placement-section[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.placement-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.placement-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;font-size:13px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:#111827;border-left:3px solid rgb(var(--primary-color, 98 101 241))}.placement-section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.panel-content[_ngcontent-%COMP%]{flex:1;flex-direction:column}.panel-content[style*="display: flex"][_ngcontent-%COMP%]{display:flex!important}.panel-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #f0f0f0}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:20px;font-weight:600;color:#1a1a1a;margin:0 0 4px}.panel-subtitle[_ngcontent-%COMP%]{font-size:13px;color:#666;margin:0}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}.prop-label[_ngcontent-%COMP%]{width:60px}.stepper-input[_ngcontent-%COMP%]{width:46px}.logo-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%]{padding:8px 10px}}'],changeDetection:0})};var ah=class i{constructor(e,t){this.customizerState=e;this.dialogService=t}minPatternOpacity=0;maxPatternOpacity=1;patternOpacityStep=.05;patternPathInput=N("");patternFillInput=N(Vl);patternOpacityInput=N(1);patternOverlays=N([]);state=De(()=>({overlays:this.patternOverlays(),fill:this.patternFillInput(),opacity:this.patternOpacityInput()}));reset(){this.patternOverlays.set([]),this.patternPathInput.set(""),this.patternFillInput.set(Vl),this.patternOpacityInput.set(1)}refreshFromSvg(){this.refreshPatternOverlaysFromSvg()}async onAddPatternPathFromUrl(e,t,n){let r=this.customizerState.svgDoc();if(!r){this.showErrorDialog(Ls.svgRequired,Jo.svgRequired);return}if(!e){this.showErrorDialog(Ls.svgUrlRequired,Jo.svgUrlRequired);return}if(!this.patternOverlays().some(o=>o.sourceUrl===e))try{let o=await fetch(e,{cache:"no-cache"});if(!o.ok)throw new Error(`Failed to load SVG (${o.status})`);let s=await o.text();if(!s||!s.includes(Ax)){this.showErrorDialog(Ls.invalidSvgContent,Jo.invalidSvgContent);return}let l=new DOMParser().parseFromString(s,Qo);if(l.querySelector(Ld)){this.showErrorDialog(Ls.unableToParseSvg,Jo.unableToParseSvg);return}let c=Array.from(l.querySelectorAll("path"));if(c.length===0){this.showErrorDialog(Ls.noPathElements,Jo.noPathElements);return}let d=this.ensurePatternOverlayLayer();c.forEach((u,f)=>{let h=r.importNode(u,!0),p=h.getAttribute("d")?.trim();if(!p)return;let v=this.readPresentationValue(h,"fill"),g=this.readPresentationValue(h,"opacity"),m=v&&v.toLowerCase()!=="none"?v:this.patternFillInput().trim()||Vl,b=this.clampPatternOpacity(g?Number.parseFloat(g):this.patternOpacityInput()),y=Math.round(b*1e3)/1e3,x=h.getAttribute("id")?.trim(),_=x??`overlay-${Date.now()}-${f}`,E=this.generatePatternOverlayId(_);this.patternOverlays().some(D=>D.id===E)||(h.setAttribute("id",E),x&&x!==E&&h.setAttribute("data-pattern-source-id",x),h.setAttribute("data-pattern-source-url",e),h.setAttribute("data-pattern-overlay","true"),t&&h.setAttribute("data-pattern-thumbnail-url",t),n&&h.setAttribute("data-pattern-placement-id",n),this.stripStyleProperty(h,"fill"),this.stripStyleProperty(h,"opacity"),h.setAttribute("fill",m),h.setAttribute("opacity",y.toString()),h.setAttribute("d",p),d.appendChild(h))}),this.patternFillInput.set(this.patternFillInput()||Vl),this.patternOpacityInput.set(this.patternOpacityInput()),this.refreshPatternOverlaysFromSvg(),this.customizerState.markSvgMutated(r)}catch(o){console.error(Jo.addPatternFromUrlFailed,o),this.showErrorDialog(Ls.failedApplyPatternSvg,Jo.failedApplyPatternSvg)}}onAddPatternPath(e,t){let n=this.customizerState.svgDoc();if(!n){this.showErrorDialog(Ls.svgRequired,Jo.svgRequired);return}let r=e.trim();if(!r)return;let o=this.parsePatternPathSnippet(r);if(!o){this.showErrorDialog(Ls.invalidSvgPath,Jo.invalidSvgPath);return}let s=n.importNode(o,!0),a=s.getAttribute("d")?.trim();if(!a){this.showErrorDialog(Ls.missingPathData,Jo.missingPathData);return}let l=this.readPresentationValue(s,"fill"),c=this.readPresentationValue(s,"opacity"),d=l&&l.toLowerCase()!=="none"?l:this.patternFillInput().trim()||Vl,u=this.clampPatternOpacity(c?Number.parseFloat(c):this.patternOpacityInput()),f=Math.round(u*1e3)/1e3,h=this.ensurePatternOverlayLayer(),p=s.getAttribute("id")?.trim(),v=this.generatePatternOverlayId(p);this.patternOverlays().some(g=>g.id===v)||(s.setAttribute("id",v),p&&p!==v&&s.setAttribute("data-pattern-source-id",p),s.setAttribute("data-pattern-overlay","true"),t&&s.setAttribute("data-pattern-placement-id",t),this.stripStyleProperty(s,"fill"),this.stripStyleProperty(s,"opacity"),s.setAttribute("fill",d),s.setAttribute("opacity",f.toString()),s.setAttribute("d",a),h.appendChild(s),this.patternPathInput.set(""),this.patternFillInput.set(d),this.patternOpacityInput.set(f),this.refreshPatternOverlaysFromSvg(),this.customizerState.markSvgMutated(n))}onPatternOpacityInputChange(e){let t=typeof e=="number"?e:Number.parseFloat(e);if(Number.isFinite(t)){this.patternOpacityInput.set(this.clampPatternOpacity(t));return}this.patternOpacityInput.set(this.clampPatternOpacity(this.patternOpacityInput()))}onPatternFillChange(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=t?.trim();if(!r)return;let o=n.getElementById(e);!o||o.getAttribute("data-pattern-overlay")!=="true"||(this.stripStyleProperty(o,"fill"),o.setAttribute("fill",r),this.updatePatternOverlayRecord(e,{fill:r}),this.customizerState.markSvgMutated(n))}onPatternOpacityChange(e,t){let n=this.customizerState.svgDoc();if(!n)return;let r=typeof t=="number"?t:Number.parseFloat(t);if(!Number.isFinite(r))return;let o=this.clampPatternOpacity(r),s=n.getElementById(e);if(!s||s.getAttribute("data-pattern-overlay")!=="true")return;this.stripStyleProperty(s,"opacity");let a=Math.round(o*1e3)/1e3;s.setAttribute("opacity",a.toString()),this.updatePatternOverlayRecord(e,{opacity:a}),this.customizerState.markSvgMutated(n)}onRemovePatternOverlay(e){let t=this.customizerState.svgDoc();if(!t)return;let n=t.getElementById(e);n&&n.getAttribute("data-pattern-overlay")==="true"&&n.parentNode?.removeChild(n),this.patternOverlays.set(this.patternOverlays().filter(r=>r.id!==e)),this.refreshPatternOverlaysFromSvg(),this.customizerState.markSvgMutated(t)}refreshPatternOverlaysFromSvg(){let e=this.customizerState.svgDoc();if(!e){this.patternOverlays.set([]);return}let n=Array.from(e.querySelectorAll('path[data-pattern-overlay="true"]')).map(r=>{let o=r.getAttribute("id")?.trim();o||(o=this.generatePatternOverlayId(),r.setAttribute("id",o));let s=this.readPresentationValue(r,"fill"),a=s&&s.toLowerCase()!=="none"?s:Vl,l=this.readPresentationValue(r,"opacity"),c=this.clampPatternOpacity(l?Number.parseFloat(l):1),d=r.getAttribute("data-pattern-source-url")?.trim(),u=r.getAttribute("data-pattern-thumbnail-url")?.trim()||void 0,f=r.getAttribute("data-pattern-placement-id")?.trim()||null;return{id:o,label:r.getAttribute("data-pattern-source-id")?.trim()||o,fill:a,placementId:f,opacity:c,pathData:r.getAttribute("d")??"",sourceUrl:d,thumbnailUrl:u}});if(this.patternOverlays.set(n),n.length>0){let r=n[n.length-1];this.patternOpacityInput.set(r.opacity)}else this.patternFillInput.set(Vl),this.patternOpacityInput.set(1)}parsePatternPathSnippet(e){let t=e.trim();if(!t)return null;let n=new DOMParser,r;if(t.startsWith("<"))r=n.parseFromString(`<svg xmlns="${Ci}">${t}</svg>`,Qo);else{r=n.parseFromString(`<svg xmlns="${Ci}"></svg>`,Qo);let a=r.createElementNS(Ci,"path");a.setAttribute("d",t),r.documentElement.appendChild(a)}if(r.querySelector(Ld))return null;let o=r.querySelector("path");if(!o)return null;let s=o.getAttribute("d");return!s||s.trim().length===0?null:o}ensurePatternOverlayLayer(){let e=this.customizerState.svgDoc();if(!e)throw new Error("SVG document not loaded");let t=e.documentElement,n=t.namespaceURI||Ci,r=t.querySelector("#PatternOverlayLayer");if(!r){r=e.createElementNS(n,"g"),r.setAttribute("id","PatternOverlayLayer"),r.setAttribute("data-pattern-layer","true");let o=t.querySelector("#OverlayLayer");o?.parentNode?o.parentNode.insertBefore(r,o):t.appendChild(r)}return r}generatePatternOverlayId(e){let t=this.customizerState.svgDoc(),r=e&&e.trim().length>0?e.trim().replace(/\s+/g,"_"):"pattern-overlay";if(!t)return`${r}-${Date.now()}`;if(!t.getElementById(r))return r;let o=1,s=`${r}-${o}`;for(;t.getElementById(s);)o+=1,s=`${r}-${o}`;return s}clampPatternOpacity(e){return Number.isFinite(e)?Math.min(this.maxPatternOpacity,Math.max(this.minPatternOpacity,e)):1}readPresentationValue(e,t){let n=e.getAttribute(t);if(n&&n.trim().length>0)return n.trim();let r=e.getAttribute("style");if(!r)return null;let o=t.toLowerCase(),s=r.split(";").map(l=>l.trim()).filter(Boolean).find(l=>l.toLowerCase().startsWith(`${o}:`));if(!s)return null;let a=s.split(":");return a.length<2?null:a[1].trim()}stripStyleProperty(e,t){let n=e.getAttribute("style");if(!n)return;let r=t.toLowerCase(),o=n.split(";").map(s=>s.trim()).filter(s=>s&&!s.toLowerCase().startsWith(`${r}:`));o.length>0?e.setAttribute("style",o.join(";")):e.removeAttribute("style")}updatePatternOverlayRecord(e,t){this.patternOverlays.update(n=>n.map(r=>r.id===e?R(R({},r),t):r))}showErrorDialog(e,t){this.dialogService.showDialog({type:"error",title:e,message:t,buttons:[{label:"Dismiss",action:"confirm",isPrimary:!0}]})}static \u0275fac=function(t){return new(t||i)(Xe(Bn),Xe($s))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var $B=i=>({$implicit:i}),ire=(i,e)=>e.id,rre=(i,e)=>e.id??i;function ore(i,e){i&1&&(w(0,"div",2),Y(1,"i",3),w(2,"span",4),k(3,"No overlays available"),T(),w(4,"span",5),k(5,"No overlay options have been configured for this product."),T()())}function sre(i,e){if(i&1&&(w(0,"app-ui-accordion-panel",6)(1,"app-ui-accordion-header")(2,"div",8),Y(3,"i",9),w(4,"span",10),k(5),T()()(),w(6,"app-ui-accordion-content"),Pr(7,11),T()()),i&2){let t=e.$implicit;M(2);let n=ro(3);ne("value",t.id),P(5),Ye(t.name),P(2),ne("ngTemplateOutlet",n)("ngTemplateOutletContext",ys(4,$B,t))}}function are(i,e){if(i&1&&(w(0,"app-ui-accordion",6),Dt(1,sre,8,6,"app-ui-accordion-panel",6,tl().trackByOverlayId,!0),T()),i&2){let t=M(2);ne("value",t.firstOverlayPanel()),P(),It(t.overlayItems())}}function lre(i,e){if(i&1&&(w(0,"div",12)(1,"div",13),Y(2,"i",14),w(3,"span"),k(4),T()(),Pr(5,11),T()),i&2){let t=e.$implicit;M(2);let n=ro(3);P(4),Ye(t.name),P(),ne("ngTemplateOutlet",n)("ngTemplateOutletContext",ys(3,$B,t))}}function cre(i,e){if(i&1&&(w(0,"div",7),Dt(1,lre,6,5,"div",12,tl().trackByOverlayId,!0),T()),i&2){let t=M(2);P(),It(t.overlayItems())}}function dre(i,e){i&1&&(w(0,"div",15),Y(1,"i",17),w(2,"span",5),k(3,"No overlay packs available for this placement."),T()())}function ure(i,e){}function fre(i,e){if(i&1){let t=Ne();w(0,"div",20),ie("click",function(){let r=Z(t).$implicit,o=M(3).$implicit,s=M(2);return J(s.overlayState.onAddPatternPathFromUrl(r.fileUrl,r.thumbnailUrl,o.id))}),Y(1,"img",21),w(2,"div",22)(3,"span",23),k(4),T()()()}if(i&2){let t=e.$implicit;ne("appTooltip",t.name),P(),ne("src",t.thumbnailUrl,ji)("alt",t.name),P(3),Ye(t.name)}}function hre(i,e){if(i&1&&(pe(0,ure,0,0),w(1,"div",18),Dt(2,fre,5,4,"div",19,tl().trackByFileUrl,!0),T()),i&2){let t=e.$implicit;me(t.name?0:-1),P(2),It(t.dataSources)}}function pre(i,e){if(i&1&&(w(0,"div",16),Dt(1,hre,4,1,null,null,ire),T()),i&2){let t=M().$implicit,n=M(2);P(),It(n.getOverlayPacks(t))}}function mre(i,e){if(i&1&&pe(0,dre,4,0,"div",15)(1,pre,3,0,"div",16),i&2){let t=e.$implicit,n=M(2);me(n.getOverlayPacks(t).length===0?0:1)}}function gre(i,e){if(i&1&&Y(0,"img",32),i&2){let t=M().$implicit;ne("src",t.thumbnailUrl||t.sourceUrl,ji)("alt",t.label)}}function vre(i,e){if(i&1&&(w(0,"span",33),k(1),Ii(2,"slice"),T()),i&2){let t=M().$implicit;P(),Ye(uw(2,1,t.label,0,2))}}function bre(i,e){if(i&1){let t=Ne();w(0,"div",44),Y(1,"i",45),k(2," Colour "),T(),w(3,"div",46)(4,"app-customizer-color-panel",47),ie("colorSelected",function(r){Z(t);let o=M().$implicit,s=M(3);return J(s.onOverlayColorSelected(o.id,r))}),T()()}if(i&2){let t=M().$implicit,n=M(3);P(4),ne("items",n.colorPanelItems(t.id,t.placementId??null))}}function yre(i,e){if(i&1){let t=Ne();w(0,"app-ui-accordion-panel",6)(1,"app-ui-accordion-header")(2,"div",29)(3,"div",30)(4,"div",31),pe(5,gre,1,2,"img",32)(6,vre,3,5,"span",33),T(),w(7,"p",34),k(8),T()(),w(9,"button",35),ie("click",function(r){let o=Z(t).$implicit,s=M(3);return r.stopPropagation(),J(s.overlayState.onRemovePatternOverlay(o.id))}),Y(10,"i",36),w(11,"span"),k(12,"Remove"),T()()()(),w(13,"app-ui-accordion-content")(14,"div",37)(15,"div",38),Y(16,"i",39),k(17," Opacity "),T(),w(18,"div",40)(19,"div",41)(20,"app-ui-slider",42),ie("ngModelChange",function(r){let o=Z(t).$implicit,s=M(3);return J(s.overlayState.onPatternOpacityChange(o.id,r))}),T(),w(21,"span",43),k(22),Ii(23,"number"),T()()(),pe(24,bre,5,1),T()()()}if(i&2){let t=e.$implicit,n=M(3);ne("value",t.id),P(5),me(t.thumbnailUrl||t.sourceUrl?5:6),P(2),ne("appTooltip",t.label),P(),Ye(t.label),P(12),ne("min",n.overlayState.minPatternOpacity)("max",n.overlayState.maxPatternOpacity)("step",n.overlayState.patternOpacityStep)("ngModel",t.opacity),P(2),Ye(Wi(23,10,t.opacity,"1.0-2")),P(2),me(n.colorPanelItems(t.id,t.placementId??null).length?24:-1)}}function xre(i,e){if(i&1&&(w(0,"div",24)(1,"span",25),Y(2,"i",26),k(3," Applied Overlays "),T(),w(4,"span",27),k(5),T()(),w(6,"app-ui-accordion",28),Dt(7,yre,25,13,"app-ui-accordion-panel",6,rre),T()),i&2){let t=M(2);P(5),Ye(t.appliedPatternOverlays().length),P(),ne("multiple",!0),P(),It(t.appliedPatternOverlays())}}function _re(i,e){if(i&1&&(pe(0,are,3,1,"app-ui-accordion",6)(1,cre,3,0,"div",7),el(2,mre,2,1,"ng-template",null,0,il),pe(4,xre,9,2)),i&2){let t=M();me(t.useAccordion()?0:1),P(4),me(t.appliedPatternOverlays().length>0?4:-1)}}var a_=class i{constructor(e){this.overlayState=e}items=Me.required();useAccordion=Me(!1,{transform:ov});overlayItems=De(()=>(this.items()??[]).filter(e=>(e.type??"").toUpperCase()==="OVERLAY"));firstOverlayPanel=De(()=>{let e=this.overlayItems()[0];if(!e)return null;let t=e;return t.id??t.actionPathIdsCsv??null});appliedPatternOverlays=De(()=>{let e=new Set(this.overlayItems().map(t=>t.id).filter(t=>typeof t=="string"&&t.length>0));return e.size?this.overlayState.patternOverlays().filter(t=>!!t.placementId&&e.has(t.placementId)):[]});colorPanelItems(e,t){if(!e)return[];let n=t?(this.items()??[]).find(a=>a.id===t):null,r=n?this.buildColorCustomizationsForItem(n,e):[];if(r.length)return[...r];let o=this.overlayPackColorDataSources();if(!o.length)return[];let s={id:`overlay-color-pack-${e}`,name:"Overlay Colors",type:"Color",dataSources:o.map(a=>R({},a))};return[{id:`overlay-color-${e}`,stepId:"",dataSourcePackId:s.id,name:"Overlay Colors",type:"Color",actionPathIdsCsv:e,isTransformationRequired:!1,defaultValue:null,position:0,pack:s}]}getOverlayPacks(e){return(e.packs??[]).filter(t=>{let n=(t.type??"").toLowerCase();return n===La.OVERLAY||n===La.EFFECTS})}getOverlayColorPacks(e){return this.buildColorCustomizationsForItem(e,"")}trackByOverlayId(e,t){return t.id??e}trackByFileUrl(e,t){return t.fileUrl??e}buildColorCustomizationsForItem(e,t){return(e.packs??[]).filter(n=>(n.type??"").toLowerCase()===La.COLOR).map(n=>({id:"new-"+n.id,stepId:"new-"+n.id,dataSourcePackId:n.id,name:e.name+" Color",type:"Color",actionPathIdsCsv:t,isTransformationRequired:!1,defaultValue:"",position:10,pack:ue(R({},n),{dataSources:[...n.dataSources??[]]})}))}overlayPackColorDataSources(){return this.overlayItems().flatMap(e=>this.getOverlayPacks(e).flatMap(t=>t.dataSources??[]).filter(t=>!!t.colorCode))}onOverlayColorSelected(e,t){e&&t&&this.overlayState.onPatternFillChange(e,t)}static \u0275fac=function(t){return new(t||i)($t(ah))};static \u0275cmp=at({type:i,selectors:[["app-overlay-panel"]],inputs:{items:[1,"items"],useAccordion:[1,"useAccordion"]},decls:3,vars:1,consts:[["pickerContent",""],[1,"overlay-panel"],[1,"empty-state"],[1,"ri-layout-grid-line","empty-state-icon"],[1,"empty-state-heading"],[1,"empty-state-sub"],[3,"value"],[1,"overlay-pick-sections"],[1,"accordion-header-content"],[1,"ri-layout-grid-line","accordion-header-icon"],[1,"accordion-header-label"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"placement-section"],[1,"placement-section-header"],[1,"ri-layout-grid-line"],[1,"empty-state","empty-state--sm"],[1,"overlay-pick-section"],[1,"ri-image-2-line","empty-state-icon"],[1,"overlay-pick-grid"],[1,"overlay-pick-card",3,"appTooltip"],[1,"overlay-pick-card",3,"click","appTooltip"],[1,"overlay-pick-card__img",3,"src","alt"],[1,"overlay-pick-card__hover"],[1,"overlay-pick-card__name"],[1,"overlay-section-divider"],[1,"overlay-section-divider__label"],[1,"ri-check-double-line"],[1,"overlay-count-badge"],[1,"overlay-accordion",3,"multiple"],[1,"overlay-accordion__header"],[1,"overlay-card__meta"],["aria-hidden","true",1,"overlay-thumb"],[1,"overlay-thumb__img",3,"src","alt"],[1,"overlay-thumb__fallback"],[1,"overlay-name",3,"appTooltip"],["type","button",1,"overlay-remove",3,"click"],[1,"ri-delete-bin-6-fill"],[1,"overlay-card__body"],[1,"prop-group-heading"],[1,"ri-contrast-line"],[1,"overlay-opacity","w-full"],[1,"slider-row"],[1,"flex-1","overlay-slider",3,"ngModelChange","min","max","step","ngModel"],[1,"slider-value"],[1,"prop-group-heading",2,"margin-top","6px"],[1,"ri-palette-line"],[1,"overlay-colors"],[1,"overlay-color-panel",3,"colorSelected","items"]],template:function(t,n){t&1&&(w(0,"div",1),pe(1,ore,6,0,"div",2)(2,_re,5,2),T()),t&2&&(P(),me(n.overlayItems().length===0?1:2))},dependencies:[qt,Fc,fo,al,ua,Ni,bi,gr,mr,Jl,Ws,fr,Mw,Nc],styles:[".overlay-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:4px;padding:24px 16px;margin:12px 14px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.empty-state--sm[_ngcontent-%COMP%]{padding:14px 12px;margin:8px 0}.empty-state-icon[_ngcontent-%COMP%]{font-size:26px;color:#d1d5db;margin-bottom:4px}.empty-state-heading[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#6b7280}.empty-state-sub[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;line-height:1.55}.overlay-pick-sections[_ngcontent-%COMP%]{display:flex;flex-direction:column}.placement-section[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0}.placement-section[_ngcontent-%COMP%]:last-child{border-bottom:none}.placement-section-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:10px 14px 8px;font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#374151;border-left:3px solid rgb(var(--primary-color, 98 101 241))}.placement-section-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-content[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px}.accordion-header-icon[_ngcontent-%COMP%]{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.accordion-header-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.overlay-pick-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:10px 14px}.pack-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#9ca3af}.pack-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.overlay-pick-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.overlay-pick-card[_ngcontent-%COMP%]{position:relative;aspect-ratio:1;border-radius:10px;overflow:hidden;border:1.5px solid #e5e7eb;background:#f9fafb;cursor:pointer;box-shadow:0 1px 3px #0000000f;transition:border-color .18s,transform .18s,box-shadow .18s}.overlay-pick-card[_ngcontent-%COMP%]:hover{border-color:rgb(var(--primary-color, 98 101 241));transform:translateY(-2px) scale(1.02);box-shadow:0 6px 18px rgb(var(--primary-color, 98 101 241) / .18)}.overlay-pick-card[_ngcontent-%COMP%]:active{transform:scale(.97)}.overlay-pick-card__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:opacity .18s}.overlay-pick-card__hover[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:6px;background:linear-gradient(to top,rgba(17,24,39,.65) 0%,transparent 55%);opacity:0;transition:opacity .2s ease}.overlay-pick-card[_ngcontent-%COMP%]:hover .overlay-pick-card__hover[_ngcontent-%COMP%]{opacity:1}@media(max-width:991px){.overlay-pick-card__hover[_ngcontent-%COMP%]{opacity:.75}.overlay-pick-card[_ngcontent-%COMP%]:hover .overlay-pick-card__hover[_ngcontent-%COMP%]{opacity:1}}.overlay-pick-card__name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:0 1px 3px rgba(0,0,0,.5)}.overlay-section-divider[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px 8px;margin-top:4px;border-top:1px solid #f0f0f0}.overlay-section-divider__label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#374151}.overlay-section-divider__label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px;color:rgb(var(--primary-color, 98 101 241))}.overlay-count-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:9999px;background:rgb(var(--primary-color, 98 101 241));color:#fff;font-size:10px;font-weight:700;line-height:1}.overlay-accordion[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0}.overlay-accordion__header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;padding-right:10px}.overlay-card__meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-width:0}.overlay-thumb[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:10px;border:1px solid #e5e7eb;display:inline-flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;background:#f9fafb}.overlay-thumb__img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.overlay-thumb__fallback[_ngcontent-%COMP%]{font-size:12px;font-weight:700;color:#1f2937}.overlay-name[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#111827;margin:0;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.overlay-card__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px 12px 10px}.prop-group-heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:#64748b}.prop-group-heading[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:12px}.overlay-opacity[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.overlay-slider[_ngcontent-%COMP%]{accent-color:rgb(var(--primary-color, 98 101 241))}.slider-row[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;gap:8px}.slider-value[_ngcontent-%COMP%]{flex-shrink:0;min-width:36px;text-align:right;font-size:11px;color:#6b7280;font-variant-numeric:tabular-nums}.overlay-colors[_ngcontent-%COMP%]{display:flex;align-items:center}.overlay-remove[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:9999px;border:1px solid #fca5a5;background:#fff1f2;color:#b91c1c;font-weight:600;font-size:11px;cursor:pointer;flex-shrink:0;transition:background .15s,box-shadow .15s,transform .15s}.overlay-remove[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.overlay-remove[_ngcontent-%COMP%]:hover{background:#ffe4e6;box-shadow:0 4px 12px #ef44442e}.overlay-remove[_ngcontent-%COMP%]:active{transform:translateY(0)}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:991px){.overlay-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(6,1fr)}}@media(max-width:640px){.overlay-pick-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(5,1fr)}.overlay-name[_ngcontent-%COMP%]{font-size:12px;max-width:130px}.overlay-thumb[_ngcontent-%COMP%]{width:34px;height:34px}}@media(max-width:480px){.overlay-pick-section[_ngcontent-%COMP%]{padding:8px 10px}.overlay-name[_ngcontent-%COMP%]{max-width:100px}}"],changeDetection:0})};var Sre=(i,e)=>e.id;function Cre(i,e){i&1&&(w(0,"div",9),Y(1,"i",11),w(2,"span",12),k(3,"No layers yet"),T(),w(4,"span",13),k(5,"Add text or logo items to configure their render order."),T()())}function wre(i,e){if(i&1&&(w(0,"div",21),k(1),T()),i&2){let t=M().$implicit;P(),Ye(t.subtitle)}}function Ere(i,e){i&1&&(w(0,"span",23),k(1,"Front"),T())}function Mre(i,e){i&1&&(w(0,"span",24),k(1,"Back"),T())}function Tre(i,e){if(i&1){let t=Ne();w(0,"div",15),ie("dragstart",function(r){let o=Z(t).$implicit,s=M(2);return J(s.onDragStart(r,o.id))})("dragover",function(r){let o=Z(t).$implicit,s=M(2);return J(s.onDragOver(r,o.id))})("drop",function(r){let o=Z(t).$implicit,s=M(2);return J(s.onDrop(r,o.id))})("dragend",function(){Z(t);let r=M(2);return J(r.onDragEnd())})("click",function(){let r=Z(t).$implicit,o=M(2);return J(o.onSelect(r.id))}),w(1,"div",16),Y(2,"i",17),T(),w(3,"div",18),k(4),T(),w(5,"div",19)(6,"div",20),k(7),T(),pe(8,wre,2,1,"div",21),T(),w(9,"div",22),pe(10,Ere,2,0,"span",23)(11,Mre,2,0,"span",24),T(),w(12,"div",25)(13,"app-ui-button",26),ie("onClick",function(){let r=Z(t).$implicit,o=M(2);return J(o.onMoveTowardFront(r.id))}),Y(14,"i",27),T(),w(15,"app-ui-button",28),ie("onClick",function(){let r=Z(t).$implicit,o=M(2);return J(o.onMoveTowardBack(r.id))}),Y(16,"i",29),T()()()}if(i&2){let t=e.$implicit,n=e.$index,r=M(2);pt("active",t.id===r.activeOverlayId())("dragging",t.id===r.draggedItemId)("drop-before",t.id===r.dropTargetId&&r.dropPosition==="before")("drop-after",t.id===r.dropTargetId&&r.dropPosition==="after"),P(3),pt("render-order-rank--first",n===0),P(),zt(" ",n+1," "),P(3),Ye(t.title),P(),me(t.subtitle?8:-1),P(2),me(n===0?10:n===r.items().length-1?11:-1),P(3),ne("text",!0)("disabled",n===0),P(2),ne("text",!0)("disabled",n===r.items().length-1)}}function Dre(i,e){if(i&1&&(w(0,"div",10),Dt(1,Tre,17,18,"div",14,Sre),T()),i&2){let t=M();P(),It(t.items())}}var l_=class i{items=Me([]);activeOverlayId=Me(null);moveTowardFront=kt();moveTowardBack=kt();selectItem=kt();reorder=kt();draggedItemId=null;dropTargetId=null;dropPosition="before";onMoveTowardFront(e){this.moveTowardFront.emit(e)}onMoveTowardBack(e){this.moveTowardBack.emit(e)}onSelect(e){this.selectItem.emit(e)}onDragStart(e,t){this.draggedItemId=t,e.dataTransfer&&(e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t))}onDragOver(e,t){if(!this.draggedItemId||this.draggedItemId===t)return;e.preventDefault();let n=e.currentTarget;if(!n)return;let r=n.getBoundingClientRect(),o=r.top+r.height/2;this.dropPosition=e.clientY>=o?"after":"before",this.dropTargetId=t}onDrop(e,t){if(!this.draggedItemId||this.draggedItemId===t){this.clearDragState();return}e.preventDefault(),this.emitReorder(this.draggedItemId,t,this.dropPosition),this.clearDragState()}onDragEnd(){this.clearDragState()}emitReorder(e,t,n){let r=this.items().map(d=>d.id),o=r.indexOf(e),s=r.indexOf(t);if(o<0||s<0)return;let a=[...r];a.splice(o,1);let l=s>o?s-1:s,c=n==="after"?l+1:l;a.splice(c,0,e),this.reorder.emit(a)}clearDragState(){this.draggedItemId=null,this.dropTargetId=null,this.dropPosition="before"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-render-order-panel"]],inputs:{items:[1,"items"],activeOverlayId:[1,"activeOverlayId"]},outputs:{moveTowardFront:"moveTowardFront",moveTowardBack:"moveTowardBack",selectItem:"selectItem",reorder:"reorder"},decls:14,vars:1,consts:[[1,"render-order-panel"],[1,"render-order-info"],[1,"render-order-info__row"],[1,"depth-label","depth-label--front"],[1,"ri-stack-line"],[1,"ri-arrow-down-line","render-order-info__arrow"],[1,"depth-label","depth-label--back"],[1,"ri-layers-line"],[1,"render-order-info__hint"],[1,"render-order-empty"],[1,"render-order-list"],[1,"ri-stack-line","render-order-empty__icon"],[1,"render-order-empty__title"],[1,"render-order-empty__hint"],["draggable","true",1,"render-order-item",3,"active","dragging","drop-before","drop-after"],["draggable","true",1,"render-order-item",3,"dragstart","dragover","drop","dragend","click"],["aria-hidden","true","appTooltip","Drag to reorder",1,"render-order-handle"],[1,"ri-draggable"],[1,"render-order-rank"],[1,"render-order-content"],[1,"render-order-title"],[1,"render-order-subtitle"],[1,"render-order-depth"],[1,"depth-pill","depth-pill--front"],[1,"depth-pill","depth-pill--back"],[1,"render-order-actions"],["appTooltip","Move forward",1,"ro-btn",3,"onClick","text","disabled"],[1,"ri-arrow-up-s-line"],["appTooltip","Move backward",1,"ro-btn",3,"onClick","text","disabled"],[1,"ri-arrow-down-s-line"]],template:function(t,n){t&1&&(w(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),Y(4,"i",4),k(5," Front (top) "),T(),Y(6,"i",5),w(7,"span",6),Y(8,"i",7),k(9," Back (bottom) "),T()(),w(10,"p",8),k(11," Drag rows or use the arrows to change which item appears on top. "),T()(),pe(12,Cre,6,0,"div",9)(13,Dre,3,0,"div",10),T()),t&2&&(P(12),me(n.items().length===0?12:13))},dependencies:[qt,Xs,fr],styles:[".render-order-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:12px 14px}.render-order-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border-radius:10px;background:linear-gradient(135deg,#f5f3ff,#eff6ff);border:1px solid #e5e7eb}.render-order-info__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.render-order-info__arrow[_ngcontent-%COMP%]{font-size:14px;color:#d1d5db;flex-shrink:0}.render-order-info__hint[_ngcontent-%COMP%]{margin:0;font-size:11px;color:#9ca3af;line-height:1.5}.depth-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;letter-spacing:.04em}.depth-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:13px}.depth-label--front[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241))}.depth-label--back[_ngcontent-%COMP%]{color:#9ca3af}.render-order-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:6px;padding:20px 14px;border:1.5px dashed #e5e7eb;border-radius:10px;background:#fafafa;text-align:center}.render-order-empty__icon[_ngcontent-%COMP%]{font-size:28px;color:#d1d5db}.render-order-empty__title[_ngcontent-%COMP%]{font-size:13px;font-weight:700;color:#374151}.render-order-empty__hint[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;line-height:1.5}.render-order-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.render-order-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;border:1.5px solid #e5e7eb;border-radius:10px;background:#fff;padding:8px 10px;cursor:pointer;transition:border-color .16s,box-shadow .16s,background .16s}.render-order-item[_ngcontent-%COMP%]:hover{border-color:#c7d2fe;background:#fafafe}.render-order-item.active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgb(var(--primary-color, 98 101 241) / .12);background:#f5f3ff}.render-order-item.dragging[_ngcontent-%COMP%]{opacity:.45;box-shadow:0 8px 24px #0000001a}.render-order-item.drop-before[_ngcontent-%COMP%]{box-shadow:inset 0 3px rgb(var(--primary-color, 98 101 241));border-color:rgb(var(--primary-color, 98 101 241))}.render-order-item.drop-after[_ngcontent-%COMP%]{box-shadow:inset 0 -3px rgb(var(--primary-color, 98 101 241));border-color:rgb(var(--primary-color, 98 101 241))}.render-order-handle[_ngcontent-%COMP%]{color:#d1d5db;font-size:16px;line-height:1;cursor:grab;flex-shrink:0;transition:color .15s}.render-order-item[_ngcontent-%COMP%]:hover .render-order-handle[_ngcontent-%COMP%]{color:#9ca3af}.render-order-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.render-order-rank[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:#f3f4f6;border:1px solid #e5e7eb;font-size:11px;font-weight:700;color:#6b7280;flex-shrink:0}.render-order-rank--first[_ngcontent-%COMP%]{background:#ede9fe;border-color:#c4b5fd;color:rgb(var(--primary-color, 98 101 241))}.render-order-content[_ngcontent-%COMP%]{flex:1;min-width:0}.render-order-title[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#111827;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.render-order-subtitle[_ngcontent-%COMP%]{font-size:11px;color:#9ca3af;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.render-order-depth[_ngcontent-%COMP%]{flex-shrink:0;min-width:38px}.depth-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:2px 8px;border-radius:9999px;font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.depth-pill--front[_ngcontent-%COMP%]{background:#ede9fe;color:rgb(var(--primary-color, 98 101 241))}.depth-pill--back[_ngcontent-%COMP%]{background:#f3f4f6;color:#9ca3af}.render-order-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2px;flex-shrink:0}.ro-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;border:1px solid #e5e7eb;background:#fff;color:#6b7280;font-size:14px;cursor:pointer;transition:border-color .15s,color .15s,background .15s}.ro-btn[_ngcontent-%COMP%]:hover:not(:disabled){border-color:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-color, 98 101 241));background:#f5f3ff}.ro-btn[_ngcontent-%COMP%]:disabled{opacity:.3;cursor:not-allowed}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:640px){.render-order-panel[_ngcontent-%COMP%]{padding:8px 10px}.render-order-item[_ngcontent-%COMP%]{padding:6px 8px;gap:6px}.render-order-title[_ngcontent-%COMP%]{font-size:12px}.render-order-subtitle[_ngcontent-%COMP%]{font-size:10px}.render-order-rank[_ngcontent-%COMP%]{width:18px;height:18px;font-size:10px}.depth-pill[_ngcontent-%COMP%]{display:none}}@media(max-width:480px){.render-order-list[_ngcontent-%COMP%]{gap:4px}}"],changeDetection:0})};var c_=class i{gridEnabled=Me(!1);snapEnabled=Me(!1);showPlacementGuides=Me(!1);gridRatio=Me(.25);editorMode=Me("3d");threeDGridSizeNormalized=Me(10);twoDGridSizeInches=Me(1);onGridToggle=kt();onSnapToggle=kt();onGuidesToggle=kt();onGridSizeChange=kt();onTwoDGridSizeChange=kt();onGridClick(){this.onGridToggle.emit()}onSnapClick(){this.onSnapToggle.emit()}onGuidesClick(){this.onGuidesToggle.emit()}onSliderChange(e){let t=e.target.value;this.onTwoDGridSizeChange.emit(t)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-canvas-guide-panel"]],inputs:{gridEnabled:[1,"gridEnabled"],snapEnabled:[1,"snapEnabled"],showPlacementGuides:[1,"showPlacementGuides"],gridRatio:[1,"gridRatio"],editorMode:[1,"editorMode"],threeDGridSizeNormalized:[1,"threeDGridSizeNormalized"],twoDGridSizeInches:[1,"twoDGridSizeInches"]},outputs:{onGridToggle:"onGridToggle",onSnapToggle:"onSnapToggle",onGuidesToggle:"onGuidesToggle",onGridSizeChange:"onGridSizeChange",onTwoDGridSizeChange:"onTwoDGridSizeChange"},decls:34,vars:12,consts:[[1,"canvas-guide-panel"],[1,"controls-section"],[1,"section-label"],[1,"ri-layout-grid-line"],[1,"toggle-buttons-group"],["type","button","aria-label","Toggle Grid",1,"control-btn",3,"click","title"],[1,"btn-label"],["type","button","aria-label","Toggle Snap to Grid",1,"control-btn",3,"click","title"],[1,"ri-focus-3-line"],["type","button","aria-label","Toggle Placement Guides",1,"control-btn",3,"click","title"],[1,"ri-guide-line"],[1,"grid-size-control"],[1,"control-label-header"],[1,"ri-settings-3-line"],[1,"control-label-text"],[1,"slider-container"],["type","range","min","0.25","max","4","step","0.01","aria-label","Grid size adjustment in inches",1,"control-slider",3,"input","value","title"],[1,"slider-value"],[1,"controls-section","info-section"],[1,"info-text"],[1,"ri-information-line"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2),bt(3,"i",3),re(4,"span"),k(5,"Canvas Display"),he()(),re(6,"div",4)(7,"button",5),Gn("click",function(){return n.onGridClick()}),bt(8,"i",3),re(9,"span",6),k(10,"Grid"),he()(),re(11,"button",7),Gn("click",function(){return n.onSnapClick()}),bt(12,"i",8),re(13,"span",6),k(14,"Snap"),he()(),re(15,"button",9),Gn("click",function(){return n.onGuidesClick()}),bt(16,"i",10),re(17,"span",6),k(18,"Guides"),he()()()(),re(19,"div",1)(20,"label",11)(21,"div",12),bt(22,"i",13),re(23,"span",14),k(24,"Grid Size (in)"),he()(),re(25,"div",15)(26,"input",16),Gn("input",function(o){return n.onSliderChange(o)}),he(),re(27,"span",17),k(28),he()()()(),re(29,"div",18)(30,"div",19),bt(31,"i",20),re(32,"p"),k(33,"Use these tools to align and position elements precisely on your canvas."),he()()()()),t&2&&(P(7),pt("active",n.gridEnabled()),di("title",n.gridEnabled()?"Hide Grid":"Show Grid"),P(4),pt("active",n.snapEnabled()),di("title",n.snapEnabled()?"Disable Snap":"Enable Snap"),P(4),pt("active",n.showPlacementGuides()),di("title",n.showPlacementGuides()?"Hide Guides":"Show Guides"),P(11),di("value",n.twoDGridSizeInches())("title","Adjust grid size in inches"),P(2),zt(" ",n.twoDGridSizeInches().toFixed(2)," in "))},dependencies:[qt],styles:[".canvas-guide-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.2rem;padding:.5rem 0}.controls-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.section-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--text-color-secondary, 100 116 139));padding:.25rem 0}.section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.toggle-buttons-group[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}.control-btn[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.375rem;padding:.75rem;border:1.5px solid rgb(var(--border-color, 203 213 225));border-radius:.625rem;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:.65rem;font-weight:500;cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden}.control-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1.125rem;transition:transform .2s ease}.control-btn[_ngcontent-%COMP%]:hover:not(.active){border-color:rgb(var(--primary-color, 98 101 241) / .5);background:rgb(var(--primary-color, 98 101 241) / .08);transform:translateY(-1px)}.control-btn.active[_ngcontent-%COMP%]{border-color:rgb(var(--primary-color, 98 101 241));background:linear-gradient(135deg,rgb(var(--primary-color, 98 101 241) / .15),rgb(var(--primary-color, 98 101 241) / .08));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 0 0 3px rgb(var(--primary-color, 98 101 241) / .1)}.control-btn[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:inset 0 2px 4px #0000000d}.btn-label[_ngcontent-%COMP%]{display:block;white-space:nowrap}.grid-size-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.575rem;cursor:pointer}.control-label-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--text-color-secondary, 100 116 139))}.control-label-header[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.control-label-text[_ngcontent-%COMP%]{display:block}.slider-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;padding:.5rem;background:rgb(var(--surface-100, 248 250 252));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.5rem;transition:all .2s ease}.slider-container[_ngcontent-%COMP%]:focus-within{border-color:rgb(var(--primary-color, 98 101 241));background:rgb(var(--surface-card, 255 255 255));box-shadow:0 0 0 2px rgb(var(--primary-color, 98 101 241) / .1)}.control-slider[_ngcontent-%COMP%]{flex:1;height:4px;appearance:none;background:linear-gradient(to right,rgb(var(--primary-color, 98 101 241) / .3),rgb(var(--primary-color, 98 101 241)));border-radius:2px;outline:none;cursor:pointer;-webkit-appearance:none}.control-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));border:2px solid rgb(var(--surface-card, 255 255 255));cursor:pointer;box-shadow:0 2px 4px #0000001a;transition:all .2s ease}.control-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.2);box-shadow:0 4px 8px rgb(var(--primary-color, 98 101 241) / .3)}.control-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));border:2px solid rgb(var(--surface-card, 255 255 255));cursor:pointer;box-shadow:0 2px 4px #0000001a;transition:all .2s ease}.control-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.2);box-shadow:0 4px 8px rgb(var(--primary-color, 98 101 241) / .3)}.slider-value[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-width:3rem;padding:.375rem .625rem;background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.375rem;font-size:.75rem;font-weight:600;color:rgb(var(--primary-color, 98 101 241));text-align:center;white-space:nowrap;transition:all .2s ease}.info-section[_ngcontent-%COMP%]{margin-top:.5rem;padding-top:1rem;border-top:1px solid rgb(var(--border-color, 203 213 225))}.info-text[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.75rem;background:rgb(var(--primary-color, 98 101 241) / .08);border:1px solid rgb(var(--primary-color, 98 101 241) / .2);border-radius:.5rem;font-size:.7rem;color:rgb(var(--text-color-secondary, 100 116 139));line-height:1.4}.info-text[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem;color:rgb(var(--primary-color, 98 101 241));margin-top:.125rem}.info-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0}@media(max-width:640px){.canvas-guide-panel[_ngcontent-%COMP%]{gap:1rem;padding:.4rem 0}.toggle-buttons-group[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr);gap:.4rem}.control-btn[_ngcontent-%COMP%]{padding:.625rem;font-size:.6rem}.control-btn[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem}.slider-container[_ngcontent-%COMP%]{padding:.4rem;gap:.5rem}}"]})};var d_=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-keyboard-shortcuts-panel"]],decls:157,vars:0,consts:[[1,"shortcuts-panel"],[1,"shortcuts-section"],[1,"section-label"],[1,"ri-map-pin-2-line"],[1,"shortcut-list"],[1,"shortcut-row"],[1,"keys"],[1,"key-sep"],[1,"key-drag"],[1,"shortcut-desc"],[1,"keys","button-key"],[1,"ri-history-line"],[1,"ri-drag-move-2-line"],[1,"keys","arrow-cluster"],[1,"arrow-cluster-inline"],[1,"ri-refresh-line"],[1,"info-note"],[1,"ri-information-line"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2),bt(3,"i",3),re(4,"span"),k(5,"Canvas Navigation"),he()(),re(6,"div",4)(7,"div",5)(8,"div",6)(9,"kbd"),k(10,"Right Click"),he(),re(11,"span",7),k(12,"+"),he(),re(13,"span",8),k(14,"Drag"),he()(),re(15,"span",9),k(16,"Pan canvas"),he()(),re(17,"div",5)(18,"div",6)(19,"kbd"),k(20,"Scroll Wheel"),he()(),re(21,"span",9),k(22,"Zoom in/out"),he()(),re(23,"div",5)(24,"div",10),k(25," Reset Button "),he(),re(26,"span",9),k(27,"Reset view to default"),he()()()(),re(28,"div",1)(29,"div",2),bt(30,"i",11),re(31,"span"),k(32,"History"),he()(),re(33,"div",4)(34,"div",5)(35,"div",6)(36,"kbd"),k(37,"Ctrl"),he(),re(38,"span",7),k(39,"+"),he(),re(40,"kbd"),k(41,"Z"),he()(),re(42,"span",9),k(43,"Undo"),he()(),re(44,"div",5)(45,"div",6)(46,"kbd"),k(47,"Ctrl"),he(),re(48,"span",7),k(49,"+"),he(),re(50,"kbd"),k(51,"Shift"),he(),re(52,"span",7),k(53,"+"),he(),re(54,"kbd"),k(55,"Z"),he()(),re(56,"span",9),k(57,"Redo"),he()(),re(58,"div",5)(59,"div",6)(60,"kbd"),k(61,"Ctrl"),he(),re(62,"span",7),k(63,"+"),he(),re(64,"kbd"),k(65,"Y"),he()(),re(66,"span",9),k(67,"Redo"),he()()()(),re(68,"div",1)(69,"div",2),bt(70,"i",12),re(71,"span"),k(72,"Move Overlay"),he()(),re(73,"div",4)(74,"div",5)(75,"div",13)(76,"kbd"),k(77,"\u2191"),he(),re(78,"kbd"),k(79,"\u2193"),he(),re(80,"kbd"),k(81,"\u2190"),he(),re(82,"kbd"),k(83,"\u2192"),he()(),re(84,"span",9),k(85,"Move 1 px"),he()(),re(86,"div",5)(87,"div",6)(88,"kbd"),k(89,"Shift"),he(),re(90,"span",7),k(91,"+"),he(),re(92,"span",14)(93,"kbd"),k(94,"\u2191"),he(),re(95,"kbd"),k(96,"\u2193"),he(),re(97,"kbd"),k(98,"\u2190"),he(),re(99,"kbd"),k(100,"\u2192"),he()()(),re(101,"span",9),k(102,"Move 10 px"),he()()()(),re(103,"div",1)(104,"div",2),bt(105,"i",15),re(106,"span"),k(107,"Rotate Overlay"),he()(),re(108,"div",4)(109,"div",5)(110,"div",6)(111,"kbd"),k(112,"Q"),he()(),re(113,"span",9),k(114,"Rotate counter-clockwise"),he()(),re(115,"div",5)(116,"div",6)(117,"kbd"),k(118,"E"),he()(),re(119,"span",9),k(120,"Rotate clockwise"),he()(),re(121,"div",5)(122,"div",6)(123,"kbd"),k(124,"Shift"),he(),re(125,"span",7),k(126,"+"),he(),re(127,"kbd"),k(128,"Q"),he()(),re(129,"span",9),k(130,"Rotate CCW fast (3\xD7)"),he()(),re(131,"div",5)(132,"div",6)(133,"kbd"),k(134,"Shift"),he(),re(135,"span",7),k(136,"+"),he(),re(137,"kbd"),k(138,"E"),he()(),re(139,"span",9),k(140,"Rotate CW fast (3\xD7)"),he()(),re(141,"div",5)(142,"div",6)(143,"kbd"),k(144,"["),he()(),re(145,"span",9),k(146,"Rotate counter-clockwise"),he()(),re(147,"div",5)(148,"div",6)(149,"kbd"),k(150,"]"),he()(),re(151,"span",9),k(152,"Rotate clockwise"),he()()()(),re(153,"div",16),bt(154,"i",17),re(155,"p"),k(156,"Overlay shortcuts apply when an overlay is selected on the canvas."),he()()())},styles:[".shortcuts-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.2rem;padding:.5rem 0}.shortcuts-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.6rem}.section-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--text-color-secondary, 100 116 139));padding:.25rem 0}.section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.shortcut-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.shortcut-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.45rem .6rem;background:rgb(var(--surface-100, 248 250 252));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.5rem}.keys[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}kbd[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:1.5rem;padding:.1rem .4rem;font-family:inherit;font-size:.65rem;font-weight:600;line-height:1.4;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--surface-card, 255 255 255));border:1.5px solid rgb(var(--border-color, 203 213 225));border-radius:.35rem;box-shadow:0 1px rgb(var(--border-color, 203 213 225));white-space:nowrap}.key-sep[_ngcontent-%COMP%]{font-size:.6rem;color:rgb(var(--text-color-secondary, 100 116 139))}.key-drag[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:.1rem .4rem;font-family:inherit;font-size:.65rem;font-weight:600;color:rgb(var(--text-color-secondary, 100 116 139));background:transparent;border:none;font-style:italic}.button-key[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:.2rem .6rem;font-family:inherit;font-size:.65rem;font-weight:600;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--primary-color, 98 101 241) / .15);border:1.5px solid rgb(var(--primary-color, 98 101 241) / .3);border-radius:.35rem;white-space:nowrap}.arrow-cluster[_ngcontent-%COMP%]{gap:.2rem}.arrow-cluster-inline[_ngcontent-%COMP%]{display:inline-flex;gap:.2rem}.shortcut-desc[_ngcontent-%COMP%]{font-size:.7rem;color:rgb(var(--text-color-secondary, 100 116 139));text-align:right;flex:1}.info-note[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.75rem;background:rgb(var(--primary-color, 98 101 241) / .08);border:1px solid rgb(var(--primary-color, 98 101 241) / .2);border-radius:.5rem;font-size:.7rem;color:rgb(var(--text-color-secondary, 100 116 139));line-height:1.4}.info-note[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{flex-shrink:0;font-size:.875rem;color:rgb(var(--primary-color, 98 101 241));margin-top:.125rem}.info-note[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;padding:0}@media(max-width:640px){.shortcuts-panel[_ngcontent-%COMP%]{gap:1rem;padding:.4rem 0}.shortcut-row[_ngcontent-%COMP%]{padding:.4rem .5rem}kbd[_ngcontent-%COMP%]{font-size:.6rem;min-width:1.35rem;padding:.1rem .3rem}}"]})};var Ire=(i,e)=>e.id;function Pre(i,e){if(i&1){let t=Ne();re(0,"img",11),Gn("error",function(){Z(t);let r=M().$implicit,o=M();return J(o.markThumbnailBroken(r==null?null:r.id))}),he()}if(i&2){let t=M().$implicit;di("src",t.thumbnailLink,ji)("alt",t.name||"Pre-design")}}function Are(i,e){i&1&&(re(0,"div",7),Za(),re(1,"svg",12),bt(2,"rect",13)(3,"path",14),he()())}function Ore(i,e){i&1&&(re(0,"div",8),Za(),re(1,"svg",15),bt(2,"polyline",16),he()())}function Rre(i,e){if(i&1&&(re(0,"p",10),k(1),he()),i&2){let t=M().$implicit;P(),Ye(t.name)}}function kre(i,e){if(i&1){let t=Ne();re(0,"div",4),Gn("click",function(){let r=Z(t).$implicit,o=M();return J(o.onSelect(r))}),re(1,"div",5),pe(2,Pre,1,2,"img",6)(3,Are,4,0,"div",7),pe(4,Ore,3,0,"div",8),re(5,"div",9),pe(6,Rre,2,1,"p",10),he()()()}if(i&2){let t=e.$implicit,n=M();pt("selected",(t==null?null:t.id)===n.selectedId()),P(2),me(t.thumbnailLink&&!n.isThumbnailBroken(t==null?null:t.id)?2:3),P(2),me((t==null?null:t.id)===n.selectedId()?4:-1),P(2),me(t.name?6:-1)}}function Fre(i,e){i&1&&(re(0,"div",3),Za(),re(1,"svg",12),bt(2,"rect",13)(3,"path",17),he(),lu(),re(4,"span"),k(5,"No pre-designs available"),he()())}var u_=class i{predesigns=Me([]);selectedId=Me(null);designSelected=kt();brokenThumbById=N({});onSelect(e){e&&this.designSelected.emit(e)}isThumbnailBroken(e){return e?!!this.brokenThumbById()[e]:!1}markThumbnailBroken(e){e&&this.brokenThumbById.update(t=>ue(R({},t),{[e]:!0}))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-pre-designs-panel"]],inputs:{predesigns:[1,"predesigns"],selectedId:[1,"selectedId"]},outputs:{designSelected:"designSelected"},decls:5,vars:1,consts:[[1,"predesigns-panel"],[1,"predesigns-grid"],[1,"design-card",3,"selected"],[1,"predesigns-empty"],[1,"design-card",3,"click"],[1,"design-card__image-wrap"],["loading","lazy","decoding","async",1,"design-card__image",3,"src","alt"],["aria-label","Thumbnail unavailable",1,"design-card__placeholder"],[1,"design-card__tick"],[1,"design-card__hover"],[1,"design-card__name"],["loading","lazy","decoding","async",1,"design-card__image",3,"error","src","alt"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["x","3","y","3","width","18","height","18","rx","2"],["d","M3 16l5-5 4 4 3-3 6 6"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","3","stroke-linecap","round","stroke-linejoin","round"],["points","20 6 9 17 4 12"],["d","M3 9h18M9 21V9"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1),Dt(2,kre,7,5,"div",2,Ire),pe(4,Fre,6,0,"div",3),he()()),t&2&&(P(2),It(n.predesigns()),P(2),me(n.predesigns().length?-1:4))},dependencies:[qt],styles:['.predesigns-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:12px;overflow-y:auto}.predesigns-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.design-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;cursor:pointer;border-radius:10px;transition:transform .18s ease,box-shadow .18s ease}.design-card[_ngcontent-%COMP%]:hover{transform:translateY(-2px)}.design-card[_ngcontent-%COMP%]:hover .design-card__image-wrap[_ngcontent-%COMP%]{box-shadow:0 6px 20px #00000024;border-color:var(--p-primary-color, #6265f1)}.design-card__image-wrap[_ngcontent-%COMP%]{position:relative;aspect-ratio:1 / 1;border-radius:10px;overflow:hidden;border:2px solid #cbcbcb;background:var(--p-surface-100, #f4f4f5);transition:border-color .18s ease,box-shadow .18s ease}.design-card__image-wrap[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#0000000a,#00000014,#0000000a 70%);background-size:200% 100%;animation:_ngcontent-%COMP%_predesign-skeleton 1.25s ease-in-out infinite}.design-card.selected[_ngcontent-%COMP%] .design-card__image-wrap[_ngcontent-%COMP%]{border-color:var(--p-primary-color, #6265f1);box-shadow:0 0 0 3px color-mix(in srgb,var(--p-primary-color, #6265f1) 25%,transparent)}.design-card__image[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block;transition:transform .22s ease;position:relative;z-index:1}.design-card[_ngcontent-%COMP%]:hover .design-card__image[_ngcontent-%COMP%]{transform:scale(1.04)}.design-card__placeholder[_ngcontent-%COMP%]{position:relative;z-index:1;width:100%;height:100%;display:grid;place-items:center;color:#00000073}.design-card__placeholder[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:42px;height:42px;opacity:.75}@keyframes _ngcontent-%COMP%_predesign-skeleton{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.design-card__image-wrap[_ngcontent-%COMP%]:before{animation:none}}.design-card__tick[_ngcontent-%COMP%]{position:absolute;top:8px;right:8px;width:24px;height:24px;border-radius:50%;background:var(--p-primary-color, #6265f1);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px #00000040;animation:_ngcontent-%COMP%_tick-pop .2s ease}.design-card__tick[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px}@keyframes _ngcontent-%COMP%_tick-pop{0%{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}.design-card__hover[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:6px;background:linear-gradient(to top,rgb(0 0 0 / 65%) 0%,transparent 55%);z-index:999;opacity:0;transition:opacity .2s ease}.design-card[_ngcontent-%COMP%]:hover .design-card__hover[_ngcontent-%COMP%]{opacity:1}@media(max-width:992px){.design-card__hover[_ngcontent-%COMP%]{opacity:.75}.design-card[_ngcontent-%COMP%]:hover .design-card__hover[_ngcontent-%COMP%]{opacity:1}}.design-card__name[_ngcontent-%COMP%]{font-size:10px;font-weight:600;color:#fff;text-align:center;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:0 1px 3px rgba(0,0,0,.5);margin:0}.predesigns-empty[_ngcontent-%COMP%]{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 16px;color:var(--p-text-muted-color, #888);font-size:13px}.predesigns-empty[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:40px;height:40px;opacity:.45}.child-accordion[_ngcontent-%COMP%]{width:100%!important}@media(max-width:992px){.predesigns-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(6,1fr)}}@media(max-width:640px){.panel-header[_ngcontent-%COMP%]{padding:12px 12px 10px}.predesigns-grid[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}.panel-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px}}@media(max-width:480px){.panel-header[_ngcontent-%COMP%]{padding:8px 10px}}'],changeDetection:0})};var SD;(t=>{let i;(a=>(a.ArrayBuffer="arraybuffer",a.Blob="blob",a.JSON="json",a.Text="text"))(i=t.ResponseType||={});let e;(o=>(o.Body="body",o.Response="response"))(e=t.Observe||={})})(SD||={});var ec=class i{http=Q(yv);toasterService=Q(da);environment=Q(Sv);request(e,t={}){let h=e,{method:n,params:r,url:o}=h,s=en(h,["method","params","url"]),{observe:a=SD.Observe.Body,skipHandleError:l,httpParamEncoder:c,loader:d}=t,u=this.removeDuplicateSlashes(`${t.apiName}${o}`),f=R({observe:a},s);return r&&(f.params=this.getParams(r,c)),f.headers=this.addLoaderHeader(d,f.headers),f.headers=this.addskipHandleError(l,f.headers),this.http.request(n,u,f).pipe(aS(p=>{p?.succeeded==!1&&!l&&this.handleError(p)}),fc(p=>l?ss():Va(()=>p)))}get(e,t={},n,r={}){return this.request({method:"GET",url:e,params:t,headers:n},R({apiName:this.environment.apiUrl,loader:!0},r))}post(e,t,n,r={}){return this.request({method:"POST",url:e,body:t,headers:n},R({apiName:this.environment.apiUrl},r))}put(e,t,n,r={}){return this.request({method:"PUT",url:e,body:t,headers:n},R({apiName:this.environment.apiUrl},r))}delete(e,t,n={}){return this.request({method:"DELETE",url:e,headers:t},R({apiName:this.environment.apiUrl},n))}getParams(e,t){let n=Object.entries(e).reduce((r,[o,s])=>(this.isUndefinedOrEmptyString(s)||s===null||(r[o]=s),r),{});return t?new co({encoder:t,fromObject:n}):new co({fromObject:n})}addLoaderHeader(e,t){let n=new uo;return t&&Object.keys(t).forEach(r=>{n=n.set(r,t[r])}),e&&(n=n.set("Loader","true")),n}addskipHandleError(e,t){return t=t||new uo,e&&(t=t.set("skipHandleError","true")),t}removeDuplicateSlashes(e){return e.replace(/([^:]\/)\/+/g,"$1")}handleError(e){return this.toasterService.showError(_v(e)),Va(()=>e)}isUndefinedOrEmptyString(e){return e===void 0||e===""||e===null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var f_=class i{api=Q(ec);createSubmission(e,t,n,r,o){let s=new FormData;return s.append("file",e,e.name),n&&s.append("productId",n),r?.length&&s.append("views",r.join(",")),o?.length&&o.forEach(a=>{s.append("previewImages",a,a.name)}),this.api.post("design-submissions",s,{"X-API-Key":t},{loader:!0})}getSubmissionByNumber(e,t){return this.api.get(`design-submissions/${encodeURIComponent(e)}`,{},{"X-API-Key":t},{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var h_=class i{message="Loading\u2026";static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-manifest-loader"]],inputs:{message:"message"},decls:20,vars:2,consts:[["role","status","aria-live","polite",1,"manifest-loader"],["aria-hidden","true",1,"loader"],[1,"box","box0"],[1,"box","box1"],[1,"box","box2"],[1,"box","box3"],[1,"box","box4"],[1,"box","box5"],[1,"box","box6"],[1,"box","box7"],[1,"message"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2),bt(3,"div"),he(),re(4,"div",3),bt(5,"div"),he(),re(6,"div",4),bt(7,"div"),he(),re(8,"div",5),bt(9,"div"),he(),re(10,"div",6),bt(11,"div"),he(),re(12,"div",7),bt(13,"div"),he(),re(14,"div",8),bt(15,"div"),he(),re(16,"div",9),bt(17,"div"),he()(),re(18,"p",10),k(19),he()()),t&2&&(Pn("aria-label",n.message),P(19),Ye(n.message))},styles:['[_nghost-%COMP%]{display:block}.message[_ngcontent-%COMP%]{margin:0;text-align:center}.manifest-loader[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}.manifest-loader[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{color:var(--p-text-color, #0f172a);font-weight:500}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{--duration: 3s;--primary: rgb(167, 11, 11);width:200px;height:365px;position:relative;transform-style:preserve-3d}@media(max-width:480px){.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%]{zoom:.44}}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%]{--x: 0;--y: 0;position:absolute;animation:var(--duration) linear forwards infinite;transform:translate(var(--x),var(--y))}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{background-color:var(--primary);width:48px;height:48px;position:relative;transform-style:preserve-3d;animation:var(--duration) ease forwards infinite;transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:before, .manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:after{--rx: 90deg;--ry: 0deg;--z: 24px;--y: -24px;--x: 0;content:"";position:absolute;background-color:inherit;width:inherit;height:inherit;transform:rotateX(var(--rx)) rotateY(var(--ry)) translate(var(--x),var(--y)) translateZ(var(--z));filter:brightness(var(--b, 1.2))}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:after{--rx: 0deg;--ry: 90deg;--x: 24px;--y: 0;--b: 1.4}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box0[_ngcontent-%COMP%]{--x: -220px;--y: -120px;left:58px;top:108px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box1[_ngcontent-%COMP%]{--x: -260px;--y: 120px;left:25px;top:120px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box2[_ngcontent-%COMP%]{--x: 120px;--y: -190px;left:58px;top:64px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box3[_ngcontent-%COMP%]{--x: 280px;--y: -40px;left:91px;top:120px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box4[_ngcontent-%COMP%]{--x: 60px;--y: 200px;left:58px;top:132px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box5[_ngcontent-%COMP%]{--x: -220px;--y: -120px;left:25px;top:76px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box6[_ngcontent-%COMP%]{--x: -260px;--y: 120px;left:91px;top:76px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box.box7[_ngcontent-%COMP%]{--x: -240px;--y: 200px;left:58px;top:87px}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box0[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move0}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box0[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale0}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box1[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move1}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box1[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale1}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box2[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move2}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box2[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale2}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box3[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move3}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box3[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale3}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box4[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move4}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box4[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale4}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box5[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move5}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box5[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale5}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box6[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move6}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box6[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale6}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box7[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-move7}.manifest-loader[_ngcontent-%COMP%] .loader[_ngcontent-%COMP%] .box7[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{animation-name:_ngcontent-%COMP%_box-scale7}@keyframes _ngcontent-%COMP%_box-move0{12%{transform:translate(var(--x),var(--y))}25%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale0{6%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}14%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move1{16%{transform:translate(var(--x),var(--y))}29%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale1{10%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}18%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move2{20%{transform:translate(var(--x),var(--y))}33%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale2{14%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}22%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move3{24%{transform:translate(var(--x),var(--y))}37%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale3{18%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}26%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move4{28%{transform:translate(var(--x),var(--y))}41%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale4{22%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}30%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move5{32%{transform:translate(var(--x),var(--y))}45%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale5{26%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}34%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move6{36%{transform:translate(var(--x),var(--y))}49%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale6{30%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}38%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_box-move7{40%{transform:translate(var(--x),var(--y))}53%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes _ngcontent-%COMP%_box-scale7{34%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}42%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes _ngcontent-%COMP%_mask{0%,65%{opacity:0}66%,to{opacity:1}}'],changeDetection:0})};function Nre(i,e){if(i&1&&(re(0,"p",13),k(1),he()),i&2){let t=M();P(),Ye(t.subtitle)}}var p_=class i{message="Saving design\u2026";subtitle=null;static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-save-loader"]],inputs:{message:"message",subtitle:"subtitle"},decls:16,vars:4,consts:[["role","status","aria-live","polite",1,"save-loader-container"],[1,"save-loader-content"],[1,"spinner-wrapper"],["viewBox","0 0 100 100",1,"spinner"],["cx","50","cy","50","r","45","fill","none","stroke","currentColor","stroke-width","4","stroke-dasharray","283.7","stroke-dashoffset","0","opacity","0.15"],["cx","50","cy","50","r","45","fill","none","stroke","url(#spinnerGradient)","stroke-width","4","stroke-dasharray","70.9","stroke-dashoffset","0","stroke-linecap","round"],["id","spinnerGradient","x1","0%","y1","0%","x2","100%","y2","100%"],["offset","0%","stop-color","var(--save-loader-color, #a70b0b)"],["offset","100%","stop-color","var(--save-loader-color, #a70b0b)","stop-opacity","0.3"],["role","img","aria-label","Save in progress",1,"success-icon"],[1,"ri-save-line"],[1,"text-content"],[1,"message"],[1,"subtitle"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2),Za(),re(3,"svg",3),bt(4,"circle",4)(5,"circle",5),re(6,"defs")(7,"linearGradient",6),bt(8,"stop",7)(9,"stop",8),he()()(),lu(),re(10,"div",9),bt(11,"i",10),he()(),re(12,"div",11)(13,"p",12),k(14),he(),pe(15,Nre,2,1,"p",13),he()()()),t&2&&(Pn("aria-label",n.message),P(13),Pn("aria-label",n.message),P(),Ye(n.message),P(),me(n.subtitle?15:-1))},styles:["[_nghost-%COMP%]{display:block}.save-loader-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.5rem;padding:2rem}.save-loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1.25rem}.spinner-wrapper[_ngcontent-%COMP%]{position:relative;width:80px;height:80px;display:flex;align-items:center;justify-content:center}.spinner[_ngcontent-%COMP%]{width:80px;height:80px;animation:_ngcontent-%COMP%_spin 2s linear infinite}.success-icon[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--save-loader-color, #a70b0b);opacity:.8}.success-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:32px;animation:_ngcontent-%COMP%_pulse-icon 2s ease-in-out infinite}.text-content[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{margin:0;font-size:1rem;font-weight:600;color:var(--p-text-color, #0f172a);letter-spacing:.3px}.subtitle[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--p-text-color-secondary, #64748b);font-weight:400;letter-spacing:.2px}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_pulse-icon{0%,to{opacity:.6;transform:scale(1)}50%{opacity:1;transform:scale(1.1)}}@media(max-width:480px){.save-loader-container[_ngcontent-%COMP%]{padding:1.5rem 1rem;gap:1rem}.spinner-wrapper[_ngcontent-%COMP%], .spinner[_ngcontent-%COMP%]{width:64px;height:64px}.success-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:24px}.message[_ngcontent-%COMP%]{font-size:.95rem}.subtitle[_ngcontent-%COMP%]{font-size:.8rem}}"],changeDetection:0})};var m_=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-three-d-loader"]],decls:10,vars:0,consts:[[1,"pyramid-loader-overlay"],[1,"pyramid-loader"],[1,"wrapper"],[1,"side","side1"],[1,"side","side2"],[1,"side","side3"],[1,"side","side4"],[1,"shadow"],[1,"loading-model-text"]],template:function(t,n){t&1&&(re(0,"div",0)(1,"div",1)(2,"div",2),bt(3,"span",3)(4,"span",4)(5,"span",5)(6,"span",6)(7,"span",7),he()(),re(8,"div",8),k(9,"Loading 3D Model..."),he()())},styles:[".pyramid-loader-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#ffffffb3;z-index:50;border-radius:inherit;gap:20px}.loading-model-text[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#333;margin-top:10px;animation:_ngcontent-%COMP%_pulse 1.5s infinite ease-in-out}@keyframes _ngcontent-%COMP%_pulse{0%{opacity:.5}50%{opacity:1}to{opacity:.5}}.pyramid-loader[_ngcontent-%COMP%]{position:relative;width:300px;height:300px;display:block;transform-style:preserve-3d;transform:rotateX(-20deg)}.wrapper[_ngcontent-%COMP%]{position:relative;width:100%;height:100%;transform-style:preserve-3d;animation:_ngcontent-%COMP%_spin 4s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotateY(360deg)}}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side[_ngcontent-%COMP%]{width:70px;height:70px;position:absolute;inset:0;margin:auto;transform-origin:center top;clip-path:polygon(50% 0%,0% 100%,100% 100%)}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side1[_ngcontent-%COMP%]{transform:rotate(-30deg) rotateY(90deg);background:conic-gradient(rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)),rgb(var(--text-color-secondary, 100 116 139)),rgb(var(--accent-color, 245 158 11)))}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side2[_ngcontent-%COMP%]{transform:rotate(30deg) rotateY(90deg);background:conic-gradient(rgb(var(--accent-color, 245 158 11)),rgb(var(--text-color-secondary, 100 116 139)),rgb(var(--secondary-color, 16 185 129)),rgb(var(--primary-color, 98 101 241)))}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side3[_ngcontent-%COMP%]{transform:rotateX(30deg);background:conic-gradient(rgb(var(--accent-color, 245 158 11)),rgb(var(--text-color-secondary, 100 116 139)),rgb(var(--secondary-color, 16 185 129)),rgb(var(--primary-color, 98 101 241)))}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .side4[_ngcontent-%COMP%]{transform:rotateX(-30deg);background:conic-gradient(rgb(var(--primary-color, 98 101 241)),rgb(var(--secondary-color, 16 185 129)),rgb(var(--text-color-secondary, 100 116 139)),rgb(var(--accent-color, 245 158 11)))}.pyramid-loader[_ngcontent-%COMP%] .wrapper[_ngcontent-%COMP%] .shadow[_ngcontent-%COMP%]{width:60px;height:60px;background:rgb(var(--primary-color, 98 101 241));position:absolute;inset:0;margin:auto;transform:rotateX(90deg) translateZ(-40px);filter:blur(12px)}"],changeDetection:0})};var g_=new qe("SDK_RUNTIME_CONFIG");var XB=1024,YB=4096;async function v_(i,e,t,n){if(console.log("SVG ::::: ",i),console.log("OBJ ::::: ",e),console.log("MTL ::::: ",t),console.log("materialSourceUrl ::::: ",n),typeof window>"u"||typeof document>"u")throw new Error("Thumbnail generation requires a browser environment.");let r=new Yc;r.background=null;let o=new fi(45,1,.1,4e3),s=new Sf({antialias:!0,alpha:!0});s.setSize(XB,XB,!1),s.setPixelRatio(Math.min(window.devicePixelRatio||1,3)),s.setClearColor(0,0),s.outputColorSpace=bn,s.toneMapping=td,s.toneMappingExposure=1;let a=await Lre(e,t,n),l=await Hre(i,s),c=new Set;$re(a),Xre(a),Kre(a,l,c),qre(r),r.add(a);let d=noe(r,a,o),u=[{key:"front",direction:new G(0,.15,1)},{key:"right",direction:new G(1,.15,0)},{key:"back",direction:new G(0,.15,-1)},{key:"left",direction:new G(-1,.15,0)}],f=[];try{for(let h of u){let p=h.direction.clone().normalize().multiplyScalar(d.distance).add(d.center);o.position.copy(p),o.lookAt(d.center),o.updateProjectionMatrix(),s.render(r,o),f.push({view:h.key,dataUrl:s.domElement.toDataURL("image/png")})}return f}finally{ioe(a,c),c.has(l)||l.dispose(),s.dispose()}}async function Lre(i,e,t){let n=new $f;if(e?.value?.trim()){let o=new Xf,s=e.type==="url"?qB(t??e.value):qB(t),a=e.type==="url"?await Ure(o,e.value,s):await JB(o,e.value,s);a.preload(),n.setMaterials(a)}return i.type==="url"?await n.loadAsync(i.value):n.parse(i.value)}async function Ure(i,e,t){let n=await fetch(e);if(!n.ok)throw new Error(`Failed to load MTL (${n.status})`);let r=await n.text();return JB(i,r,t)}function JB(i,e,t){return new Promise((n,r)=>{try{let o=Bre(e,t),s=i.parse(o,t);n(s)}catch(o){r(new Error(`Failed to parse MTL text: ${o instanceof Error?o.message:"Unknown error"}`))}})}function Bre(i,e){return i.trim()?i.split(/\r?\n/).map(t=>zre(t,e)).join(`
|
|
4615
|
-
`):i}function zre(i,e){let t=i.match(/^(\s*)(map_\S+|bump|disp|decal|refl)\s+(.+)$/i);if(!t)return i;let[,n,r,o]=t,s=o.trim().split(/\s+/);if(!s.length)return i;let a=s[s.length-1];if(Vre(a))return i;let l=Gre(e,a);return l?(s[s.length-1]=l,`${n}${r} ${s.join(" ")}`):i}function Vre(i){let e=i.trim();return/^https?:\/\//i.test(e)||/^\/\//.test(e)}function Gre(i,e){let n=e.split("?")[0].split("#")[0].split(/[\\/]/).pop();if(!n)return e;if(!i)return n;try{return new URL(n,i).toString()}catch{let r=i.endsWith("/")?"":"/";return`${i}${r}${n}`}}async function Hre(i,e){let t=i.type==="url"?await jre(i.value):i.value,n=new Blob([t],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(n);try{let o=await Wre(r),s=document.createElement("canvas");s.width=YB,s.height=YB;let a=s.getContext("2d");if(!a)throw new Error("Failed to create canvas context for SVG texture.");a.imageSmoothingEnabled=!0,a.imageSmoothingQuality="high",a.clearRect(0,0,s.width,s.height);let l=o.width/o.height,c=s.width,d=s.height;l>1?d=s.height/l:c=s.width*l,a.drawImage(o,0,0,c,d);let u=new ws(s);return u.colorSpace=bn,u.minFilter=go,u.magFilter=jn,u.anisotropy=e.capabilities.getMaxAnisotropy(),u.flipY=!0,u.wrapS=Oi,u.wrapT=Oi,u.needsUpdate=!0,u}finally{URL.revokeObjectURL(r)}}function qB(i){if(!i)return"";try{if(typeof window<"u")return new URL(".",new URL(i,window.location.href)).toString()}catch{}let e=i.split("?")[0].split("#")[0],t=e.lastIndexOf("/");return t>=0?e.slice(0,t+1):""}async function jre(i){let e=await fetch(i,{cache:"no-cache"});if(!e.ok)throw new Error(`Failed to load SVG (${e.status})`);return e.text()}function Wre(i){return new Promise((e,t)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=()=>t(new Error("Failed to decode SVG image.")),n.src=i})}function $re(i){Yre(i);let t=new Yi().setFromObject(i).getSize(new G),n=Math.max(t.x,t.y,t.z);if(!Number.isFinite(n)||n<=0)return;i.scale.setScalar(4/n);let o=new Yi().setFromObject(i).getCenter(new G);i.position.sub(o),i.traverse(s=>{let a=s;!a.isMesh||!a.geometry||(a.geometry.computeVertexNormals(),a.castShadow=!1,a.receiveShadow=!1)})}function Xre(i){let e=t=>{if(!t)return new Ca({color:16777215,roughness:.8,metalness:.1});let n=t,r=t;return new Ca({map:n.map??null,color:r.color?.clone()??new ct(16777215),roughness:.8,metalness:.1})};i.traverse(t=>{let n=t;if(!n.isMesh)return;let r=n.material;Array.isArray(r)?n.material=r.map(o=>e(o)):n.material=e(r),n.castShadow=!0,n.receiveShadow=!0})}function Yre(i){i.traverse(e=>{let t=e;if(!t.isMesh||!(t.geometry instanceof ei))return;let n=Tx(t.geometry.clone(),1e-5);n.deleteAttribute("normal"),n.computeVertexNormals(),n.normalizeNormals(),n.computeBoundingBox(),n.computeBoundingSphere(),t.geometry.dispose(),t.geometry=n,(Array.isArray(t.material)?t.material:[t.material]).forEach(o=>{o&&("flatShading"in o&&(o.flatShading=!1),o.side=Xi,o.needsUpdate=!0)})})}function qre(i){let e=new ed(16777215,.6);i.add(e);let t=new Uo(16777215,1.2);t.position.set(100,150,100),i.add(t);let n=new Uo(16777215,.6);n.position.set(-100,50,100),i.add(n);let r=new Uo(16777215,.8);r.position.set(0,100,-150),i.add(r);let o=new Qc(16777215,13421772,.5);o.position.set(0,200,0),i.add(o)}function Kre(i,e,t){let n=new WeakMap,r=new WeakMap,o=QB(e);i.traverse(s=>{let a=s;!a.isMesh||!a.material||(Array.isArray(a.material)?a.material.forEach(l=>{KB(l,e,o,n,r,t)}):KB(a.material,e,o,n,r,t))})}function KB(i,e,t,n,r,o){if(!Zre(i))return;n.has(i)||n.set(i,i.map??null);let s=n.get(i)??null;if(Qre(i,!!s,r),!s||!t){s&&o.add(s),i.map=e,i.needsUpdate=!0;return}let a=QB(s),l=a?e4(a):null;if(!a||!l){o.add(s),i.map=e,i.needsUpdate=!0;return}let c=toe(a,t,l.width,l.height);if(!c){o.add(s),i.map=e,i.needsUpdate=!0;return}o.add(s);let d=new ws(c);eoe(d,s,e),d.needsUpdate=!0,o.add(d),i.map=d,i.needsUpdate=!0}function Zre(i){return"map"in i}function Jre(i){return"color"in i&&i.color instanceof ct}function Qre(i,e,t){if(Jre(i)){if(t.has(i)||t.set(i,i.color.clone()),e){i.color.copy(t.get(i));return}i.color.set(16777215)}}function eoe(i,e,t){i.colorSpace=e.colorSpace??t.colorSpace,i.flipY=e.flipY,i.wrapS=e.wrapS,i.wrapT=e.wrapT,i.magFilter=e.magFilter,i.minFilter=e.minFilter,i.anisotropy=e.anisotropy||t.anisotropy,i.generateMipmaps=e.generateMipmaps,i.premultiplyAlpha=e.premultiplyAlpha,i.unpackAlignment=e.unpackAlignment,i.repeat.copy(e.repeat),i.offset.copy(e.offset),i.center.copy(e.center),i.rotation=e.rotation,i.matrixAutoUpdate=e.matrixAutoUpdate,i.matrix.copy(e.matrix)}function QB(i){let e=i.source?.data??i.image;if(!e)return null;let t=e4(e);return!t||t.width<=0||t.height<=0?null:e}function e4(i){if(i instanceof HTMLVideoElement)return!i.videoWidth||!i.videoHeight?null:{width:i.videoWidth,height:i.videoHeight};let e=i;return!e.width||!e.height?null:{width:e.width,height:e.height}}function toe(i,e,t,n){let r=document.createElement("canvas");r.width=t,r.height=n;let o=r.getContext("2d");if(!o)return null;try{return o.clearRect(0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,o.drawImage(i,0,0,t,n),o.globalCompositeOperation="multiply",o.globalAlpha=1,o.drawImage(e,0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,r}catch{let s=document.createElement("canvas");s.width=t,s.height=n;let a=s.getContext("2d");return a?(a.clearRect(0,0,t,n),a.drawImage(i,0,0,t,n),a.drawImage(e,0,0,t,n),s):null}}function noe(i,e,t){let n=new Yi().setFromObject(e),r=n.getCenter(new G),o=n.getSize(new G),s=Math.max(o.x,o.y,o.z)*.5,a=Math.max(s,.5),l=t.fov*(Math.PI/180),c=a/Math.tan(l/2)*1.45;return t.near=Math.max(c/200,.05),t.far=Math.max(c*20,500),t.updateProjectionMatrix(),i.updateMatrixWorld(!0),{center:r,distance:c}}function ioe(i,e){let t=new Set;i.traverse(n=>{let r=n;if(r.isMesh&&(r.geometry?.dispose(),!!r.material)){if(Array.isArray(r.material)){r.material.forEach(o=>ZB(o,t));return}ZB(r.material,t)}}),e.forEach(n=>{t.has(n)||(n.dispose(),t.add(n))})}function ZB(i,e){let t=i;Gd(t.map,e),Gd(t.lightMap,e),Gd(t.normalMap,e),Gd(t.roughnessMap,e),Gd(t.metalnessMap,e),Gd(t.aoMap,e),Gd(t.emissiveMap,e),i.dispose()}function Gd(i,e){!i||e.has(i)||(i.dispose(),e.add(i))}var b_=class i{async generateThumbnails(e,t,n,r){return v_(e,t,n,r)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var y_=(l=>(l.PREDESIGNS="predesigns",l.COLOR="color",l.PATTERN="pattern",l.PERSONALIZATION="personalization",l.OVERLAY="overlay",l.BACKGROUND="background",l.RENDER_ORDER="render-order",l.CANVAS_GUIDE="canvas-guide",l))(y_||{}),x_={PREDESIGNS:"predesigns-fixed",RENDER_ORDER:"render-order-fixed",CANVAS_GUIDE:"canvas-guide-fixed"},Hd={DESIGNS:"Designs",RENDER_POSITION:"Render Position",CUSTOMIZATION:"Customization",PERSONALIZATION:"Personalization"},__={PATTERN:"pattern",OVERLAY:"overlay",UNKNOWN:"Unknown"},t4="ri-stack-line",n4="panel";var roe=["*"],lh=class i{value=Me.required();valueChange=kt();isActive(e){return this.value()===e}select(e){this.value()!==e&&this.valueChange.emit(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-tabs"]],inputs:{value:[1,"value"]},outputs:{valueChange:"valueChange"},ngContentSelectors:roe,decls:2,vars:0,consts:[[1,"ui-tabs"]],template:function(t,n){t&1&&(_i(),re(0,"div",0),Si(1),he())},styles:[".ui-tabs[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var ooe=["*"],S_=class i{value=Me.required();tabs=Q(lh,{host:!0});active=De(()=>this.tabs.isActive(this.value()));onSelect(){this.tabs.select(this.value())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-tab"]],inputs:{value:[1,"value"]},ngContentSelectors:ooe,decls:2,vars:2,consts:[["type","button",1,"ui-tab",3,"click"]],template:function(t,n){t&1&&(_i(),re(0,"button",0),Gn("click",function(){return n.onSelect()}),Si(1),he()),t&2&&pt("ui-tab--active",n.active())},styles:[".ui-tab[_ngcontent-%COMP%]{border:0;border-radius:0;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:.84rem;font-weight:500;line-height:1;padding:.7rem .95rem .72rem;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color .2s ease,border-color .2s ease}.ui-tab[_ngcontent-%COMP%]:hover{color:rgb(var(--text-color, 15 23 42));border-bottom-color:rgb(var(--surface-300, 203 213 225))}.ui-tab--active[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));border-bottom-color:rgb(var(--primary-color, 98 101 241))}.ui-tab[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:inset 0 -2px rgb(var(--primary-color, 98 101 241))}"],changeDetection:0})};var soe=["*"],C_=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-tablist"]],ngContentSelectors:soe,decls:2,vars:0,consts:[[1,"ui-tablist"]],template:function(t,n){t&1&&(_i(),re(0,"div",0),Si(1),he())},styles:[".ui-tablist[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.35rem;border-bottom:1px solid rgb(var(--surface-200, 226 232 240));background:transparent;padding:0}@media(max-width:992px){.ui-tablist[_ngcontent-%COMP%]{margin-top:5px}}"],changeDetection:0})};var w_=class i{buildStepLookup(e){let t=new Map,n=r=>{r.forEach(o=>{t.set(o.id,o),o.children?.length&&n(o.children)})};return n(e),t}flattenSteps(e,t=0){return[...e].sort((r,o)=>r.position-o.position).flatMap(r=>[{id:r.id,name:r.name,iconClass:r.iconClass,depth:t},...this.flattenSteps(r.children??[],t+1)])}buildParentNav(e,t,n){return[...[...e].filter(r=>!r.parentStepId).sort((r,o)=>r.position-o.position).map(r=>({id:r.id,name:r.name,iconClass:r.iconClass,depth:0})),{id:t,name:Hd.RENDER_POSITION,iconClass:n,depth:0}]}buildPanelsByStep(e){let{stepNav:t,customizations:n,personalizationItems:r,stepLookup:o,renderOrderStepId:s,renderOrderItems:a}=e,l=new Map;t.forEach(d=>{this.buildCustomizationPanels(d.id,n,o).forEach(u=>this.addPanelToMap(l,d.id,u)),this.buildPersonalizationPanels(d.id,r,o).forEach(u=>this.addPanelToMap(l,d.id,u))}),this.addPanelToMap(l,s,{kind:"render-order",trackId:`${s}-${n4}`,title:Hd.RENDER_POSITION,items:a});let c="canvas-guide-fixed";return this.addPanelToMap(l,c,{kind:"canvas-guide",trackId:`${c}-panel`,title:"Canvas Guide"}),l}hasPlacementType(e,t){return(e??"").trim().toUpperCase()===t}addPanelToMap(e,t,n){let r=e.get(t)??[];e.set(t,[...r,n])}buildCustomizationPanels(e,t,n){let r=t.filter(a=>a.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??Hd.CUSTOMIZATION,s=r.reduce((a,l)=>{let c=l.type??__.UNKNOWN;return a[c]=a[c]?[...a[c],l]:[l],a},{});return Object.entries(s).map(([a,l])=>{let c=[...l].sort((u,f)=>u.position-f.position),d=this.isPatternCustomizationType(a)?"pattern":"color";return{kind:d,trackId:`${e}-${d}-${a}`,title:o,customizations:c}})}buildPersonalizationPanels(e,t,n){let r=t.filter(d=>d.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??Hd.PERSONALIZATION,s=[],a=r.filter(d=>this.hasPlacementType(d.type,"TEXT")||this.hasPlacementType(d.type,"LOGO"));a.length&&s.push({kind:"personalization",trackId:`${e}-personalization`,title:o,items:a});let l=r.filter(d=>this.hasPlacementType(d.type,"OVERLAY"));l.length&&s.push({kind:"overlay",trackId:`${e}-overlay`,title:o,items:l});let c=r.filter(d=>this.hasPlacementType(d.type,"BACKGROUND"));return c.length&&s.push({kind:"background",trackId:`${e}-background`,title:o,templates:c}),s}isPatternCustomizationType(e){let t=e.trim().toLowerCase();return t.includes(__.PATTERN)||t===__.OVERLAY}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var E_=class i{async fetchFileAsText(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch file: ${t.statusText}`);return t.text()}createJsonFile(e,t){return new File([e],`${t}-${Date.now()}.json`,{type:"application/json"})}downloadFile(e){if(typeof document>"u")return;let t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download=e.name,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}async copyTextToClipboard(e){if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}if(typeof document>"u")return!1;let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}downloadDataUrlFile(e,t){if(typeof document>"u")return;let n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),document.body.removeChild(n)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function o4(i){let e=i.svgDoc.documentElement;return{exportedAt:new Date().toISOString(),preDesignId:i.preDesignId,svg:{width:i.svgWidth,height:i.svgHeight,viewBox:i.svgViewBox,rootId:e?.getAttribute("id")??null,content:i.svgString},renderOrder:i.renderOrder,placements:i.placementZones.filter(t=>i.usedPlacementKeys.has(t.placementKey)).map(t=>({id:t.id,placementKey:t.placementKey,label:t.label,elementName:t.elementName,allowedKinds:t.allowedKinds,required:t.required,bounds:t.bounds})),paths:[...i.styledPaths,...i.textPathSummaries],overlays:{text:i.textOverlays,logo:i.logoOverlays},background:{selectedKey:i.selectedBackgroundKey&&i.backgrounds.some(t=>t.actionItemId===i.selectedBackgroundKey)?i.selectedBackgroundKey:null,items:i.backgrounds},pattern:{selectedUploadedPatternId:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternId:null,selectedFileUrl:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternFileUrl:null,definitions:i.filteredPatternDefinitions,overlays:i.usedPatternOverlays.map(t=>({id:t.id,label:t.label??null,placementId:t.placementId??null,fill:t.fill??null,opacity:t.opacity,sourceUrl:t.sourceUrl??null,thumbnailUrl:t.thumbnailUrl??null,pathData:t.pathData})),targets:i.patternTargets,colors:loe(i.svgDoc,i.usedPatternIds)}}}function s4(i){return new Set(Array.from(i.querySelectorAll('[data-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function a4(i){return new Set(Array.from(i.querySelectorAll('path[data-pattern-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function l4(i){return Array.from(i.querySelectorAll("path, rect, circle, ellipse, polygon, polyline")).filter(e=>!e.closest("defs")).filter(e=>!e.closest('[data-overlay="true"]')).map(e=>{let t=ch(e,"fill"),n=h4(e,t),r=p4(i,t);return{id:e.getAttribute("id")??null,tag:e.tagName,fill:r?.colors.length?r.colors:t,fillGradient:r,stroke:ch(e,"stroke"),strokeWidth:ch(e,"stroke-width"),opacity:ch(e,"opacity"),transform:e.getAttribute("transform"),patternFill:n}})}function c4(i){return Array.from(i.querySelectorAll("[id]")).filter(e=>!e.closest("defs")).map(e=>{let t=ch(e,"fill"),n=h4(e,t);return n?{targetId:e.id,patternId:n,fill:t}:null}).filter(e=>!!e)}function d4(i){let{patternOverlays:e,patternDefinitions:t,patternTargets:n,usedPatternOverlayIds:r}=i,o=new Set(n.map(l=>l.patternId)),s=e.filter(l=>{if(!r.has(l.id))return!1;let c=aoe(l.fill);return c&&o.add(c),!0}),a=Object.fromEntries(Object.entries(t).filter(([l])=>o.has(l)));return{usedPatternIds:o,usedPatternOverlays:s,filteredPatternDefinitions:a}}function u4(i){let{textOverlays:e,logoOverlays:t,backgrounds:n,usedPatternOverlays:r}=i,o=new Set;return e.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),t.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),n.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),r.forEach(s=>{s.placementId&&o.add(s.placementId)}),o}function f4(i){return i.flatMap(e=>{let t=(e.text??"").trim()||e.id,n=[{id:t,tag:"text",fill:e.style.fill??null,fillGradient:null,stroke:null,strokeWidth:null,opacity:null,transform:null,patternFill:null}];return e.style.stroke&&(e.style.strokeWidth??0)>0&&n.push({id:`${t} Outline 1`,tag:"text-shadow",fill:e.style.stroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.strokeWidth}`,opacity:null,transform:null,patternFill:null}),e.style.secondStroke&&(e.style.secondStrokeWidth??0)>0&&n.push({id:`${t} Outline 2`,tag:"text-shadow",fill:e.style.secondStroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.secondStrokeWidth}`,opacity:null,transform:null,patternFill:null}),n})}function aoe(i){return(i??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]??null}function ch(i,e){let t=i.getAttribute(e);if(t&&t.trim().length>0)return t.trim();let n=i.getAttribute("style");if(!n)return null;let r=e.toLowerCase(),o=n.split(";").map(a=>a.trim()).find(a=>a.toLowerCase().startsWith(`${r}:`));if(!o)return null;let s=o.split(":")[1]?.trim()??null;return s&&s.length>0?s:null}function h4(i,e){let t=i.getAttribute("data-pattern-fill")?.trim();return t||((e??"").match(/^url\(#([^)]+)\)$/i)?.[1]??null)}function p4(i,e){let r=(e??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]?.trim();if(!r)return null;let o=(l,c=new Set)=>{if(!l||c.has(l))return null;c.add(l);let d=i.getElementById(l);if(!(d instanceof SVGLinearGradientElement)&&!(d instanceof SVGRadialGradientElement))return null;if(Array.from(d.querySelectorAll(":scope > stop")).length>0)return d;let f=d.getAttribute("href")??d.getAttributeNS(Mm,"href"),h=f?.startsWith("#")?f.slice(1).trim():null;return h?o(h,c)??d:d},s=o(r);if(!s)return null;let a=Array.from(s.querySelectorAll(":scope > stop")).map(l=>{let c=l.getAttribute("stop-color")?.trim()??i4(l,"stop-color")??null;if(!c)return null;let d=l.getAttribute("stop-opacity")?.trim()??i4(l,"stop-opacity"),u=d&&d.length>0?Number.parseFloat(d):NaN;return{offset:l.getAttribute("offset")?.trim()??null,color:c,opacity:Number.isFinite(u)?u:null}}).filter(l=>!!l);return a.length===0?null:{gradientId:r,type:s.tagName==="radialGradient"?"radialGradient":"linearGradient",colors:Array.from(new Set(a.map(l=>l.color))),stops:a}}function i4(i,e){let t=i.getAttribute("style");if(!t)return null;let n=e.toLowerCase(),r=t.split(";").map(s=>s.trim()).find(s=>s.toLowerCase().startsWith(`${n}:`));if(!r)return null;let o=r.split(":")[1]?.trim()??null;return o&&o.length>0?o:null}function loe(i,e){let t=coe(i);return Array.from(e).map(n=>{let r=i.getElementById(n);if(!(r instanceof SVGPatternElement))return null;let o=foe(r,i),s=new Map,a=c=>hoe(i,s,c),l=c=>{let d=ch(c,"fill");return d&&d.length>0?d:uoe(c,t)};return o.forEach(c=>{a(l(c)),Array.from(c.querySelectorAll("*")).forEach(u=>{a(l(u))})}),s.size===0?null:{patternId:n,colors:Array.from(s.values())}}).filter(n=>!!n)}function coe(i){let e=new Map;return Array.from(i.querySelectorAll("style")).forEach(n=>{let o=(n.textContent??"").matchAll(/([^{}]+)\{([^{}]*)\}/g);for(let s of o){let a=(s[1]??"").trim(),l=(s[2]??"").trim();if(!a||!l)continue;let c=l.match(/(?:^|;)\s*fill\s*:\s*([^;]+)\s*(?:;|$)/i);if(!c)continue;let d=c[1]?.trim()??"";if(!d)continue;a.split(",").map(f=>f.trim()).filter(f=>f.length>0).forEach(f=>{let h=doe(f);h&&e.set(h,d)})}}),e}function doe(i){let e=i.trim();if(!e)return null;let t=e.split(":")[0]?.trim()??"";if(!t)return null;let n=t.split(/[\s>+~]+/).map(o=>o.trim()).filter(o=>o.length>0),r=n[n.length-1]??"";return r&&(/^#[A-Za-z_][\w-]*$/.test(r)||/^\.[A-Za-z_][\w-]*$/.test(r)||/^[A-Za-z][\w-]*$/.test(r))?r.toLowerCase():null}function uoe(i,e){let t=(i.getAttribute("id")??"").trim();if(t){let o=e.get(`#${t.toLowerCase()}`);if(o)return o}let n=(i.getAttribute("class")??"").trim();if(n){let o=n.split(/\s+/).map(s=>s.trim()).filter(s=>s.length>0);for(let s of o){let a=e.get(`.${s.toLowerCase()}`);if(a)return a}}return e.get(i.tagName.toLowerCase())??null}function foe(i,e){let t=[],n=new Set,r=i;for(;r;){let o=(r.getAttribute("id")??"").trim();if(o&&n.has(o))break;o&&n.add(o),t.push(r);let s=r.getAttribute("href")?.trim()??r.getAttributeNS(Mm,"href")?.trim(),a=s?.startsWith("#")?s.slice(1).trim():null;if(!a)break;let l=e.getElementById(a);r=l instanceof SVGPatternElement?l:null}return t}function hoe(i,e,t){let n=(t??"").trim();if(!n)return;let r=p4(i,n);if(r?.colors.length){r.colors.forEach(a=>{let l=r4(a);if(!l)return;let c=l.toLowerCase();e.has(c)||e.set(c,l)});return}let o=r4(n);if(!o)return;let s=o.toLowerCase();e.has(s)||e.set(s,o)}function r4(i){let e=(i??"").trim();if(!e)return null;let t=e.toLowerCase();return t==="none"||t.startsWith("url(")?null:e}var M_=class i{buildDesignExportPayload(e){let{svgDoc:t,svgString:n,overlays:r,personalizationItems:o,placementZones:s,placementNameByKey:a,backgroundState:l,backgroundImageTemplates:c,patternState:d,patternOverlays:u,renderOrder:f,svgDimensions:h,svgViewBox:p,bounds:v,overlayDimensionsPxById:g,selectedEffectIdByOverlay:m,textStyleResolvers:b,selectedPredesignId:y}=e,x=this.buildEffectFileUrlById(o),_=s4(t),E=a4(t),D=l4(t),A=this.collectTextOverlayExports({overlays:r,bounds:v,effectFileUrlById:x,placementNameByKey:a,usedOverlayIds:_,selectedEffectIdByOverlay:m,overlayDimensionsPxById:g,textStyleResolvers:b}),S=this.collectLogoOverlayExports({overlays:r,bounds:v,placementNameByKey:a,overlayDimensionsPxById:g,usedOverlayIds:_}),I=this.collectBackgroundExports(t,l,c),L=c4(t),H=d4({patternOverlays:u,patternDefinitions:d.definition,patternTargets:L,usedPatternOverlayIds:E}),z=u4({textOverlays:A,logoOverlays:S,backgrounds:I,usedPatternOverlays:H.usedPatternOverlays}),X=f4(A);return o4({preDesignId:y,svgDoc:t,svgString:n,svgWidth:h?.width??null,svgHeight:h?.height??null,svgViewBox:p,renderOrder:f,placementZones:s,usedPlacementKeys:z,styledPaths:D,textPathSummaries:X,textOverlays:A,logoOverlays:S,selectedBackgroundKey:l.selectedKey,backgrounds:I,selectedPatternId:d.selectedId,selectedPatternFileUrl:d.selectedFileUrl,usedPatternIds:H.usedPatternIds,filteredPatternDefinitions:H.filteredPatternDefinitions,usedPatternOverlays:H.usedPatternOverlays,patternTargets:L})}buildEffectFileUrlById(e){return e.reduce((t,n)=>((n.packs??[]).filter(o=>(o.type??"").toLowerCase().includes(La.EFFECT)).forEach(o=>{(o.dataSources??[]).forEach(s=>{let a=s?.id?.trim(),l=s?.fileUrl?.trim();a&&l&&t.set(a,l)})}),t),new Map)}collectTextOverlayExports(e){let{overlays:t,bounds:n,effectFileUrlById:r,placementNameByKey:o,usedOverlayIds:s,selectedEffectIdByOverlay:a,overlayDimensionsPxById:l,textStyleResolvers:c}=e;return t.filter(Et).filter(d=>s.has(d.id)).map(d=>{let u=a.get(d.id)??null,f=u?r.get(u)??null:null,h=this.resolveFontFamily(d,c),p=this.resolveFontWeight(d,c),v=this.resolveFontStyle(d,c),g=this.resolveLetterSpacing(d,c),m=d.lineHeight??c.defaultLineHeight,b=this.resolveStrokeColor(d,c),y=d.strokeWidth??0,x=this.resolveSecondStrokeColor(d,c),_=d.secondStrokeWidth??0,E=this.resolveCurveAmount(d,c),D=d.shadowBlur??c.defaultShadowBlur,A=d.shadowOffsetX??c.defaultShadowOffsetX,S=d.shadowOffsetY??c.defaultShadowOffsetY,I=d.shadowColor??c.defaultShadowColor,L=Number.isFinite(d.horizontalScale)?Math.max(d.horizontalScale,.1):1,H=Number.isFinite(d.verticalScale)?Math.max(d.verticalScale,.1):1,z=d.fontSize*Math.max((d.text??"").trim().length,1)*.5*L,X=d.fontSize*(d.lineHeight??c.defaultLineHeight)*H,q=l?.get(d.id),K=q&&Number.isFinite(q.width)&&q.width>0?q.width:z,j=q&&Number.isFinite(q.height)&&q.height>0?q.height:X,te=Math.abs(D)>1e-4||Math.abs(A)>1e-4||Math.abs(S)>1e-4,ye={applied:[...b&&y>0?["stroke"]:[],...x&&_>0?["secondStroke"]:[],...te?["shadow"]:[],...Math.abs(E)>1e-4?["curve"]:[],...d.warpEnabled===!0?["warp"]:[],...p==="bold"?["bold"]:[],...v==="italic"?["italic"]:[]],stroke:b&&y>0?{color:b,width:y}:null,secondStroke:x&&_>0?{color:x,width:_}:null,shadow:te?{blur:D,offsetX:A,offsetY:S,color:I}:null,curve:Math.abs(E)>1e-4?{amount:E}:null,warp:d.warpEnabled===!0,bold:p==="bold",italic:v==="italic"};return{id:d.id,kind:d.kind,text:d.text,effectId:u,effectFileUrl:f,placementKey:d.placementKey??null,lockAspectRatio:d.lockAspectRatio??!0,placementName:d.placementKey?o.get(d.placementKey)??d.placementKey:null,transform:{normalizedX:d.normalizedX,normalizedY:d.normalizedY,absoluteCenterX:n.x+d.normalizedX*n.width,absoluteCenterY:n.y+d.normalizedY*n.height,angle:d.angle??0},style:{fill:d.fill,fontFamily:h,fontSize:d.fontSize,horizontalScale:L,verticalScale:H,fontWeight:p,fontStyle:v,letterSpacing:g,lineHeight:m,stroke:b,strokeWidth:y,secondStroke:x,secondStrokeWidth:_,curveAmount:E,shadowBlur:D,shadowOffsetX:A,shadowOffsetY:S,shadowColor:I},dimensions:{renderedWidth:K,renderedHeight:j},effects:ye}})}collectLogoOverlayExports(e){let{overlays:t,bounds:n,placementNameByKey:r,overlayDimensionsPxById:o,usedOverlayIds:s}=e;return t.filter(oi).filter(a=>s.has(a.id)).map(a=>{let l=o?.get(a.id),c=l&&Number.isFinite(l.width)&&l.width>0?l.width:a.normalizedWidth*n.width,d=l&&Number.isFinite(l.height)&&l.height>0?l.height:a.normalizedHeight*n.height;return{id:a.id,kind:a.kind,logoBlobId:a.logoBlobId??null,imageName:a.imageName??null,imageSrc:a.imageSrc,placementKey:a.placementKey??null,lockAspectRatio:a.lockAspectRatio??!0,placementName:a.placementKey?r.get(a.placementKey)??a.placementKey:null,transform:{normalizedX:a.normalizedX,normalizedY:a.normalizedY,absoluteCenterX:n.x+a.normalizedX*n.width,absoluteCenterY:n.y+a.normalizedY*n.height,angle:a.angle??0},dimensions:{originalWidth:a.originalWidth,originalHeight:a.originalHeight,normalizedWidth:a.normalizedWidth,normalizedHeight:a.normalizedHeight,renderedWidth:c,renderedHeight:d},opacity:a.opacity??1}})}collectBackgroundExports(e,t,n){return n.map(r=>{let o=t.images[r.actionItemId],s=e.getElementById(r.actionItemId),a=s?.getAttribute("href")??s?.getAttributeNS(Mm,"href"),l=!!o?.transform&&(Math.abs((o.transform.scale??1)-1)>1e-4||Math.abs(o.transform.rotation??0)>1e-4||Math.abs(o.transform.translateX??0)>1e-4||Math.abs(o.transform.translateY??0)>1e-4||Math.abs((o.transform.opacity??1)-1)>1e-4);return{isUsed:!!o?.fileName||!!o?.src?.trim()||!!a?.trim()||l,placementKey:r.placementKey??null,templateId:r.id,actionItemId:r.actionItemId,name:r.name??null,imageSrc:o?.src??null,fileName:o?.fileName??null,transform:o?.transform??null,svgTransform:s?.getAttribute("transform")??null,svgOpacity:s?.getAttribute("opacity")??null}}).filter(r=>r.isUsed).map(s=>{var a=s,{isUsed:r}=a,o=en(a,["isUsed"]);return o})}resolveFontFamily(e,t){let n=e.fontFamily?.trim();return n&&n.length>0?n:t.defaultFontFamily}resolveFontWeight(e,t){return e.fontWeight??t.defaultFontWeight}resolveFontStyle(e,t){return e.fontStyle??t.defaultFontStyle}resolveLetterSpacing(e,t){return Number.isFinite(e.letterSpacing)?e.letterSpacing:t.defaultLetterSpacing}resolveStrokeColor(e,t){if(!((e.strokeWidth??0)>0))return null;let r=e.stroke?.trim();return r&&r.length>0?r:t.defaultStrokeColor}resolveSecondStrokeColor(e,t){if(!((e.secondStrokeWidth??0)>0))return null;let r=e.secondStroke?.trim();return r&&r.length>0?r:t.defaultSecondStrokeColor}resolveCurveAmount(e,t){return Number.isFinite(e.curveAmount)?e.curveAmount:t.defaultCurveAmount}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var poe=10,moe=1,goe=3;var T_=class i{resolveHistoryAction(e){if(!e.ctrlKey&&!e.metaKey)return null;let t=e.key.toLowerCase();return t==="z"?e.shiftKey?"REDO":"UNDO":t==="y"?"REDO":null}resolveOverlayAction(e,t){let n=e.key.toLowerCase(),r=e.shiftKey?poe:moe,o=t*goe;switch(n){case"arrowup":return{kind:"MOVE",deltaXPx:0,deltaYPx:-r};case"arrowdown":return{kind:"MOVE",deltaXPx:0,deltaYPx:r};case"arrowleft":return{kind:"MOVE",deltaXPx:-r,deltaYPx:0};case"arrowright":return{kind:"MOVE",deltaXPx:r,deltaYPx:0};case"q":return{kind:"ROTATE",deltaAngle:e.shiftKey?-o:-t};case"e":return{kind:"ROTATE",deltaAngle:e.shiftKey?o:t};case"[":return{kind:"ROTATE",deltaAngle:-t};case"]":return{kind:"ROTATE",deltaAngle:t};default:return null}}isTextInputTarget(e){let t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"||e.isContentEditable}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var m4=.08,D_=class i{constructor(e){this.measurementService=e}resolveLayerDefinition(e,t){if(!e)return null;let n=e.toLowerCase();return t.find(r=>r.name.toLowerCase()===n)??null}resolveLayerBoundsById(e){let t=e.pathId.trim();if(!t||!e.svgDoc)return{bounds:null};let n=t.toLowerCase();if(e.layerBoundsCache.has(n))return{bounds:e.layerBoundsCache.get(n)??null};let r=e.svgDoc.getElementById(t),o=this.readElementBounds(r);if((!o||o.width<=0||o.height<=0)&&e.svgText&&e.measurementRoot){let l=this.measurementService.queryMeasurementElementById(e.measurementRoot,t);o=this.readElementBounds(l)}let s=o&&o.width>0&&o.height>0?o:null,a=new Map(e.layerBoundsCache);return a.set(n,s),{bounds:s,nextCache:a}}combineBounds(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let l of e)l&&(t=Math.min(t,l.x),n=Math.min(n,l.y),r=Math.max(r,l.x+l.width),o=Math.max(o,l.y+l.height));if(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(o))return null;let s=r-t,a=o-n;return s<=0||a<=0?null:{x:t,y:n,width:s,height:a}}getLayerPreviewBounds(e,t){if(e.width<=0||e.height<=0||!t)return null;let n=t.width*m4,r=t.height*m4,o=e.x,s=e.y,a=e.x+e.width,l=e.y+e.height,c=Math.max(t.x-n,o),d=Math.max(t.y-r,s),u=Math.min(t.x+t.width+n,a),f=Math.min(t.y+t.height+r,l);return u<=c||f<=d?e:{x:c,y:d,width:u-c,height:f-d}}normalizePreviewBounds(e,t){if(!e||e.width<=0||e.height<=0)return t;let n=t.x,r=t.y,o=t.x+t.width,s=t.y+t.height,a=Math.max(e.x,n),l=Math.max(e.y,r),c=Math.min(e.x+e.width,o),d=Math.min(e.y+e.height,s);return c<=a||d<=l?t:{x:a,y:l,width:c-a,height:d-l}}pointInsideBounds(e,t){return t.width<=0||t.height<=0?!1:e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height}readElementBounds(e){if(!e)return null;try{let t=e.getBBox();return!t||t.width<=0||t.height<=0?null:{x:t.x,y:t.y,width:t.width,height:t.height}}catch{return null}}static \u0275fac=function(t){return new(t||i)(Xe(Hl))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var I_=class i{api=Q(ec);getManifest(e,t,n,r){return this.api.get(`products/${e}/manifest`,R(R({},t?{preDesignId:t}:{}),n!==void 0?{useCdnUrl:n}:{}),r?{"X-API-Key":r}:void 0,{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var P_=class i{api=Q(ec);getPublicDistributor(e){return this.api.get("public/distributor",{},{"X-API-Key":e},{loader:!1,skipHandleError:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var A_=class i{manifestApi=Q(I_);publicDistributorApi=Q(P_);resolveProductId(e){let t=e.runtimeConfig?.productId?.trim(),n=e.inputProductId?.trim();return t||n||e.fallbackProductId}resolveApiKey(e){let t=e.runtimeConfig?.apiKey?.trim(),n=e.inputApiKey?.trim();return t||n||null}buildManifestConfigSignature(e){let t=this.resolveProductId(e);if(!t)return null;let n=this.resolveApiKey(e)??"";return`${t}::${n}`}async fetchManifest(e){try{let t=await uc(this.manifestApi.getManifest(e.productId,e.preDesignId??null,e.useCdnUrl,e.apiKey));if(!t?.isSuccess)return{ok:!1,message:(t?.errors??["Unable to load manifest"])[0]};let n=t.data;if(!n)return{ok:!1,message:"Unable to load manifest"};let r=await this.resolveDistributorBranding(e.apiKey??null,n.distributorBranding??null);return n.distributorBranding=r,{ok:!0,data:n}}catch{return{ok:!1,message:"Unable to load manifest"}}}normalizeManifestData(e){let{data:t,preDesignId:n,selectedPredesignId:r,activeStepId:o}=e,s=t.preDesigns??[]??[],a=n??t.preDesignId??t.selectedPreDesignId??t.activePreDesignId??(!r&&s.length?s[0]?.id??null:null),l=(t.personalizationObjectIdMap??t.placements??[]).map(d=>R({},d));l.filter(d=>(d.type??"").trim().toUpperCase()==="BACKGROUND").forEach(d=>{let h=(d.actionPathIdsCsv??d.actionItemId??"").toString().trim().split(",").map(p=>p.trim()).filter(p=>p.length>0).map(p=>p.startsWith("#")?p.slice(1).trim():p).filter(p=>p.length>0).join(",");d.actionPathIdsCsv=h,d.actionItemId=h});let c=t.steps??[]??[];return{resolvedPredesignId:a,threeDFileLink:t.threeDFileLink??t.model?.url??"",materialFileLink:t.mtlFileLink??t.model?.mtlUrl??null,svgFileLink:t.svgFileLink??t.model?.svgUrl??"",svgViewBox:t.svgViewBox??null,printAreaWidthInches:Number.isFinite(t.printAreaWidthInches)?t.printAreaWidthInches:null,printAreaHeightInches:Number.isFinite(t.printAreaHeightInches)?t.printAreaHeightInches:null,customizations:t.customizations??[]??[],predesigns:s,steps:c,pathIdAccordingLayers:t.layers??[]??[],renderPathAccordingLayers:t.renderLayers??[]??[],isShowWholeLayersOption:!!t.isShowWholeLayersOption,placements:l,nextActiveStepId:o||c[0]?.id||null,manifestMeta:t.meta??null,distributorBranding:t.distributorBranding??null}}async resolveDistributorBranding(e,t){if(!e)return t;try{let n=await uc(this.publicDistributorApi.getPublicDistributor(e)),r=this.mapPublicDistributorBranding(n);return r?{distributorId:r.distributorId||t?.distributorId||"",distributorName:r.distributorName??t?.distributorName??null,logoUrl:r.logoUrl??t?.logoUrl??null,themePrimaryColor:r.themePrimaryColor??t?.themePrimaryColor??null,themeSecondaryColor:r.themeSecondaryColor??t?.themeSecondaryColor??null,themeAccentColor:r.themeAccentColor??t?.themeAccentColor??null,themeMode:t?.themeMode??null}:t}catch{return t}}mapPublicDistributorBranding(e){return e?.id?{distributorId:e.id,distributorName:e.name??null,logoUrl:e.branding?.logoUrl??null,themePrimaryColor:e.branding?.primaryColor??null,themeSecondaryColor:e.branding?.secondaryColor??null,themeAccentColor:e.branding?.accentColor??null,themeMode:null}:null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var O_=class i{constructor(e){this.manifestService=e}toIdentityInput(e){return{runtimeConfig:e.runtimeConfig,inputProductId:e.inputProductId,inputApiKey:e.inputApiKey,fallbackProductId:e.fallbackProductId}}resolveProductId(e){return this.manifestService.resolveProductId(this.toIdentityInput(e))}resolveApiKey(e){return this.manifestService.resolveApiKey(this.toIdentityInput(e))}buildConfigSignature(e){return this.manifestService.buildManifestConfigSignature(this.toIdentityInput(e))}async loadManifest(e){let t=this.toIdentityInput(e),n=this.manifestService.resolveProductId(t),r=this.manifestService.resolveApiKey(t),o=this.manifestService.buildManifestConfigSignature(t);if(!n)return{ok:!1,message:Rt.missingProductId,productId:null,signature:o};let s=await this.manifestService.fetchManifest({productId:n,preDesignId:e.preDesignId??null,useCdnUrl:e.runtimeConfig?!0:void 0,apiKey:r});return s.ok?{ok:!0,normalized:this.manifestService.normalizeManifestData({data:s.data,preDesignId:e.preDesignId,selectedPredesignId:e.selectedPredesignId,activeStepId:e.activeStepId}),productId:n,apiKey:r,signature:o}:{ok:!1,message:s.message||Rt.manifestLoadFailed,productId:n,signature:o}}static \u0275fac=function(t){return new(t||i)(Xe(A_))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var CD={COLOR:"color",PATTERN:"pattern"},g4="image/png",v4="lineargradient",b4=1;var R_=class i{constructor(e,t){this.colorState=e;this.customizerState=t}personalizationState=Q(Ql);captureSnapshot(e){if(!e.manifestLoaded||!e.svgDoc)return null;let t=new Map,n=new Map;return e.customizations.forEach(r=>{if(!this.isColorCustomization(r)||!r.actionPathIdsCsv)return;let o=this.readAppliedColorForRegionIds(e.svgDoc,r.actionPathIdsCsv);o&&(t.set(r.actionPathIdsCsv,o),r.name&&n.set(r.name.trim().toLowerCase(),o))}),{targetPredesignId:e.targetPredesignId,colorsByRegion:t,colorsByCustomizationName:n,backgrounds:this.captureBackgroundCarryover(e.backgroundState),patternSelections:this.capturePatternSelections(e.svgDoc,e.customizations,e.patternState),overlayPatterns:this.captureOverlayPatterns(e.svgDoc,e.patternOverlayState),textOverlays:e.overlays.filter(Et).map(r=>R({},r)),logoOverlays:e.overlays.filter(oi).map(r=>R({},r))}}captureOverlayPatterns(e,t){let n=t.state().overlays??[],r=n.reduce((a,l)=>(a.set(l.id,l),a),new Map),s=Array.from(e.querySelectorAll('path[data-pattern-overlay="true"]')).reduce((a,l)=>{let c=(l.getAttribute("id")??"").trim();if(!c)return a;let d=r.get(c),u=this.readSvgPresentationValue(l,"fill")??d?.fill??null,f=this.readSvgPresentationValue(l,"opacity")??(typeof d?.opacity=="number"?`${d.opacity}`:null),h=f!==null?Number.parseFloat(f):NaN,p=Number.isFinite(h)?Math.min(1,Math.max(0,h)):d?.opacity??1,v=(l.getAttribute("data-pattern-source-url")??"").trim()||(d?.sourceUrl??"").trim();return v&&a.push({id:c,label:(l.getAttribute("data-pattern-source-id")??"").trim()||d?.label||c,placementId:(l.getAttribute("data-pattern-placement-id")??"").trim()||d?.placementId||null,fill:u&&u.trim().length>0?u:void 0,opacity:p,pathData:l.getAttribute("d")??d?.pathData??"",sourceUrl:v,thumbnailUrl:(l.getAttribute("data-pattern-thumbnail-url")??"").trim()||d?.thumbnailUrl}),a},[]);return s.length>0?s:n.filter(a=>!!a.sourceUrl).map(a=>R({},a))}readSvgPresentationValue(e,t){let n=e.getAttribute(t);if(n&&n.trim().length>0)return n.trim();let r=e.getAttribute("style");if(!r)return null;let o=t.toLowerCase(),s=r.split(";").map(l=>l.trim()).filter(Boolean).find(l=>l.toLowerCase().startsWith(`${o}:`));if(!s)return null;let a=s.split(":");return a.length<2?null:a[1].trim()}async applyIfNeeded(e){let t=e.snapshot;if(!t||!e.selectedPredesignId||t.targetPredesignId!==e.selectedPredesignId)return!1;await this.restoreBackgroundCarryover(t.backgrounds,e),await this.restorePatternCarryover(t.patternSelections,e),await this.restoreOverlayPatternCarryover(t.overlayPatterns,e),this.restoreOverlayCarryover(t,e),this.restoreColorCarryover(t,e.customizations),await this.customizerState.syncOverlaysToSvgDoc().catch(()=>{});let n=this.customizerState.svgDoc();return n&&this.customizerState.markSvgMutated(n),e.backgroundState.refreshFromSvg(),e.patternState.refreshFromSvg(),e.patternOverlayState.refreshFromSvg(),this.customizerState.render2d(),this.customizerState.requestTextureRebuild(),!0}captureBackgroundCarryover(e){let t=e.state(),n=t.templates??[],r=t.images??{};return n.reduce((o,s)=>{let a=r[s.actionItemId];return a?.src&&o.push({placementKey:s.placementKey,actionItemId:s.actionItemId,name:s.name,state:{src:a.src,fileName:a.fileName,transform:R({},a.transform)}}),o},[])}async restoreBackgroundCarryover(e,t){if(!e.length)return;let n=e.reduce((o,s)=>(o.set(s.placementKey,s),o),new Map),r=e.reduce((o,s)=>(o.set(s.name.trim().toLowerCase(),s),o),new Map);for(let o of t.backgroundTemplates){let s=n.get(o.placementKey)??r.get((o.name??"").trim().toLowerCase());if(!s?.state?.src)continue;let a=await this.createFileFromDataUrl(s.state.src,s.state.fileName??`${o.actionItemId}.png`);a&&(await t.backgroundState.onFileSelected(o.actionItemId,a),t.backgroundState.select(o.actionItemId),this.restoreBackgroundTransform(t.backgroundState,s.state.transform))}}restoreBackgroundTransform(e,t){e.updateTransform("scale",t.scale),e.updateTransform("rotation",t.rotation),e.updateTransform("translateX",t.translateX),e.updateTransform("translateY",t.translateY),e.updateTransform("opacity",t.opacity)}async createFileFromDataUrl(e,t){try{let r=await(await fetch(e)).blob(),o=r.type&&r.type.trim().length>0?r.type:g4;return new File([r],t,{type:o})}catch{return null}}capturePatternSelections(e,t,n){let r=n.selectedPatternFileUrl(),o=n.selectedUploadedPatternId(),s=o?n.patternDefinitionState()[o]??null:null;return r?t.filter(a=>this.isPatternCustomization(a)&&!!a.actionPathIdsCsv).map(a=>{let l=this.resolvePatternSourceMatch(a,r);if(!l)return null;let c=a.actionPathIdsCsv?this.readAppliedColorForRegionIds(e,a.actionPathIdsCsv):null;return{key:this.buildCustomizationCarryoverKey(a.id,a.name),dataSourceId:l.dataSourceId,sourceUrl:l.sourceUrl,transform:s?R({},s):null,color:c,sourceActionPathIdsCsv:a.actionPathIdsCsv??null,sourceName:(a.name??"").trim()||null}}).filter(a=>!!a):[]}async restorePatternCarryover(e,t){if(!e.length)return;let n=t.customizations.filter(s=>this.isPatternCustomization(s)&&!!s.actionPathIdsCsv),r=n.reduce((s,a)=>(s.set(this.buildCustomizationCarryoverKey(a.id,a.name),a),s),new Map),o=new Set;for(let s of e){let a=this.resolvePatternTargetCustomization(s,n,r,o);if(!a?.actionPathIdsCsv)continue;let l=this.resolvePatternSourceUrlForTarget(a,s);if(!l)continue;await t.patternState.applyPatternFromUrl(l,a.actionPathIdsCsv,!0);let c=t.patternState.selectedUploadedPatternId();c&&s.transform&&(t.patternState.onPatternDefinitionScaleChange(c,s.transform.scale),t.patternState.onPatternDefinitionRotationChange(c,s.transform.rotation),t.patternState.onPatternDefinitionTranslateXChange(c,s.transform.translateX),t.patternState.onPatternDefinitionTranslateYChange(c,s.transform.translateY),t.patternState.onPatternDefinitionOpacityChange(c,s.transform.opacity)),s.color&&this.colorState.applyColor(a.actionPathIdsCsv,s.color),o.add(this.buildCustomizationCarryoverKey(a.id,a.name))}}resolvePatternTargetCustomization(e,t,n,r){let o=n.get(e.key);if(o&&!r.has(this.buildCustomizationCarryoverKey(o.id,o.name)))return o;if(e.dataSourceId){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.pack?.dataSources??[]).some(d=>(d.id??"").trim()===e.dataSourceId)});if(a)return a}let s=(e.sourceName??"").trim().toLowerCase();if(s){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.name??"").trim().toLowerCase()===s});if(a)return a}if(e.sourceActionPathIdsCsv){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.actionPathIdsCsv??"").trim()===e.sourceActionPathIdsCsv});if(a)return a}return null}resolvePatternSourceMatch(e,t){let n=(e.pack?.dataSources??[]).find(r=>(r.fileUrl??"").trim()===t);return n?{dataSourceId:(n.id??"").trim()||null,sourceUrl:(n.fileUrl??"").trim()||t}:null}resolvePatternSourceUrlForTarget(e,t){let n=e.pack?.dataSources??[];if(t.dataSourceId){let a=(n.find(l=>(l.id??"").trim()===t.dataSourceId)?.fileUrl??"").trim();if(a)return a}let o=(n.find(s=>(s.fileUrl??"").trim()===t.sourceUrl)?.fileUrl??"").trim();return o||null}async restoreOverlayPatternCarryover(e,t){if(!e.length)return;let n=new Set(t.personalizationItems.map(o=>o.id)),r=this.groupOverlayPatternsForRestore(e,n);for(let o of r){await t.patternOverlayState.onAddPatternPathFromUrl(o.sourceUrl,o.thumbnailUrl,o.placementId);let s=t.patternOverlayState.state().overlays.filter(l=>(l.sourceUrl??"").trim()===o.sourceUrl&&(l.placementId??null)===o.placementId);if(!s.length)continue;let a=new Set;for(let l of o.overlays){let c=this.matchRestoredOverlayCandidate(l,s,a);c&&(a.add(c.id),t.patternOverlayState.onPatternOpacityChange(c.id,l.opacity),l.fill&&this.colorState.applyColor(c.id,l.fill))}}}groupOverlayPatternsForRestore(e,t){let n=new Map;for(let r of e){let o=(r.sourceUrl??"").trim();if(!o)continue;let s=r.placementId??null;if(s&&!t.has(s))continue;let a=`${o}::${s??""}`,l=n.get(a);if(l){l.overlays.push(r);continue}n.set(a,{sourceUrl:o,placementId:s,thumbnailUrl:r.thumbnailUrl,overlays:[r]})}return[...n.values()]}matchRestoredOverlayCandidate(e,t,n){let r=t.find(s=>!n.has(s.id)&&s.pathData===e.pathData);if(r)return r;let o=t.find(s=>!n.has(s.id)&&(s.label??"").trim()===(e.label??"").trim());return o||(t.find(s=>!n.has(s.id))??null)}restoreOverlayCarryover(e,t){let n=new Set(t.personalizationItems.map(s=>s.placementKey)),r=e.textOverlays.map(s=>R({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneTextBounds(R({},s)):s),o=e.logoOverlays.map(s=>R({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneLogoBounds(R({},s)):s);t.overlaysState.set([...r,...o]),t.activeOverlayIdState.set(null),this.customizerState.setActiveOverlay(null)}restoreColorCarryover(e,t){t.forEach(n=>{if(!this.isColorCustomization(n)||!n.actionPathIdsCsv)return;let r=e.colorsByRegion.get(n.actionPathIdsCsv),o=e.colorsByCustomizationName.get((n.name??"").trim().toLowerCase()),s=r??o;s&&this.colorState.applyColor(n.actionPathIdsCsv,s)})}isColorCustomization(e){return(e.type??"").trim().toLowerCase()===CD.COLOR}isPatternCustomization(e){return(e.type??"").trim().toLowerCase()===CD.PATTERN}buildCustomizationCarryoverKey(e,t){return`${(e??"").trim().toLowerCase()}::${(t??"").trim().toLowerCase()}`}readAppliedColorForRegionIds(e,t){let n=this.parseColorTargets(t);for(let{selector:r,stopIndex:o}of n){let s=Array.from(e.querySelectorAll(r));if(s.length===0)continue;let a=s[0];if(a.tagName.toLowerCase()===v4){let c=Array.from(a.querySelectorAll("stop"));if(!c.length)continue;let d=this.resolveGradientStopIndex(o,c.length),u=c[d],f=u.getAttribute("stop-color")??u.style.stopColor??"";if(f.trim())return f;continue}let l=a.getAttribute("fill")??a.style.fill??"";if(l.trim())return l}return null}parseColorTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length>0?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}resolveGradientStopIndex(e,t){let n=Number.isFinite(e)?e:b4;return Math.min(Math.max(n,0),t-1)}static \u0275fac=function(t){return new(t||i)(Xe(rh),Xe(Bn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function boe(i,e){if(i&1){let t=Ne();w(0,"app-ui-button",11),ie("onClick",function(){Z(t);let r=M(2);return J(r.onClose())}),T()}i&2&&ne("icon","ri-close-line")("text",!0)("rounded",!0)}function yoe(i,e){if(i&1&&(w(0,"p",9),k(1),T()),i&2){let t,n=M(2);P(),Ye((t=n.config())==null?null:t.subtitle)}}function xoe(i,e){if(i&1){let t=Ne();w(0,"app-ui-button",13),ie("onClick",function(){let r=Z(t).$implicit,o=M(3);return J(o.onButtonClick(r))}),T()}if(i&2){let t=e.$implicit;ne("label",t.label)("severity",t.isPrimary?"primary":"secondary")}}function _oe(i,e){if(i&1&&(w(0,"div",10),Dt(1,xoe,1,2,"app-ui-button",12,Iu),T()),i&2){let t,n=M(2);P(),It((t=n.config())==null?null:t.buttons)}}function Soe(i,e){if(i&1){let t=Ne();w(0,"div",1),ie("click",function(){Z(t);let r=M();return J(r.onBackdropClick())}),w(1,"div",2),ie("click",function(r){return r.stopPropagation()}),w(2,"div",3)(3,"div",4)(4,"h2",5),k(5),T(),pe(6,boe,1,3,"app-ui-button",6),T(),w(7,"div",7)(8,"p",8),k(9),T(),pe(10,yoe,2,1,"p",9),T(),pe(11,_oe,3,0,"div",10),T()()()}if(i&2){let t,n,r,o,s,a,l=M();P(2),so("dialog-type-"+(((t=l.config())==null?null:t.type)||"custom")),P(3),Ye((n=l.config())==null?null:n.title),P(),me((r=l.config())!=null&&r.closable?6:-1),P(3),Ye((o=l.config())==null?null:o.message),P(),me((s=l.config())!=null&&s.subtitle?10:-1),P(),me((a=l.config())!=null&&a.buttons&&l.config().buttons.length>0?11:-1)}}var k_=class i{dialogService=Q($s);isOpen=this.dialogService.isOpen;config=this.dialogService.currentConfig;ngOnInit(){}onClose(){this.dialogService.cancel()}onBackdropClick(){this.config()?.closable&&this.onClose()}onButtonClick(e){e.action==="confirm"?this.dialogService.confirm():e.action==="cancel"?this.dialogService.cancel():e.action==="custom"&&e.customId&&this.dialogService.handleCustomAction(e.customId)}getButtonClass(e){let t=["dialog-btn"];return e.isPrimary&&t.push("dialog-btn-primary"),e.isDestructive&&t.push("dialog-btn-destructive"),t.join(" ")}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-generic-dialog"]],decls:1,vars:1,consts:[[1,"dialog-overlay"],[1,"dialog-overlay",3,"click"],[1,"dialog-container",3,"click"],[1,"dialog"],[1,"dialog-header"],[1,"dialog-title"],["severity","primary","aria-label","Close dialog",3,"icon","text","rounded"],[1,"dialog-content"],[1,"dialog-message"],[1,"dialog-subtitle"],[1,"dialog-actions"],["severity","primary","aria-label","Close dialog",3,"onClick","icon","text","rounded"],[3,"label","severity"],[3,"onClick","label","severity"]],template:function(t,n){t&1&&pe(0,Soe,12,7,"div",0),t&2&&me(n.isOpen()?0:-1)},dependencies:[qt,Xs],styles:[".dialog-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;z-index:9999;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:_ngcontent-%COMP%_dialogFadeIn .2s ease-out}@keyframes _ngcontent-%COMP%_dialogFadeIn{0%{opacity:0;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.dialog-container[_ngcontent-%COMP%]{position:relative;z-index:10000;animation:_ngcontent-%COMP%_dialogSlideUp .3s ease-out;max-width:90vw;max-height:90vh}@keyframes _ngcontent-%COMP%_dialogSlideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.dialog[_ngcontent-%COMP%]{background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:12px;box-shadow:0 20px 60px #0f172a26;overflow:hidden;min-width:380px;display:flex;flex-direction:column}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid rgb(var(--border-color, 203 213 225));background:linear-gradient(135deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)))}.dialog-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;color:rgb(var(--text-color, 15 23 42));line-height:1.3}.dialog-close[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:18px;cursor:pointer;border-radius:6px;transition:all .2s;flex-shrink:0}.dialog-close[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.dialog-content[_ngcontent-%COMP%]{padding:24px;color:rgb(var(--text-color, 15 23 42))}.dialog-message[_ngcontent-%COMP%]{margin:0 0 12px;font-size:14px;line-height:1.5;font-weight:500}.dialog-message[_ngcontent-%COMP%]:last-child{margin-bottom:0}.dialog-subtitle[_ngcontent-%COMP%]{color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;margin:0;line-height:1.5}.dialog-actions[_ngcontent-%COMP%]{display:flex;gap:12px;padding:20px 24px;border-top:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-100, 248 250 252) / .5);justify-content:flex-end}.dialog-btn[_ngcontent-%COMP%]{padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;min-width:100px;text-align:center;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));border:1px solid rgb(var(--border-color, 203 213 225))}.dialog-btn[_ngcontent-%COMP%]:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--text-color-secondary, 100 116 139))}.dialog-btn[_ngcontent-%COMP%]:active{transform:scale(.98)}.dialog-btn-primary[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.dialog-btn-primary[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 4px 12px #6265f14d}.dialog-btn-destructive[_ngcontent-%COMP%]{background:#ef4444;color:#fff;border:none}.dialog-btn-destructive[_ngcontent-%COMP%]:hover{background:#dc2626;box-shadow:0 4px 12px #ef44444d}.dialog-type-warning[_ngcontent-%COMP%]{border-top:4px solid rgb(249,115,22)}.dialog-type-success[_ngcontent-%COMP%]{border-top:4px solid rgb(16,185,129)}.dialog-type-error[_ngcontent-%COMP%]{border-top:4px solid rgb(239,68,68)}@media(max-width:640px){.dialog[_ngcontent-%COMP%]{min-width:350px;max-width:100%}.dialog-content[_ngcontent-%COMP%], .dialog-header[_ngcontent-%COMP%]{padding:20px}.dialog-btn[_ngcontent-%COMP%]{width:100%;min-width:unset}}"]})};var Coe=["threeDUI"],y4=(i,e)=>e.id,x4=(i,e)=>e.trackId;function woe(i,e){if(i&1&&Y(0,"img",4),i&2){let t=M();ne("src",t.distributorHeaderLogoUrl(),ji)}}function Eoe(i,e){i&1&&(w(0,"app-ui-tab",15),k(1,"2D Editor"),T(),w(2,"app-ui-tab",16),k(3,"Both"),T())}function Moe(i,e){if(i&1&&(w(0,"div",12),Y(1,"app-manifest-loader",17),T()),i&2){let t=M();P(),ne("message",t.manifestLoaderMessage)}}function Toe(i,e){if(i&1){let t=Ne();w(0,"button",22),ie("click",function(){Z(t);let r=M(2);return J(r.retryManifestLoad())}),k(1," Retry "),T()}}function Doe(i,e){if(i&1&&(w(0,"div",12)(1,"div",18)(2,"div",19),k(3,"Unable to load manifest"),T(),w(4,"div",20),k(5),T(),pe(6,Toe,2,0,"button",21),T()()),i&2){let t=M();P(5),Ye(t.manifestError()),P(),me(t.isSdkRuntime()?-1:6)}}function Ioe(i,e){if(i&1&&(w(0,"div",13),Y(1,"app-save-loader",23),T()),i&2){let t=M();P(),ne("message",t.designSaveMessage()||"Saving design\u2026")("subtitle","Please wait while your design is being processed")}}function Poe(i,e){i&1&&Y(0,"app-three-d-loader")}function Aoe(i,e){if(i&1){let t=Ne();w(0,"app-three-d-ui",46,0),tp("svgTextChange",function(r){Z(t);let o=M(2);return bs(o.svgText,r)||(o.svgText=r),J(r)})("svgDimensionsChange",function(r){Z(t);let o=M(2);return bs(o.svgDimensions,r)||(o.svgDimensions=r),J(r)})("svgViewBoxChange",function(r){Z(t);let o=M(2);return bs(o.svgViewBox,r)||(o.svgViewBox=r),J(r)})("showPlacementGuidesChange",function(r){Z(t);let o=M(2);return bs(o.showPlacementGuides,r)||(o.showPlacementGuides=r),J(r)})("placementZonesChange",function(r){Z(t);let o=M(2);return bs(o.placementZones,r)||(o.placementZones=r),J(r)})("overlaysChange",function(r){Z(t);let o=M(2);return bs(o.overlays,r)||(o.overlays=r),J(r)})("activeOverlayIdChange",function(r){Z(t);let o=M(2);return bs(o.activeOverlayId,r)||(o.activeOverlayId=r),J(r)}),ie("activeOverlayChange",function(r){Z(t);let o=M(2);return J(o.setActiveOverlay(r))})("overlayPositionChange",function(r){Z(t);let o=M(2);return J(o.onOverlayPositionChange(r))})("overlayRotationChange",function(r){Z(t);let o=M(2);return J(o.onOverlayRotationChange(r))})("overlayResizeChange",function(r){Z(t);let o=M(2);return J(o.onOverlayResizeChange(r))})("onUndo",function(){Z(t);let r=M(2);return J(r.onUndo())})("onRedo",function(){Z(t);let r=M(2);return J(r.onRedo())}),T()}if(i&2){let t=M(2);Rc("svgText",t.svgText),ne("isActive",t.editorMode()!=="2d")("mtlText",t.mtlText())("objText",t.objText())("materialSourceUrl",t.materialFileLink()),Rc("svgDimensions",t.svgDimensions),ne("overlayBounds",t.threeDOverlayBounds())("printAreaWidthInches",t.printAreaWidthInches())("printAreaHeightInches",t.printAreaHeightInches())("gridSizeInches",t.twoDGridSizeInches()),Rc("svgViewBox",t.svgViewBox)("showPlacementGuides",t.showPlacementGuides)("placementZones",t.placementZones)("overlays",t.overlays)("activeOverlayId",t.activeOverlayId),ne("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("gridSize",t.threeDGridSizeNormalized())}}function Ooe(i,e){i&1&&(w(0,"div",50)(1,"div",51),Y(2,"i",49),w(3,"span"),k(4,"Keyboard Shortcuts"),T()(),Y(5,"app-keyboard-shortcuts-panel"),T())}function Roe(i,e){if(i&1){let t=Ne();w(0,"div",47),ie("click",function(r){return r.stopPropagation()}),w(1,"button",48),ie("click",function(r){Z(t);let o=M(2);return J(o.toggleShortcuts(r))}),Y(2,"i",49),T(),pe(3,Ooe,6,0,"div",50),T()}if(i&2){let t=M(2);P(),pt("active",t.showShortcuts()),P(2),me(t.showShortcuts()?3:-1)}}function koe(i,e){if(i&1&&(w(0,"div",32),Y(1,"app-manifest-loader",17),w(2,"p",52),k(3),T()()),i&2){let t=M(2);P(),ne("message",t.predesignLoaderMessage),P(2),Ye(t.predesignLoaderSubtitle)}}function Foe(i,e){i&1&&(w(0,"p",35),k(1,"No actions available for this step."),T())}function Noe(i,e){if(i&1){let t=Ne();w(0,"app-pre-designs-panel",62),ie("designSelected",function(r){Z(t);let o=M(4);return J(o.onPredesignSelected(r))}),T()}if(i&2){let t=M().$implicit,n=M(3);ne("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function Loe(i,e){if(i&1&&Y(0,"app-customizer-color-panel",57),i&2){let t=M().$implicit;ne("items",t.customizations)}}function Uoe(i,e){if(i&1&&Y(0,"app-customizer-pattern-panel",57),i&2){let t=M().$implicit;ne("items",t.customizations)}}function Boe(i,e){if(i&1&&Y(0,"app-customizer-personalization-panel",57),i&2){let t=M().$implicit;ne("items",t.items)}}function zoe(i,e){if(i&1&&Y(0,"app-overlay-panel",58),i&2){let t=M().$implicit;ne("items",t.items)("useAccordion",t.items.length>1)}}function Voe(i,e){if(i&1&&Y(0,"app-customizer-background-panel",59),i&2){let t=M().$implicit;ne("templates",t.templates)}}function Goe(i,e){if(i&1){let t=Ne();w(0,"app-render-order-panel",63),ie("moveTowardFront",function(r){Z(t);let o=M(4);return J(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){Z(t);let o=M(4);return J(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){Z(t);let o=M(4);return J(o.onRenderOrderReorder(r))})("selectItem",function(r){Z(t);let o=M(4);return J(o.onRenderOrderSelect(r))}),T()}if(i&2){let t=M().$implicit,n=M(3);ne("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function Hoe(i,e){if(i&1){let t=Ne();w(0,"app-canvas-guide-panel",64),ie("onGridToggle",function(){Z(t);let r=M(4);return J(r.onGridToggle())})("onSnapToggle",function(){Z(t);let r=M(4);return J(r.onSnapToggle())})("onGuidesToggle",function(){Z(t);let r=M(4);return J(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){Z(t);let o=M(4);return J(o.onTwoDGridSizeChange(r))}),T()}if(i&2){let t=M(4);ne("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function joe(i,e){if(i&1&&(w(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2"),k(4),T()(),w(5,"div",55),pe(6,Noe,1,2,"app-pre-designs-panel",56)(7,Loe,1,1,"app-customizer-color-panel",57)(8,Uoe,1,1,"app-customizer-pattern-panel",57)(9,Boe,1,1,"app-customizer-personalization-panel",57)(10,zoe,1,2,"app-overlay-panel",58)(11,Voe,1,1,"app-customizer-background-panel",59)(12,Goe,1,2,"app-render-order-panel",60)(13,Hoe,1,7,"app-canvas-guide-panel",61),T()()()),i&2){let t,n=e.$implicit,r=M(3);P(4),Ye(n.title),P(2),me((t=n.kind)===r.panelKind.PREDESIGNS?6:t===r.panelKind.COLOR?7:t===r.panelKind.PATTERN?8:t===r.panelKind.PERSONALIZATION?9:t===r.panelKind.OVERLAY?10:t===r.panelKind.BACKGROUND?11:t===r.panelKind.RENDER_ORDER?12:t===r.panelKind.CANVAS_GUIDE?13:-1)}}function Woe(i,e){if(i&1&&Dt(0,joe,14,2,"section",36,x4),i&2){let t=M(2);It(t.activePanels())}}function $oe(i,e){if(i&1){let t=Ne();w(0,"app-pre-designs-panel",62),ie("designSelected",function(r){Z(t);let o=M(4);return J(o.onPredesignSelected(r))}),T()}if(i&2){let t=M().$implicit,n=M(3);ne("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function Xoe(i,e){if(i&1&&Y(0,"app-customizer-color-panel",57),i&2){let t=M().$implicit;ne("items",t.customizations)}}function Yoe(i,e){if(i&1&&Y(0,"app-customizer-pattern-panel",57),i&2){let t=M().$implicit;ne("items",t.customizations)}}function qoe(i,e){if(i&1&&Y(0,"app-customizer-personalization-panel",57),i&2){let t=M().$implicit;ne("items",t.items)}}function Koe(i,e){if(i&1&&Y(0,"app-overlay-panel",58),i&2){let t=M().$implicit;ne("items",t.items)("useAccordion",t.items.length>1)}}function Zoe(i,e){if(i&1&&Y(0,"app-customizer-background-panel",59),i&2){let t=M().$implicit;ne("templates",t.templates)}}function Joe(i,e){if(i&1){let t=Ne();w(0,"app-render-order-panel",63),ie("moveTowardFront",function(r){Z(t);let o=M(4);return J(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){Z(t);let o=M(4);return J(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){Z(t);let o=M(4);return J(o.onRenderOrderReorder(r))})("selectItem",function(r){Z(t);let o=M(4);return J(o.onRenderOrderSelect(r))}),T()}if(i&2){let t=M().$implicit,n=M(3);ne("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function Qoe(i,e){if(i&1){let t=Ne();w(0,"app-canvas-guide-panel",64),ie("onGridToggle",function(){Z(t);let r=M(4);return J(r.onGridToggle())})("onSnapToggle",function(){Z(t);let r=M(4);return J(r.onSnapToggle())})("onGuidesToggle",function(){Z(t);let r=M(4);return J(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){Z(t);let o=M(4);return J(o.onTwoDGridSizeChange(r))}),T()}if(i&2){let t=M(4);ne("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function ese(i,e){if(i&1&&(w(0,"app-ui-accordion-panel",67)(1,"app-ui-accordion-header")(2,"div",68)(3,"span"),k(4),T()()(),w(5,"app-ui-accordion-content")(6,"div",69),pe(7,$oe,1,2,"app-pre-designs-panel",56)(8,Xoe,1,1,"app-customizer-color-panel",57)(9,Yoe,1,1,"app-customizer-pattern-panel",57)(10,qoe,1,1,"app-customizer-personalization-panel",57)(11,Koe,1,2,"app-overlay-panel",58)(12,Zoe,1,1,"app-customizer-background-panel",59)(13,Joe,1,2,"app-render-order-panel",60)(14,Qoe,1,7,"app-canvas-guide-panel",61),T()()()),i&2){let t,n=e.$implicit,r=M(3);ne("value",n.trackId),P(4),Ye(n.title),P(3),me((t=n.kind)===r.panelKind.PREDESIGNS?7:t===r.panelKind.COLOR?8:t===r.panelKind.PATTERN?9:t===r.panelKind.PERSONALIZATION?10:t===r.panelKind.OVERLAY?11:t===r.panelKind.BACKGROUND?12:t===r.panelKind.RENDER_ORDER?13:t===r.panelKind.CANVAS_GUIDE?14:-1)}}function tse(i,e){if(i&1&&(w(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2",65),k(4),T()(),w(5,"div",55)(6,"app-ui-accordion",66),Dt(7,ese,15,3,"app-ui-accordion-panel",67,x4),T()()()()),i&2){let t,n=M(2);P(4),Ye(n.selectedStepLabel()),P(2),ne("value",(t=n.activePanels()[0])==null?null:t.trackId),P(),It(n.activePanels())}}function nse(i,e){i&1&&(Y(0,"i",71),w(1,"span"),k(2,"Hide Options"),T())}function ise(i,e){i&1&&(Y(0,"i",72),w(1,"span"),k(2,"Show Options"),T())}function rse(i,e){if(i&1){let t=Ne();w(0,"button",70),ie("click",function(){Z(t);let r=M(2);return J(r.toggleMobilePanel())}),pe(1,nse,3,0)(2,ise,3,0),T()}if(i&2){let t=M(2);Pn("aria-label",t.mobilePanelVisible()?"Hide options panel":"Show options panel"),P(),me(t.mobilePanelVisible()?1:2)}}function ose(i,e){i&1&&(Y(0,"i",71),w(1,"span"),k(2,"Show Preview"),T())}function sse(i,e){i&1&&(Y(0,"i",74),w(1,"span"),k(2,"Expand Panel"),T())}function ase(i,e){if(i&1){let t=Ne();w(0,"button",73),ie("click",function(){Z(t);let r=M(2);return J(r.toggleMobileCanvas())}),pe(1,ose,3,0)(2,sse,3,0),T()}if(i&2){let t=M(2);P(),me(t.mobileCanvasHidden()?1:2)}}function lse(i,e){if(i&1&&Y(0,"i"),i&2){let t=M().$implicit;so(t.iconClass)}}function cse(i,e){if(i&1){let t=Ne();w(0,"button",76),ie("click",function(){let r=Z(t).$implicit,o=M(3);return J(o.onNavItemClick(r.id))}),pe(1,lse,1,2,"i",77),w(2,"span",78),k(3),T()()}if(i&2){let t=e.$implicit,n=M(3);pt("active",t.id===n.activeStepId()),P(),me(t.iconClass?1:-1),P(),oo("padding-left",t.depth*12,"px"),P(),Ye(t.name)}}function dse(i,e){if(i&1&&(w(0,"div",42),Dt(1,cse,4,6,"button",75,y4),T()),i&2){let t=M(2);P(),It(t.hiddenNavItems())}}function use(i,e){if(i&1&&Y(0,"i"),i&2){let t=M().$implicit;so(t.iconClass)}}function fse(i,e){if(i&1){let t=Ne();w(0,"button",79),ie("click",function(){let r=Z(t).$implicit,o=M(2);return J(o.onNavItemClick(r.id))}),pe(1,use,1,2,"i",77),w(2,"span",78),k(3),T()()}if(i&2){let t=e.$implicit,n=M(2);pt("active",t.id===n.activeStepId()),P(),me(t.iconClass?1:-1),P(),oo("padding-left",t.depth*12,"px"),P(),Ye(t.name)}}function hse(i,e){i&1&&(Y(0,"i",81),w(1,"span",78),k(2,"Hide"),T())}function pse(i,e){i&1&&(Y(0,"i",82),w(1,"span",78),k(2,"Show More"),T())}function mse(i,e){if(i&1){let t=Ne();w(0,"button",80),ie("click",function(){Z(t);let r=M(2);return J(r.toggleNavExpanded())}),pe(1,hse,3,0)(2,pse,3,0),T()}if(i&2){let t=M(2);P(),me(t.navExpanded()?1:2)}}function gse(i,e){if(i&1){let t=Ne();w(0,"div",24)(1,"main",25)(2,"section",26)(3,"div",26)(4,"app-two-d-ui",27),ie("layerToggle",function(r){Z(t);let o=M();return J(o.onLayerToggle(r))})("canvasReady",function(r){Z(t);let o=M();return J(o.onTwoDCanvasReady(r))})("canvasDetached",function(){Z(t);let r=M();return J(r.onTwoDCanvasDestroyed())})("zoomIn",function(){Z(t);let r=M();return J(r.onTwoDZoomIn())})("zoomOut",function(){Z(t);let r=M();return J(r.onTwoDZoomOut())})("resetView",function(){Z(t);let r=M();return J(r.onTwoDReset())})("onUndo",function(){Z(t);let r=M();return J(r.onUndo())})("onRedo",function(){Z(t);let r=M();return J(r.onRedo())}),T()()(),w(5,"section",26)(6,"main",28)(7,"div",29),pe(8,Poe,1,0,"app-three-d-loader"),pe(9,Aoe,2,18,"app-three-d-ui",30),T()()(),pe(10,Roe,4,3,"div",31),pe(11,koe,4,2,"div",32),T(),w(12,"section",33)(13,"aside",34),pe(14,Foe,2,0,"p",35)(15,Woe,2,0)(16,tse,9,2,"section",36),T()(),w(17,"section",37)(18,"div",38)(19,"div",39),pe(20,rse,3,2,"button",40),pe(21,ase,3,1,"button",41),T(),pe(22,dse,3,0,"div",42),w(23,"div",43),Dt(24,fse,4,6,"button",44,y4),pe(26,mse,3,1,"button",45),T()()()()}if(i&2){let t=M();pt("mobile-panel-hidden",!t.mobilePanelVisible())("mobile-canvas-hidden",t.mobileCanvasHidden()),P(),pt("single",t.editorMode()!=="both")("canvas-loading",t.showCanvasManifestLoader()),P(),pt("hidden",t.editorMode()==="3d"),P(2),ne("svgText",t.svgText())("isActive",t.editorMode()!=="3d")("layers",t.layers())("selectedLayerKey",t.selectedLayerKey())("isShowAllLayersOption",t.isShowWholeLayersOption())("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridSize",t.twoDGridSize()),P(),pt("hidden",t.editorMode()==="2d"),P(3),me(t.loading()?8:-1),P(),me((t.editorMode()==="3d"||t.editorMode()==="both")&&t.objText()?9:-1),P(),me(t.isMobile()?-1:10),P(),me(t.showCanvasManifestLoader()?11:-1),P(3),me(t.activePanels().length===0?14:t.activePanels().length===1?15:16),P(6),me(t.mobileCanvasHidden()?-1:20),P(),me(t.mobilePanelVisible()?21:-1),P(),me(t.navExpanded()?22:-1),P(),pt("nav-expanded",t.navExpanded()),P(),It(t.visibleNavItems()),P(2),me(t.hiddenNavItems().length>0?26:-1)}}var F_=class i{panelKind=y_;apiKey=Me(null);productId=Me(null);submissionNumber=Me(null);predesignId=Me(null);threeDUI=Pu("threeDUI");editorMode=N("3d");customizerState=Q(Bn);measurementService=Q(Hl);fontAssetService=Q(Zx);textLayoutService=Q(Jx);printAreaMeasurementService=Q(Bl);svgRenderService=Q(Qx);overlayStyleService=Q(e_);renderOrderState=Q(t_);backgroundState=Q(Jf);personalizationState=Q(Ql);patternState=Q(oh);patternOverlayState=Q(ah);designHistory=Q(Ll);destroyRef=Q(sr);manifestFlowService=Q(O_);threeThumbnailService=Q(b_);submissionApi=Q(f_);toaster=Q(da);panelService=Q(w_);fileService=Q(E_);designExportService=Q(M_);themeService=Q(Yf);keyboardShortcutService=Q(T_);layerBoundsService=Q(D_);imageCompressionService=Q(zs);predesignCarryoverService=Q(R_);dialogService=Q($s);sdkRuntimeConfig=Q(g_,{optional:!0});selectedStepLabel=De(()=>this.parentNav().find(e=>e.id===this.activeStepId())?.name??"");fallbackProductId=A3;isSdkRuntime=N(!!this.sdkRuntimeConfig);mobilePanelVisible=N(!0);mobileCanvasHidden=N(!1);isMobile=N(!1);toggleMobileCanvas(){this.mobileCanvasHidden.update(e=>!e)}manifestLoading=N(!1);manifestError=N(null);predesignSwitchLoading=N(!1);showBlockingManifestLoader=De(()=>this.manifestLoading()&&!this.predesignSwitchLoading());showCanvasManifestLoader=De(()=>this.manifestLoading()&&this.predesignSwitchLoading());showBlockingManifestError=De(()=>!!this.manifestError()&&!this.manifestLoaded);manifestLoaderMessage="Loading product manifest\u2026";predesignLoaderMessage="Applying selected design\u2026";predesignLoaderSubtitle="Updating 2D and 3D previews";selectedPredesignId=N(null);designSavingInProgress=N(!1);designSaveMessage=N(null);distributorHeaderLogoUrl=N(null);submissionThumbnailViews=["front","right","back","left"];manifestRequestToken=null;pendingPredesignCarryover=null;viewInitialized=!1;manifestLoaded=!1;filesLoaded=!1;hasInitializedManifestLoad=!1;lastManifestConfigSignature=null;pendingSubmissionPayload=null;editableSubmissionCompressionToken=null;suspendTextureRebuild=!1;pendingTextureRebuildWhileSuspended=!1;pendingEditableTextEffects=N([]);appliedEditableTextEffectKeys=N(new Set);replayPendingEffectsInFlight=!1;svgText=this.customizerState.svgTextState;svgDoc=this.customizerState.svgDocState;svgTextForExport=N(null);baseSvgText=N(null);predesignBaseSvgText=N(null);mtlText=N(null);objText=N(null);threeDFileLink=N("");materialFileLink=N(null);pathIdAccordingLayers=N([]);renderPathAccordingLayers=N([]);layers=De(()=>this.pathIdAccordingLayers().map(e=>e.name));selectedLayerKey=N(null);placementZones=this.personalizationState.placementZones;showPlacementGuides=this.personalizationState.showPlacementGuides;loading=N(!1);sanitizer=Q(fp);minFontSize=N(12);maxFontSize=N(400);fontSizeStep=N(2);rotationStep=N(5);builtInFontOptions=N(Fx.map(({label:e,value:t})=>({label:e,value:t})));fontOptions=N([...this.builtInFontOptions()]);defaultFontFamily=N(this.builtInFontOptions()[0]?.value??Fx[0]?.value??pr);defaultFontWeight=N("normal");defaultFontStyle=N("normal");defaultLineHeight=N(1.2);defaultLetterSpacing=N(0);strokeWidthStep=N(.5);letterSpacingStep=N(.5);defaultCurveAmount=N(0);defaultShadowBlur=N(0);shadowBlurStep=N(1);defaultShadowOffsetX=N(0);defaultShadowOffsetY=N(0);defaultShadowColor=N(wm);warpEnvelopeFileName=N(null);warpUploadError=N(null);overlays=this.customizerState.overlays;svgDimensions=N(null);svgViewBox=N({minX:0,minY:0,width:1e3,height:1e3});activeOverlayId=N(null);threeDOverlayBounds=De(()=>this.getOverlayBoundingRect());gridEnabled=N(!1);snapEnabled=N(!1);gridRatio=N((Wr.TWO_D_GRID_SIZE-8)/112);printAreaWidthInches=De(()=>this.customizerState.printAreaWidthInches());printAreaHeightInches=De(()=>this.customizerState.printAreaHeightInches());twoDGridSizeInches=N(1);twoDGridStepPx=De(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox(),o=this.twoDGridSizeInches();return e&&e>0&&n&&n>0&&o>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(o,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(o,r.height,n)))}:{x:Wr.TWO_D_GRID_SIZE,y:Wr.TWO_D_GRID_SIZE}});twoDGridSize=De(()=>this.twoDGridStepPx().x);twoDGridMajorStepPx=De(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox();return e&&e>0&&n&&n>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(1,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(1,r.height,n)))}:{x:Wr.INCH_IN_PIXELS,y:Wr.INCH_IN_PIXELS}});twoDGridMajorSize=De(()=>this.twoDGridMajorStepPx().x);threeDGridSizeNormalized=De(()=>{let e=this.gridRatio();return Math.round((e*(.2-.01)+.01)*100)/100});svgFileLink=N("");customizations=N([]);predesigns=N([]);isShowWholeLayersOption=N(!1);personlizationPlacements=De(()=>this.personalizationState.placements());twoDCanvasElement=null;fabricCanvas=null;fabricCanvasCleanup=null;fabricCanvasSyncDimensions=null;fabricReady=N(!1);canvasLoadToken=N(null);baseElementCache=this.customizerState.baseElementCache;baseBBoxCache=this.customizerState.baseBBoxCache;measurementHost=this.customizerState.measurementHost;measurementSvgRoot=this.customizerState.measurementSvgRoot;measurementCloneDirty=this.customizerState.measurementCloneDirty;canvasTransform=N(null);fabricLayoutState=N(null);fabricViewZoom=N(1);minFabricViewZoom=N(.25);maxFabricViewZoom=N(5);isBrowser=this.customizerState.isBrowser;textureUpdateScheduled=N(!1);overlaySyncPromise=N(Promise.resolve());backgroundImageTemplates=De(()=>this.backgroundState.state().templates);placementZoneBounds=N(new Map);overlayFabricObjects=N(new Map);fabricVisibleOverlayIds=N(new Set);layerBoundsCache=this.customizerState.layerBoundsCache;pendingLogoLoads=N(new Map);fontSourceMap=N(R({},WT));fontBinaryPromises=N(new Map);fontOutlinePromises=N(new Map);fontFacePromises=N(new Map);fontFacesReady=N(new Set);svgImageHrefCache=new Map;svgImageHrefPending=new Map;canUndo=this.designHistory.canUndo;canRedo=this.designHistory.canRedo;historyInitialized=!1;historyDebounceHandle=null;sdkReadyNotified=!1;isUndoingRedoing=N(!1);historyCaptureSuspended=!1;preserveHistoryOnNextSvgLoad=!1;placementGuideObjects=N(new Map);fabricGridState=N({horizontal:[],vertical:[]});fabricGuideState=N({lines:[]});twoDSnapRuntime=N(Fi());twoDCursorCanvasPoint=N(null);twoDDraggingOverlayId=N(null);fabricSelectionClearSuppressionCount=0;lastHandledRenderCommandId=0;lastHandledTextureCommandId=0;lastHandledOverlaySyncCommandId=0;predesignStepId=x_.PREDESIGNS;renderOrderStepId=x_.RENDER_ORDER;canvasGuideStepId=x_.CANVAS_GUIDE;steps=N([]);personalizationItems=N([]);activeStepId=N(null);activeRenderOrderItemId=De(()=>this.activeOverlayId()?`overlay:${this.activeOverlayId()}`:null);stepNav=De(()=>this.panelService.flattenSteps(this.steps()));renderOrderItems=De(()=>{let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});return this.renderOrderState.stack().map(t=>e.get(t)).filter(t=>!!t)});stepLookup=De(()=>this.panelService.buildStepLookup(this.steps()));parentNav=De(()=>this.panelService.buildParentNav(this.steps(),this.renderOrderStepId,t4));navExpanded=N(!1);dynamicSlotId=N(null);isDesktop=N(!0);showShortcuts=N(!1);toggleShortcuts(e){e.stopPropagation(),this.showShortcuts.update(t=>!t)}closeShortcuts(){this.showShortcuts.set(!1)}onResize(){if(this.isBrowser()){let e=window.innerWidth;this.isDesktop.set(e>=992),this.isMobile.set(e<768)}}allNavItems=De(()=>{let e=this.predesigns(),t=[];return e&&e.length>0&&t.push({id:this.predesignStepId,name:"Designs",iconClass:"ri-pencil-fill",depth:0}),t.push(...this.parentNav()),t.push({id:this.canvasGuideStepId,name:"Canvas Guide",iconClass:"ri-layout-grid-line",depth:0}),t});visibleNavItems=De(()=>{let e=this.allNavItems();if(this.isDesktop()||e.length<=4)return e;let t=this.dynamicSlotId(),n=this.activeStepId(),r=n&&e.findIndex(a=>a.id===n)>=3?n:t;(!r||e.findIndex(a=>a.id===r)<3)&&(r=e[3].id);let o=e.slice(0,3),s=e.find(a=>a.id===r)||e[3];return[...o,s]});hiddenNavItems=De(()=>{let e=this.allNavItems();if(e.length<=4)return[];let t=new Set(this.visibleNavItems().map(n=>n.id));return e.filter(n=>!t.has(n.id))});toggleNavExpanded(){this.navExpanded.update(e=>!e)}onNavItemClick(e){this.setActiveStep(e),this.navExpanded.set(!1),this.dynamicSlotId.set(e)}predesignPanel=De(()=>{let e=this.predesigns();return e.length?{kind:"predesigns",trackId:this.predesignStepId,title:Hd.DESIGNS,predesigns:e}:null});canvasGuidePanel=De(()=>({kind:"canvas-guide",trackId:this.canvasGuideStepId,title:"Canvas Guide"}));panelsByStep=De(()=>this.panelService.buildPanelsByStep({stepNav:this.stepNav(),customizations:this.customizations(),personalizationItems:this.personalizationItems(),stepLookup:this.stepLookup(),renderOrderStepId:this.renderOrderStepId,renderOrderItems:this.renderOrderItems()}));activePanels=De(()=>{let e=this.activeStepId();if(!e)return[];if(e===this.predesignStepId){let s=this.predesignPanel();return s?[s]:[]}if(e===this.renderOrderStepId)return this.panelsByStep().get(this.renderOrderStepId)??[];if(e===this.canvasGuideStepId){let s=this.canvasGuidePanel();return s?[s]:[]}let t=this.stepLookup(),n=this.panelsByStep(),r=s=>{let a=n.get(s.id)??[],l=(s.children??[]).flatMap(c=>r(c));return[...a,...l]},o=t.get(e);return o?r(o):[]});constructor(){Yt(()=>{this.customizerState.fabricReadyState.set(this.fabricReady())}),Yt(()=>{this.customizerState.canvasTransformState.set(this.canvasTransform())}),Yt(()=>{let e=this.customizerState.render2dCommandId();e===0||e===this.lastHandledRenderCommandId||(this.lastHandledRenderCommandId=e,gn(()=>this.render2dView()))}),Yt(()=>{let e=this.customizerState.textureRebuildCommandId();e===0||e===this.lastHandledTextureCommandId||(this.lastHandledTextureCommandId=e,gn(()=>this.requestTextureRebuild()))}),Yt(()=>{let e=this.customizerState.overlaySyncCommandId();e===0||e===this.lastHandledOverlaySyncCommandId||(this.lastHandledOverlaySyncCommandId=e,gn(()=>{this.syncOverlaysToSvgDoc().then(()=>this.customizerState.completeOverlaySyncCommand(e)).catch(t=>this.customizerState.completeOverlaySyncCommand(e,t))}))}),Yt(()=>{this.apiKey(),this.productId();let e=this.submissionNumber()?.trim()??"",t=this.predesignId()?.trim()??"";if(!this.hasInitializedManifestLoad)return;let n=this.getManifestConfigSignature(),r=n?`${n}::${e}::${t}`:null;!r||r===this.lastManifestConfigSignature||(this.lastManifestConfigSignature=r,gn(()=>{if(e){this.selectedPredesignId.set(null),this.bootstrapEditableSubmission(e);return}t?this.selectedPredesignId.set(t):this.selectedPredesignId.set(null),this.pendingSubmissionPayload=null,this.loadManifest(t||void 0)}))}),Yt(()=>{let e=this.fabricReady(),t=this.showPlacementGuides(),n=this.placementZones().length,r=!!this.canvasTransform(),o=this.fabricCanvas;if(!o||!e||!r||n===0){o&&(gn(()=>this.clearPlacementGuides(o)),o.requestRenderAll());return}if(!t){gn(()=>this.clearPlacementGuides(o)),o.requestRenderAll();return}gn(()=>this.updatePlacementGuideVisibility())}),Yt(()=>{this.gridEnabled(),this.twoDGridStepPx(),this.twoDGridMajorStepPx(),this.twoDGridSizeInches(),gn(()=>this.render2dView())}),Yt(()=>{this.svgDoc(),this.svgText(),this.overlays(),this.patternState.state(),this.patternOverlayState.state().overlays,this.backgroundState.state().images,this.backgroundImageTemplates(),this.renderPathAccordingLayers(),gn(()=>this.synchronizeRenderOrderStack())}),Yt(()=>{this.svgText(),this.overlays(),this.selectedLayerKey(),this.showPlacementGuides(),this.backgroundState.state(),this.patternState.state(),gn(()=>{this.isUndoingRedoing()?this.isUndoingRedoing.set(!1):this.scheduleHistoryCapture()})}),Yt(()=>{this.ingestFontPacks(this.personalizationItems())}),Yt(()=>{this.personalizationItems(),this.overlays(),this.pendingEditableTextEffects().length&&gn(()=>{this.replayPendingEditableTextEffects()})}),Yt(()=>{let e=this.svgDoc();gn(()=>{if(!e){this.baseElementCache.set(null),this.baseBBoxCache.set(null);return}let t=e.documentElement;if(this.baseElementCache.set(t),t instanceof SVGGraphicsElement)try{this.baseBBoxCache.set(t.getBBox())}catch{this.baseBBoxCache.set(null)}})}),Yt(()=>{let e=this.editorMode();gn(()=>{(e==="3d"||e==="both")&&setTimeout(()=>{this.threeDUI()?.resizeHandler()},0),(e==="2d"||e==="both")&&setTimeout(()=>{this.fabricCanvasSyncDimensions?.(),this.render2dView()},0)})}),this.fontAssetService.queueFontFaceLoad(this.defaultFontFamily(),this.fontDeps()),this.registerKeyboardShortcuts()}ngOnInit(){if(this.isBrowser()){let n=window.innerWidth;this.isDesktop.set(n>=992),this.isMobile.set(n<768)}let e=this.submissionNumber()?.trim()??"",t=this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput());if(this.lastManifestConfigSignature=t?`${t}::${e}`:null,this.hasInitializedManifestLoad=!0,e){this.bootstrapEditableSubmission(e);return}}async bootstrapEditableSubmission(e){let t=this.resolveApiKey();if(this.pendingEditableTextEffects.set([]),this.appliedEditableTextEffectKeys.set(new Set),!t){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Rt.missingApiKey);return}this.manifestLoading.set(!0);let n=this.resolveProductId()?.trim();if(!n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Rt.missingProductId),this.manifestLoading.set(!1);return}this.manifestError.set(null);try{let r=await uc(this.submissionApi.getSubmissionByNumber(e,t)),o=this.resolveEditableSubmissionData(r?.data);if(!r?.isSuccess||!o){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let l=r?.errors?.[0]??r?.message??Rt.submissionNotFound;this.manifestError.set(l),this.manifestLoading.set(!1),this.toaster.showError(l);return}let s=o.productId?.trim();if(!s||s!==n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Rt.submissionProductMismatch),this.manifestLoading.set(!1),this.toaster.showError(Rt.submissionProductMismatch);return}if(!this.isValidEditablePayload(o.designPayload)){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Rt.submissionInvalidPayload),this.toaster.showError(Rt.submissionInvalidPayload),this.manifestLoading.set(!1);return}let a=o.preDesignId?.trim()||null;this.selectedPredesignId.set(a),this.pendingSubmissionPayload=o.designPayload,await this.loadManifest(a)}catch{this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestLoading.set(!1),this.manifestError.set(Rt.submissionLoadFailed),this.toaster.showError(Rt.submissionLoadFailed)}}resolveEditableSubmissionData(e){if(!e)return null;if(Array.isArray(e)){let t=e[0];return t&&typeof t=="object"?t:null}return typeof e!="object"?null:e}isValidEditablePayload(e){if(!e||typeof e!="object")return!1;let t=e.svg?.content,n=e.svg?.contentUrl,r=typeof t=="string"&&t.trim().length>0,o=typeof n=="string"&&n.trim().length>0;return r||o}async loadManifest(e){let t=Symbol();this.manifestRequestToken=t;let n=!!e&&this.manifestLoaded;this.manifestLoading.set(!0),this.predesignSwitchLoading.set(n),this.manifestError.set(null),n||(this.manifestLoaded=!1),this.filesLoaded=!1;try{let r=await this.manifestFlowService.loadManifest(ue(R({},this.getManifestIdentityInput()),{preDesignId:e??null,selectedPredesignId:this.selectedPredesignId(),activeStepId:this.activeStepId()}));if(this.manifestRequestToken!==t)return;if(!r.ok){this.pendingPredesignCarryover=null,this.manifestError.set(r.message),this.notifyManifestLoadFailed(r.message);return}this.applyManifestData(r.normalized)}catch{if(this.manifestRequestToken!==t)return;this.pendingPredesignCarryover=null,this.manifestError.set(Rt.manifestLoadFailed),this.notifyManifestLoadFailed(Rt.manifestLoadFailed)}finally{this.manifestRequestToken===t&&(this.manifestLoading.set(!1),this.predesignSwitchLoading.set(!1))}}retryManifestLoad(){this.loadManifest()}toggleMobilePanel(){this.mobilePanelVisible.update(e=>!e)}async onPredesignSelected(e){let t=e?.id??null;t&&(this.manifestLoading()||t===this.selectedPredesignId()||(this.pendingPredesignCarryover=this.capturePredesignCarryover(t),this.preserveHistoryOnNextSvgLoad=!1,this.selectedPredesignId.set(t),await this.loadManifest(t)))}tryLoadFilesFromManifest(e=!1){!this.viewInitialized||!this.manifestLoaded||this.filesLoaded||(this.filesLoaded=!0,this.loadFilesFromUrls(e))}ngAfterViewInit(){this.initFabricCanvases(),this.viewInitialized=!0,this.tryLoadFilesFromManifest()}registerKeyboardShortcuts(){if(!this.isBrowser)return;let e=t=>{let n=t.composedPath?.()[0]||t.target;if(n&&this.keyboardShortcutService.isTextInputTarget(n))return;let r=this.keyboardShortcutService.resolveHistoryAction(t);if(r==="UNDO"){this.onUndo(),t.preventDefault();return}if(r==="REDO"){this.onRedo(),t.preventDefault();return}this.tryHandleOverlayKeyboardShortcut(t)&&t.preventDefault()};window.addEventListener("keydown",e,{passive:!1}),this.destroyRef.onDestroy(()=>window.removeEventListener("keydown",e))}tryHandleOverlayKeyboardShortcut(e){let t=this.keyboardShortcutService.resolveOverlayAction(e,this.rotationStep());return t?t.kind==="MOVE"?this.nudgeActiveOverlayByPixels(t.deltaXPx,t.deltaYPx):this.rotateActiveOverlayByStep(t.deltaAngle):!1}nudgeActiveOverlayByPixels(e,t){let n=this.resolveKeyboardTargetOverlay();if(!n)return!1;let r=this.getOverlayBoundingRect();if(r.width<=0||r.height<=0)return!1;let o=n.normalizedX+e/r.width,s=n.normalizedY+t/r.height;return this.setOverlayNormalizedPosition(n,o,s),!0}rotateActiveOverlayByStep(e){let t=this.resolveKeyboardTargetOverlay();return t?(this.onOverlayRotationChange({overlay:t,angle:(t.angle??0)+e}),!0):!1}resolveKeyboardTargetOverlay(){let e=this.findOverlayById(this.activeOverlayId());if(e)return e;if(this.editorMode()==="2d")return null;let t=this.overlays(),n=t.length>0?t[t.length-1]:null;return n?(this.setActiveOverlay(n),n):null}async loadFilesFromUrls(e=!1){this.preserveHistoryOnNextSvgLoad=!1;try{if(this.loading.set(!0),this.svgFileLink()){let n=await this.fileService.fetchFileAsText(this.svgFileLink());if(this.svgText.set(n),this.loadSVGFromText(n,!0),await this.applyPredesignCarryoverIfNeeded(),this.pendingSubmissionPayload)try{await this.applyEditableSubmissionPayload(this.pendingSubmissionPayload),this.pendingSubmissionPayload=null}catch(r){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let o=r instanceof Error&&r.message===Rt.submissionInvalidPayload?Rt.submissionInvalidPayload:Rt.submissionLoadFailed;this.manifestError.set(o),this.toaster.showError(o);return}}if(this.threeDFileLink()&&this.objText.set(await this.fileService.fetchFileAsText(this.threeDFileLink())),this.materialFileLink()&&this.mtlText.set(await this.fileService.fetchFileAsText(this.materialFileLink())),this.loading.set(!1),this.sdkRuntimeConfig&&!this.sdkReadyNotified){this.sdkReadyNotified=!0;let n=this.resolveProductId();n&&this.sdkRuntimeConfig.onReady?.({productId:n})}e&&setTimeout(()=>{this.threeDUI()?.rebuildSVGTexture()},0)}catch(n){if(console.error(Rt.errorLoadingFilesFromUrls,n),this.sdkRuntimeConfig){this.manifestError.set(Rt.manifestAssetsLoadFailed);let r=this.resolveProductId();r&&this.sdkRuntimeConfig.onAssetLoadFailed?.({productId:r,code:"ASSET_LOAD_FAILED",message:Rt.manifestAssetsLoadDetail})}this.loading.set(!1)}}async applyEditableSubmissionPayload(e){let t=Symbol();this.editableSubmissionCompressionToken=t,this.suspendTextureRebuild=!0,this.pendingTextureRebuildWhileSuspended=!1,this.predesignBaseSvgText.set(this.baseSvgText());let n=e.svg?.content?.trim()??"";if(!n){let r=e.svg?.contentUrl?.trim();if(!r)throw new Error(Rt.submissionInvalidPayload);n=(await this.fileService.fetchFileAsText(r)).trim()}if(!n)throw new Error(Rt.submissionInvalidPayload);try{this.loadSVGFromText(n,!1);let r=this.parseTextOverlays(e.overlays?.text??[]),o=this.parseLogoOverlays(e.overlays?.logo??[]),s=this.ensureUniqueOverlayIds([...r,...o]);this.overlays.set(s),this.hydrateEditableOverlayRuntimeDimensions(e,s),this.activeOverlayId.set(s[0]?.id??null);let a=(e.overlays?.text??[]).filter(c=>!!c?.id).map(c=>({overlayId:c.id,effectId:c.effectId??null}));if(this.personalizationState.setSelectedEffectByOverlay(a),this.appliedEditableTextEffectKeys.set(new Set),this.pendingEditableTextEffects.set(this.buildPendingEditableTextEffects(e.overlays?.text??[],s)),await this.replayPendingEditableTextEffects(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),e.background?.selectedKey&&this.backgroundState.select(e.background.selectedKey),await this.prepareEditableSubmissionAssetsFor3d(s,t),this.editableSubmissionCompressionToken!==t)return;e.pattern?.selectedUploadedPatternId&&this.patternState.setSelectedUploadedPattern(e.pattern.selectedUploadedPatternId),this.patternState.setSelectedPatternFileUrl(e.pattern?.selectedFileUrl??null);let l=(e.renderOrder??[]).filter(c=>typeof c=="string"&&c.trim().length>0);if(l.length){this.renderOrderState.enableManualOrdering(),this.renderOrderState.setStack(l);let c=this.svgDoc()?.documentElement;c&&this.renderOrderState.applyStackToSvg(c,this.renderPathAccordingLayers())}await this.syncOverlaysToSvgDoc(),this.requestTextureRebuild(),this.render2dView(),this.resetHistoryWithCurrentState("Edited submission initial state")}finally{if(this.editableSubmissionCompressionToken!==t)return;this.editableSubmissionCompressionToken=null,this.suspendTextureRebuild=!1,this.pendingTextureRebuildWhileSuspended&&(this.pendingTextureRebuildWhileSuspended=!1,this.requestTextureRebuild())}}async prepareEditableSubmissionAssetsFor3d(e,t){await Promise.all([this.compressEditableSubmissionLogoOverlaysFor3d(e,t),this.backgroundState.ensureCompressedSourcesFor3d()]),this.editableSubmissionCompressionToken===t&&this.overlays.set([...e])}async compressEditableSubmissionLogoOverlaysFor3d(e,t){let n=e.filter(oi);n.length&&await Promise.all(n.map(async r=>{let o=r.imageSrc?.trim();if(!(!o||r.imageSrc3d))try{let s=await this.imageCompressionService.compressImageToDataUrl(o);if(this.editableSubmissionCompressionToken!==t)return;r.imageSrc3d=s}catch(s){console.warn("[CustomizerUiComponent] Failed to compress editable submission logo, using original",s)}}))}parseTextOverlays(e){return e.filter(t=>!!t?.id).map(t=>({id:t.id,kind:"text",text:t.text??"",fill:t.style?.fill??"#1f2937",fontSize:Number.isFinite(t.style?.fontSize)?t.style?.fontSize:24,horizontalScale:this.normalizeOverlayScale(t.style?.horizontalScale,1),verticalScale:this.normalizeOverlayScale(t.style?.verticalScale,1),fontFamily:t.style?.fontFamily??this.defaultFontFamily(),fontWeight:t.style?.fontWeight??this.defaultFontWeight(),fontStyle:t.style?.fontStyle??this.defaultFontStyle(),letterSpacing:Number.isFinite(t.style?.letterSpacing)?t.style?.letterSpacing:this.defaultLetterSpacing(),lineHeight:Number.isFinite(t.style?.lineHeight)?t.style?.lineHeight:this.defaultLineHeight(),stroke:t.style?.stroke??qf,strokeWidth:Number.isFinite(t.style?.strokeWidth)?t.style?.strokeWidth:0,secondStroke:t.style?.secondStroke??Kf,secondStrokeWidth:Number.isFinite(t.style?.secondStrokeWidth)?t.style?.secondStrokeWidth:0,curveAmount:Number.isFinite(t.style?.curveAmount)?t.style?.curveAmount:this.defaultCurveAmount(),shadowBlur:Number.isFinite(t.style?.shadowBlur)?t.style?.shadowBlur:this.defaultShadowBlur(),shadowOffsetX:Number.isFinite(t.style?.shadowOffsetX)?t.style?.shadowOffsetX:this.defaultShadowOffsetX(),shadowOffsetY:Number.isFinite(t.style?.shadowOffsetY)?t.style?.shadowOffsetY:this.defaultShadowOffsetY(),shadowColor:t.style?.shadowColor??wm,warpEnabled:t.effects?.warp===!0,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,placementKey:t.placementKey??null,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0}))}parseLogoOverlays(e){return e.filter(t=>!!t?.id&&!!t?.imageSrc).map(t=>({id:t.id,kind:"logo",logoBlobId:t.logoBlobId??null,imageSrc:t.imageSrc,imageName:t.imageName??void 0,placementKey:t.placementKey??null,opacity:Number.isFinite(t.opacity)?t.opacity:1,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0,originalWidth:Number.isFinite(t.dimensions?.originalWidth)?t.dimensions?.originalWidth:0,originalHeight:Number.isFinite(t.dimensions?.originalHeight)?t.dimensions?.originalHeight:0,normalizedWidth:this.normalizeOverlayCoordinate(t.dimensions?.normalizedWidth,.2),normalizedHeight:this.normalizeOverlayCoordinate(t.dimensions?.normalizedHeight,.2)}))}hydrateEditableOverlayRuntimeDimensions(e,t){let n=new Map,r=new Map(t.filter(Et).map(s=>[s.id,s]));(e.overlays?.text??[]).forEach(s=>{if(!s?.id)return;let a=r.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})});let o=new Map(t.filter(oi).map(s=>[s.id,s]));(e.overlays?.logo??[]).forEach(s=>{if(!s?.id)return;let a=o.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})}),this.customizerState.overlayRuntimeDimensionsPx.set(n)}normalizeOverlayCoordinate(e,t){return Number.isFinite(e)?nn.clamp(e,0,1):t}normalizeOverlayScale(e,t){return Number.isFinite(e)?nn.clamp(e,.1,8):t}buildPendingEditableTextEffects(e,t){let n=new Map(t.filter(Et).map(o=>[o.id,o])),r=[];for(let o of e){let s=o?.effectId?.trim();if(!o?.id||!s)continue;let a=n.get(o.id);a&&r.push({overlayId:a.id,placementKey:a.placementKey??o.placementKey??null,effectId:s})}return r}async replayPendingEditableTextEffects(){if(this.replayPendingEffectsInFlight)return;let e=this.pendingEditableTextEffects();if(!(!e.length||!this.hasAnyEffectDataSources())){this.replayPendingEffectsInFlight=!0;try{let t=new Map(this.overlays().map(o=>[o.id,o])),n=new Set(this.appliedEditableTextEffectKeys()),r=[];for(let o of e){let s=`${o.overlayId}::${o.effectId}`;if(n.has(s))continue;let a=t.get(o.overlayId);if(!a||!Et(a))continue;let l=this.findEffectDataSource(o.effectId,o.placementKey);if(!l){r.push(o);continue}await this.personalizationState.applyTextEffect(a,l),n.add(s)}this.appliedEditableTextEffectKeys.set(n),this.pendingEditableTextEffects.set(r)}finally{this.replayPendingEffectsInFlight=!1}}}hasAnyEffectDataSources(){return(this.personalizationItems()??[]).some(e=>(e.packs??[]).some(t=>(t.type??"").toLowerCase().includes("effect")&&(t.dataSources?.length??0)>0))}findEffectDataSource(e,t){let n=e.trim();if(!n)return null;let r=(this.personalizationItems()??[]).filter(o=>!t||o.placementKey===t).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n);return r||((this.personalizationItems()??[]).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n)??null)}ensureUniqueOverlayIds(e){let t=new Map;return e.map(n=>{let r=t.get(n.id)??0;return t.set(n.id,r+1),r===0?n:ue(R({},n),{id:`${n.id}-${r}`})})}capturePredesignCarryover(e){return this.predesignCarryoverService.captureSnapshot({targetPredesignId:e,manifestLoaded:this.manifestLoaded,svgDoc:this.svgDoc(),customizations:this.customizations(),overlays:this.overlays(),backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}async applyPredesignCarryoverIfNeeded(){let e=this.pendingPredesignCarryover;if(!e)return;let t=this.selectedPredesignId();this.pendingPredesignCarryover=null,await this.predesignCarryoverService.applyIfNeeded({snapshot:e,selectedPredesignId:t,customizations:this.customizations(),personalizationItems:this.personalizationItems(),backgroundTemplates:this.backgroundImageTemplates(),overlaysState:this.overlays,activeOverlayIdState:this.activeOverlayId,backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}applyManifestData(e){this.predesignBaseSvgText.set(null),e.distributorBranding?(this.themeService.applyDistributorBranding(e.distributorBranding,{lock:!0}),this.distributorHeaderLogoUrl.set(e.distributorBranding.logoUrl??null)):(this.themeService.clearDistributorBranding(),this.distributorHeaderLogoUrl.set(null)),this.editorMode.set((e.isShowWholeLayersOption||e.pathIdAccordingLayers.length>0)&&!this.isMobile()?"both":"3d"),e.resolvedPredesignId&&this.selectedPredesignId.set(e.resolvedPredesignId),this.threeDFileLink.set(e.threeDFileLink),this.materialFileLink.set(e.materialFileLink),this.svgFileLink.set(e.svgFileLink),e.svgViewBox&&this.svgViewBox.set(e.svgViewBox),this.customizations.set(e.customizations),this.predesigns.set(e.predesigns),this.steps.set(e.steps),this.pathIdAccordingLayers.set(e.pathIdAccordingLayers),this.renderPathAccordingLayers.set(e.renderPathAccordingLayers),this.isShowWholeLayersOption.set(e.isShowWholeLayersOption),this.customizerState.setPrintAreaInches(e.printAreaWidthInches,e.printAreaHeightInches),this.personalizationState.setPlacements(e.placements),this.backgroundState.setTemplates(e.placements),this.personalizationItems.set(e.placements),e.nextActiveStepId&&!this.activeStepId()&&this.activeStepId.set(e.nextActiveStepId),this.sdkReadyNotified=!1,this.manifestLoaded=!0;let t=this.resolveProductId();this.sdkRuntimeConfig&&t&&this.sdkRuntimeConfig.onManifestLoaded?.({productId:t,manifestMeta:e.manifestMeta}),this.tryLoadFilesFromManifest(!0)}getManifestIdentityInput(){return{runtimeConfig:this.sdkRuntimeConfig,inputProductId:this.productId(),inputApiKey:this.apiKey(),fallbackProductId:this.fallbackProductId}}resolveProductId(){return this.manifestFlowService.resolveProductId(this.getManifestIdentityInput())}resolveApiKey(){return this.manifestFlowService.resolveApiKey(this.getManifestIdentityInput())}getManifestConfigSignature(){return this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput())}notifyManifestLoadFailed(e){if(!this.sdkRuntimeConfig)return;let t=this.resolveProductId();t&&this.sdkRuntimeConfig.onManifestLoadFailed?.({productId:t,code:"MANIFEST_LOAD_FAILED",message:e})}loadSVGFromText(e,t=!0){this.baseSvgText.set(e),this.svgText.set(e),this.measurementCloneDirty.set(!0),this.overlays.set([]),this.customizerState.clearAllTextGlyphPlans(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.fabricLayoutState.set(null),this.svgDimensions.set(null),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3}),this.activeOverlayId.set(null);let n=this.isShowWholeLayersOption()?null:this.pathIdAccordingLayers()[0]?.name??null;this.selectedLayerKey.set(n),this.patternState.reset(),this.patternOverlayState.reset(),this.renderOrderState.reset(),this.placementZones.set([]),this.placementZoneBounds.set(new Map),this.personalizationState.reset(),this.backgroundState.reset(),this.resetFabricViewTransform(),this.parseSVGRegions(this.svgText()),this.personalizationState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),this.render2dView(),this.requestTextureRebuild(),t&&!this.designHistory.isRestoring()&&this.resetHistoryWithCurrentState("Initial state")}resetHistoryWithCurrentState(e){let t=this.buildHistorySnapshot(e);this.designHistory.seed(t),this.historyInitialized=!0}scheduleHistoryCapture(e){!this.historyInitialized||this.designHistory.isRestoring()||this.historyCaptureSuspended||(this.historyDebounceHandle&&clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=setTimeout(()=>{this.designHistory.record(this.buildHistorySnapshot(e)),this.historyDebounceHandle=null},120))}setHistoryCaptureSuspended(e){this.historyCaptureSuspended=e,e&&this.historyDebounceHandle&&(clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=null)}buildHistorySnapshot(e,t){let n=t===void 0?this.selectedPredesignId():t;return{svgText:this.svgText(),overlays:JSON.parse(JSON.stringify(this.overlays()??[])),activeOverlayId:this.activeOverlayId(),selectedLayerKey:this.selectedLayerKey(),showPlacementGuides:this.showPlacementGuides(),selectedPredesignId:n,label:e,timestamp:Date.now()}}async applySnapshot(e){this.designHistory.beginRestore();try{let t=this.selectedPredesignId(),n=e.selectedPredesignId??null;if(t!==n){this.selectedPredesignId.set(n),await this.loadManifest(n);return}e.svgText?this.loadSVGFromText(e.svgText,!1):(this.svgText.set(null),this.render2dView()),this.overlays.set(JSON.parse(JSON.stringify(e.overlays??[]))),this.activeOverlayId.set(e.activeOverlayId??null),this.selectedLayerKey.set(e.selectedLayerKey??null),this.showPlacementGuides.set(!!e.showPlacementGuides),this.syncOverlaysToSvgDoc().finally(()=>{this.requestTextureRebuild(),this.render2dView()})}finally{this.designHistory.endRestore(),this.historyInitialized=!0}}onUndo(){let e=this.designHistory.undo(this.buildHistorySnapshot("undo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onRedo(){let e=this.designHistory.redo(this.buildHistorySnapshot("redo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onTwoDCanvasReady(e){this.twoDCanvasElement!==e&&(this.twoDCanvasElement=e,this.initFabricCanvases())}onTwoDCanvasDestroyed(){this.twoDCanvasElement=null,this.disposeFabricCanvases()}render2dView(){this.render2dViewAsync(),this.updatePlacementGuideVisibility()}async render2dViewAsync(){if(!this.fabricReady()||!this.fabricCanvas)return;try{await this.overlaySyncPromise()}catch{return}if(!this.svgDoc()){this.fabricCanvas.clear(),this.fabricCanvas.renderAll(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.twoDSnapRuntime.set(Fi());return}let e=this.getActiveLayerPathIds(),t=this.renderOrderState.resolveFabricVisibleOverlayIds(this.overlays()),n=this.overlays().map(s=>s.id).filter(s=>!t.has(s));this.fabricVisibleOverlayIds.set(t);let r=this.svgRenderService.buildSvgForView(this.svgDoc(),this.pathIdAccordingLayers(),e.length>0?e:void 0,{preserveOverlayIds:n}),o=e.length>0?this.getLayerPreviewBounds(e):null;this.renderSvgOnCanvas(this.fabricCanvas,r,o),this.fabricGuideState.set({lines:[]}),this.twoDSnapRuntime.set(Fi())}onLayerToggle(e){let t=this.selectedLayerKey(),n=this.isShowWholeLayersOption(),r=e===null||t===e?n?null:t:e;t!==r&&(this.selectedLayerKey.set(r),this.render2dView())}getActiveLayerPathIds(){let e=this.selectedLayerKey();if(!e)return[];let t=this.pathIdAccordingLayers().find(n=>n.name.toLowerCase()===e.toLowerCase());return t?t.actionPathIdsCsv.split(",").map(n=>n.replace("#","").trim()):[]}getAllLayerPathIds(){let e=new Set;for(let t of this.pathIdAccordingLayers())for(let n of t.actionPathIdsCsv.split(",")){let r=n.replace("#","").trim();r&&e.add(r)}return[...e]}renderSvgOnCanvas(e,t,n){let r=this.overlayFabricObjects().size>0,o=this.canvasTransform();if(!t){e.clear(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.canvasLoadToken.set(null),e.backgroundImage=void 0,e.renderAll();return}let s=Symbol();this.canvasLoadToken.set(s),this.svgDimensions()||this.computeSvgDimensions();let a=this.getOverlayBoundingRect(),l=this.normalizePreviewBounds(n??null,a);Z3({canvas:e,svgMarkup:t,fabricViewZoom:this.fabricViewZoom(),svgViewBox:this.svgViewBox(),svgDimensions:this.svgDimensions(),targetBounds:l,baseBounds:a,loadToken:s}).then(c=>{if(!c||this.canvasLoadToken()!==c.token)return;let{image:d,transform:u,layout:f}=c;r&&o||(e.clear(),this.overlayFabricObjects.set(new Map)),e.backgroundImage=d,this.canvasTransform.set(u),this.fabricLayoutState.set(f),this.renderOverlaysOnCanvas(e),this.renderTwoDAlignmentLayers(e),e.requestRenderAll(),this.canvasLoadToken.set(null)}).catch(c=>{console.error(Rt.failedRenderSvgOnCanvas,c),this.canvasLoadToken.set(null)})}createOverlayTextObject(e,t,n){let r=this.getCachedTextGlyphPlan(e);if(!r)return this.ensureTextGlyphPlan(e),this.overlayFabricObjects().get(e.id);let o=this.getTextGlyphPlanSignature(e),s=this.getTextLayoutSignature(e),a=this.overlayFabricObjects().get(e.id);if(a){let x=a.textPlanSignature,_=a.layoutSignature;if(x===o&&_===s)return this.applyShadowToFabricGroup(a,e),a}a&&(t.getActiveObject()===a&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(a),this.overlayFabricObjects.update(x=>{let _=new Map(x);return _.delete(e.id),_}));let l=this.getOrBuildTextLayout(e,r);if(!l.length)return null;let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,g=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0,m=(x,_,E,D,A)=>{let S=new As(x.d,{fill:e.fill,stroke:_,strokeWidth:E,strokeLineJoin:"round",strokeLineCap:"round",paintFirst:D,originX:"center",originY:"center",left:x.x,angle:x.angle,strokeUniform:!0});return S.outlineLayer=A,S},b=[];l.forEach(x=>{g>0&&b.push(m(x,e.fill,g,"stroke","faux-bold"));let _=h>0?p+(d>0?u:0):0;_>0&&b.push(m(x,f??void 0,_,"stroke","secondary-stroke"));let E=d>0?u:0;b.push(m(x,c??void 0,E,E>0?"stroke":"fill","primary-stroke"))});let y=new Yo(b,{originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,centeredRotation:!0,lockScalingFlip:!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)});return y.set("lockUniScaling",e.lockAspectRatio??!0),y.set("skewX",e.fontStyle==="italic"?-12:0),y.set("skewY",0),y.dataOverlayId=e.id,y.textPlanSignature=o,y.layoutSignature=s,this.applyShadowToFabricGroup(y,e),y.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,y),this.constrainOverlayWithinView(e,y)}),y.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,y),this.constrainOverlayWithinView(e,y)}),y.on("modified",()=>{this.twoDSnapRuntime.set(Fi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let x=this.resolveOverlayForFabricObject(y);x&&Et(x)&&this.finalizeOverlayFromFabric(x,y)}),y.on("mousedown",()=>{let x=this.resolveOverlayForFabricObject(y);x&&this.setActiveOverlay(x)}),y.on("selected",()=>{let x=this.resolveOverlayForFabricObject(y);x&&this.setActiveOverlay(x)}),this.overlayFabricObjects.update(x=>{let _=new Map(x);return _.set(e.id,y),_}),t.add(y),this.activeOverlayId()===e.id&&t.setActiveObject(y),t.requestRenderAll(),y}ensureLogoFabricObject(e,t){let n=this.overlayFabricObjects().get(e.id);if(n){if(n.dataImageSrc!==e.imageSrc)t.getActiveObject()===n&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(n),this.overlayFabricObjects.update(s=>{let a=new Map(s);return a.delete(e.id),a});else return this.syncFabricObjectWithOverlay(e,n),this.activeOverlayId()===e.id&&t.setActiveObject(n),n;this.pendingLogoLoads.update(s=>{let a=new Map(s);return a.delete(e.id),a}),t.getObjects().includes(n)&&t.requestRenderAll()}let r=Symbol();return this.pendingLogoLoads.update(o=>{let s=new Map(o);return s.set(e.id,r),s}),Br.fromURL(e.imageSrc).then(o=>{this.pendingLogoLoads().get(e.id)===r&&(o.set({originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,lockScalingFlip:!0,lockUniScaling:e.lockAspectRatio??!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12}),o.dataOverlayId=e.id,o.dataImageSrc=e.imageSrc,o.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,o),this.constrainOverlayWithinView(e,o)}),o.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,o),this.constrainOverlayWithinView(e,o)}),o.on("modified",()=>{this.twoDSnapRuntime.set(Fi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let s=this.resolveOverlayForFabricObject(o);s&&oi(s)&&this.finalizeOverlayFromFabric(s,o)}),o.on("mousedown",()=>{let s=this.resolveOverlayForFabricObject(o);s&&this.setActiveOverlay(s)}),o.on("selected",()=>{let s=this.resolveOverlayForFabricObject(o);s&&this.setActiveOverlay(s)}),this.overlayFabricObjects.update(s=>{let a=new Map(s);return a.set(e.id,o),a}),t.add(o),this.syncFabricObjectWithOverlay(e,o),this.constrainOverlayWithinView(e,o),this.applyFabricStackByOverlayOrder(t),this.activeOverlayId()===e.id&&t.setActiveObject(o),t.requestRenderAll())}).finally(()=>{this.pendingLogoLoads().get(e.id)===r&&this.pendingLogoLoads.update(o=>{let s=new Map(o);return s.delete(e.id),s})}),null}renderOverlaysOnCanvas(e){let t=this.canvasTransform();if(!t){e.requestRenderAll();return}this.renderPlacementGuides(e);let n=new Set;this.overlays().forEach(o=>{if(this.fabricVisibleOverlayIds().has(o.id)&&this.overlayMatchesLayer(o,this.selectedLayerKey()))if(Et(o)){if(o.text.trim().length===0)return;let s=this.overlayFabricObjects().get(o.id),a=this.getTextGlyphPlanSignature(o),l=this.getTextLayoutSignature(o),c=!s||s.textPlanSignature!==a||s.layoutSignature!==l,d=c?this.createOverlayTextObject(o,e,t):s;d&&(!c&&d instanceof Yo&&(this.applyShadowToFabricGroup(d,o),d.layoutSignature=l,d.textPlanSignature=a),this.syncFabricObjectWithOverlay(o,d),this.activeOverlayId()===o.id&&e.setActiveObject(d),n.add(o.id))}else oi(o)&&this.ensureLogoFabricObject(o,e)&&n.add(o.id)}),Array.from(this.overlayFabricObjects().entries()).forEach(([o,s])=>{n.has(o)||(e.getActiveObject()===s&&this.discardActiveObjectWithoutSelectionClear(e),e.remove(s),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.delete(o),l}))}),this.applyFabricStackByOverlayOrder(e);let r=this.activeOverlayId();if(r){let o=this.overlayFabricObjects().get(r);o&&e.setActiveObject(o)}e.requestRenderAll()}applyFabricStackByOverlayOrder(e){this.overlays().forEach(r=>{if(!this.fabricVisibleOverlayIds().has(r.id)||!this.overlayMatchesLayer(r,this.selectedLayerKey())||Et(r)&&r.text.trim().length===0)return;let o=this.overlayFabricObjects().get(r.id);o&&e.bringObjectToFront(o)});let t=this.fabricGridState();t.horizontal.forEach(r=>e.bringObjectToFront(r)),t.vertical.forEach(r=>e.bringObjectToFront(r)),this.fabricGuideState().lines.forEach(r=>e.bringObjectToFront(r))}updatePlacementGuideVisibility(){let e=this.fabricCanvas,t=this.canvasTransform();!e||!t||(this.renderPlacementGuides(e),e.requestRenderAll(),this.threeDUI()?.currentObject()&&this.requestTextureRebuild())}renderPlacementGuides(e){let t=this.canvasTransform();if(!t){this.clearPlacementGuides(e);return}let n=this.placementZones().map(o=>({placementKey:o.placementKey,allowedKinds:o.allowedKinds,bounds:o.bounds})),r=J3(e,{show:this.showPlacementGuides()&&n.length>0,transform:t,zones:n,state:{objects:this.placementGuideObjects()}});this.placementGuideObjects.set(r.objects)}clearPlacementGuides(e){this.placementGuideObjects().size&&(jT(e,this.placementGuideObjects()),this.placementGuideObjects.set(new Map))}renderTwoDAlignmentLayers(e){let t=this.activeOverlay(),n=t?this.overlayFabricObjects().get(t.id):null,r=n?.left??null,o=n?.top??null,s=this.twoDCursorCanvasPoint()}clearTwoDSmartGuides(){this.fabricCanvas&&this.fabricGuideState.set(VT(this.fabricCanvas,this.fabricGuideState()))}applySmartAlignmentForFabricMove(e,t){let n=this.fabricCanvas;if(!n)return;let r=t.left??0,o=t.top??0;if(this.twoDCursorCanvasPoint.set({x:r,y:o}),!this.snapEnabled()){this.twoDSnapRuntime.set(Fi()),this.clearTwoDSmartGuides();return}let s=Math.max((t.getScaledWidth()||0)/2,1),a=Math.max((t.getScaledHeight()||0)/2,1),l={id:e.id,cx:r,cy:o,halfW:s,halfH:a},c=this.overlays().filter(f=>f.id!==e.id).map(f=>this.overlayFabricObjects().get(f.id)).filter(f=>!!f).map(f=>({id:f?.dataOverlayId,cx:f.left??0,cy:f.top??0,halfW:Math.max((f.getScaledWidth()||0)/2,1),halfH:Math.max((f.getScaledHeight()||0)/2,1)})),d=this.getTwoDGridStepPx(),u=Ox({x:r,y:o},l,c,{x:n.getWidth()/2,y:n.getHeight()/2},{snapEnabled:this.snapEnabled(),snapToGrid:this.gridEnabled(),gridStepX:d.x,gridStepY:d.y,tolerance:Wr.TWO_D_SNAP_TOLERANCE_PX},this.twoDSnapRuntime());this.twoDSnapRuntime.set(u.state),t.set({left:u.x,top:u.y}),t.setCoords(),this.fabricGuideState.set(j3(n,u.guides,this.fabricGuideState(),n.getWidth(),n.getHeight()))}resolveOverlayForFabricObject(e){let t=e?.dataOverlayId;return t?this.findOverlayById(t)??null:null}syncFabricObjectWithOverlay(e,t){let n=this.canvasTransform();if(!n)return;let r=this.getOverlayBoundingRect(),o=r.x+e.normalizedX*r.width,s=r.y+e.normalizedY*r.height,a=n.offsetX+o*n.scale,l=n.offsetY+s*n.scale;if(Et(e)){let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,v=this.getShadowCanvasShift(e,n),g=a+v.x,m=l+v.y,b=t;b.getObjects().forEach(y=>{if(y instanceof As){let x=y.outlineLayer,_,E=0,D="fill";if(x==="faux-bold"){let A=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0;_=e.fill,E=A,D=A>0?"stroke":"fill"}else x==="secondary-stroke"?(_=f??void 0,E=h>0?p+(d>0?u:0):0,D=E>0?"stroke":"fill"):(_=c??void 0,E=d>0?u:0,D=E>0?"stroke":"fill");y.set({fill:e.fill,stroke:_,strokeWidth:E,paintFirst:D,strokeUniform:!0}),y.dirty=!0}}),b.dirty=!0,b.set({originX:"center",originY:"center",angle:e.angle??0,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)}),b.set("lockUniScaling",e.lockAspectRatio??!0),b.setPositionByOrigin(new oe(g,m),"center","center"),this.applyShadowToFabricGroup(b,e),b.setCoords(),this.publishOverlayRuntimeDimensions(e.id,b);return}if(oi(e)){let c=t,d=e.normalizedWidth*r.width,u=e.normalizedHeight*r.height,f=Math.max(c.width??d,1),h=Math.max(c.height??u,1),p=d*n.scale/f,v=u*n.scale/h;c.set({originX:"center",originY:"center",angle:e.angle??0,lockUniScaling:e.lockAspectRatio??!0,scaleX:p,scaleY:v,opacity:e.opacity??1}),c.setPositionByOrigin(new oe(a,l),"center","center"),c.setCoords(),this.publishOverlayRuntimeDimensions(e.id,c)}}applyShadowToFabricGroup(e,t){let n=this.resolveShadowSettings(t);this.overlayStyleService.applyShadowToFabricGroup(e,n)}finalizeOverlayFromFabric(e,t){let n=this.canvasTransform(),r=this.getOverlayBoundingRect();if(!n||r.width<=0||r.height<=0)return;let o=t.left??n.offsetX,s=t.top??n.offsetY;if(Et(e)){let f=this.getShadowCanvasShift(e,n);o-=f.x,s-=f.y}let a=(o-n.offsetX)/n.scale,l=(s-n.offsetY)/n.scale,c=(a-r.x)/r.width,d=(l-r.y)/r.height,u=this.clampNormalizedToPlacementZone(e,c,d);if(e.normalizedX=u.x,e.normalizedY=u.y,e.angle=this.normalizeAngle(t.angle??0),Et(e)){let f=t,h=Math.abs(f.scaleX??n.scale),p=Math.abs(f.scaleY??h),v=n.scale||1,g=this.normalizeOverlayScale(h/v,1),m=this.normalizeOverlayScale(p/v,g);if(e.lockAspectRatio??!0){let b=this.normalizeOverlayScale((g+m)/2,1);g=b,m=b}if(e.horizontalScale=g,e.verticalScale=m,this.customizerState.clearTextGlyphPlan(e.id),e.placementKey){let b=this.applyPlacementZoneTextBounds(R({},e));Object.assign(e,b)}}else if(oi(e)){let f=t.getScaledWidth()||0,h=t.getScaledHeight()||0,p=f/n.scale,v=h/n.scale;if(e.lockAspectRatio??!0){let g=Math.max(e.normalizedWidth,.02)*r.width,m=Math.max(e.normalizedHeight,.02)*r.height,b=g>0?p/g:1,y=m>0?v/m:b,x=this.normalizeOverlayScale((b+y)/2,1);e.normalizedWidth=Math.min(Math.max(Math.max(e.normalizedWidth,.02)*x,.02),1),e.normalizedHeight=Math.min(Math.max(Math.max(e.normalizedHeight,.02)*x,.02),1)}else p>0&&(e.normalizedWidth=Math.min(Math.max(p/r.width,.02),1)),v>0&&(e.normalizedHeight=Math.min(Math.max(v/r.height,.02),1));if(typeof t.opacity=="number"&&(e.opacity=t.opacity),e.placementKey){let g=this.applyPlacementZoneLogoBounds(R({},e));Object.assign(e,g)}}this.commitOverlayUpdate(),this.customizerState.clearOverlayRuntimeDimensions(e.id),this.syncFabricObjectWithOverlay(e,t),t.canvas?.requestRenderAll()}publishOverlayRuntimeDimensions(e,t){let n=this.canvasTransform();if(!n||n.scale<=0)return;let r=Math.max((t.getScaledWidth()||0)/n.scale,1),o=Math.max((t.getScaledHeight()||0)/n.scale,1);this.customizerState.setOverlayRuntimeDimensionsPx(e,r,o)}constrainOverlayWithinView(e,t){let n=this.canvasTransform();if(!n)return;let o=(e.placementKey?this.personalizationState.getPlacementZoneBoundsByKey(e.placementKey):null)??this.getOverlayBoundingRect(),s=(t.getScaledWidth()||0)/2,a=(t.getScaledHeight()||0)/2,l=n.offsetX+o.x*n.scale+s,c=n.offsetX+(o.x+o.width)*n.scale-s,d=n.offsetY+o.y*n.scale+a,u=n.offsetY+(o.y+o.height)*n.scale-a,f=Math.min(Math.max(t.left??l,l),c),h=Math.min(Math.max(t.top??d,d),u);t.set({left:f,top:h}),t.setCoords()}getOverlayBoundingRect(){let e=this.getBaseBoundingBox();!this.svgDimensions()&&!e&&this.computeSvgDimensions();let t=this.svgDimensions(),n=this.svgViewBox(),r=t?{width:t.width,height:t.height,x:n.minX,y:n.minY}:null;return Dx(e,r)}getOverlayCenterPoint(e){let t=this.getOverlayBoundingRect();return{x:t.x+e.normalizedX*t.width,y:t.y+e.normalizedY*t.height}}overlayMatchesLayer(e,t){if(e.placementKey||!t)return!0;let n=this.resolveLayerDefinition(t);if(!n)return!0;let r=this.getOverlayCenterPoint(e),o=!1;for(let s of n.actionPathIdsCsv){let a=this.getLayerBoundsById(s);if(a&&(o=!0,this.pointInsideBounds(r,a)))return!0}return!o}resolveLayerDefinition(e){return this.layerBoundsService.resolveLayerDefinition(e,this.pathIdAccordingLayers())}getLayerBoundsById(e){let t=this.layerBoundsService.resolveLayerBoundsById({pathId:e,svgDoc:this.svgDoc(),svgText:this.svgText(),layerBoundsCache:this.layerBoundsCache(),measurementRoot:this.svgText()?this.ensureMeasurementSvgClone():null});return t.nextCache&&this.layerBoundsCache.set(t.nextCache),t.bounds}combineBoundsForPathIds(e){let t=e.map(n=>this.getLayerBoundsById(n));return this.layerBoundsService.combineBounds(t)}getLayerPreviewBounds(e){if(e.length===0)return null;let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0)return null;let n=this.combineBoundsForPathIds(e);return this.layerBoundsService.getLayerPreviewBounds(t,n)}normalizePreviewBounds(e,t){return this.layerBoundsService.normalizePreviewBounds(e,t)}pointInsideBounds(e,t){return this.layerBoundsService.pointInsideBounds(e,t)}readElementBounds(e){return this.layerBoundsService.readElementBounds(e)}ensureMeasurementSvgClone(){return this.customizerState.ensureMeasurementSvgClone(this.svgText)}refreshPlacementZonesFromSvg(){this.personalizationState.refreshFromSvg()}clampNormalizedToPlacementZone(e,t,n){return this.personalizationState.clampNormalizedToPlacementZone(e,t,n)}applyPlacementZoneTextBounds(e){return this.personalizationState.applyPlacementZoneTextBounds(e)}applyPlacementZoneLogoBounds(e){return this.personalizationState.applyPlacementZoneLogoBounds(e)}resolveOverlayLabel(e){return this.personalizationState.resolveOverlayLabel(e)}setActiveOverlay(e){if(!e){this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null),this.fabricCanvas&&this.fabricCanvas.getActiveObject()&&(this.fabricCanvas.discardActiveObject(),this.fabricCanvas.requestRenderAll()),this.threeDUI()?.rebuildSVGTexture();return}this.activeOverlayId.set(e.id),this.customizerState.setActiveOverlay(e),this.threeDUI()?.rebuildSVGTexture();let t=this.overlayFabricObjects().get(e.id);this.fabricCanvas&&t&&this.fabricCanvas.getActiveObject()!==t&&(this.fabricCanvas.setActiveObject(t),this.fabricCanvas.requestRenderAll())}findOverlayById(e){return e?this.overlays().find(t=>t.id===e)??null:null}async commitOverlayUpdate(){this.overlays.set([...this.overlays()]),await this.syncOverlaysToSvgDoc(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}onRenderOrderMoveTowardFront(e){let t=this.renderOrderState.moveInStack(e,-1);t&&this.applyRenderStackChange(t)}onRenderOrderMoveTowardBack(e){let t=this.renderOrderState.moveInStack(e,1);t&&this.applyRenderStackChange(t)}onRenderOrderReorder(e){let t=this.renderOrderState.reorderInStack(e);t&&this.applyRenderStackChange(t)}onRenderOrderSelect(e){let[t,n]=this.renderOrderState.parseRenderItemId(e);if(t!=="overlay")return;let r=this.findOverlayById(n);r&&this.setActiveOverlay(r)}async applyRenderStackChange(e){if(this.renderOrderState.enableManualOrdering(),!this.renderOrderState.setStack(e))return;let t=this.renderOrderState.syncOverlayOrderFromStack(this.overlays(),e);t!==this.overlays()&&this.overlays.set(t),await this.syncOverlaysToSvgDoc();let n=this.svgDoc();n&&this.customizerState.markSvgMutated(n),this.patternOverlayState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}synchronizeRenderOrderStack(){let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});this.renderOrderState.synchronizeStack(e,this.svgDoc(),this.renderPathAccordingLayers())}applyRenderOrderStackToSvg(e){return this.renderOrderState.applyStackToSvg(e,this.renderPathAccordingLayers())}buildPlacementNameByKeyMap(){return this.personalizationItems().reduce((e,t)=>(t?.placementKey&&e.set(t.placementKey,t.name??t.placementKey),e),new Map)}resolveFontFamily(e){let t=e.fontFamily,n=t&&t.trim().length>0?t:this.defaultFontFamily(),r=this.fontSourceMap()[n]?n:this.defaultFontFamily();return this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()),r}resolveFontWeight(e){return e.fontWeight??this.defaultFontWeight()}resolveFontStyle(e){return e.fontStyle??this.defaultFontStyle()}resolveLetterSpacing(e){let t=e.letterSpacing;return Number.isFinite(t)?t:this.defaultLetterSpacing()}resolveStrokeColor(e){if(!((e.strokeWidth??0)>0))return null;let n=e.stroke;return n&&n.trim().length>0?n:qf}resolveSecondStrokeColor(e){if(!((e.secondStrokeWidth??0)>0))return null;let n=e.secondStroke;return n&&n.trim().length>0?n:Kf}resolveCurveAmount(e){let t=e.curveAmount;return Number.isFinite(t)?t:this.defaultCurveAmount()}resolveCurveControlY(e){let t=this.resolveCurveAmount(e)/100,n=e.fontSize||this.minFontSize();return t*n}shadowDefaults(){return{blur:this.defaultShadowBlur(),offsetX:this.defaultShadowOffsetX(),offsetY:this.defaultShadowOffsetY(),color:this.defaultShadowColor()}}resolveShadowSettings(e){return this.overlayStyleService.resolveShadowSettings(e,this.shadowDefaults())}getShadowCanvasShift(e,t){let n=this.resolveShadowSettings(e);return this.overlayStyleService.getShadowCanvasShift(n,t?.scale??1)}getTextGlyphPlanSignature(e){return[e.text,this.resolveFontFamily(e),this.resolveFontWeight(e),this.resolveFontStyle(e),e.fontSize,this.resolveLetterSpacing(e)].join("|")}getTextLayoutSignature(e){let t=e.warpEnvelope??null,n=e.warpEnabled&&t?`warp:on:${t.viewBox.minX},${t.viewBox.minY},${t.viewBox.width},${t.viewBox.height}|${t.topPathD}|${t.bottomPathD}`:"warp:off",r=(e.secondStrokeWidth??0)>0?"1":"0";return`${this.getTextGlyphPlanSignature(e)}|curve:${this.resolveCurveAmount(e)}|${n}|ss:${r}`}async computeTextGlyphPlan(e){let t=await this.resolveOpentypeFont(e);return this.textLayoutService.computeTextGlyphPlan(e,{font:t,letterSpacing:this.resolveLetterSpacing(e)})}async getOrBuildTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);if(n)return n;let r=await this.computeTextGlyphPlan(e);return r&&this.customizerState.storeTextGlyphPlan(e.id,t,r),r}getCachedTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);return n||(this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e)),null)}ensureTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e);this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e))}getOrBuildTextLayout(e,t){let n=this.getTextLayoutSignature(e),r=this.customizerState.textLayoutCache().get(e.id);if(r&&r.signature===n)return r.layout.map(s=>R({},s));let o=this.textLayoutService.buildTextLayoutFromPlan(e,t,this.textLayoutCtx(e));return this.customizerState.textLayoutCache.update(s=>{var a=new Map(s);return a.set(e.id,{signature:n,layout:o}),a}),o.map(s=>R({},s))}textLayoutCtx(e){let t=e.warpEnvelope??null;return{shouldApplyWarp:!!(e.warpEnabled&&t),textWarpEnvelope:t,curveControlY:this.resolveCurveControlY(e)}}ingestFontPacks(e){let t=R({},WT),n=new Map;this.builtInFontOptions().forEach(({label:o,value:s},a)=>{n.set(s,{label:o,value:s,position:a})}),e.forEach(o=>{(o.packs??[]).filter(a=>(a.type??"").toLowerCase().includes("font")).forEach(a=>{(a.dataSources??[]).forEach(l=>{if(!l||l.isActive===!1)return;let c=(l.fontFamily??l.name??"").trim();if(!c)return;let d=this.resolveFontSource(l);d&&(t[c]=d,n.has(c)||n.set(c,{label:(l.name??c).trim()||c,value:c,position:l.position??n.size+1}))})})});let r=[...n.values()].sort((o,s)=>o.position-s.position).map(({label:o,value:s})=>({label:o,value:s}));this.fontSourceMap.set(t),this.fontOptions.set(r),this.queueInitialFontFaceLoads(r)}queueInitialFontFaceLoads(e){let t=new Set,n=this.defaultFontFamily().trim();if(n&&t.add(n),this.overlays().filter(Et).forEach(r=>{let o=r.fontFamily?.trim();o&&t.add(o)}),!t.size){let r=e[0]?.value?.trim();r&&t.add(r)}t.forEach(r=>this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()))}fontDeps(){return{isBrowser:this.isBrowser,fontSourceMap:this.fontSourceMap,fontFacesReady:this.fontFacesReady,fontFacePromises:this.fontFacePromises,fontBinaryPromises:this.fontBinaryPromises,fontOutlinePromises:this.fontOutlinePromises,defaultFontFamily:this.defaultFontFamily}}resolveFontSource(e){let t=e?.fontUrl?.trim?.();return t||(e?.fileUrl?.trim?.()?e.fileUrl:null)}resolveOpentypeFont(e){return this.fontAssetService.resolveOpentypeFont(e,this.fontDeps())}normalizeFontSize(e){if(!Number.isFinite(e))return this.minFontSize();let t=Math.round(e);return Math.min(this.maxFontSize(),Math.max(this.minFontSize(),t))}normalizeAngle(e){if(!Number.isFinite(e))return 0;let t=e%360;return t>180?t-=360:t<=-180&&(t+=360),Math.round(t*10)/10}activeOverlay(){let e=this.findOverlayById(this.activeOverlayId());return e&&this.overlayMatchesLayer(e,this.selectedLayerKey())?e:null}onOverlayPositionChange(e){this.setOverlayNormalizedPosition(e.overlay,e.normalizedX,e.normalizedY)}onOverlayRotationChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;t.angle=this.normalizeAngle(e.angle),this.commitOverlayUpdate();let n=this.overlayFabricObjects().get(t.id);n&&(this.syncFabricObjectWithOverlay(t,n),n.canvas?.requestRenderAll())}onOverlayResizeChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;let n=R({},t);if(this.customizerState.clearOverlayRuntimeDimensions(n.id),Et(t)&&"fontSize"in e&&(n=ue(R({},n),{fontSize:this.normalizeFontSize(e.fontSize)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(R({},n)))),Et(t)&&"horizontalScale"in e&&"verticalScale"in e&&(n=ue(R({},n),{horizontalScale:this.normalizeOverlayScale(e.horizontalScale,1),verticalScale:this.normalizeOverlayScale(e.verticalScale,1)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(R({},n)))),oi(t)&&"normalizedWidth"in e&&"normalizedHeight"in e){if(t.lockAspectRatio??!0){let l=Math.max(t.normalizedWidth,.02),c=Math.max(t.normalizedHeight,.02),d=Math.max(e.normalizedWidth,.02)/l,u=Math.max(e.normalizedHeight,.02)/c,f=Math.max((d+u)/2,.02);n=ue(R({},n),{normalizedWidth:Math.min(Math.max(l*f,.02),1),normalizedHeight:Math.min(Math.max(c*f,.02),1)})}else n=ue(R({},n),{normalizedWidth:Math.min(Math.max(e.normalizedWidth,.02),1),normalizedHeight:Math.min(Math.max(e.normalizedHeight,.02),1)});n.placementKey&&(n=this.applyPlacementZoneLogoBounds(R({},n)))}let r=this.overlays(),o=r.findIndex(l=>l.id===n.id);if(o<0)return;let s=[...r];s[o]=n,this.overlays.set(s),this.customizerState.setActiveOverlay(n),this.commitOverlayUpdate();let a=this.overlayFabricObjects().get(n.id);a&&(this.syncFabricObjectWithOverlay(n,a),a.canvas?.requestRenderAll())}setOverlayNormalizedPosition(e,t,n){this.setActiveOverlay(e);let{x:r,y:o}=this.clampNormalizedToPlacementZone(e,t,n);if(Math.abs(r-e.normalizedX)<1e-4&&Math.abs(o-e.normalizedY)<1e-4)return;e.normalizedX=r,e.normalizedY=o,this.commitOverlayUpdate();let s=this.overlayFabricObjects().get(e.id);s&&(this.syncFabricObjectWithOverlay(e,s),s.canvas?.requestRenderAll())}syncOverlaysToSvgDoc(){let e=this.executeOverlaySync();return this.overlaySyncPromise.set(e.catch(t=>{throw console.error(Rt.overlaySyncFailed,t),t})),this.overlaySyncPromise()}async buildSvgText(e,t){if(!this.svgDoc())return;let n=this.svgDoc()?.documentElement;if(!n)return;let r=this.svgRenderService.ensureDefsElement(this.svgDoc());if(!r)return;this.svgRenderService.clearOverlayFilterDefs(r),Array.from(n.querySelectorAll('[data-overlay="true"]')).forEach(l=>{l.parentNode?.removeChild(l)});let o=n.querySelector("#OverlayLayer");o&&!o.childNodes.length&&o.parentNode?.removeChild(o),this.svgDimensions()||this.computeSvgDimensions();let s=n.namespaceURI||Ci,a=this.getOverlayBoundingRect();for(let l of this.overlays()){let c=a.x+l.normalizedX*a.width,d=a.y+l.normalizedY*a.height;if(Et(l)){if(l.text.trim().length===0)continue;try{let u=await this.getOrBuildTextGlyphPlan(l);if(!u||u.glyphs.length===0)continue;let f=this.getOrBuildTextLayout(l,u);if(!f.length)continue;let h=this.resolveStrokeColor(l),p=l.strokeWidth??0,v=this.resolveSecondStrokeColor(l),g=l.secondStrokeWidth??0,m=this.resolveShadowSettings(l);this.svgRenderService.appendTextOverlayAsPath({overlay:l,layout:f,center:{x:c,y:d},overlayContainer:n,defs:r,svgDoc:this.svgDoc(),strokeColor:h,strokeWidth:p,secondStrokeColor:v,secondStrokeWidth:g,shadowSettings:m})}catch(u){console.error(F3(l.id),u)}continue}if(oi(l)){let u=l.normalizedWidth*a.width,f=l.normalizedHeight*a.height;if(u<=0||f<=0)continue;let h=c-u/2,p=d-f/2,v=this.svgDoc().createElementNS(s,"image");v.setAttribute("id",l.id),v.setAttribute("data-overlay","true"),v.setAttribute("x",`${h}`),v.setAttribute("y",`${p}`),v.setAttribute("width",`${u}`),v.setAttribute("height",`${f}`),v.setAttribute("preserveAspectRatio","none"),l.opacity!==void 0&&v.setAttribute("opacity",`${l.opacity}`);let g;e==="compressed"?g=l.imageSrc3d||l.imageSrc:g=l.imageSrc;let m=await this.resolveSvgImageHref(g);v.setAttribute("href",m);let b=l.angle??0;Math.abs(b)>.01&&v.setAttribute("transform",`rotate(${b} ${c} ${d})`),l.imageName&&v.setAttribute("data-source-name",l.imageName),n.appendChild(v)}}this.synchronizeRenderOrderStack(),this.applyRenderOrderStackToSvg(n),await this.backgroundState.syncBackgroundsToSvgWithQuality(e),t.set(new XMLSerializer().serializeToString(this.svgDoc())),this.measurementCloneDirty.set(!0)}async executeOverlaySyncForView(){return this.buildSvgText("compressed",this.svgText)}async executeOverlaySyncForExport(){return this.buildSvgText("original",this.svgTextForExport)}async executeOverlaySync(){return this.executeOverlaySyncForView()}async resolveSvgImageHref(e){let t=e?.trim()??"";if(!t)return"";if(t.startsWith("data:"))return t;let n=this.svgImageHrefCache.get(t);if(n)return n;let r=this.svgImageHrefPending.get(t);if(r)return r;let o=this.convertImageUrlToDataUrl(t).then(s=>{let a=s||t;return this.svgImageHrefCache.set(t,a),a}).finally(()=>{this.svgImageHrefPending.delete(t)});return this.svgImageHrefPending.set(t,o),o}async convertImageUrlToDataUrl(e){try{let t=await fetch(e,{mode:"cors",credentials:"omit"});if(!t.ok)return null;let n=await t.blob();return!n||n.size===0?null:await this.blobToDataUrl(n)}catch{return null}}blobToDataUrl(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let o=r.result;if(typeof o=="string"){t(o);return}n(new Error("Unable to convert blob to data URL."))},r.onerror=()=>n(r.error??new Error("FileReader failed.")),r.readAsDataURL(e)})}computeSvgDimensions(){if(!this.svgDoc()){this.svgDimensions.set(null);return}let e=this.svgDoc()?.documentElement;if(!e){this.svgDimensions.set(null);return}let t=e.getAttribute("viewBox");if(t){let a=t.split(/[\s,]+/).map(l=>Number.parseFloat(l)).filter(l=>Number.isFinite(l));if(a.length===4){let[l,c,d,u]=a;if(d>0&&u>0){this.svgDimensions.set({width:d,height:u}),this.svgViewBox.set({minX:l,minY:c,width:d,height:u});return}}}let n=e.getAttribute("width"),r=e.getAttribute("height"),o=n?Number.parseFloat(n):NaN,s=r?Number.parseFloat(r):NaN;if(Number.isFinite(o)&&Number.isFinite(s)&&o>0&&s>0){this.svgDimensions.set({width:o,height:s}),this.svgViewBox.set({minX:0,minY:0,width:o,height:s});return}this.svgDimensions.set({width:1e3,height:1e3}),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3})}requestTextureRebuild(){if(this.svgText()){if(this.suspendTextureRebuild){this.pendingTextureRebuildWhileSuspended=!0;return}this.textureUpdateScheduled()||(this.textureUpdateScheduled.set(!0),requestAnimationFrame(()=>{this.overlaySyncPromise().catch(()=>{}).finally(()=>{this.textureUpdateScheduled.set(!1),this.svgText()&&this.threeDUI()?.rebuildSVGTexture()})}))}}getBaseElement(){return this.svgDoc()?this.baseElementCache()?this.baseElementCache():this.svgDoc()?.documentElement:null}getBaseBoundingBox(){if(this.baseBBoxCache())return this.baseBBoxCache();let e=this.getBaseElement();if(!e||!(e instanceof SVGGraphicsElement))return null;try{return e.getBBox()}catch{return null}}invalidateBaseCaches(){this.customizerState.invalidateBaseCaches(()=>this.refreshPlacementZonesFromSvg())}disposeFabricCanvases(){this.fabricCanvas&&(this.clearPlacementGuides(this.fabricCanvas),this.fabricGridState.set(z3(this.fabricCanvas,this.fabricGridState())),this.fabricGuideState.set(VT(this.fabricCanvas,this.fabricGuideState())),this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null)),this.placementGuideObjects.set(new Map),this.fabricReady.set(!1),this.overlayFabricObjects.set(new Map),this.pendingLogoLoads.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.twoDSnapRuntime.set(Fi()),this.twoDCursorCanvasPoint.set(null),this.twoDDraggingOverlayId.set(null)}initFabricCanvases(){if(!this.twoDCanvasElement){this.disposeFabricCanvases();return}this.setupFabricCanvasInstance(this.twoDCanvasElement)}setupFabricCanvasInstance(e){this.fabricCanvas&&(this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null));let{canvas:t,events:n,cleanup:r,syncDimensions:o}=q3(e),s=h=>{let v=h.detail?.overlayId;if(!v)return;let g=this.findOverlayById(v);g&&this.setActiveOverlay(g)},a=()=>{this.fabricSelectionClearSuppressionCount>0||(this.activeOverlayId.set(null),this.twoDSnapRuntime.set(Fi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides())},l=h=>{let g=(h.detail?.deltaY??0)<0?1.08:.92;this.updateFabricViewZoom(g)},c=h=>{let v=h.detail?.multiplier;!Number.isFinite(v)||v<=0||this.updateFabricViewZoom(v)},d=()=>{this.render2dView()},u=h=>{let v=h.detail;!v||!Number.isFinite(v.x)||!Number.isFinite(v.y)||this.twoDCursorCanvasPoint.set({x:v.x,y:v.y})};n.addEventListener(ri.OVERLAY_SELECT,s),n.addEventListener(ri.SELECTION_CLEARED,a),n.addEventListener(ri.WHEEL,l),n.addEventListener(ri.PINCH,c),n.addEventListener(ri.POINTER_MOVE,u),n.addEventListener(ri.RESIZE,d);let f=()=>{n.removeEventListener(ri.OVERLAY_SELECT,s),n.removeEventListener(ri.SELECTION_CLEARED,a),n.removeEventListener(ri.WHEEL,l),n.removeEventListener(ri.PINCH,c),n.removeEventListener(ri.POINTER_MOVE,u),n.removeEventListener(ri.RESIZE,d),r()};this.fabricCanvasCleanup=f,this.fabricCanvasSyncDimensions=o,this.fabricCanvas=t,this.customizerState.fabricCanvasState.set(t),t.on("after:render",h=>{if(this.gridEnabled()){let p=h.ctx,v=t.viewportTransform;if(p&&v){let g=this.getTwoDGridStepPx(),m=this.getTwoDGridMajorStepPx();G3(p,t.getWidth(),t.getHeight(),v,g.x,g.y,m.x,m.y)}}}),this.fabricReady.set(!0),this.render2dView()}discardActiveObjectWithoutSelectionClear(e){this.fabricSelectionClearSuppressionCount+=1;try{e.discardActiveObject()}finally{queueMicrotask(()=>{this.fabricSelectionClearSuppressionCount=Math.max(0,this.fabricSelectionClearSuppressionCount-1)})}}resetFabricViewTransform(){this.fabricViewZoom.set(1),this.fabricCanvas&&this.fabricCanvas.setViewportTransform([1,0,0,1,0,0])}updateFabricViewZoom(e){let t=nn.clamp(this.fabricViewZoom()*e,this.minFabricViewZoom(),this.maxFabricViewZoom());Math.abs(t-this.fabricViewZoom())<.001||(this.fabricViewZoom.set(t),this.applyFabricViewZoom()||this.render2dView())}applyFabricViewZoom(){if(!this.fabricCanvas||!this.canvasTransform()||!this.fabricLayoutState())return!1;let{baseScale:e,targetBounds:t,canvasWidth:n,canvasHeight:r,pxPerUnit:o}=this.fabricLayoutState(),s=e*this.fabricViewZoom(),a=t.width*s,l=t.height*s,c=(n-a)/2-t.x*s,d=(r-l)/2-t.y*s,u=s/(o||1);this.canvasTransform.set({scale:s,offsetX:c,offsetY:d});let f=this.fabricCanvas.backgroundImage;return f&&f.set({left:c,top:d,scaleX:u,scaleY:u,originX:"left",originY:"top",selectable:!1,evented:!1}),this.renderOverlaysOnCanvas(this.fabricCanvas),this.fabricCanvas.requestRenderAll(),!0}ngOnDestroy(){this.disposeFabricCanvases(),this.twoDCanvasElement=null,this.measurementService.disposeMeasurementHost(this.measurementHost),this.measurementSvgRoot.set(null),this.customizerState.resetWarpResources()}parseSVGRegions(e){let t=new DOMParser;this.svgDoc.set(t.parseFromString(e,Qo)),this.invalidateBaseCaches(),this.computeSvgDimensions(),this.backgroundState.refreshFromSvg(),this.refreshPlacementZonesFromSvg()}async exportCurrentSvg(){if(!this.svgDoc()){console.warn(Rt.noSvgLoadedToExport);return}this.downloadCurrentSvgSnapshot()}async onSaveDesignClick(){if(!this.svgDoc()){this.toaster.showError(Rt.noSvgDocumentLoaded);return}this.designSavingInProgress.set(!0),this.designSaveMessage.set("Preparing design\u2026");try{await this.syncOverlaysToSvgDoc(),await this.executeOverlaySyncForExport();let t=this.svgTextForExport();if(!t){this.toaster.showError(Rt.failedToSerializeSvg);return}let n=this.buildDesignExportPayload(t),r=JSON.stringify(n,null,2),o=this.fileService.createJsonFile(r,I3),s=this.resolveApiKey(),a=this.resolveProductId();if(!s){this.toaster.showError(Rt.missingApiKey);return}this.designSaveMessage.set("Generating preview images\u2026");let l;try{l=await this.generateSubmissionThumbnails()}catch(u){let f=u instanceof Error?u.message:Rt.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}let c,d=l.map(u=>u.view);try{let u=Date.now();c=l.map(f=>this.dataUrlToPngFile(f.dataUrl,f.view,u))}catch(u){let f=u instanceof Error?u.message:Rt.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}this.designSaveMessage.set("Uploading design\u2026");try{let u=await uc(this.submissionApi.createSubmission(o,s,a??void 0,d,c));if(!u?.isSuccess||!u?.data){let h=u?.errors?.[0]??Rt.designSubmissionFailed;this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:h,errors:u?.errors??void 0}),this.toaster.showError(h);return}let f=u.data;this.sdkRuntimeConfig?.onSubmissionSuccess?.({productId:a??void 0,previews:this.mapSubmissionPreviewUrls(f),submissionNumber:f.submissionNumber,personalizationPlacements:f.personalizationPlacements}),this.toaster.showSuccess(k3(f.submissionNumber),Rt.designSubmittedTitle)}catch{this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:Rt.designSubmissionFailed}),this.toaster.showError(Rt.designSubmissionFailed)}}finally{this.designSavingInProgress.set(!1),this.designSaveMessage.set(null)}}async onResetDesignClick(){let e=this.predesignBaseSvgText()||this.baseSvgText();if(!e){this.toaster.showError("No design loaded to reset to");return}if((await this.dialogService.showDialog({type:"confirmation",title:"Reset Design",message:"Are you sure you want to reset all customizations?",subtitle:"This will remove all applied customizations and revert to the current base design.",buttons:[{label:"Cancel",action:"cancel"},{label:"Reset",action:"confirm",isPrimary:!0,isDestructive:!0}]})).action==="confirm")try{this.loadSVGFromText(e,!0),this.toaster.showSuccess("All customizations have been reset")}catch(n){let r=n instanceof Error?n.message:"Failed to reset design";this.toaster.showError(r)}}onExitClick(){this.sdkRuntimeConfig?.onClose?.()}async generateSubmissionThumbnails(){let e=this.svgDoc();if(!e)throw new Error(Rt.noSvgDesignLoaded);await this.syncOverlaysToSvgDoc();let t=this.svgRenderService.serializeSvg(e);if(!t)throw new Error(Rt.failedSerializeSvgForThumbnail);let n=this.objText();if(!n)throw new Error(Rt.no3dModelForThumbnail);let r=this.mtlText();try{let o={type:"text",value:t},s={type:"text",value:n},a=r?{type:"text",value:r}:void 0,l=await this.threeThumbnailService.generateThumbnails(o,s,a,this.materialFileLink());if(!l.length)throw new Error(Rt.noThumbnailsGenerated);return this.normalizeSubmissionThumbnails(l)}catch(o){throw o instanceof Error?o:new Error(Rt.failedGenerateThumbnails)}}normalizeSubmissionThumbnails(e){let t=new Map,n=new Set(this.submissionThumbnailViews);if(e.forEach(r=>{n.has(r.view)&&(t.has(r.view)||t.set(r.view,r))}),t.size!==this.submissionThumbnailViews.length)throw new Error(Rt.invalidSubmissionThumbnails);return this.submissionThumbnailViews.map(r=>t.get(r))}dataUrlToPngFile(e,t,n=Date.now()){let r=/^data:(image\/png);base64,(.+)$/i.exec(e);if(!r)throw new Error(Rt.failedGenerateSubmissionThumbnails);let o=r[1],s=atob(r[2]),a=new Uint8Array(s.length);for(let l=0;l<s.length;l+=1)a[l]=s.charCodeAt(l);return new File([a],`preview-${t}-${n}.png`,{type:o})}mapSubmissionPreviewUrls(e){return(e.previews??[]).map(t=>({viewType:t.viewType,url:t.url,width:t.width,height:t.height})).filter(t=>!!t.url)}get getSvgTextForFinal(){return this.svgText()?this.sanitizer.bypassSecurityTrustHtml(this.svgText()):null}onTwoDZoomIn(){this.updateFabricViewZoom(1.1)}onTwoDZoomOut(){this.updateFabricViewZoom(.9)}onTwoDReset(){this.resetFabricViewTransform(),this.updateFabricViewZoom(1),this.render2dView()}onGridToggle(){this.gridEnabled.update(e=>!e)}onSnapToggle(){this.snapEnabled.update(e=>!e)}onGuidesToggle(){this.showPlacementGuides.update(e=>!e)}onGridSizeChange(e){let t=Number(e);if(!Number.isFinite(t))return;let n=Math.max(0,Math.min(1,t));this.gridRatio.set(n)}getTwoDGridStepPx(){let e=this.canvasTransform(),t=this.twoDGridStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}getTwoDGridMajorStepPx(){let e=this.canvasTransform(),t=this.twoDGridMajorStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}onTwoDGridSizeChange(e){let t=Number(e);Number.isFinite(t)&&this.twoDGridSizeInches.set(Math.max(.25,Math.min(4,t)))}setActiveStep(e){this.activeStepId.set(e)}downloadCurrentSvgSnapshot(){let e=this.serializeCurrentSvgSnapshot();return e?(this.svgRenderService.downloadSvg(e,`${P3}-${Date.now()}.svg`),e):null}serializeCurrentSvgSnapshot(){let e=this.svgRenderService.serializeSvg(this.svgDoc());return e||null}buildDesignExportPayload(e){let t=this.svgDoc();if(!t)return{};let n=this.overlays().reduce((o,s)=>{let a=this.personalizationState.getSelectedEffectIdForOverlay(s.id);return a&&o.set(s.id,a),o},new Map),r=this.collectOverlayDimensionsPxById(this.overlays());return this.designExportService.buildDesignExportPayload({selectedPredesignId:this.selectedPredesignId(),svgDoc:t,svgString:e,overlays:this.overlays(),personalizationItems:this.personalizationItems(),placementZones:this.placementZones(),placementNameByKey:this.buildPlacementNameByKeyMap(),backgroundState:this.backgroundState.state(),backgroundImageTemplates:this.backgroundImageTemplates(),patternState:this.patternState.state(),patternOverlays:this.patternOverlayState.state().overlays,renderOrder:this.renderOrderState.stack(),svgDimensions:this.svgDimensions(),svgViewBox:this.svgViewBox(),bounds:this.getOverlayBoundingRect(),overlayDimensionsPxById:r,selectedEffectIdByOverlay:n,textStyleResolvers:{defaultFontFamily:this.defaultFontFamily(),defaultFontWeight:this.defaultFontWeight(),defaultFontStyle:this.defaultFontStyle(),defaultLetterSpacing:this.defaultLetterSpacing(),defaultStrokeColor:qf,defaultSecondStrokeColor:Kf,defaultCurveAmount:this.defaultCurveAmount(),defaultLineHeight:this.defaultLineHeight(),defaultShadowBlur:this.defaultShadowBlur(),defaultShadowOffsetX:this.defaultShadowOffsetX(),defaultShadowOffsetY:this.defaultShadowOffsetY(),defaultShadowColor:this.defaultShadowColor()}})}collectOverlayDimensionsPxById(e){let t=new Map;return e.forEach(n=>{let r=this.personalizationState.getOverlayDimensionsPx(n);if(r.width>0&&r.height>0){t.set(n.id,{width:r.width,height:r.height});return}let o=this.customizerState.overlayRuntimeDimensionsPx().get(n.id);o&&o.width>0&&o.height>0&&t.set(n.id,{width:o.width,height:o.height})}),t}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-customizer-ui"]],viewQuery:function(t,n){t&1&&nl(n.threeDUI,Coe,5),t&2&&Oc()},hostBindings:function(t,n){t&1&&ie("click",function(){return n.closeShortcuts()},PC)("resize",function(){return n.onResize()},IC)},inputs:{apiKey:[1,"apiKey"],productId:[1,"productId"],submissionNumber:[1,"submissionNumber"],predesignId:[1,"predesignId"]},decls:22,vars:8,consts:[["threeDUI",""],[1,"header"],[1,"flex","items-center","justify-between"],[1,"brand"],["alt","Distributor logo",1,"brand-logo-img",3,"src"],[1,"header-right"],["type","button","title","Exit and close the customizer",1,"btn-exit",3,"click","disabled"],["type","button","title","Reset all customizations to the current predesign base",1,"btn-reset",3,"click","disabled"],["type","button",1,"btn-save",3,"click","disabled"],[1,"header-bottom"],[3,"valueChange","value"],["value","3d"],[1,"manifest-loader-overlay"],[1,"save-loader-overlay"],[1,"flex","editor-main-box",3,"mobile-panel-hidden","mobile-canvas-hidden"],["value","2d"],["value","both"],[3,"message"],["role","alert",1,"manifest-error-card"],[1,"manifest-error-title"],[1,"manifest-error-message"],["type","button",1,"manifest-retry-btn"],["type","button",1,"manifest-retry-btn",3,"click"],[3,"message","subtitle"],[1,"flex","editor-main-box"],[1,"main-canvas-area","flex-1"],[1,"view-section"],[3,"layerToggle","canvasReady","canvasDetached","zoomIn","zoomOut","resetView","onUndo","onRedo","svgText","isActive","layers","selectedLayerKey","isShowAllLayersOption","gridEnabled","snapEnabled","showPlacementGuides","gridSize"],[1,"canvas-area","canvas-area-single"],[1,"jersey-model"],[1,"w-full",3,"svgText","isActive","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap"],["role","status","aria-live","polite",1,"canvas-manifest-loader"],[1,"right-panel-shell"],[1,"right-panel"],[1,"text-sm","text-surface-500"],[1,""],[1,"icon-nav-shell"],[1,"panel-icon-nav"],[1,"mobile-actions-bar"],["type","button",1,"mobile-panel-toggle"],["type","button",1,"mobile-canvas-toggle"],[1,"expanded-nav-menu"],[1,"icon-nav-list"],[1,"icon-btn",3,"active"],[1,"icon-btn","toggle-more-btn"],[1,"w-full",3,"svgTextChange","svgDimensionsChange","svgViewBoxChange","showPlacementGuidesChange","placementZonesChange","overlaysChange","activeOverlayIdChange","activeOverlayChange","overlayPositionChange","overlayRotationChange","overlayResizeChange","onUndo","onRedo","svgText","isActive","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap",3,"click"],["title","Keyboard Shortcuts",1,"shortcuts-fab",3,"click"],[1,"ri-keyboard-line"],[1,"shortcuts-popover"],[1,"shortcuts-popover-header"],[1,"canvas-manifest-loader-subtitle"],[1,"panel-content"],[1,"panel-header"],[1,"panel-scroll-body"],[3,"predesigns","selectedId"],[3,"items"],[3,"items","useAccordion"],[3,"templates"],[3,"items","activeOverlayId"],[3,"gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[3,"designSelected","predesigns","selectedId"],[3,"moveTowardFront","moveTowardBack","reorder","selectItem","items","activeOverlayId"],[3,"onGridToggle","onSnapToggle","onGuidesToggle","onTwoDGridSizeChange","gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[1,"text-gray-900"],[1,"child-accordion",3,"value"],[3,"value"],[1,"flex","items-center","gap-2"],[1,"child-panel"],["type","button",1,"mobile-panel-toggle",3,"click"],[1,"ri-arrow-down-s-line"],[1,"ri-arrow-up-s-line"],["type","button",1,"mobile-canvas-toggle",3,"click"],[1,"ri-fullscreen-line"],[1,"icon-btn","expanded-btn",3,"active"],[1,"icon-btn","expanded-btn",3,"click"],[3,"class"],[1,"w-full"],[1,"icon-btn",3,"click"],[1,"icon-btn","toggle-more-btn",3,"click"],[1,"ri-close-line"],[1,"ri-more-fill"]],template:function(t,n){t&1&&(w(0,"header",1)(1,"div",2)(2,"div",3),pe(3,woe,1,1,"img",4),T(),w(4,"div",5)(5,"button",6),ie("click",function(){return n.onExitClick()}),k(6," Exit "),T(),w(7,"button",7),ie("click",function(){return n.onResetDesignClick()}),k(8," Reset "),T(),w(9,"button",8),ie("click",function(){return n.onSaveDesignClick()}),k(10),T()()(),w(11,"div",9)(12,"app-ui-tabs",10),tp("valueChange",function(o){return bs(n.editorMode,o)||(n.editorMode=o),o}),w(13,"app-ui-tablist")(14,"app-ui-tab",11),k(15,"3D Editor"),T(),pe(16,Eoe,4,0),T()()()(),pe(17,Moe,2,1,"div",12)(18,Doe,7,2,"div",12)(19,Ioe,2,2,"div",13)(20,gse,27,32,"div",14),Y(21,"app-generic-dialog")),t&2&&(P(3),me(n.distributorHeaderLogoUrl()?3:-1),P(2),ne("disabled",n.designSavingInProgress()),P(2),ne("disabled",n.designSavingInProgress()),P(2),ne("disabled",n.designSavingInProgress()),P(),zt(" ",n.designSavingInProgress()?"Saving\u2026":"Save Design"," "),P(2),Rc("value",n.editorMode),P(4),me(n.isShowWholeLayersOption()||n.layers().length>0?16:-1),P(),me(n.showBlockingManifestLoader()?17:n.showBlockingManifestError()?18:n.designSavingInProgress()?19:20))},dependencies:[qt,fo,kx,Rx,Jl,i_,r_,o_,a_,l_,c_,u_,lh,C_,S_,Ni,bi,gr,mr,h_,p_,m_,k_,d_],styles:[`@layer properties;@layer theme,utilities;@layer theme{:root,:host{--color-gray-300: oklch(87.2% .01 258.338);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-900: oklch(21% .034 264.665);--color-white: #fff;--spacing: .25rem;--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--font-weight-medium: 500;--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.visible{visibility:visible}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.container{width:100%}@media(width>=40rem){.container{max-width:40rem}}@media(width>=48rem){.container{max-width:48rem}}@media(width>=64rem){.container{max-width:64rem}}@media(width>=80rem){.container{max-width:80rem}}@media(width>=96rem){.container{max-width:96rem}}.mt-3{margin-top:calc(var(--spacing) * 3)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing) * 2)}.h-full{height:100%}.w-2{width:calc(var(--spacing) * 2)}.w-full{width:100%}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.resize{resize:both}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:calc(var(--spacing) * 2)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:calc(infinity * 1px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-300{border-color:var(--color-gray-300)}.bg-white{background-color:var(--color-white)}.object-center{object-position:center}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-1{padding-block:calc(var(--spacing) * 1)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.shadow{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.ease-in-out{--tw-ease: var(--ease-in-out);transition-timing-function:var(--ease-in-out)}}@font-face{font-family:remixicon;src:url("./media/remixicon.eot?t=1769685282643");src:url("./media/remixicon.eot?t=1769685282643#iefix") format("embedded-opentype"),url("./media/remixicon.woff2?t=1769685282643") format("woff2"),url("./media/remixicon.woff?t=1769685282643") format("woff"),url("./media/remixicon.ttf?t=1769685282643") format("truetype"),url("./media/remixicon.svg?t=1769685282643#remixicon") format("svg");font-display:swap}[class^=ri-],[class*=" ri-"]{font-family:remixicon!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-xl{font-size:1.5em;line-height:.6666em;vertical-align:-.075em}.ri-xxs{font-size:.5em}.ri-xs{font-size:.75em}.ri-sm{font-size:.875em}.ri-1x{font-size:1em}.ri-2x{font-size:2em}.ri-3x{font-size:3em}.ri-4x{font-size:4em}.ri-5x{font-size:5em}.ri-6x{font-size:6em}.ri-7x{font-size:7em}.ri-8x{font-size:8em}.ri-9x{font-size:9em}.ri-10x{font-size:10em}.ri-fw{text-align:center;width:1.25em}.ri-24-hours-fill:before{content:"\\ea01"}.ri-24-hours-line:before{content:"\\ea02"}.ri-4k-fill:before{content:"\\ea03"}.ri-4k-line:before{content:"\\ea04"}.ri-a-b:before{content:"\\ea05"}.ri-account-box-fill:before{content:"\\ea06"}.ri-account-box-line:before{content:"\\ea07"}.ri-account-circle-fill:before{content:"\\ea08"}.ri-account-circle-line:before{content:"\\ea09"}.ri-account-pin-box-fill:before{content:"\\ea0a"}.ri-account-pin-box-line:before{content:"\\ea0b"}.ri-account-pin-circle-fill:before{content:"\\ea0c"}.ri-account-pin-circle-line:before{content:"\\ea0d"}.ri-add-box-fill:before{content:"\\ea0e"}.ri-add-box-line:before{content:"\\ea0f"}.ri-add-circle-fill:before{content:"\\ea10"}.ri-add-circle-line:before{content:"\\ea11"}.ri-add-fill:before{content:"\\ea12"}.ri-add-line:before{content:"\\ea13"}.ri-admin-fill:before{content:"\\ea14"}.ri-admin-line:before{content:"\\ea15"}.ri-advertisement-fill:before{content:"\\ea16"}.ri-advertisement-line:before{content:"\\ea17"}.ri-airplay-fill:before{content:"\\ea18"}.ri-airplay-line:before{content:"\\ea19"}.ri-alarm-fill:before{content:"\\ea1a"}.ri-alarm-line:before{content:"\\ea1b"}.ri-alarm-warning-fill:before{content:"\\ea1c"}.ri-alarm-warning-line:before{content:"\\ea1d"}.ri-album-fill:before{content:"\\ea1e"}.ri-album-line:before{content:"\\ea1f"}.ri-alert-fill:before{content:"\\ea20"}.ri-alert-line:before{content:"\\ea21"}.ri-aliens-fill:before{content:"\\ea22"}.ri-aliens-line:before{content:"\\ea23"}.ri-align-bottom:before{content:"\\ea24"}.ri-align-center:before{content:"\\ea25"}.ri-align-justify:before{content:"\\ea26"}.ri-align-left:before{content:"\\ea27"}.ri-align-right:before{content:"\\ea28"}.ri-align-top:before{content:"\\ea29"}.ri-align-vertically:before{content:"\\ea2a"}.ri-alipay-fill:before{content:"\\ea2b"}.ri-alipay-line:before{content:"\\ea2c"}.ri-amazon-fill:before{content:"\\ea2d"}.ri-amazon-line:before{content:"\\ea2e"}.ri-anchor-fill:before{content:"\\ea2f"}.ri-anchor-line:before{content:"\\ea30"}.ri-ancient-gate-fill:before{content:"\\ea31"}.ri-ancient-gate-line:before{content:"\\ea32"}.ri-ancient-pavilion-fill:before{content:"\\ea33"}.ri-ancient-pavilion-line:before{content:"\\ea34"}.ri-android-fill:before{content:"\\ea35"}.ri-android-line:before{content:"\\ea36"}.ri-angularjs-fill:before{content:"\\ea37"}.ri-angularjs-line:before{content:"\\ea38"}.ri-anticlockwise-2-fill:before{content:"\\ea39"}.ri-anticlockwise-2-line:before{content:"\\ea3a"}.ri-anticlockwise-fill:before{content:"\\ea3b"}.ri-anticlockwise-line:before{content:"\\ea3c"}.ri-app-store-fill:before{content:"\\ea3d"}.ri-app-store-line:before{content:"\\ea3e"}.ri-apple-fill:before{content:"\\ea3f"}.ri-apple-line:before{content:"\\ea40"}.ri-apps-2-fill:before{content:"\\ea41"}.ri-apps-2-line:before{content:"\\ea42"}.ri-apps-fill:before{content:"\\ea43"}.ri-apps-line:before{content:"\\ea44"}.ri-archive-drawer-fill:before{content:"\\ea45"}.ri-archive-drawer-line:before{content:"\\ea46"}.ri-archive-fill:before{content:"\\ea47"}.ri-archive-line:before{content:"\\ea48"}.ri-arrow-down-circle-fill:before{content:"\\ea49"}.ri-arrow-down-circle-line:before{content:"\\ea4a"}.ri-arrow-down-fill:before{content:"\\ea4b"}.ri-arrow-down-line:before{content:"\\ea4c"}.ri-arrow-down-s-fill:before{content:"\\ea4d"}.ri-arrow-down-s-line:before{content:"\\ea4e"}.ri-arrow-drop-down-fill:before{content:"\\ea4f"}.ri-arrow-drop-down-line:before{content:"\\ea50"}.ri-arrow-drop-left-fill:before{content:"\\ea51"}.ri-arrow-drop-left-line:before{content:"\\ea52"}.ri-arrow-drop-right-fill:before{content:"\\ea53"}.ri-arrow-drop-right-line:before{content:"\\ea54"}.ri-arrow-drop-up-fill:before{content:"\\ea55"}.ri-arrow-drop-up-line:before{content:"\\ea56"}.ri-arrow-go-back-fill:before{content:"\\ea57"}.ri-arrow-go-back-line:before{content:"\\ea58"}.ri-arrow-go-forward-fill:before{content:"\\ea59"}.ri-arrow-go-forward-line:before{content:"\\ea5a"}.ri-arrow-left-circle-fill:before{content:"\\ea5b"}.ri-arrow-left-circle-line:before{content:"\\ea5c"}.ri-arrow-left-down-fill:before{content:"\\ea5d"}.ri-arrow-left-down-line:before{content:"\\ea5e"}.ri-arrow-left-fill:before{content:"\\ea5f"}.ri-arrow-left-line:before{content:"\\ea60"}.ri-arrow-left-right-fill:before{content:"\\ea61"}.ri-arrow-left-right-line:before{content:"\\ea62"}.ri-arrow-left-s-fill:before{content:"\\ea63"}.ri-arrow-left-s-line:before{content:"\\ea64"}.ri-arrow-left-up-fill:before{content:"\\ea65"}.ri-arrow-left-up-line:before{content:"\\ea66"}.ri-arrow-right-circle-fill:before{content:"\\ea67"}.ri-arrow-right-circle-line:before{content:"\\ea68"}.ri-arrow-right-down-fill:before{content:"\\ea69"}.ri-arrow-right-down-line:before{content:"\\ea6a"}.ri-arrow-right-fill:before{content:"\\ea6b"}.ri-arrow-right-line:before{content:"\\ea6c"}.ri-arrow-right-s-fill:before{content:"\\ea6d"}.ri-arrow-right-s-line:before{content:"\\ea6e"}.ri-arrow-right-up-fill:before{content:"\\ea6f"}.ri-arrow-right-up-line:before{content:"\\ea70"}.ri-arrow-up-circle-fill:before{content:"\\ea71"}.ri-arrow-up-circle-line:before{content:"\\ea72"}.ri-arrow-up-down-fill:before{content:"\\ea73"}.ri-arrow-up-down-line:before{content:"\\ea74"}.ri-arrow-up-fill:before{content:"\\ea75"}.ri-arrow-up-line:before{content:"\\ea76"}.ri-arrow-up-s-fill:before{content:"\\ea77"}.ri-arrow-up-s-line:before{content:"\\ea78"}.ri-artboard-2-fill:before{content:"\\ea79"}.ri-artboard-2-line:before{content:"\\ea7a"}.ri-artboard-fill:before{content:"\\ea7b"}.ri-artboard-line:before{content:"\\ea7c"}.ri-article-fill:before{content:"\\ea7d"}.ri-article-line:before{content:"\\ea7e"}.ri-aspect-ratio-fill:before{content:"\\ea7f"}.ri-aspect-ratio-line:before{content:"\\ea80"}.ri-asterisk:before{content:"\\ea81"}.ri-at-fill:before{content:"\\ea82"}.ri-at-line:before{content:"\\ea83"}.ri-attachment-2:before{content:"\\ea84"}.ri-attachment-fill:before{content:"\\ea85"}.ri-attachment-line:before{content:"\\ea86"}.ri-auction-fill:before{content:"\\ea87"}.ri-auction-line:before{content:"\\ea88"}.ri-award-fill:before{content:"\\ea89"}.ri-award-line:before{content:"\\ea8a"}.ri-baidu-fill:before{content:"\\ea8b"}.ri-baidu-line:before{content:"\\ea8c"}.ri-ball-pen-fill:before{content:"\\ea8d"}.ri-ball-pen-line:before{content:"\\ea8e"}.ri-bank-card-2-fill:before{content:"\\ea8f"}.ri-bank-card-2-line:before{content:"\\ea90"}.ri-bank-card-fill:before{content:"\\ea91"}.ri-bank-card-line:before{content:"\\ea92"}.ri-bank-fill:before{content:"\\ea93"}.ri-bank-line:before{content:"\\ea94"}.ri-bar-chart-2-fill:before{content:"\\ea95"}.ri-bar-chart-2-line:before{content:"\\ea96"}.ri-bar-chart-box-fill:before{content:"\\ea97"}.ri-bar-chart-box-line:before{content:"\\ea98"}.ri-bar-chart-fill:before{content:"\\ea99"}.ri-bar-chart-grouped-fill:before{content:"\\ea9a"}.ri-bar-chart-grouped-line:before{content:"\\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\\ea9d"}.ri-bar-chart-line:before{content:"\\ea9e"}.ri-barcode-box-fill:before{content:"\\ea9f"}.ri-barcode-box-line:before{content:"\\eaa0"}.ri-barcode-fill:before{content:"\\eaa1"}.ri-barcode-line:before{content:"\\eaa2"}.ri-barricade-fill:before{content:"\\eaa3"}.ri-barricade-line:before{content:"\\eaa4"}.ri-base-station-fill:before{content:"\\eaa5"}.ri-base-station-line:before{content:"\\eaa6"}.ri-basketball-fill:before{content:"\\eaa7"}.ri-basketball-line:before{content:"\\eaa8"}.ri-battery-2-charge-fill:before{content:"\\eaa9"}.ri-battery-2-charge-line:before{content:"\\eaaa"}.ri-battery-2-fill:before{content:"\\eaab"}.ri-battery-2-line:before{content:"\\eaac"}.ri-battery-charge-fill:before{content:"\\eaad"}.ri-battery-charge-line:before{content:"\\eaae"}.ri-battery-fill:before{content:"\\eaaf"}.ri-battery-line:before{content:"\\eab0"}.ri-battery-low-fill:before{content:"\\eab1"}.ri-battery-low-line:before{content:"\\eab2"}.ri-battery-saver-fill:before{content:"\\eab3"}.ri-battery-saver-line:before{content:"\\eab4"}.ri-battery-share-fill:before{content:"\\eab5"}.ri-battery-share-line:before{content:"\\eab6"}.ri-bear-smile-fill:before{content:"\\eab7"}.ri-bear-smile-line:before{content:"\\eab8"}.ri-behance-fill:before{content:"\\eab9"}.ri-behance-line:before{content:"\\eaba"}.ri-bell-fill:before{content:"\\eabb"}.ri-bell-line:before{content:"\\eabc"}.ri-bike-fill:before{content:"\\eabd"}.ri-bike-line:before{content:"\\eabe"}.ri-bilibili-fill:before{content:"\\eabf"}.ri-bilibili-line:before{content:"\\eac0"}.ri-bill-fill:before{content:"\\eac1"}.ri-bill-line:before{content:"\\eac2"}.ri-billiards-fill:before{content:"\\eac3"}.ri-billiards-line:before{content:"\\eac4"}.ri-bit-coin-fill:before{content:"\\eac5"}.ri-bit-coin-line:before{content:"\\eac6"}.ri-blaze-fill:before{content:"\\eac7"}.ri-blaze-line:before{content:"\\eac8"}.ri-bluetooth-connect-fill:before{content:"\\eac9"}.ri-bluetooth-connect-line:before{content:"\\eaca"}.ri-bluetooth-fill:before{content:"\\eacb"}.ri-bluetooth-line:before{content:"\\eacc"}.ri-blur-off-fill:before{content:"\\eacd"}.ri-blur-off-line:before{content:"\\eace"}.ri-body-scan-fill:before{content:"\\eacf"}.ri-body-scan-line:before{content:"\\ead0"}.ri-bold:before{content:"\\ead1"}.ri-book-2-fill:before{content:"\\ead2"}.ri-book-2-line:before{content:"\\ead3"}.ri-book-3-fill:before{content:"\\ead4"}.ri-book-3-line:before{content:"\\ead5"}.ri-book-fill:before{content:"\\ead6"}.ri-book-line:before{content:"\\ead7"}.ri-book-marked-fill:before{content:"\\ead8"}.ri-book-marked-line:before{content:"\\ead9"}.ri-book-open-fill:before{content:"\\eada"}.ri-book-open-line:before{content:"\\eadb"}.ri-book-read-fill:before{content:"\\eadc"}.ri-book-read-line:before{content:"\\eadd"}.ri-booklet-fill:before{content:"\\eade"}.ri-booklet-line:before{content:"\\eadf"}.ri-bookmark-2-fill:before{content:"\\eae0"}.ri-bookmark-2-line:before{content:"\\eae1"}.ri-bookmark-3-fill:before{content:"\\eae2"}.ri-bookmark-3-line:before{content:"\\eae3"}.ri-bookmark-fill:before{content:"\\eae4"}.ri-bookmark-line:before{content:"\\eae5"}.ri-boxing-fill:before{content:"\\eae6"}.ri-boxing-line:before{content:"\\eae7"}.ri-braces-fill:before{content:"\\eae8"}.ri-braces-line:before{content:"\\eae9"}.ri-brackets-fill:before{content:"\\eaea"}.ri-brackets-line:before{content:"\\eaeb"}.ri-briefcase-2-fill:before{content:"\\eaec"}.ri-briefcase-2-line:before{content:"\\eaed"}.ri-briefcase-3-fill:before{content:"\\eaee"}.ri-briefcase-3-line:before{content:"\\eaef"}.ri-briefcase-4-fill:before{content:"\\eaf0"}.ri-briefcase-4-line:before{content:"\\eaf1"}.ri-briefcase-5-fill:before{content:"\\eaf2"}.ri-briefcase-5-line:before{content:"\\eaf3"}.ri-briefcase-fill:before{content:"\\eaf4"}.ri-briefcase-line:before{content:"\\eaf5"}.ri-bring-forward:before{content:"\\eaf6"}.ri-bring-to-front:before{content:"\\eaf7"}.ri-broadcast-fill:before{content:"\\eaf8"}.ri-broadcast-line:before{content:"\\eaf9"}.ri-brush-2-fill:before{content:"\\eafa"}.ri-brush-2-line:before{content:"\\eafb"}.ri-brush-3-fill:before{content:"\\eafc"}.ri-brush-3-line:before{content:"\\eafd"}.ri-brush-4-fill:before{content:"\\eafe"}.ri-brush-4-line:before{content:"\\eaff"}.ri-brush-fill:before{content:"\\eb00"}.ri-brush-line:before{content:"\\eb01"}.ri-bubble-chart-fill:before{content:"\\eb02"}.ri-bubble-chart-line:before{content:"\\eb03"}.ri-bug-2-fill:before{content:"\\eb04"}.ri-bug-2-line:before{content:"\\eb05"}.ri-bug-fill:before{content:"\\eb06"}.ri-bug-line:before{content:"\\eb07"}.ri-building-2-fill:before{content:"\\eb08"}.ri-building-2-line:before{content:"\\eb09"}.ri-building-3-fill:before{content:"\\eb0a"}.ri-building-3-line:before{content:"\\eb0b"}.ri-building-4-fill:before{content:"\\eb0c"}.ri-building-4-line:before{content:"\\eb0d"}.ri-building-fill:before{content:"\\eb0e"}.ri-building-line:before{content:"\\eb0f"}.ri-bus-2-fill:before{content:"\\eb10"}.ri-bus-2-line:before{content:"\\eb11"}.ri-bus-fill:before{content:"\\eb12"}.ri-bus-line:before{content:"\\eb13"}.ri-bus-wifi-fill:before{content:"\\eb14"}.ri-bus-wifi-line:before{content:"\\eb15"}.ri-cactus-fill:before{content:"\\eb16"}.ri-cactus-line:before{content:"\\eb17"}.ri-cake-2-fill:before{content:"\\eb18"}.ri-cake-2-line:before{content:"\\eb19"}.ri-cake-3-fill:before{content:"\\eb1a"}.ri-cake-3-line:before{content:"\\eb1b"}.ri-cake-fill:before{content:"\\eb1c"}.ri-cake-line:before{content:"\\eb1d"}.ri-calculator-fill:before{content:"\\eb1e"}.ri-calculator-line:before{content:"\\eb1f"}.ri-calendar-2-fill:before{content:"\\eb20"}.ri-calendar-2-line:before{content:"\\eb21"}.ri-calendar-check-fill:before{content:"\\eb22"}.ri-calendar-check-line:before{content:"\\eb23"}.ri-calendar-event-fill:before{content:"\\eb24"}.ri-calendar-event-line:before{content:"\\eb25"}.ri-calendar-fill:before{content:"\\eb26"}.ri-calendar-line:before{content:"\\eb27"}.ri-calendar-todo-fill:before{content:"\\eb28"}.ri-calendar-todo-line:before{content:"\\eb29"}.ri-camera-2-fill:before{content:"\\eb2a"}.ri-camera-2-line:before{content:"\\eb2b"}.ri-camera-3-fill:before{content:"\\eb2c"}.ri-camera-3-line:before{content:"\\eb2d"}.ri-camera-fill:before{content:"\\eb2e"}.ri-camera-lens-fill:before{content:"\\eb2f"}.ri-camera-lens-line:before{content:"\\eb30"}.ri-camera-line:before{content:"\\eb31"}.ri-camera-off-fill:before{content:"\\eb32"}.ri-camera-off-line:before{content:"\\eb33"}.ri-camera-switch-fill:before{content:"\\eb34"}.ri-camera-switch-line:before{content:"\\eb35"}.ri-capsule-fill:before{content:"\\eb36"}.ri-capsule-line:before{content:"\\eb37"}.ri-car-fill:before{content:"\\eb38"}.ri-car-line:before{content:"\\eb39"}.ri-car-washing-fill:before{content:"\\eb3a"}.ri-car-washing-line:before{content:"\\eb3b"}.ri-caravan-fill:before{content:"\\eb3c"}.ri-caravan-line:before{content:"\\eb3d"}.ri-cast-fill:before{content:"\\eb3e"}.ri-cast-line:before{content:"\\eb3f"}.ri-cellphone-fill:before{content:"\\eb40"}.ri-cellphone-line:before{content:"\\eb41"}.ri-celsius-fill:before{content:"\\eb42"}.ri-celsius-line:before{content:"\\eb43"}.ri-centos-fill:before{content:"\\eb44"}.ri-centos-line:before{content:"\\eb45"}.ri-character-recognition-fill:before{content:"\\eb46"}.ri-character-recognition-line:before{content:"\\eb47"}.ri-charging-pile-2-fill:before{content:"\\eb48"}.ri-charging-pile-2-line:before{content:"\\eb49"}.ri-charging-pile-fill:before{content:"\\eb4a"}.ri-charging-pile-line:before{content:"\\eb4b"}.ri-chat-1-fill:before{content:"\\eb4c"}.ri-chat-1-line:before{content:"\\eb4d"}.ri-chat-2-fill:before{content:"\\eb4e"}.ri-chat-2-line:before{content:"\\eb4f"}.ri-chat-3-fill:before{content:"\\eb50"}.ri-chat-3-line:before{content:"\\eb51"}.ri-chat-4-fill:before{content:"\\eb52"}.ri-chat-4-line:before{content:"\\eb53"}.ri-chat-check-fill:before{content:"\\eb54"}.ri-chat-check-line:before{content:"\\eb55"}.ri-chat-delete-fill:before{content:"\\eb56"}.ri-chat-delete-line:before{content:"\\eb57"}.ri-chat-download-fill:before{content:"\\eb58"}.ri-chat-download-line:before{content:"\\eb59"}.ri-chat-follow-up-fill:before{content:"\\eb5a"}.ri-chat-follow-up-line:before{content:"\\eb5b"}.ri-chat-forward-fill:before{content:"\\eb5c"}.ri-chat-forward-line:before{content:"\\eb5d"}.ri-chat-heart-fill:before{content:"\\eb5e"}.ri-chat-heart-line:before{content:"\\eb5f"}.ri-chat-history-fill:before{content:"\\eb60"}.ri-chat-history-line:before{content:"\\eb61"}.ri-chat-new-fill:before{content:"\\eb62"}.ri-chat-new-line:before{content:"\\eb63"}.ri-chat-off-fill:before{content:"\\eb64"}.ri-chat-off-line:before{content:"\\eb65"}.ri-chat-poll-fill:before{content:"\\eb66"}.ri-chat-poll-line:before{content:"\\eb67"}.ri-chat-private-fill:before{content:"\\eb68"}.ri-chat-private-line:before{content:"\\eb69"}.ri-chat-quote-fill:before{content:"\\eb6a"}.ri-chat-quote-line:before{content:"\\eb6b"}.ri-chat-settings-fill:before{content:"\\eb6c"}.ri-chat-settings-line:before{content:"\\eb6d"}.ri-chat-smile-2-fill:before{content:"\\eb6e"}.ri-chat-smile-2-line:before{content:"\\eb6f"}.ri-chat-smile-3-fill:before{content:"\\eb70"}.ri-chat-smile-3-line:before{content:"\\eb71"}.ri-chat-smile-fill:before{content:"\\eb72"}.ri-chat-smile-line:before{content:"\\eb73"}.ri-chat-upload-fill:before{content:"\\eb74"}.ri-chat-upload-line:before{content:"\\eb75"}.ri-chat-voice-fill:before{content:"\\eb76"}.ri-chat-voice-line:before{content:"\\eb77"}.ri-check-double-fill:before{content:"\\eb78"}.ri-check-double-line:before{content:"\\eb79"}.ri-check-fill:before{content:"\\eb7a"}.ri-check-line:before{content:"\\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\\eb7d"}.ri-checkbox-blank-fill:before{content:"\\eb7e"}.ri-checkbox-blank-line:before{content:"\\eb7f"}.ri-checkbox-circle-fill:before{content:"\\eb80"}.ri-checkbox-circle-line:before{content:"\\eb81"}.ri-checkbox-fill:before{content:"\\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\\eb83"}.ri-checkbox-indeterminate-line:before{content:"\\eb84"}.ri-checkbox-line:before{content:"\\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\\eb87"}.ri-checkbox-multiple-fill:before{content:"\\eb88"}.ri-checkbox-multiple-line:before{content:"\\eb89"}.ri-china-railway-fill:before{content:"\\eb8a"}.ri-china-railway-line:before{content:"\\eb8b"}.ri-chrome-fill:before{content:"\\eb8c"}.ri-chrome-line:before{content:"\\eb8d"}.ri-clapperboard-fill:before{content:"\\eb8e"}.ri-clapperboard-line:before{content:"\\eb8f"}.ri-clipboard-fill:before{content:"\\eb90"}.ri-clipboard-line:before{content:"\\eb91"}.ri-clockwise-2-fill:before{content:"\\eb92"}.ri-clockwise-2-line:before{content:"\\eb93"}.ri-clockwise-fill:before{content:"\\eb94"}.ri-clockwise-line:before{content:"\\eb95"}.ri-close-circle-fill:before{content:"\\eb96"}.ri-close-circle-line:before{content:"\\eb97"}.ri-close-fill:before{content:"\\eb98"}.ri-close-line:before{content:"\\eb99"}.ri-closed-captioning-fill:before{content:"\\eb9a"}.ri-closed-captioning-line:before{content:"\\eb9b"}.ri-cloud-fill:before{content:"\\eb9c"}.ri-cloud-line:before{content:"\\eb9d"}.ri-cloud-off-fill:before{content:"\\eb9e"}.ri-cloud-off-line:before{content:"\\eb9f"}.ri-cloud-windy-fill:before{content:"\\eba0"}.ri-cloud-windy-line:before{content:"\\eba1"}.ri-cloudy-2-fill:before{content:"\\eba2"}.ri-cloudy-2-line:before{content:"\\eba3"}.ri-cloudy-fill:before{content:"\\eba4"}.ri-cloudy-line:before{content:"\\eba5"}.ri-code-box-fill:before{content:"\\eba6"}.ri-code-box-line:before{content:"\\eba7"}.ri-code-fill:before{content:"\\eba8"}.ri-code-line:before{content:"\\eba9"}.ri-code-s-fill:before{content:"\\ebaa"}.ri-code-s-line:before{content:"\\ebab"}.ri-code-s-slash-fill:before{content:"\\ebac"}.ri-code-s-slash-line:before{content:"\\ebad"}.ri-code-view:before{content:"\\ebae"}.ri-codepen-fill:before{content:"\\ebaf"}.ri-codepen-line:before{content:"\\ebb0"}.ri-coin-fill:before{content:"\\ebb1"}.ri-coin-line:before{content:"\\ebb2"}.ri-coins-fill:before{content:"\\ebb3"}.ri-coins-line:before{content:"\\ebb4"}.ri-collage-fill:before{content:"\\ebb5"}.ri-collage-line:before{content:"\\ebb6"}.ri-command-fill:before{content:"\\ebb7"}.ri-command-line:before{content:"\\ebb8"}.ri-community-fill:before{content:"\\ebb9"}.ri-community-line:before{content:"\\ebba"}.ri-compass-2-fill:before{content:"\\ebbb"}.ri-compass-2-line:before{content:"\\ebbc"}.ri-compass-3-fill:before{content:"\\ebbd"}.ri-compass-3-line:before{content:"\\ebbe"}.ri-compass-4-fill:before{content:"\\ebbf"}.ri-compass-4-line:before{content:"\\ebc0"}.ri-compass-discover-fill:before{content:"\\ebc1"}.ri-compass-discover-line:before{content:"\\ebc2"}.ri-compass-fill:before{content:"\\ebc3"}.ri-compass-line:before{content:"\\ebc4"}.ri-compasses-2-fill:before{content:"\\ebc5"}.ri-compasses-2-line:before{content:"\\ebc6"}.ri-compasses-fill:before{content:"\\ebc7"}.ri-compasses-line:before{content:"\\ebc8"}.ri-computer-fill:before{content:"\\ebc9"}.ri-computer-line:before{content:"\\ebca"}.ri-contacts-book-2-fill:before{content:"\\ebcb"}.ri-contacts-book-2-line:before{content:"\\ebcc"}.ri-contacts-book-fill:before{content:"\\ebcd"}.ri-contacts-book-line:before{content:"\\ebce"}.ri-contacts-book-upload-fill:before{content:"\\ebcf"}.ri-contacts-book-upload-line:before{content:"\\ebd0"}.ri-contacts-fill:before{content:"\\ebd1"}.ri-contacts-line:before{content:"\\ebd2"}.ri-contrast-2-fill:before{content:"\\ebd3"}.ri-contrast-2-line:before{content:"\\ebd4"}.ri-contrast-drop-2-fill:before{content:"\\ebd5"}.ri-contrast-drop-2-line:before{content:"\\ebd6"}.ri-contrast-drop-fill:before{content:"\\ebd7"}.ri-contrast-drop-line:before{content:"\\ebd8"}.ri-contrast-fill:before{content:"\\ebd9"}.ri-contrast-line:before{content:"\\ebda"}.ri-copper-coin-fill:before{content:"\\ebdb"}.ri-copper-coin-line:before{content:"\\ebdc"}.ri-copper-diamond-fill:before{content:"\\ebdd"}.ri-copper-diamond-line:before{content:"\\ebde"}.ri-copyleft-fill:before{content:"\\ebdf"}.ri-copyleft-line:before{content:"\\ebe0"}.ri-copyright-fill:before{content:"\\ebe1"}.ri-copyright-line:before{content:"\\ebe2"}.ri-coreos-fill:before{content:"\\ebe3"}.ri-coreos-line:before{content:"\\ebe4"}.ri-coupon-2-fill:before{content:"\\ebe5"}.ri-coupon-2-line:before{content:"\\ebe6"}.ri-coupon-3-fill:before{content:"\\ebe7"}.ri-coupon-3-line:before{content:"\\ebe8"}.ri-coupon-4-fill:before{content:"\\ebe9"}.ri-coupon-4-line:before{content:"\\ebea"}.ri-coupon-5-fill:before{content:"\\ebeb"}.ri-coupon-5-line:before{content:"\\ebec"}.ri-coupon-fill:before{content:"\\ebed"}.ri-coupon-line:before{content:"\\ebee"}.ri-cpu-fill:before{content:"\\ebef"}.ri-cpu-line:before{content:"\\ebf0"}.ri-creative-commons-by-fill:before{content:"\\ebf1"}.ri-creative-commons-by-line:before{content:"\\ebf2"}.ri-creative-commons-fill:before{content:"\\ebf3"}.ri-creative-commons-line:before{content:"\\ebf4"}.ri-creative-commons-nc-fill:before{content:"\\ebf5"}.ri-creative-commons-nc-line:before{content:"\\ebf6"}.ri-creative-commons-nd-fill:before{content:"\\ebf7"}.ri-creative-commons-nd-line:before{content:"\\ebf8"}.ri-creative-commons-sa-fill:before{content:"\\ebf9"}.ri-creative-commons-sa-line:before{content:"\\ebfa"}.ri-creative-commons-zero-fill:before{content:"\\ebfb"}.ri-creative-commons-zero-line:before{content:"\\ebfc"}.ri-criminal-fill:before{content:"\\ebfd"}.ri-criminal-line:before{content:"\\ebfe"}.ri-crop-2-fill:before{content:"\\ebff"}.ri-crop-2-line:before{content:"\\ec00"}.ri-crop-fill:before{content:"\\ec01"}.ri-crop-line:before{content:"\\ec02"}.ri-css3-fill:before{content:"\\ec03"}.ri-css3-line:before{content:"\\ec04"}.ri-cup-fill:before{content:"\\ec05"}.ri-cup-line:before{content:"\\ec06"}.ri-currency-fill:before{content:"\\ec07"}.ri-currency-line:before{content:"\\ec08"}.ri-cursor-fill:before{content:"\\ec09"}.ri-cursor-line:before{content:"\\ec0a"}.ri-customer-service-2-fill:before{content:"\\ec0b"}.ri-customer-service-2-line:before{content:"\\ec0c"}.ri-customer-service-fill:before{content:"\\ec0d"}.ri-customer-service-line:before{content:"\\ec0e"}.ri-dashboard-2-fill:before{content:"\\ec0f"}.ri-dashboard-2-line:before{content:"\\ec10"}.ri-dashboard-3-fill:before{content:"\\ec11"}.ri-dashboard-3-line:before{content:"\\ec12"}.ri-dashboard-fill:before{content:"\\ec13"}.ri-dashboard-line:before{content:"\\ec14"}.ri-database-2-fill:before{content:"\\ec15"}.ri-database-2-line:before{content:"\\ec16"}.ri-database-fill:before{content:"\\ec17"}.ri-database-line:before{content:"\\ec18"}.ri-delete-back-2-fill:before{content:"\\ec19"}.ri-delete-back-2-line:before{content:"\\ec1a"}.ri-delete-back-fill:before{content:"\\ec1b"}.ri-delete-back-line:before{content:"\\ec1c"}.ri-delete-bin-2-fill:before{content:"\\ec1d"}.ri-delete-bin-2-line:before{content:"\\ec1e"}.ri-delete-bin-3-fill:before{content:"\\ec1f"}.ri-delete-bin-3-line:before{content:"\\ec20"}.ri-delete-bin-4-fill:before{content:"\\ec21"}.ri-delete-bin-4-line:before{content:"\\ec22"}.ri-delete-bin-5-fill:before{content:"\\ec23"}.ri-delete-bin-5-line:before{content:"\\ec24"}.ri-delete-bin-6-fill:before{content:"\\ec25"}.ri-delete-bin-6-line:before{content:"\\ec26"}.ri-delete-bin-7-fill:before{content:"\\ec27"}.ri-delete-bin-7-line:before{content:"\\ec28"}.ri-delete-bin-fill:before{content:"\\ec29"}.ri-delete-bin-line:before{content:"\\ec2a"}.ri-delete-column:before{content:"\\ec2b"}.ri-delete-row:before{content:"\\ec2c"}.ri-device-fill:before{content:"\\ec2d"}.ri-device-line:before{content:"\\ec2e"}.ri-device-recover-fill:before{content:"\\ec2f"}.ri-device-recover-line:before{content:"\\ec30"}.ri-dingding-fill:before{content:"\\ec31"}.ri-dingding-line:before{content:"\\ec32"}.ri-direction-fill:before{content:"\\ec33"}.ri-direction-line:before{content:"\\ec34"}.ri-disc-fill:before{content:"\\ec35"}.ri-disc-line:before{content:"\\ec36"}.ri-discord-fill:before{content:"\\ec37"}.ri-discord-line:before{content:"\\ec38"}.ri-discuss-fill:before{content:"\\ec39"}.ri-discuss-line:before{content:"\\ec3a"}.ri-dislike-fill:before{content:"\\ec3b"}.ri-dislike-line:before{content:"\\ec3c"}.ri-disqus-fill:before{content:"\\ec3d"}.ri-disqus-line:before{content:"\\ec3e"}.ri-divide-fill:before{content:"\\ec3f"}.ri-divide-line:before{content:"\\ec40"}.ri-donut-chart-fill:before{content:"\\ec41"}.ri-donut-chart-line:before{content:"\\ec42"}.ri-door-closed-fill:before{content:"\\ec43"}.ri-door-closed-line:before{content:"\\ec44"}.ri-door-fill:before{content:"\\ec45"}.ri-door-line:before{content:"\\ec46"}.ri-door-lock-box-fill:before{content:"\\ec47"}.ri-door-lock-box-line:before{content:"\\ec48"}.ri-door-lock-fill:before{content:"\\ec49"}.ri-door-lock-line:before{content:"\\ec4a"}.ri-door-open-fill:before{content:"\\ec4b"}.ri-door-open-line:before{content:"\\ec4c"}.ri-dossier-fill:before{content:"\\ec4d"}.ri-dossier-line:before{content:"\\ec4e"}.ri-douban-fill:before{content:"\\ec4f"}.ri-douban-line:before{content:"\\ec50"}.ri-double-quotes-l:before{content:"\\ec51"}.ri-double-quotes-r:before{content:"\\ec52"}.ri-download-2-fill:before{content:"\\ec53"}.ri-download-2-line:before{content:"\\ec54"}.ri-download-cloud-2-fill:before{content:"\\ec55"}.ri-download-cloud-2-line:before{content:"\\ec56"}.ri-download-cloud-fill:before{content:"\\ec57"}.ri-download-cloud-line:before{content:"\\ec58"}.ri-download-fill:before{content:"\\ec59"}.ri-download-line:before{content:"\\ec5a"}.ri-draft-fill:before{content:"\\ec5b"}.ri-draft-line:before{content:"\\ec5c"}.ri-drag-drop-fill:before{content:"\\ec5d"}.ri-drag-drop-line:before{content:"\\ec5e"}.ri-drag-move-2-fill:before{content:"\\ec5f"}.ri-drag-move-2-line:before{content:"\\ec60"}.ri-drag-move-fill:before{content:"\\ec61"}.ri-drag-move-line:before{content:"\\ec62"}.ri-dribbble-fill:before{content:"\\ec63"}.ri-dribbble-line:before{content:"\\ec64"}.ri-drive-fill:before{content:"\\ec65"}.ri-drive-line:before{content:"\\ec66"}.ri-drizzle-fill:before{content:"\\ec67"}.ri-drizzle-line:before{content:"\\ec68"}.ri-drop-fill:before{content:"\\ec69"}.ri-drop-line:before{content:"\\ec6a"}.ri-dropbox-fill:before{content:"\\ec6b"}.ri-dropbox-line:before{content:"\\ec6c"}.ri-dual-sim-1-fill:before{content:"\\ec6d"}.ri-dual-sim-1-line:before{content:"\\ec6e"}.ri-dual-sim-2-fill:before{content:"\\ec6f"}.ri-dual-sim-2-line:before{content:"\\ec70"}.ri-dv-fill:before{content:"\\ec71"}.ri-dv-line:before{content:"\\ec72"}.ri-dvd-fill:before{content:"\\ec73"}.ri-dvd-line:before{content:"\\ec74"}.ri-e-bike-2-fill:before{content:"\\ec75"}.ri-e-bike-2-line:before{content:"\\ec76"}.ri-e-bike-fill:before{content:"\\ec77"}.ri-e-bike-line:before{content:"\\ec78"}.ri-earth-fill:before{content:"\\ec79"}.ri-earth-line:before{content:"\\ec7a"}.ri-earthquake-fill:before{content:"\\ec7b"}.ri-earthquake-line:before{content:"\\ec7c"}.ri-edge-fill:before{content:"\\ec7d"}.ri-edge-line:before{content:"\\ec7e"}.ri-edit-2-fill:before{content:"\\ec7f"}.ri-edit-2-line:before{content:"\\ec80"}.ri-edit-box-fill:before{content:"\\ec81"}.ri-edit-box-line:before{content:"\\ec82"}.ri-edit-circle-fill:before{content:"\\ec83"}.ri-edit-circle-line:before{content:"\\ec84"}.ri-edit-fill:before{content:"\\ec85"}.ri-edit-line:before{content:"\\ec86"}.ri-eject-fill:before{content:"\\ec87"}.ri-eject-line:before{content:"\\ec88"}.ri-emotion-2-fill:before{content:"\\ec89"}.ri-emotion-2-line:before{content:"\\ec8a"}.ri-emotion-fill:before{content:"\\ec8b"}.ri-emotion-happy-fill:before{content:"\\ec8c"}.ri-emotion-happy-line:before{content:"\\ec8d"}.ri-emotion-laugh-fill:before{content:"\\ec8e"}.ri-emotion-laugh-line:before{content:"\\ec8f"}.ri-emotion-line:before{content:"\\ec90"}.ri-emotion-normal-fill:before{content:"\\ec91"}.ri-emotion-normal-line:before{content:"\\ec92"}.ri-emotion-sad-fill:before{content:"\\ec93"}.ri-emotion-sad-line:before{content:"\\ec94"}.ri-emotion-unhappy-fill:before{content:"\\ec95"}.ri-emotion-unhappy-line:before{content:"\\ec96"}.ri-empathize-fill:before{content:"\\ec97"}.ri-empathize-line:before{content:"\\ec98"}.ri-emphasis-cn:before{content:"\\ec99"}.ri-emphasis:before{content:"\\ec9a"}.ri-english-input:before{content:"\\ec9b"}.ri-equalizer-fill:before{content:"\\ec9c"}.ri-equalizer-line:before{content:"\\ec9d"}.ri-eraser-fill:before{content:"\\ec9e"}.ri-eraser-line:before{content:"\\ec9f"}.ri-error-warning-fill:before{content:"\\eca0"}.ri-error-warning-line:before{content:"\\eca1"}.ri-evernote-fill:before{content:"\\eca2"}.ri-evernote-line:before{content:"\\eca3"}.ri-exchange-box-fill:before{content:"\\eca4"}.ri-exchange-box-line:before{content:"\\eca5"}.ri-exchange-cny-fill:before{content:"\\eca6"}.ri-exchange-cny-line:before{content:"\\eca7"}.ri-exchange-dollar-fill:before{content:"\\eca8"}.ri-exchange-dollar-line:before{content:"\\eca9"}.ri-exchange-fill:before{content:"\\ecaa"}.ri-exchange-funds-fill:before{content:"\\ecab"}.ri-exchange-funds-line:before{content:"\\ecac"}.ri-exchange-line:before{content:"\\ecad"}.ri-external-link-fill:before{content:"\\ecae"}.ri-external-link-line:before{content:"\\ecaf"}.ri-eye-2-fill:before{content:"\\ecb0"}.ri-eye-2-line:before{content:"\\ecb1"}.ri-eye-close-fill:before{content:"\\ecb2"}.ri-eye-close-line:before{content:"\\ecb3"}.ri-eye-fill:before{content:"\\ecb4"}.ri-eye-line:before{content:"\\ecb5"}.ri-eye-off-fill:before{content:"\\ecb6"}.ri-eye-off-line:before{content:"\\ecb7"}.ri-facebook-box-fill:before{content:"\\ecb8"}.ri-facebook-box-line:before{content:"\\ecb9"}.ri-facebook-circle-fill:before{content:"\\ecba"}.ri-facebook-circle-line:before{content:"\\ecbb"}.ri-facebook-fill:before{content:"\\ecbc"}.ri-facebook-line:before{content:"\\ecbd"}.ri-fahrenheit-fill:before{content:"\\ecbe"}.ri-fahrenheit-line:before{content:"\\ecbf"}.ri-feedback-fill:before{content:"\\ecc0"}.ri-feedback-line:before{content:"\\ecc1"}.ri-file-2-fill:before{content:"\\ecc2"}.ri-file-2-line:before{content:"\\ecc3"}.ri-file-3-fill:before{content:"\\ecc4"}.ri-file-3-line:before{content:"\\ecc5"}.ri-file-4-fill:before{content:"\\ecc6"}.ri-file-4-line:before{content:"\\ecc7"}.ri-file-add-fill:before{content:"\\ecc8"}.ri-file-add-line:before{content:"\\ecc9"}.ri-file-chart-2-fill:before{content:"\\ecca"}.ri-file-chart-2-line:before{content:"\\eccb"}.ri-file-chart-fill:before{content:"\\eccc"}.ri-file-chart-line:before{content:"\\eccd"}.ri-file-cloud-fill:before{content:"\\ecce"}.ri-file-cloud-line:before{content:"\\eccf"}.ri-file-code-fill:before{content:"\\ecd0"}.ri-file-code-line:before{content:"\\ecd1"}.ri-file-copy-2-fill:before{content:"\\ecd2"}.ri-file-copy-2-line:before{content:"\\ecd3"}.ri-file-copy-fill:before{content:"\\ecd4"}.ri-file-copy-line:before{content:"\\ecd5"}.ri-file-damage-fill:before{content:"\\ecd6"}.ri-file-damage-line:before{content:"\\ecd7"}.ri-file-download-fill:before{content:"\\ecd8"}.ri-file-download-line:before{content:"\\ecd9"}.ri-file-edit-fill:before{content:"\\ecda"}.ri-file-edit-line:before{content:"\\ecdb"}.ri-file-excel-2-fill:before{content:"\\ecdc"}.ri-file-excel-2-line:before{content:"\\ecdd"}.ri-file-excel-fill:before{content:"\\ecde"}.ri-file-excel-line:before{content:"\\ecdf"}.ri-file-fill:before{content:"\\ece0"}.ri-file-forbid-fill:before{content:"\\ece1"}.ri-file-forbid-line:before{content:"\\ece2"}.ri-file-gif-fill:before{content:"\\ece3"}.ri-file-gif-line:before{content:"\\ece4"}.ri-file-history-fill:before{content:"\\ece5"}.ri-file-history-line:before{content:"\\ece6"}.ri-file-hwp-fill:before{content:"\\ece7"}.ri-file-hwp-line:before{content:"\\ece8"}.ri-file-info-fill:before{content:"\\ece9"}.ri-file-info-line:before{content:"\\ecea"}.ri-file-line:before{content:"\\eceb"}.ri-file-list-2-fill:before{content:"\\ecec"}.ri-file-list-2-line:before{content:"\\eced"}.ri-file-list-3-fill:before{content:"\\ecee"}.ri-file-list-3-line:before{content:"\\ecef"}.ri-file-list-fill:before{content:"\\ecf0"}.ri-file-list-line:before{content:"\\ecf1"}.ri-file-lock-fill:before{content:"\\ecf2"}.ri-file-lock-line:before{content:"\\ecf3"}.ri-file-marked-fill:before{content:"\\ecf4"}.ri-file-marked-line:before{content:"\\ecf5"}.ri-file-music-fill:before{content:"\\ecf6"}.ri-file-music-line:before{content:"\\ecf7"}.ri-file-paper-2-fill:before{content:"\\ecf8"}.ri-file-paper-2-line:before{content:"\\ecf9"}.ri-file-paper-fill:before{content:"\\ecfa"}.ri-file-paper-line:before{content:"\\ecfb"}.ri-file-pdf-fill:before{content:"\\ecfc"}.ri-file-pdf-line:before{content:"\\ecfd"}.ri-file-ppt-2-fill:before{content:"\\ecfe"}.ri-file-ppt-2-line:before{content:"\\ecff"}.ri-file-ppt-fill:before{content:"\\ed00"}.ri-file-ppt-line:before{content:"\\ed01"}.ri-file-reduce-fill:before{content:"\\ed02"}.ri-file-reduce-line:before{content:"\\ed03"}.ri-file-search-fill:before{content:"\\ed04"}.ri-file-search-line:before{content:"\\ed05"}.ri-file-settings-fill:before{content:"\\ed06"}.ri-file-settings-line:before{content:"\\ed07"}.ri-file-shield-2-fill:before{content:"\\ed08"}.ri-file-shield-2-line:before{content:"\\ed09"}.ri-file-shield-fill:before{content:"\\ed0a"}.ri-file-shield-line:before{content:"\\ed0b"}.ri-file-shred-fill:before{content:"\\ed0c"}.ri-file-shred-line:before{content:"\\ed0d"}.ri-file-text-fill:before{content:"\\ed0e"}.ri-file-text-line:before{content:"\\ed0f"}.ri-file-transfer-fill:before{content:"\\ed10"}.ri-file-transfer-line:before{content:"\\ed11"}.ri-file-unknow-fill:before{content:"\\ed12"}.ri-file-unknow-line:before{content:"\\ed13"}.ri-file-upload-fill:before{content:"\\ed14"}.ri-file-upload-line:before{content:"\\ed15"}.ri-file-user-fill:before{content:"\\ed16"}.ri-file-user-line:before{content:"\\ed17"}.ri-file-warning-fill:before{content:"\\ed18"}.ri-file-warning-line:before{content:"\\ed19"}.ri-file-word-2-fill:before{content:"\\ed1a"}.ri-file-word-2-line:before{content:"\\ed1b"}.ri-file-word-fill:before{content:"\\ed1c"}.ri-file-word-line:before{content:"\\ed1d"}.ri-file-zip-fill:before{content:"\\ed1e"}.ri-file-zip-line:before{content:"\\ed1f"}.ri-film-fill:before{content:"\\ed20"}.ri-film-line:before{content:"\\ed21"}.ri-filter-2-fill:before{content:"\\ed22"}.ri-filter-2-line:before{content:"\\ed23"}.ri-filter-3-fill:before{content:"\\ed24"}.ri-filter-3-line:before{content:"\\ed25"}.ri-filter-fill:before{content:"\\ed26"}.ri-filter-line:before{content:"\\ed27"}.ri-filter-off-fill:before{content:"\\ed28"}.ri-filter-off-line:before{content:"\\ed29"}.ri-find-replace-fill:before{content:"\\ed2a"}.ri-find-replace-line:before{content:"\\ed2b"}.ri-finder-fill:before{content:"\\ed2c"}.ri-finder-line:before{content:"\\ed2d"}.ri-fingerprint-2-fill:before{content:"\\ed2e"}.ri-fingerprint-2-line:before{content:"\\ed2f"}.ri-fingerprint-fill:before{content:"\\ed30"}.ri-fingerprint-line:before{content:"\\ed31"}.ri-fire-fill:before{content:"\\ed32"}.ri-fire-line:before{content:"\\ed33"}.ri-firefox-fill:before{content:"\\ed34"}.ri-firefox-line:before{content:"\\ed35"}.ri-first-aid-kit-fill:before{content:"\\ed36"}.ri-first-aid-kit-line:before{content:"\\ed37"}.ri-flag-2-fill:before{content:"\\ed38"}.ri-flag-2-line:before{content:"\\ed39"}.ri-flag-fill:before{content:"\\ed3a"}.ri-flag-line:before{content:"\\ed3b"}.ri-flashlight-fill:before{content:"\\ed3c"}.ri-flashlight-line:before{content:"\\ed3d"}.ri-flask-fill:before{content:"\\ed3e"}.ri-flask-line:before{content:"\\ed3f"}.ri-flight-land-fill:before{content:"\\ed40"}.ri-flight-land-line:before{content:"\\ed41"}.ri-flight-takeoff-fill:before{content:"\\ed42"}.ri-flight-takeoff-line:before{content:"\\ed43"}.ri-flood-fill:before{content:"\\ed44"}.ri-flood-line:before{content:"\\ed45"}.ri-flow-chart:before{content:"\\ed46"}.ri-flutter-fill:before{content:"\\ed47"}.ri-flutter-line:before{content:"\\ed48"}.ri-focus-2-fill:before{content:"\\ed49"}.ri-focus-2-line:before{content:"\\ed4a"}.ri-focus-3-fill:before{content:"\\ed4b"}.ri-focus-3-line:before{content:"\\ed4c"}.ri-focus-fill:before{content:"\\ed4d"}.ri-focus-line:before{content:"\\ed4e"}.ri-foggy-fill:before{content:"\\ed4f"}.ri-foggy-line:before{content:"\\ed50"}.ri-folder-2-fill:before{content:"\\ed51"}.ri-folder-2-line:before{content:"\\ed52"}.ri-folder-3-fill:before{content:"\\ed53"}.ri-folder-3-line:before{content:"\\ed54"}.ri-folder-4-fill:before{content:"\\ed55"}.ri-folder-4-line:before{content:"\\ed56"}.ri-folder-5-fill:before{content:"\\ed57"}.ri-folder-5-line:before{content:"\\ed58"}.ri-folder-add-fill:before{content:"\\ed59"}.ri-folder-add-line:before{content:"\\ed5a"}.ri-folder-chart-2-fill:before{content:"\\ed5b"}.ri-folder-chart-2-line:before{content:"\\ed5c"}.ri-folder-chart-fill:before{content:"\\ed5d"}.ri-folder-chart-line:before{content:"\\ed5e"}.ri-folder-download-fill:before{content:"\\ed5f"}.ri-folder-download-line:before{content:"\\ed60"}.ri-folder-fill:before{content:"\\ed61"}.ri-folder-forbid-fill:before{content:"\\ed62"}.ri-folder-forbid-line:before{content:"\\ed63"}.ri-folder-history-fill:before{content:"\\ed64"}.ri-folder-history-line:before{content:"\\ed65"}.ri-folder-info-fill:before{content:"\\ed66"}.ri-folder-info-line:before{content:"\\ed67"}.ri-folder-keyhole-fill:before{content:"\\ed68"}.ri-folder-keyhole-line:before{content:"\\ed69"}.ri-folder-line:before{content:"\\ed6a"}.ri-folder-lock-fill:before{content:"\\ed6b"}.ri-folder-lock-line:before{content:"\\ed6c"}.ri-folder-music-fill:before{content:"\\ed6d"}.ri-folder-music-line:before{content:"\\ed6e"}.ri-folder-open-fill:before{content:"\\ed6f"}.ri-folder-open-line:before{content:"\\ed70"}.ri-folder-received-fill:before{content:"\\ed71"}.ri-folder-received-line:before{content:"\\ed72"}.ri-folder-reduce-fill:before{content:"\\ed73"}.ri-folder-reduce-line:before{content:"\\ed74"}.ri-folder-settings-fill:before{content:"\\ed75"}.ri-folder-settings-line:before{content:"\\ed76"}.ri-folder-shared-fill:before{content:"\\ed77"}.ri-folder-shared-line:before{content:"\\ed78"}.ri-folder-shield-2-fill:before{content:"\\ed79"}.ri-folder-shield-2-line:before{content:"\\ed7a"}.ri-folder-shield-fill:before{content:"\\ed7b"}.ri-folder-shield-line:before{content:"\\ed7c"}.ri-folder-transfer-fill:before{content:"\\ed7d"}.ri-folder-transfer-line:before{content:"\\ed7e"}.ri-folder-unknow-fill:before{content:"\\ed7f"}.ri-folder-unknow-line:before{content:"\\ed80"}.ri-folder-upload-fill:before{content:"\\ed81"}.ri-folder-upload-line:before{content:"\\ed82"}.ri-folder-user-fill:before{content:"\\ed83"}.ri-folder-user-line:before{content:"\\ed84"}.ri-folder-warning-fill:before{content:"\\ed85"}.ri-folder-warning-line:before{content:"\\ed86"}.ri-folder-zip-fill:before{content:"\\ed87"}.ri-folder-zip-line:before{content:"\\ed88"}.ri-folders-fill:before{content:"\\ed89"}.ri-folders-line:before{content:"\\ed8a"}.ri-font-color:before{content:"\\ed8b"}.ri-font-size-2:before{content:"\\ed8c"}.ri-font-size:before{content:"\\ed8d"}.ri-football-fill:before{content:"\\ed8e"}.ri-football-line:before{content:"\\ed8f"}.ri-footprint-fill:before{content:"\\ed90"}.ri-footprint-line:before{content:"\\ed91"}.ri-forbid-2-fill:before{content:"\\ed92"}.ri-forbid-2-line:before{content:"\\ed93"}.ri-forbid-fill:before{content:"\\ed94"}.ri-forbid-line:before{content:"\\ed95"}.ri-format-clear:before{content:"\\ed96"}.ri-fridge-fill:before{content:"\\ed97"}.ri-fridge-line:before{content:"\\ed98"}.ri-fullscreen-exit-fill:before{content:"\\ed99"}.ri-fullscreen-exit-line:before{content:"\\ed9a"}.ri-fullscreen-fill:before{content:"\\ed9b"}.ri-fullscreen-line:before{content:"\\ed9c"}.ri-function-fill:before{content:"\\ed9d"}.ri-function-line:before{content:"\\ed9e"}.ri-functions:before{content:"\\ed9f"}.ri-funds-box-fill:before{content:"\\eda0"}.ri-funds-box-line:before{content:"\\eda1"}.ri-funds-fill:before{content:"\\eda2"}.ri-funds-line:before{content:"\\eda3"}.ri-gallery-fill:before{content:"\\eda4"}.ri-gallery-line:before{content:"\\eda5"}.ri-gallery-upload-fill:before{content:"\\eda6"}.ri-gallery-upload-line:before{content:"\\eda7"}.ri-game-fill:before{content:"\\eda8"}.ri-game-line:before{content:"\\eda9"}.ri-gamepad-fill:before{content:"\\edaa"}.ri-gamepad-line:before{content:"\\edab"}.ri-gas-station-fill:before{content:"\\edac"}.ri-gas-station-line:before{content:"\\edad"}.ri-gatsby-fill:before{content:"\\edae"}.ri-gatsby-line:before{content:"\\edaf"}.ri-genderless-fill:before{content:"\\edb0"}.ri-genderless-line:before{content:"\\edb1"}.ri-ghost-2-fill:before{content:"\\edb2"}.ri-ghost-2-line:before{content:"\\edb3"}.ri-ghost-fill:before{content:"\\edb4"}.ri-ghost-line:before{content:"\\edb5"}.ri-ghost-smile-fill:before{content:"\\edb6"}.ri-ghost-smile-line:before{content:"\\edb7"}.ri-gift-2-fill:before{content:"\\edb8"}.ri-gift-2-line:before{content:"\\edb9"}.ri-gift-fill:before{content:"\\edba"}.ri-gift-line:before{content:"\\edbb"}.ri-git-branch-fill:before{content:"\\edbc"}.ri-git-branch-line:before{content:"\\edbd"}.ri-git-commit-fill:before{content:"\\edbe"}.ri-git-commit-line:before{content:"\\edbf"}.ri-git-merge-fill:before{content:"\\edc0"}.ri-git-merge-line:before{content:"\\edc1"}.ri-git-pull-request-fill:before{content:"\\edc2"}.ri-git-pull-request-line:before{content:"\\edc3"}.ri-git-repository-commits-fill:before{content:"\\edc4"}.ri-git-repository-commits-line:before{content:"\\edc5"}.ri-git-repository-fill:before{content:"\\edc6"}.ri-git-repository-line:before{content:"\\edc7"}.ri-git-repository-private-fill:before{content:"\\edc8"}.ri-git-repository-private-line:before{content:"\\edc9"}.ri-github-fill:before{content:"\\edca"}.ri-github-line:before{content:"\\edcb"}.ri-gitlab-fill:before{content:"\\edcc"}.ri-gitlab-line:before{content:"\\edcd"}.ri-global-fill:before{content:"\\edce"}.ri-global-line:before{content:"\\edcf"}.ri-globe-fill:before{content:"\\edd0"}.ri-globe-line:before{content:"\\edd1"}.ri-goblet-fill:before{content:"\\edd2"}.ri-goblet-line:before{content:"\\edd3"}.ri-google-fill:before{content:"\\edd4"}.ri-google-line:before{content:"\\edd5"}.ri-google-play-fill:before{content:"\\edd6"}.ri-google-play-line:before{content:"\\edd7"}.ri-government-fill:before{content:"\\edd8"}.ri-government-line:before{content:"\\edd9"}.ri-gps-fill:before{content:"\\edda"}.ri-gps-line:before{content:"\\eddb"}.ri-gradienter-fill:before{content:"\\eddc"}.ri-gradienter-line:before{content:"\\eddd"}.ri-grid-fill:before{content:"\\edde"}.ri-grid-line:before{content:"\\eddf"}.ri-group-2-fill:before{content:"\\ede0"}.ri-group-2-line:before{content:"\\ede1"}.ri-group-fill:before{content:"\\ede2"}.ri-group-line:before{content:"\\ede3"}.ri-guide-fill:before{content:"\\ede4"}.ri-guide-line:before{content:"\\ede5"}.ri-h-1:before{content:"\\ede6"}.ri-h-2:before{content:"\\ede7"}.ri-h-3:before{content:"\\ede8"}.ri-h-4:before{content:"\\ede9"}.ri-h-5:before{content:"\\edea"}.ri-h-6:before{content:"\\edeb"}.ri-hail-fill:before{content:"\\edec"}.ri-hail-line:before{content:"\\eded"}.ri-hammer-fill:before{content:"\\edee"}.ri-hammer-line:before{content:"\\edef"}.ri-hand-coin-fill:before{content:"\\edf0"}.ri-hand-coin-line:before{content:"\\edf1"}.ri-hand-heart-fill:before{content:"\\edf2"}.ri-hand-heart-line:before{content:"\\edf3"}.ri-hand-sanitizer-fill:before{content:"\\edf4"}.ri-hand-sanitizer-line:before{content:"\\edf5"}.ri-handbag-fill:before{content:"\\edf6"}.ri-handbag-line:before{content:"\\edf7"}.ri-hard-drive-2-fill:before{content:"\\edf8"}.ri-hard-drive-2-line:before{content:"\\edf9"}.ri-hard-drive-fill:before{content:"\\edfa"}.ri-hard-drive-line:before{content:"\\edfb"}.ri-hashtag:before{content:"\\edfc"}.ri-haze-2-fill:before{content:"\\edfd"}.ri-haze-2-line:before{content:"\\edfe"}.ri-haze-fill:before{content:"\\edff"}.ri-haze-line:before{content:"\\ee00"}.ri-hd-fill:before{content:"\\ee01"}.ri-hd-line:before{content:"\\ee02"}.ri-heading:before{content:"\\ee03"}.ri-headphone-fill:before{content:"\\ee04"}.ri-headphone-line:before{content:"\\ee05"}.ri-health-book-fill:before{content:"\\ee06"}.ri-health-book-line:before{content:"\\ee07"}.ri-heart-2-fill:before{content:"\\ee08"}.ri-heart-2-line:before{content:"\\ee09"}.ri-heart-3-fill:before{content:"\\ee0a"}.ri-heart-3-line:before{content:"\\ee0b"}.ri-heart-add-fill:before{content:"\\ee0c"}.ri-heart-add-line:before{content:"\\ee0d"}.ri-heart-fill:before{content:"\\ee0e"}.ri-heart-line:before{content:"\\ee0f"}.ri-heart-pulse-fill:before{content:"\\ee10"}.ri-heart-pulse-line:before{content:"\\ee11"}.ri-hearts-fill:before{content:"\\ee12"}.ri-hearts-line:before{content:"\\ee13"}.ri-heavy-showers-fill:before{content:"\\ee14"}.ri-heavy-showers-line:before{content:"\\ee15"}.ri-history-fill:before{content:"\\ee16"}.ri-history-line:before{content:"\\ee17"}.ri-home-2-fill:before{content:"\\ee18"}.ri-home-2-line:before{content:"\\ee19"}.ri-home-3-fill:before{content:"\\ee1a"}.ri-home-3-line:before{content:"\\ee1b"}.ri-home-4-fill:before{content:"\\ee1c"}.ri-home-4-line:before{content:"\\ee1d"}.ri-home-5-fill:before{content:"\\ee1e"}.ri-home-5-line:before{content:"\\ee1f"}.ri-home-6-fill:before{content:"\\ee20"}.ri-home-6-line:before{content:"\\ee21"}.ri-home-7-fill:before{content:"\\ee22"}.ri-home-7-line:before{content:"\\ee23"}.ri-home-8-fill:before{content:"\\ee24"}.ri-home-8-line:before{content:"\\ee25"}.ri-home-fill:before{content:"\\ee26"}.ri-home-gear-fill:before{content:"\\ee27"}.ri-home-gear-line:before{content:"\\ee28"}.ri-home-heart-fill:before{content:"\\ee29"}.ri-home-heart-line:before{content:"\\ee2a"}.ri-home-line:before{content:"\\ee2b"}.ri-home-smile-2-fill:before{content:"\\ee2c"}.ri-home-smile-2-line:before{content:"\\ee2d"}.ri-home-smile-fill:before{content:"\\ee2e"}.ri-home-smile-line:before{content:"\\ee2f"}.ri-home-wifi-fill:before{content:"\\ee30"}.ri-home-wifi-line:before{content:"\\ee31"}.ri-honor-of-kings-fill:before{content:"\\ee32"}.ri-honor-of-kings-line:before{content:"\\ee33"}.ri-honour-fill:before{content:"\\ee34"}.ri-honour-line:before{content:"\\ee35"}.ri-hospital-fill:before{content:"\\ee36"}.ri-hospital-line:before{content:"\\ee37"}.ri-hotel-bed-fill:before{content:"\\ee38"}.ri-hotel-bed-line:before{content:"\\ee39"}.ri-hotel-fill:before{content:"\\ee3a"}.ri-hotel-line:before{content:"\\ee3b"}.ri-hotspot-fill:before{content:"\\ee3c"}.ri-hotspot-line:before{content:"\\ee3d"}.ri-hq-fill:before{content:"\\ee3e"}.ri-hq-line:before{content:"\\ee3f"}.ri-html5-fill:before{content:"\\ee40"}.ri-html5-line:before{content:"\\ee41"}.ri-ie-fill:before{content:"\\ee42"}.ri-ie-line:before{content:"\\ee43"}.ri-image-2-fill:before{content:"\\ee44"}.ri-image-2-line:before{content:"\\ee45"}.ri-image-add-fill:before{content:"\\ee46"}.ri-image-add-line:before{content:"\\ee47"}.ri-image-edit-fill:before{content:"\\ee48"}.ri-image-edit-line:before{content:"\\ee49"}.ri-image-fill:before{content:"\\ee4a"}.ri-image-line:before{content:"\\ee4b"}.ri-inbox-archive-fill:before{content:"\\ee4c"}.ri-inbox-archive-line:before{content:"\\ee4d"}.ri-inbox-fill:before{content:"\\ee4e"}.ri-inbox-line:before{content:"\\ee4f"}.ri-inbox-unarchive-fill:before{content:"\\ee50"}.ri-inbox-unarchive-line:before{content:"\\ee51"}.ri-increase-decrease-fill:before{content:"\\ee52"}.ri-increase-decrease-line:before{content:"\\ee53"}.ri-indent-decrease:before{content:"\\ee54"}.ri-indent-increase:before{content:"\\ee55"}.ri-indeterminate-circle-fill:before{content:"\\ee56"}.ri-indeterminate-circle-line:before{content:"\\ee57"}.ri-information-fill:before{content:"\\ee58"}.ri-information-line:before{content:"\\ee59"}.ri-infrared-thermometer-fill:before{content:"\\ee5a"}.ri-infrared-thermometer-line:before{content:"\\ee5b"}.ri-ink-bottle-fill:before{content:"\\ee5c"}.ri-ink-bottle-line:before{content:"\\ee5d"}.ri-input-cursor-move:before{content:"\\ee5e"}.ri-input-method-fill:before{content:"\\ee5f"}.ri-input-method-line:before{content:"\\ee60"}.ri-insert-column-left:before{content:"\\ee61"}.ri-insert-column-right:before{content:"\\ee62"}.ri-insert-row-bottom:before{content:"\\ee63"}.ri-insert-row-top:before{content:"\\ee64"}.ri-instagram-fill:before{content:"\\ee65"}.ri-instagram-line:before{content:"\\ee66"}.ri-install-fill:before{content:"\\ee67"}.ri-install-line:before{content:"\\ee68"}.ri-invision-fill:before{content:"\\ee69"}.ri-invision-line:before{content:"\\ee6a"}.ri-italic:before{content:"\\ee6b"}.ri-kakao-talk-fill:before{content:"\\ee6c"}.ri-kakao-talk-line:before{content:"\\ee6d"}.ri-key-2-fill:before{content:"\\ee6e"}.ri-key-2-line:before{content:"\\ee6f"}.ri-key-fill:before{content:"\\ee70"}.ri-key-line:before{content:"\\ee71"}.ri-keyboard-box-fill:before{content:"\\ee72"}.ri-keyboard-box-line:before{content:"\\ee73"}.ri-keyboard-fill:before{content:"\\ee74"}.ri-keyboard-line:before{content:"\\ee75"}.ri-keynote-fill:before{content:"\\ee76"}.ri-keynote-line:before{content:"\\ee77"}.ri-knife-blood-fill:before{content:"\\ee78"}.ri-knife-blood-line:before{content:"\\ee79"}.ri-knife-fill:before{content:"\\ee7a"}.ri-knife-line:before{content:"\\ee7b"}.ri-landscape-fill:before{content:"\\ee7c"}.ri-landscape-line:before{content:"\\ee7d"}.ri-layout-2-fill:before{content:"\\ee7e"}.ri-layout-2-line:before{content:"\\ee7f"}.ri-layout-3-fill:before{content:"\\ee80"}.ri-layout-3-line:before{content:"\\ee81"}.ri-layout-4-fill:before{content:"\\ee82"}.ri-layout-4-line:before{content:"\\ee83"}.ri-layout-5-fill:before{content:"\\ee84"}.ri-layout-5-line:before{content:"\\ee85"}.ri-layout-6-fill:before{content:"\\ee86"}.ri-layout-6-line:before{content:"\\ee87"}.ri-layout-bottom-2-fill:before{content:"\\ee88"}.ri-layout-bottom-2-line:before{content:"\\ee89"}.ri-layout-bottom-fill:before{content:"\\ee8a"}.ri-layout-bottom-line:before{content:"\\ee8b"}.ri-layout-column-fill:before{content:"\\ee8c"}.ri-layout-column-line:before{content:"\\ee8d"}.ri-layout-fill:before{content:"\\ee8e"}.ri-layout-grid-fill:before{content:"\\ee8f"}.ri-layout-grid-line:before{content:"\\ee90"}.ri-layout-left-2-fill:before{content:"\\ee91"}.ri-layout-left-2-line:before{content:"\\ee92"}.ri-layout-left-fill:before{content:"\\ee93"}.ri-layout-left-line:before{content:"\\ee94"}.ri-layout-line:before{content:"\\ee95"}.ri-layout-masonry-fill:before{content:"\\ee96"}.ri-layout-masonry-line:before{content:"\\ee97"}.ri-layout-right-2-fill:before{content:"\\ee98"}.ri-layout-right-2-line:before{content:"\\ee99"}.ri-layout-right-fill:before{content:"\\ee9a"}.ri-layout-right-line:before{content:"\\ee9b"}.ri-layout-row-fill:before{content:"\\ee9c"}.ri-layout-row-line:before{content:"\\ee9d"}.ri-layout-top-2-fill:before{content:"\\ee9e"}.ri-layout-top-2-line:before{content:"\\ee9f"}.ri-layout-top-fill:before{content:"\\eea0"}.ri-layout-top-line:before{content:"\\eea1"}.ri-leaf-fill:before{content:"\\eea2"}.ri-leaf-line:before{content:"\\eea3"}.ri-lifebuoy-fill:before{content:"\\eea4"}.ri-lifebuoy-line:before{content:"\\eea5"}.ri-lightbulb-fill:before{content:"\\eea6"}.ri-lightbulb-flash-fill:before{content:"\\eea7"}.ri-lightbulb-flash-line:before{content:"\\eea8"}.ri-lightbulb-line:before{content:"\\eea9"}.ri-line-chart-fill:before{content:"\\eeaa"}.ri-line-chart-line:before{content:"\\eeab"}.ri-line-fill:before{content:"\\eeac"}.ri-line-height:before{content:"\\eead"}.ri-line-line:before{content:"\\eeae"}.ri-link-m:before{content:"\\eeaf"}.ri-link-unlink-m:before{content:"\\eeb0"}.ri-link-unlink:before{content:"\\eeb1"}.ri-link:before{content:"\\eeb2"}.ri-linkedin-box-fill:before{content:"\\eeb3"}.ri-linkedin-box-line:before{content:"\\eeb4"}.ri-linkedin-fill:before{content:"\\eeb5"}.ri-linkedin-line:before{content:"\\eeb6"}.ri-links-fill:before{content:"\\eeb7"}.ri-links-line:before{content:"\\eeb8"}.ri-list-check-2:before{content:"\\eeb9"}.ri-list-check:before{content:"\\eeba"}.ri-list-ordered:before{content:"\\eebb"}.ri-list-settings-fill:before{content:"\\eebc"}.ri-list-settings-line:before{content:"\\eebd"}.ri-list-unordered:before{content:"\\eebe"}.ri-live-fill:before{content:"\\eebf"}.ri-live-line:before{content:"\\eec0"}.ri-loader-2-fill:before{content:"\\eec1"}.ri-loader-2-line:before{content:"\\eec2"}.ri-loader-3-fill:before{content:"\\eec3"}.ri-loader-3-line:before{content:"\\eec4"}.ri-loader-4-fill:before{content:"\\eec5"}.ri-loader-4-line:before{content:"\\eec6"}.ri-loader-5-fill:before{content:"\\eec7"}.ri-loader-5-line:before{content:"\\eec8"}.ri-loader-fill:before{content:"\\eec9"}.ri-loader-line:before{content:"\\eeca"}.ri-lock-2-fill:before{content:"\\eecb"}.ri-lock-2-line:before{content:"\\eecc"}.ri-lock-fill:before{content:"\\eecd"}.ri-lock-line:before{content:"\\eece"}.ri-lock-password-fill:before{content:"\\eecf"}.ri-lock-password-line:before{content:"\\eed0"}.ri-lock-unlock-fill:before{content:"\\eed1"}.ri-lock-unlock-line:before{content:"\\eed2"}.ri-login-box-fill:before{content:"\\eed3"}.ri-login-box-line:before{content:"\\eed4"}.ri-login-circle-fill:before{content:"\\eed5"}.ri-login-circle-line:before{content:"\\eed6"}.ri-logout-box-fill:before{content:"\\eed7"}.ri-logout-box-line:before{content:"\\eed8"}.ri-logout-box-r-fill:before{content:"\\eed9"}.ri-logout-box-r-line:before{content:"\\eeda"}.ri-logout-circle-fill:before{content:"\\eedb"}.ri-logout-circle-line:before{content:"\\eedc"}.ri-logout-circle-r-fill:before{content:"\\eedd"}.ri-logout-circle-r-line:before{content:"\\eede"}.ri-luggage-cart-fill:before{content:"\\eedf"}.ri-luggage-cart-line:before{content:"\\eee0"}.ri-luggage-deposit-fill:before{content:"\\eee1"}.ri-luggage-deposit-line:before{content:"\\eee2"}.ri-lungs-fill:before{content:"\\eee3"}.ri-lungs-line:before{content:"\\eee4"}.ri-mac-fill:before{content:"\\eee5"}.ri-mac-line:before{content:"\\eee6"}.ri-macbook-fill:before{content:"\\eee7"}.ri-macbook-line:before{content:"\\eee8"}.ri-magic-fill:before{content:"\\eee9"}.ri-magic-line:before{content:"\\eeea"}.ri-mail-add-fill:before{content:"\\eeeb"}.ri-mail-add-line:before{content:"\\eeec"}.ri-mail-check-fill:before{content:"\\eeed"}.ri-mail-check-line:before{content:"\\eeee"}.ri-mail-close-fill:before{content:"\\eeef"}.ri-mail-close-line:before{content:"\\eef0"}.ri-mail-download-fill:before{content:"\\eef1"}.ri-mail-download-line:before{content:"\\eef2"}.ri-mail-fill:before{content:"\\eef3"}.ri-mail-forbid-fill:before{content:"\\eef4"}.ri-mail-forbid-line:before{content:"\\eef5"}.ri-mail-line:before{content:"\\eef6"}.ri-mail-lock-fill:before{content:"\\eef7"}.ri-mail-lock-line:before{content:"\\eef8"}.ri-mail-open-fill:before{content:"\\eef9"}.ri-mail-open-line:before{content:"\\eefa"}.ri-mail-send-fill:before{content:"\\eefb"}.ri-mail-send-line:before{content:"\\eefc"}.ri-mail-settings-fill:before{content:"\\eefd"}.ri-mail-settings-line:before{content:"\\eefe"}.ri-mail-star-fill:before{content:"\\eeff"}.ri-mail-star-line:before{content:"\\ef00"}.ri-mail-unread-fill:before{content:"\\ef01"}.ri-mail-unread-line:before{content:"\\ef02"}.ri-mail-volume-fill:before{content:"\\ef03"}.ri-mail-volume-line:before{content:"\\ef04"}.ri-map-2-fill:before{content:"\\ef05"}.ri-map-2-line:before{content:"\\ef06"}.ri-map-fill:before{content:"\\ef07"}.ri-map-line:before{content:"\\ef08"}.ri-map-pin-2-fill:before{content:"\\ef09"}.ri-map-pin-2-line:before{content:"\\ef0a"}.ri-map-pin-3-fill:before{content:"\\ef0b"}.ri-map-pin-3-line:before{content:"\\ef0c"}.ri-map-pin-4-fill:before{content:"\\ef0d"}.ri-map-pin-4-line:before{content:"\\ef0e"}.ri-map-pin-5-fill:before{content:"\\ef0f"}.ri-map-pin-5-line:before{content:"\\ef10"}.ri-map-pin-add-fill:before{content:"\\ef11"}.ri-map-pin-add-line:before{content:"\\ef12"}.ri-map-pin-fill:before{content:"\\ef13"}.ri-map-pin-line:before{content:"\\ef14"}.ri-map-pin-range-fill:before{content:"\\ef15"}.ri-map-pin-range-line:before{content:"\\ef16"}.ri-map-pin-time-fill:before{content:"\\ef17"}.ri-map-pin-time-line:before{content:"\\ef18"}.ri-map-pin-user-fill:before{content:"\\ef19"}.ri-map-pin-user-line:before{content:"\\ef1a"}.ri-mark-pen-fill:before{content:"\\ef1b"}.ri-mark-pen-line:before{content:"\\ef1c"}.ri-markdown-fill:before{content:"\\ef1d"}.ri-markdown-line:before{content:"\\ef1e"}.ri-markup-fill:before{content:"\\ef1f"}.ri-markup-line:before{content:"\\ef20"}.ri-mastercard-fill:before{content:"\\ef21"}.ri-mastercard-line:before{content:"\\ef22"}.ri-mastodon-fill:before{content:"\\ef23"}.ri-mastodon-line:before{content:"\\ef24"}.ri-medal-2-fill:before{content:"\\ef25"}.ri-medal-2-line:before{content:"\\ef26"}.ri-medal-fill:before{content:"\\ef27"}.ri-medal-line:before{content:"\\ef28"}.ri-medicine-bottle-fill:before{content:"\\ef29"}.ri-medicine-bottle-line:before{content:"\\ef2a"}.ri-medium-fill:before{content:"\\ef2b"}.ri-medium-line:before{content:"\\ef2c"}.ri-men-fill:before{content:"\\ef2d"}.ri-men-line:before{content:"\\ef2e"}.ri-mental-health-fill:before{content:"\\ef2f"}.ri-mental-health-line:before{content:"\\ef30"}.ri-menu-2-fill:before{content:"\\ef31"}.ri-menu-2-line:before{content:"\\ef32"}.ri-menu-3-fill:before{content:"\\ef33"}.ri-menu-3-line:before{content:"\\ef34"}.ri-menu-4-fill:before{content:"\\ef35"}.ri-menu-4-line:before{content:"\\ef36"}.ri-menu-5-fill:before{content:"\\ef37"}.ri-menu-5-line:before{content:"\\ef38"}.ri-menu-add-fill:before{content:"\\ef39"}.ri-menu-add-line:before{content:"\\ef3a"}.ri-menu-fill:before{content:"\\ef3b"}.ri-menu-fold-fill:before{content:"\\ef3c"}.ri-menu-fold-line:before{content:"\\ef3d"}.ri-menu-line:before{content:"\\ef3e"}.ri-menu-unfold-fill:before{content:"\\ef3f"}.ri-menu-unfold-line:before{content:"\\ef40"}.ri-merge-cells-horizontal:before{content:"\\ef41"}.ri-merge-cells-vertical:before{content:"\\ef42"}.ri-message-2-fill:before{content:"\\ef43"}.ri-message-2-line:before{content:"\\ef44"}.ri-message-3-fill:before{content:"\\ef45"}.ri-message-3-line:before{content:"\\ef46"}.ri-message-fill:before{content:"\\ef47"}.ri-message-line:before{content:"\\ef48"}.ri-messenger-fill:before{content:"\\ef49"}.ri-messenger-line:before{content:"\\ef4a"}.ri-meteor-fill:before{content:"\\ef4b"}.ri-meteor-line:before{content:"\\ef4c"}.ri-mic-2-fill:before{content:"\\ef4d"}.ri-mic-2-line:before{content:"\\ef4e"}.ri-mic-fill:before{content:"\\ef4f"}.ri-mic-line:before{content:"\\ef50"}.ri-mic-off-fill:before{content:"\\ef51"}.ri-mic-off-line:before{content:"\\ef52"}.ri-mickey-fill:before{content:"\\ef53"}.ri-mickey-line:before{content:"\\ef54"}.ri-microscope-fill:before{content:"\\ef55"}.ri-microscope-line:before{content:"\\ef56"}.ri-microsoft-fill:before{content:"\\ef57"}.ri-microsoft-line:before{content:"\\ef58"}.ri-mind-map:before{content:"\\ef59"}.ri-mini-program-fill:before{content:"\\ef5a"}.ri-mini-program-line:before{content:"\\ef5b"}.ri-mist-fill:before{content:"\\ef5c"}.ri-mist-line:before{content:"\\ef5d"}.ri-money-cny-box-fill:before{content:"\\ef5e"}.ri-money-cny-box-line:before{content:"\\ef5f"}.ri-money-cny-circle-fill:before{content:"\\ef60"}.ri-money-cny-circle-line:before{content:"\\ef61"}.ri-money-dollar-box-fill:before{content:"\\ef62"}.ri-money-dollar-box-line:before{content:"\\ef63"}.ri-money-dollar-circle-fill:before{content:"\\ef64"}.ri-money-dollar-circle-line:before{content:"\\ef65"}.ri-money-euro-box-fill:before{content:"\\ef66"}.ri-money-euro-box-line:before{content:"\\ef67"}.ri-money-euro-circle-fill:before{content:"\\ef68"}.ri-money-euro-circle-line:before{content:"\\ef69"}.ri-money-pound-box-fill:before{content:"\\ef6a"}.ri-money-pound-box-line:before{content:"\\ef6b"}.ri-money-pound-circle-fill:before{content:"\\ef6c"}.ri-money-pound-circle-line:before{content:"\\ef6d"}.ri-moon-clear-fill:before{content:"\\ef6e"}.ri-moon-clear-line:before{content:"\\ef6f"}.ri-moon-cloudy-fill:before{content:"\\ef70"}.ri-moon-cloudy-line:before{content:"\\ef71"}.ri-moon-fill:before{content:"\\ef72"}.ri-moon-foggy-fill:before{content:"\\ef73"}.ri-moon-foggy-line:before{content:"\\ef74"}.ri-moon-line:before{content:"\\ef75"}.ri-more-2-fill:before{content:"\\ef76"}.ri-more-2-line:before{content:"\\ef77"}.ri-more-fill:before{content:"\\ef78"}.ri-more-line:before{content:"\\ef79"}.ri-motorbike-fill:before{content:"\\ef7a"}.ri-motorbike-line:before{content:"\\ef7b"}.ri-mouse-fill:before{content:"\\ef7c"}.ri-mouse-line:before{content:"\\ef7d"}.ri-movie-2-fill:before{content:"\\ef7e"}.ri-movie-2-line:before{content:"\\ef7f"}.ri-movie-fill:before{content:"\\ef80"}.ri-movie-line:before{content:"\\ef81"}.ri-music-2-fill:before{content:"\\ef82"}.ri-music-2-line:before{content:"\\ef83"}.ri-music-fill:before{content:"\\ef84"}.ri-music-line:before{content:"\\ef85"}.ri-mv-fill:before{content:"\\ef86"}.ri-mv-line:before{content:"\\ef87"}.ri-navigation-fill:before{content:"\\ef88"}.ri-navigation-line:before{content:"\\ef89"}.ri-netease-cloud-music-fill:before{content:"\\ef8a"}.ri-netease-cloud-music-line:before{content:"\\ef8b"}.ri-netflix-fill:before{content:"\\ef8c"}.ri-netflix-line:before{content:"\\ef8d"}.ri-newspaper-fill:before{content:"\\ef8e"}.ri-newspaper-line:before{content:"\\ef8f"}.ri-node-tree:before{content:"\\ef90"}.ri-notification-2-fill:before{content:"\\ef91"}.ri-notification-2-line:before{content:"\\ef92"}.ri-notification-3-fill:before{content:"\\ef93"}.ri-notification-3-line:before{content:"\\ef94"}.ri-notification-4-fill:before{content:"\\ef95"}.ri-notification-4-line:before{content:"\\ef96"}.ri-notification-badge-fill:before{content:"\\ef97"}.ri-notification-badge-line:before{content:"\\ef98"}.ri-notification-fill:before{content:"\\ef99"}.ri-notification-line:before{content:"\\ef9a"}.ri-notification-off-fill:before{content:"\\ef9b"}.ri-notification-off-line:before{content:"\\ef9c"}.ri-npmjs-fill:before{content:"\\ef9d"}.ri-npmjs-line:before{content:"\\ef9e"}.ri-number-0:before{content:"\\ef9f"}.ri-number-1:before{content:"\\efa0"}.ri-number-2:before{content:"\\efa1"}.ri-number-3:before{content:"\\efa2"}.ri-number-4:before{content:"\\efa3"}.ri-number-5:before{content:"\\efa4"}.ri-number-6:before{content:"\\efa5"}.ri-number-7:before{content:"\\efa6"}.ri-number-8:before{content:"\\efa7"}.ri-number-9:before{content:"\\efa8"}.ri-numbers-fill:before{content:"\\efa9"}.ri-numbers-line:before{content:"\\efaa"}.ri-nurse-fill:before{content:"\\efab"}.ri-nurse-line:before{content:"\\efac"}.ri-oil-fill:before{content:"\\efad"}.ri-oil-line:before{content:"\\efae"}.ri-omega:before{content:"\\efaf"}.ri-open-arm-fill:before{content:"\\efb0"}.ri-open-arm-line:before{content:"\\efb1"}.ri-open-source-fill:before{content:"\\efb2"}.ri-open-source-line:before{content:"\\efb3"}.ri-opera-fill:before{content:"\\efb4"}.ri-opera-line:before{content:"\\efb5"}.ri-order-play-fill:before{content:"\\efb6"}.ri-order-play-line:before{content:"\\efb7"}.ri-organization-chart:before{content:"\\efb8"}.ri-outlet-2-fill:before{content:"\\efb9"}.ri-outlet-2-line:before{content:"\\efba"}.ri-outlet-fill:before{content:"\\efbb"}.ri-outlet-line:before{content:"\\efbc"}.ri-page-separator:before{content:"\\efbd"}.ri-pages-fill:before{content:"\\efbe"}.ri-pages-line:before{content:"\\efbf"}.ri-paint-brush-fill:before{content:"\\efc0"}.ri-paint-brush-line:before{content:"\\efc1"}.ri-paint-fill:before{content:"\\efc2"}.ri-paint-line:before{content:"\\efc3"}.ri-palette-fill:before{content:"\\efc4"}.ri-palette-line:before{content:"\\efc5"}.ri-pantone-fill:before{content:"\\efc6"}.ri-pantone-line:before{content:"\\efc7"}.ri-paragraph:before{content:"\\efc8"}.ri-parent-fill:before{content:"\\efc9"}.ri-parent-line:before{content:"\\efca"}.ri-parentheses-fill:before{content:"\\efcb"}.ri-parentheses-line:before{content:"\\efcc"}.ri-parking-box-fill:before{content:"\\efcd"}.ri-parking-box-line:before{content:"\\efce"}.ri-parking-fill:before{content:"\\efcf"}.ri-parking-line:before{content:"\\efd0"}.ri-passport-fill:before{content:"\\efd1"}.ri-passport-line:before{content:"\\efd2"}.ri-patreon-fill:before{content:"\\efd3"}.ri-patreon-line:before{content:"\\efd4"}.ri-pause-circle-fill:before{content:"\\efd5"}.ri-pause-circle-line:before{content:"\\efd6"}.ri-pause-fill:before{content:"\\efd7"}.ri-pause-line:before{content:"\\efd8"}.ri-pause-mini-fill:before{content:"\\efd9"}.ri-pause-mini-line:before{content:"\\efda"}.ri-paypal-fill:before{content:"\\efdb"}.ri-paypal-line:before{content:"\\efdc"}.ri-pen-nib-fill:before{content:"\\efdd"}.ri-pen-nib-line:before{content:"\\efde"}.ri-pencil-fill:before{content:"\\efdf"}.ri-pencil-line:before{content:"\\efe0"}.ri-pencil-ruler-2-fill:before{content:"\\efe1"}.ri-pencil-ruler-2-line:before{content:"\\efe2"}.ri-pencil-ruler-fill:before{content:"\\efe3"}.ri-pencil-ruler-line:before{content:"\\efe4"}.ri-percent-fill:before{content:"\\efe5"}.ri-percent-line:before{content:"\\efe6"}.ri-phone-camera-fill:before{content:"\\efe7"}.ri-phone-camera-line:before{content:"\\efe8"}.ri-phone-fill:before{content:"\\efe9"}.ri-phone-find-fill:before{content:"\\efea"}.ri-phone-find-line:before{content:"\\efeb"}.ri-phone-line:before{content:"\\efec"}.ri-phone-lock-fill:before{content:"\\efed"}.ri-phone-lock-line:before{content:"\\efee"}.ri-picture-in-picture-2-fill:before{content:"\\efef"}.ri-picture-in-picture-2-line:before{content:"\\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\\eff1"}.ri-picture-in-picture-exit-line:before{content:"\\eff2"}.ri-picture-in-picture-fill:before{content:"\\eff3"}.ri-picture-in-picture-line:before{content:"\\eff4"}.ri-pie-chart-2-fill:before{content:"\\eff5"}.ri-pie-chart-2-line:before{content:"\\eff6"}.ri-pie-chart-box-fill:before{content:"\\eff7"}.ri-pie-chart-box-line:before{content:"\\eff8"}.ri-pie-chart-fill:before{content:"\\eff9"}.ri-pie-chart-line:before{content:"\\effa"}.ri-pin-distance-fill:before{content:"\\effb"}.ri-pin-distance-line:before{content:"\\effc"}.ri-ping-pong-fill:before{content:"\\effd"}.ri-ping-pong-line:before{content:"\\effe"}.ri-pinterest-fill:before{content:"\\efff"}.ri-pinterest-line:before{content:"\\f000"}.ri-pinyin-input:before{content:"\\f001"}.ri-pixelfed-fill:before{content:"\\f002"}.ri-pixelfed-line:before{content:"\\f003"}.ri-plane-fill:before{content:"\\f004"}.ri-plane-line:before{content:"\\f005"}.ri-plant-fill:before{content:"\\f006"}.ri-plant-line:before{content:"\\f007"}.ri-play-circle-fill:before{content:"\\f008"}.ri-play-circle-line:before{content:"\\f009"}.ri-play-fill:before{content:"\\f00a"}.ri-play-line:before{content:"\\f00b"}.ri-play-list-2-fill:before{content:"\\f00c"}.ri-play-list-2-line:before{content:"\\f00d"}.ri-play-list-add-fill:before{content:"\\f00e"}.ri-play-list-add-line:before{content:"\\f00f"}.ri-play-list-fill:before{content:"\\f010"}.ri-play-list-line:before{content:"\\f011"}.ri-play-mini-fill:before{content:"\\f012"}.ri-play-mini-line:before{content:"\\f013"}.ri-playstation-fill:before{content:"\\f014"}.ri-playstation-line:before{content:"\\f015"}.ri-plug-2-fill:before{content:"\\f016"}.ri-plug-2-line:before{content:"\\f017"}.ri-plug-fill:before{content:"\\f018"}.ri-plug-line:before{content:"\\f019"}.ri-polaroid-2-fill:before{content:"\\f01a"}.ri-polaroid-2-line:before{content:"\\f01b"}.ri-polaroid-fill:before{content:"\\f01c"}.ri-polaroid-line:before{content:"\\f01d"}.ri-police-car-fill:before{content:"\\f01e"}.ri-police-car-line:before{content:"\\f01f"}.ri-price-tag-2-fill:before{content:"\\f020"}.ri-price-tag-2-line:before{content:"\\f021"}.ri-price-tag-3-fill:before{content:"\\f022"}.ri-price-tag-3-line:before{content:"\\f023"}.ri-price-tag-fill:before{content:"\\f024"}.ri-price-tag-line:before{content:"\\f025"}.ri-printer-cloud-fill:before{content:"\\f026"}.ri-printer-cloud-line:before{content:"\\f027"}.ri-printer-fill:before{content:"\\f028"}.ri-printer-line:before{content:"\\f029"}.ri-product-hunt-fill:before{content:"\\f02a"}.ri-product-hunt-line:before{content:"\\f02b"}.ri-profile-fill:before{content:"\\f02c"}.ri-profile-line:before{content:"\\f02d"}.ri-projector-2-fill:before{content:"\\f02e"}.ri-projector-2-line:before{content:"\\f02f"}.ri-projector-fill:before{content:"\\f030"}.ri-projector-line:before{content:"\\f031"}.ri-psychotherapy-fill:before{content:"\\f032"}.ri-psychotherapy-line:before{content:"\\f033"}.ri-pulse-fill:before{content:"\\f034"}.ri-pulse-line:before{content:"\\f035"}.ri-pushpin-2-fill:before{content:"\\f036"}.ri-pushpin-2-line:before{content:"\\f037"}.ri-pushpin-fill:before{content:"\\f038"}.ri-pushpin-line:before{content:"\\f039"}.ri-qq-fill:before{content:"\\f03a"}.ri-qq-line:before{content:"\\f03b"}.ri-qr-code-fill:before{content:"\\f03c"}.ri-qr-code-line:before{content:"\\f03d"}.ri-qr-scan-2-fill:before{content:"\\f03e"}.ri-qr-scan-2-line:before{content:"\\f03f"}.ri-qr-scan-fill:before{content:"\\f040"}.ri-qr-scan-line:before{content:"\\f041"}.ri-question-answer-fill:before{content:"\\f042"}.ri-question-answer-line:before{content:"\\f043"}.ri-question-fill:before{content:"\\f044"}.ri-question-line:before{content:"\\f045"}.ri-question-mark:before{content:"\\f046"}.ri-questionnaire-fill:before{content:"\\f047"}.ri-questionnaire-line:before{content:"\\f048"}.ri-quill-pen-fill:before{content:"\\f049"}.ri-quill-pen-line:before{content:"\\f04a"}.ri-radar-fill:before{content:"\\f04b"}.ri-radar-line:before{content:"\\f04c"}.ri-radio-2-fill:before{content:"\\f04d"}.ri-radio-2-line:before{content:"\\f04e"}.ri-radio-button-fill:before{content:"\\f04f"}.ri-radio-button-line:before{content:"\\f050"}.ri-radio-fill:before{content:"\\f051"}.ri-radio-line:before{content:"\\f052"}.ri-rainbow-fill:before{content:"\\f053"}.ri-rainbow-line:before{content:"\\f054"}.ri-rainy-fill:before{content:"\\f055"}.ri-rainy-line:before{content:"\\f056"}.ri-reactjs-fill:before{content:"\\f057"}.ri-reactjs-line:before{content:"\\f058"}.ri-record-circle-fill:before{content:"\\f059"}.ri-record-circle-line:before{content:"\\f05a"}.ri-record-mail-fill:before{content:"\\f05b"}.ri-record-mail-line:before{content:"\\f05c"}.ri-recycle-fill:before{content:"\\f05d"}.ri-recycle-line:before{content:"\\f05e"}.ri-red-packet-fill:before{content:"\\f05f"}.ri-red-packet-line:before{content:"\\f060"}.ri-reddit-fill:before{content:"\\f061"}.ri-reddit-line:before{content:"\\f062"}.ri-refresh-fill:before{content:"\\f063"}.ri-refresh-line:before{content:"\\f064"}.ri-refund-2-fill:before{content:"\\f065"}.ri-refund-2-line:before{content:"\\f066"}.ri-refund-fill:before{content:"\\f067"}.ri-refund-line:before{content:"\\f068"}.ri-registered-fill:before{content:"\\f069"}.ri-registered-line:before{content:"\\f06a"}.ri-remixicon-fill:before{content:"\\f06b"}.ri-remixicon-line:before{content:"\\f06c"}.ri-remote-control-2-fill:before{content:"\\f06d"}.ri-remote-control-2-line:before{content:"\\f06e"}.ri-remote-control-fill:before{content:"\\f06f"}.ri-remote-control-line:before{content:"\\f070"}.ri-repeat-2-fill:before{content:"\\f071"}.ri-repeat-2-line:before{content:"\\f072"}.ri-repeat-fill:before{content:"\\f073"}.ri-repeat-line:before{content:"\\f074"}.ri-repeat-one-fill:before{content:"\\f075"}.ri-repeat-one-line:before{content:"\\f076"}.ri-reply-all-fill:before{content:"\\f077"}.ri-reply-all-line:before{content:"\\f078"}.ri-reply-fill:before{content:"\\f079"}.ri-reply-line:before{content:"\\f07a"}.ri-reserved-fill:before{content:"\\f07b"}.ri-reserved-line:before{content:"\\f07c"}.ri-rest-time-fill:before{content:"\\f07d"}.ri-rest-time-line:before{content:"\\f07e"}.ri-restart-fill:before{content:"\\f07f"}.ri-restart-line:before{content:"\\f080"}.ri-restaurant-2-fill:before{content:"\\f081"}.ri-restaurant-2-line:before{content:"\\f082"}.ri-restaurant-fill:before{content:"\\f083"}.ri-restaurant-line:before{content:"\\f084"}.ri-rewind-fill:before{content:"\\f085"}.ri-rewind-line:before{content:"\\f086"}.ri-rewind-mini-fill:before{content:"\\f087"}.ri-rewind-mini-line:before{content:"\\f088"}.ri-rhythm-fill:before{content:"\\f089"}.ri-rhythm-line:before{content:"\\f08a"}.ri-riding-fill:before{content:"\\f08b"}.ri-riding-line:before{content:"\\f08c"}.ri-road-map-fill:before{content:"\\f08d"}.ri-road-map-line:before{content:"\\f08e"}.ri-roadster-fill:before{content:"\\f08f"}.ri-roadster-line:before{content:"\\f090"}.ri-robot-fill:before{content:"\\f091"}.ri-robot-line:before{content:"\\f092"}.ri-rocket-2-fill:before{content:"\\f093"}.ri-rocket-2-line:before{content:"\\f094"}.ri-rocket-fill:before{content:"\\f095"}.ri-rocket-line:before{content:"\\f096"}.ri-rotate-lock-fill:before{content:"\\f097"}.ri-rotate-lock-line:before{content:"\\f098"}.ri-rounded-corner:before{content:"\\f099"}.ri-route-fill:before{content:"\\f09a"}.ri-route-line:before{content:"\\f09b"}.ri-router-fill:before{content:"\\f09c"}.ri-router-line:before{content:"\\f09d"}.ri-rss-fill:before{content:"\\f09e"}.ri-rss-line:before{content:"\\f09f"}.ri-ruler-2-fill:before{content:"\\f0a0"}.ri-ruler-2-line:before{content:"\\f0a1"}.ri-ruler-fill:before{content:"\\f0a2"}.ri-ruler-line:before{content:"\\f0a3"}.ri-run-fill:before{content:"\\f0a4"}.ri-run-line:before{content:"\\f0a5"}.ri-safari-fill:before{content:"\\f0a6"}.ri-safari-line:before{content:"\\f0a7"}.ri-safe-2-fill:before{content:"\\f0a8"}.ri-safe-2-line:before{content:"\\f0a9"}.ri-safe-fill:before{content:"\\f0aa"}.ri-safe-line:before{content:"\\f0ab"}.ri-sailboat-fill:before{content:"\\f0ac"}.ri-sailboat-line:before{content:"\\f0ad"}.ri-save-2-fill:before{content:"\\f0ae"}.ri-save-2-line:before{content:"\\f0af"}.ri-save-3-fill:before{content:"\\f0b0"}.ri-save-3-line:before{content:"\\f0b1"}.ri-save-fill:before{content:"\\f0b2"}.ri-save-line:before{content:"\\f0b3"}.ri-scales-2-fill:before{content:"\\f0b4"}.ri-scales-2-line:before{content:"\\f0b5"}.ri-scales-3-fill:before{content:"\\f0b6"}.ri-scales-3-line:before{content:"\\f0b7"}.ri-scales-fill:before{content:"\\f0b8"}.ri-scales-line:before{content:"\\f0b9"}.ri-scan-2-fill:before{content:"\\f0ba"}.ri-scan-2-line:before{content:"\\f0bb"}.ri-scan-fill:before{content:"\\f0bc"}.ri-scan-line:before{content:"\\f0bd"}.ri-scissors-2-fill:before{content:"\\f0be"}.ri-scissors-2-line:before{content:"\\f0bf"}.ri-scissors-cut-fill:before{content:"\\f0c0"}.ri-scissors-cut-line:before{content:"\\f0c1"}.ri-scissors-fill:before{content:"\\f0c2"}.ri-scissors-line:before{content:"\\f0c3"}.ri-screenshot-2-fill:before{content:"\\f0c4"}.ri-screenshot-2-line:before{content:"\\f0c5"}.ri-screenshot-fill:before{content:"\\f0c6"}.ri-screenshot-line:before{content:"\\f0c7"}.ri-sd-card-fill:before{content:"\\f0c8"}.ri-sd-card-line:before{content:"\\f0c9"}.ri-sd-card-mini-fill:before{content:"\\f0ca"}.ri-sd-card-mini-line:before{content:"\\f0cb"}.ri-search-2-fill:before{content:"\\f0cc"}.ri-search-2-line:before{content:"\\f0cd"}.ri-search-eye-fill:before{content:"\\f0ce"}.ri-search-eye-line:before{content:"\\f0cf"}.ri-search-fill:before{content:"\\f0d0"}.ri-search-line:before{content:"\\f0d1"}.ri-secure-payment-fill:before{content:"\\f0d2"}.ri-secure-payment-line:before{content:"\\f0d3"}.ri-seedling-fill:before{content:"\\f0d4"}.ri-seedling-line:before{content:"\\f0d5"}.ri-send-backward:before{content:"\\f0d6"}.ri-send-plane-2-fill:before{content:"\\f0d7"}.ri-send-plane-2-line:before{content:"\\f0d8"}.ri-send-plane-fill:before{content:"\\f0d9"}.ri-send-plane-line:before{content:"\\f0da"}.ri-send-to-back:before{content:"\\f0db"}.ri-sensor-fill:before{content:"\\f0dc"}.ri-sensor-line:before{content:"\\f0dd"}.ri-separator:before{content:"\\f0de"}.ri-server-fill:before{content:"\\f0df"}.ri-server-line:before{content:"\\f0e0"}.ri-service-fill:before{content:"\\f0e1"}.ri-service-line:before{content:"\\f0e2"}.ri-settings-2-fill:before{content:"\\f0e3"}.ri-settings-2-line:before{content:"\\f0e4"}.ri-settings-3-fill:before{content:"\\f0e5"}.ri-settings-3-line:before{content:"\\f0e6"}.ri-settings-4-fill:before{content:"\\f0e7"}.ri-settings-4-line:before{content:"\\f0e8"}.ri-settings-5-fill:before{content:"\\f0e9"}.ri-settings-5-line:before{content:"\\f0ea"}.ri-settings-6-fill:before{content:"\\f0eb"}.ri-settings-6-line:before{content:"\\f0ec"}.ri-settings-fill:before{content:"\\f0ed"}.ri-settings-line:before{content:"\\f0ee"}.ri-shape-2-fill:before{content:"\\f0ef"}.ri-shape-2-line:before{content:"\\f0f0"}.ri-shape-fill:before{content:"\\f0f1"}.ri-shape-line:before{content:"\\f0f2"}.ri-share-box-fill:before{content:"\\f0f3"}.ri-share-box-line:before{content:"\\f0f4"}.ri-share-circle-fill:before{content:"\\f0f5"}.ri-share-circle-line:before{content:"\\f0f6"}.ri-share-fill:before{content:"\\f0f7"}.ri-share-forward-2-fill:before{content:"\\f0f8"}.ri-share-forward-2-line:before{content:"\\f0f9"}.ri-share-forward-box-fill:before{content:"\\f0fa"}.ri-share-forward-box-line:before{content:"\\f0fb"}.ri-share-forward-fill:before{content:"\\f0fc"}.ri-share-forward-line:before{content:"\\f0fd"}.ri-share-line:before{content:"\\f0fe"}.ri-shield-check-fill:before{content:"\\f0ff"}.ri-shield-check-line:before{content:"\\f100"}.ri-shield-cross-fill:before{content:"\\f101"}.ri-shield-cross-line:before{content:"\\f102"}.ri-shield-fill:before{content:"\\f103"}.ri-shield-flash-fill:before{content:"\\f104"}.ri-shield-flash-line:before{content:"\\f105"}.ri-shield-keyhole-fill:before{content:"\\f106"}.ri-shield-keyhole-line:before{content:"\\f107"}.ri-shield-line:before{content:"\\f108"}.ri-shield-star-fill:before{content:"\\f109"}.ri-shield-star-line:before{content:"\\f10a"}.ri-shield-user-fill:before{content:"\\f10b"}.ri-shield-user-line:before{content:"\\f10c"}.ri-ship-2-fill:before{content:"\\f10d"}.ri-ship-2-line:before{content:"\\f10e"}.ri-ship-fill:before{content:"\\f10f"}.ri-ship-line:before{content:"\\f110"}.ri-shirt-fill:before{content:"\\f111"}.ri-shirt-line:before{content:"\\f112"}.ri-shopping-bag-2-fill:before{content:"\\f113"}.ri-shopping-bag-2-line:before{content:"\\f114"}.ri-shopping-bag-3-fill:before{content:"\\f115"}.ri-shopping-bag-3-line:before{content:"\\f116"}.ri-shopping-bag-fill:before{content:"\\f117"}.ri-shopping-bag-line:before{content:"\\f118"}.ri-shopping-basket-2-fill:before{content:"\\f119"}.ri-shopping-basket-2-line:before{content:"\\f11a"}.ri-shopping-basket-fill:before{content:"\\f11b"}.ri-shopping-basket-line:before{content:"\\f11c"}.ri-shopping-cart-2-fill:before{content:"\\f11d"}.ri-shopping-cart-2-line:before{content:"\\f11e"}.ri-shopping-cart-fill:before{content:"\\f11f"}.ri-shopping-cart-line:before{content:"\\f120"}.ri-showers-fill:before{content:"\\f121"}.ri-showers-line:before{content:"\\f122"}.ri-shuffle-fill:before{content:"\\f123"}.ri-shuffle-line:before{content:"\\f124"}.ri-shut-down-fill:before{content:"\\f125"}.ri-shut-down-line:before{content:"\\f126"}.ri-side-bar-fill:before{content:"\\f127"}.ri-side-bar-line:before{content:"\\f128"}.ri-signal-tower-fill:before{content:"\\f129"}.ri-signal-tower-line:before{content:"\\f12a"}.ri-signal-wifi-1-fill:before{content:"\\f12b"}.ri-signal-wifi-1-line:before{content:"\\f12c"}.ri-signal-wifi-2-fill:before{content:"\\f12d"}.ri-signal-wifi-2-line:before{content:"\\f12e"}.ri-signal-wifi-3-fill:before{content:"\\f12f"}.ri-signal-wifi-3-line:before{content:"\\f130"}.ri-signal-wifi-error-fill:before{content:"\\f131"}.ri-signal-wifi-error-line:before{content:"\\f132"}.ri-signal-wifi-fill:before{content:"\\f133"}.ri-signal-wifi-line:before{content:"\\f134"}.ri-signal-wifi-off-fill:before{content:"\\f135"}.ri-signal-wifi-off-line:before{content:"\\f136"}.ri-sim-card-2-fill:before{content:"\\f137"}.ri-sim-card-2-line:before{content:"\\f138"}.ri-sim-card-fill:before{content:"\\f139"}.ri-sim-card-line:before{content:"\\f13a"}.ri-single-quotes-l:before{content:"\\f13b"}.ri-single-quotes-r:before{content:"\\f13c"}.ri-sip-fill:before{content:"\\f13d"}.ri-sip-line:before{content:"\\f13e"}.ri-skip-back-fill:before{content:"\\f13f"}.ri-skip-back-line:before{content:"\\f140"}.ri-skip-back-mini-fill:before{content:"\\f141"}.ri-skip-back-mini-line:before{content:"\\f142"}.ri-skip-forward-fill:before{content:"\\f143"}.ri-skip-forward-line:before{content:"\\f144"}.ri-skip-forward-mini-fill:before{content:"\\f145"}.ri-skip-forward-mini-line:before{content:"\\f146"}.ri-skull-2-fill:before{content:"\\f147"}.ri-skull-2-line:before{content:"\\f148"}.ri-skull-fill:before{content:"\\f149"}.ri-skull-line:before{content:"\\f14a"}.ri-skype-fill:before{content:"\\f14b"}.ri-skype-line:before{content:"\\f14c"}.ri-slack-fill:before{content:"\\f14d"}.ri-slack-line:before{content:"\\f14e"}.ri-slice-fill:before{content:"\\f14f"}.ri-slice-line:before{content:"\\f150"}.ri-slideshow-2-fill:before{content:"\\f151"}.ri-slideshow-2-line:before{content:"\\f152"}.ri-slideshow-3-fill:before{content:"\\f153"}.ri-slideshow-3-line:before{content:"\\f154"}.ri-slideshow-4-fill:before{content:"\\f155"}.ri-slideshow-4-line:before{content:"\\f156"}.ri-slideshow-fill:before{content:"\\f157"}.ri-slideshow-line:before{content:"\\f158"}.ri-smartphone-fill:before{content:"\\f159"}.ri-smartphone-line:before{content:"\\f15a"}.ri-snapchat-fill:before{content:"\\f15b"}.ri-snapchat-line:before{content:"\\f15c"}.ri-snowy-fill:before{content:"\\f15d"}.ri-snowy-line:before{content:"\\f15e"}.ri-sort-asc:before{content:"\\f15f"}.ri-sort-desc:before{content:"\\f160"}.ri-sound-module-fill:before{content:"\\f161"}.ri-sound-module-line:before{content:"\\f162"}.ri-soundcloud-fill:before{content:"\\f163"}.ri-soundcloud-line:before{content:"\\f164"}.ri-space-ship-fill:before{content:"\\f165"}.ri-space-ship-line:before{content:"\\f166"}.ri-space:before{content:"\\f167"}.ri-spam-2-fill:before{content:"\\f168"}.ri-spam-2-line:before{content:"\\f169"}.ri-spam-3-fill:before{content:"\\f16a"}.ri-spam-3-line:before{content:"\\f16b"}.ri-spam-fill:before{content:"\\f16c"}.ri-spam-line:before{content:"\\f16d"}.ri-speaker-2-fill:before{content:"\\f16e"}.ri-speaker-2-line:before{content:"\\f16f"}.ri-speaker-3-fill:before{content:"\\f170"}.ri-speaker-3-line:before{content:"\\f171"}.ri-speaker-fill:before{content:"\\f172"}.ri-speaker-line:before{content:"\\f173"}.ri-spectrum-fill:before{content:"\\f174"}.ri-spectrum-line:before{content:"\\f175"}.ri-speed-fill:before{content:"\\f176"}.ri-speed-line:before{content:"\\f177"}.ri-speed-mini-fill:before{content:"\\f178"}.ri-speed-mini-line:before{content:"\\f179"}.ri-split-cells-horizontal:before{content:"\\f17a"}.ri-split-cells-vertical:before{content:"\\f17b"}.ri-spotify-fill:before{content:"\\f17c"}.ri-spotify-line:before{content:"\\f17d"}.ri-spy-fill:before{content:"\\f17e"}.ri-spy-line:before{content:"\\f17f"}.ri-stack-fill:before{content:"\\f180"}.ri-stack-line:before{content:"\\f181"}.ri-stack-overflow-fill:before{content:"\\f182"}.ri-stack-overflow-line:before{content:"\\f183"}.ri-stackshare-fill:before{content:"\\f184"}.ri-stackshare-line:before{content:"\\f185"}.ri-star-fill:before{content:"\\f186"}.ri-star-half-fill:before{content:"\\f187"}.ri-star-half-line:before{content:"\\f188"}.ri-star-half-s-fill:before{content:"\\f189"}.ri-star-half-s-line:before{content:"\\f18a"}.ri-star-line:before{content:"\\f18b"}.ri-star-s-fill:before{content:"\\f18c"}.ri-star-s-line:before{content:"\\f18d"}.ri-star-smile-fill:before{content:"\\f18e"}.ri-star-smile-line:before{content:"\\f18f"}.ri-steam-fill:before{content:"\\f190"}.ri-steam-line:before{content:"\\f191"}.ri-steering-2-fill:before{content:"\\f192"}.ri-steering-2-line:before{content:"\\f193"}.ri-steering-fill:before{content:"\\f194"}.ri-steering-line:before{content:"\\f195"}.ri-stethoscope-fill:before{content:"\\f196"}.ri-stethoscope-line:before{content:"\\f197"}.ri-sticky-note-2-fill:before{content:"\\f198"}.ri-sticky-note-2-line:before{content:"\\f199"}.ri-sticky-note-fill:before{content:"\\f19a"}.ri-sticky-note-line:before{content:"\\f19b"}.ri-stock-fill:before{content:"\\f19c"}.ri-stock-line:before{content:"\\f19d"}.ri-stop-circle-fill:before{content:"\\f19e"}.ri-stop-circle-line:before{content:"\\f19f"}.ri-stop-fill:before{content:"\\f1a0"}.ri-stop-line:before{content:"\\f1a1"}.ri-stop-mini-fill:before{content:"\\f1a2"}.ri-stop-mini-line:before{content:"\\f1a3"}.ri-store-2-fill:before{content:"\\f1a4"}.ri-store-2-line:before{content:"\\f1a5"}.ri-store-3-fill:before{content:"\\f1a6"}.ri-store-3-line:before{content:"\\f1a7"}.ri-store-fill:before{content:"\\f1a8"}.ri-store-line:before{content:"\\f1a9"}.ri-strikethrough-2:before{content:"\\f1aa"}.ri-strikethrough:before{content:"\\f1ab"}.ri-subscript-2:before{content:"\\f1ac"}.ri-subscript:before{content:"\\f1ad"}.ri-subtract-fill:before{content:"\\f1ae"}.ri-subtract-line:before{content:"\\f1af"}.ri-subway-fill:before{content:"\\f1b0"}.ri-subway-line:before{content:"\\f1b1"}.ri-subway-wifi-fill:before{content:"\\f1b2"}.ri-subway-wifi-line:before{content:"\\f1b3"}.ri-suitcase-2-fill:before{content:"\\f1b4"}.ri-suitcase-2-line:before{content:"\\f1b5"}.ri-suitcase-3-fill:before{content:"\\f1b6"}.ri-suitcase-3-line:before{content:"\\f1b7"}.ri-suitcase-fill:before{content:"\\f1b8"}.ri-suitcase-line:before{content:"\\f1b9"}.ri-sun-cloudy-fill:before{content:"\\f1ba"}.ri-sun-cloudy-line:before{content:"\\f1bb"}.ri-sun-fill:before{content:"\\f1bc"}.ri-sun-foggy-fill:before{content:"\\f1bd"}.ri-sun-foggy-line:before{content:"\\f1be"}.ri-sun-line:before{content:"\\f1bf"}.ri-superscript-2:before{content:"\\f1c0"}.ri-superscript:before{content:"\\f1c1"}.ri-surgical-mask-fill:before{content:"\\f1c2"}.ri-surgical-mask-line:before{content:"\\f1c3"}.ri-surround-sound-fill:before{content:"\\f1c4"}.ri-surround-sound-line:before{content:"\\f1c5"}.ri-survey-fill:before{content:"\\f1c6"}.ri-survey-line:before{content:"\\f1c7"}.ri-swap-box-fill:before{content:"\\f1c8"}.ri-swap-box-line:before{content:"\\f1c9"}.ri-swap-fill:before{content:"\\f1ca"}.ri-swap-line:before{content:"\\f1cb"}.ri-switch-fill:before{content:"\\f1cc"}.ri-switch-line:before{content:"\\f1cd"}.ri-sword-fill:before{content:"\\f1ce"}.ri-sword-line:before{content:"\\f1cf"}.ri-syringe-fill:before{content:"\\f1d0"}.ri-syringe-line:before{content:"\\f1d1"}.ri-t-box-fill:before{content:"\\f1d2"}.ri-t-box-line:before{content:"\\f1d3"}.ri-t-shirt-2-fill:before{content:"\\f1d4"}.ri-t-shirt-2-line:before{content:"\\f1d5"}.ri-t-shirt-air-fill:before{content:"\\f1d6"}.ri-t-shirt-air-line:before{content:"\\f1d7"}.ri-t-shirt-fill:before{content:"\\f1d8"}.ri-t-shirt-line:before{content:"\\f1d9"}.ri-table-2:before{content:"\\f1da"}.ri-table-alt-fill:before{content:"\\f1db"}.ri-table-alt-line:before{content:"\\f1dc"}.ri-table-fill:before{content:"\\f1dd"}.ri-table-line:before{content:"\\f1de"}.ri-tablet-fill:before{content:"\\f1df"}.ri-tablet-line:before{content:"\\f1e0"}.ri-takeaway-fill:before{content:"\\f1e1"}.ri-takeaway-line:before{content:"\\f1e2"}.ri-taobao-fill:before{content:"\\f1e3"}.ri-taobao-line:before{content:"\\f1e4"}.ri-tape-fill:before{content:"\\f1e5"}.ri-tape-line:before{content:"\\f1e6"}.ri-task-fill:before{content:"\\f1e7"}.ri-task-line:before{content:"\\f1e8"}.ri-taxi-fill:before{content:"\\f1e9"}.ri-taxi-line:before{content:"\\f1ea"}.ri-taxi-wifi-fill:before{content:"\\f1eb"}.ri-taxi-wifi-line:before{content:"\\f1ec"}.ri-team-fill:before{content:"\\f1ed"}.ri-team-line:before{content:"\\f1ee"}.ri-telegram-fill:before{content:"\\f1ef"}.ri-telegram-line:before{content:"\\f1f0"}.ri-temp-cold-fill:before{content:"\\f1f1"}.ri-temp-cold-line:before{content:"\\f1f2"}.ri-temp-hot-fill:before{content:"\\f1f3"}.ri-temp-hot-line:before{content:"\\f1f4"}.ri-terminal-box-fill:before{content:"\\f1f5"}.ri-terminal-box-line:before{content:"\\f1f6"}.ri-terminal-fill:before{content:"\\f1f7"}.ri-terminal-line:before{content:"\\f1f8"}.ri-terminal-window-fill:before{content:"\\f1f9"}.ri-terminal-window-line:before{content:"\\f1fa"}.ri-test-tube-fill:before{content:"\\f1fb"}.ri-test-tube-line:before{content:"\\f1fc"}.ri-text-direction-l:before{content:"\\f1fd"}.ri-text-direction-r:before{content:"\\f1fe"}.ri-text-spacing:before{content:"\\f1ff"}.ri-text-wrap:before{content:"\\f200"}.ri-text:before{content:"\\f201"}.ri-thermometer-fill:before{content:"\\f202"}.ri-thermometer-line:before{content:"\\f203"}.ri-thumb-down-fill:before{content:"\\f204"}.ri-thumb-down-line:before{content:"\\f205"}.ri-thumb-up-fill:before{content:"\\f206"}.ri-thumb-up-line:before{content:"\\f207"}.ri-thunderstorms-fill:before{content:"\\f208"}.ri-thunderstorms-line:before{content:"\\f209"}.ri-ticket-2-fill:before{content:"\\f20a"}.ri-ticket-2-line:before{content:"\\f20b"}.ri-ticket-fill:before{content:"\\f20c"}.ri-ticket-line:before{content:"\\f20d"}.ri-time-fill:before{content:"\\f20e"}.ri-time-line:before{content:"\\f20f"}.ri-timer-2-fill:before{content:"\\f210"}.ri-timer-2-line:before{content:"\\f211"}.ri-timer-fill:before{content:"\\f212"}.ri-timer-flash-fill:before{content:"\\f213"}.ri-timer-flash-line:before{content:"\\f214"}.ri-timer-line:before{content:"\\f215"}.ri-todo-fill:before{content:"\\f216"}.ri-todo-line:before{content:"\\f217"}.ri-toggle-fill:before{content:"\\f218"}.ri-toggle-line:before{content:"\\f219"}.ri-tools-fill:before{content:"\\f21a"}.ri-tools-line:before{content:"\\f21b"}.ri-tornado-fill:before{content:"\\f21c"}.ri-tornado-line:before{content:"\\f21d"}.ri-trademark-fill:before{content:"\\f21e"}.ri-trademark-line:before{content:"\\f21f"}.ri-traffic-light-fill:before{content:"\\f220"}.ri-traffic-light-line:before{content:"\\f221"}.ri-train-fill:before{content:"\\f222"}.ri-train-line:before{content:"\\f223"}.ri-train-wifi-fill:before{content:"\\f224"}.ri-train-wifi-line:before{content:"\\f225"}.ri-translate-2:before{content:"\\f226"}.ri-translate:before{content:"\\f227"}.ri-travesti-fill:before{content:"\\f228"}.ri-travesti-line:before{content:"\\f229"}.ri-treasure-map-fill:before{content:"\\f22a"}.ri-treasure-map-line:before{content:"\\f22b"}.ri-trello-fill:before{content:"\\f22c"}.ri-trello-line:before{content:"\\f22d"}.ri-trophy-fill:before{content:"\\f22e"}.ri-trophy-line:before{content:"\\f22f"}.ri-truck-fill:before{content:"\\f230"}.ri-truck-line:before{content:"\\f231"}.ri-tumblr-fill:before{content:"\\f232"}.ri-tumblr-line:before{content:"\\f233"}.ri-tv-2-fill:before{content:"\\f234"}.ri-tv-2-line:before{content:"\\f235"}.ri-tv-fill:before{content:"\\f236"}.ri-tv-line:before{content:"\\f237"}.ri-twitch-fill:before{content:"\\f238"}.ri-twitch-line:before{content:"\\f239"}.ri-twitter-fill:before{content:"\\f23a"}.ri-twitter-line:before{content:"\\f23b"}.ri-typhoon-fill:before{content:"\\f23c"}.ri-typhoon-line:before{content:"\\f23d"}.ri-u-disk-fill:before{content:"\\f23e"}.ri-u-disk-line:before{content:"\\f23f"}.ri-ubuntu-fill:before{content:"\\f240"}.ri-ubuntu-line:before{content:"\\f241"}.ri-umbrella-fill:before{content:"\\f242"}.ri-umbrella-line:before{content:"\\f243"}.ri-underline:before{content:"\\f244"}.ri-uninstall-fill:before{content:"\\f245"}.ri-uninstall-line:before{content:"\\f246"}.ri-unsplash-fill:before{content:"\\f247"}.ri-unsplash-line:before{content:"\\f248"}.ri-upload-2-fill:before{content:"\\f249"}.ri-upload-2-line:before{content:"\\f24a"}.ri-upload-cloud-2-fill:before{content:"\\f24b"}.ri-upload-cloud-2-line:before{content:"\\f24c"}.ri-upload-cloud-fill:before{content:"\\f24d"}.ri-upload-cloud-line:before{content:"\\f24e"}.ri-upload-fill:before{content:"\\f24f"}.ri-upload-line:before{content:"\\f250"}.ri-usb-fill:before{content:"\\f251"}.ri-usb-line:before{content:"\\f252"}.ri-user-2-fill:before{content:"\\f253"}.ri-user-2-line:before{content:"\\f254"}.ri-user-3-fill:before{content:"\\f255"}.ri-user-3-line:before{content:"\\f256"}.ri-user-4-fill:before{content:"\\f257"}.ri-user-4-line:before{content:"\\f258"}.ri-user-5-fill:before{content:"\\f259"}.ri-user-5-line:before{content:"\\f25a"}.ri-user-6-fill:before{content:"\\f25b"}.ri-user-6-line:before{content:"\\f25c"}.ri-user-add-fill:before{content:"\\f25d"}.ri-user-add-line:before{content:"\\f25e"}.ri-user-fill:before{content:"\\f25f"}.ri-user-follow-fill:before{content:"\\f260"}.ri-user-follow-line:before{content:"\\f261"}.ri-user-heart-fill:before{content:"\\f262"}.ri-user-heart-line:before{content:"\\f263"}.ri-user-line:before{content:"\\f264"}.ri-user-location-fill:before{content:"\\f265"}.ri-user-location-line:before{content:"\\f266"}.ri-user-received-2-fill:before{content:"\\f267"}.ri-user-received-2-line:before{content:"\\f268"}.ri-user-received-fill:before{content:"\\f269"}.ri-user-received-line:before{content:"\\f26a"}.ri-user-search-fill:before{content:"\\f26b"}.ri-user-search-line:before{content:"\\f26c"}.ri-user-settings-fill:before{content:"\\f26d"}.ri-user-settings-line:before{content:"\\f26e"}.ri-user-shared-2-fill:before{content:"\\f26f"}.ri-user-shared-2-line:before{content:"\\f270"}.ri-user-shared-fill:before{content:"\\f271"}.ri-user-shared-line:before{content:"\\f272"}.ri-user-smile-fill:before{content:"\\f273"}.ri-user-smile-line:before{content:"\\f274"}.ri-user-star-fill:before{content:"\\f275"}.ri-user-star-line:before{content:"\\f276"}.ri-user-unfollow-fill:before{content:"\\f277"}.ri-user-unfollow-line:before{content:"\\f278"}.ri-user-voice-fill:before{content:"\\f279"}.ri-user-voice-line:before{content:"\\f27a"}.ri-video-add-fill:before{content:"\\f27b"}.ri-video-add-line:before{content:"\\f27c"}.ri-video-chat-fill:before{content:"\\f27d"}.ri-video-chat-line:before{content:"\\f27e"}.ri-video-download-fill:before{content:"\\f27f"}.ri-video-download-line:before{content:"\\f280"}.ri-video-fill:before{content:"\\f281"}.ri-video-line:before{content:"\\f282"}.ri-video-upload-fill:before{content:"\\f283"}.ri-video-upload-line:before{content:"\\f284"}.ri-vidicon-2-fill:before{content:"\\f285"}.ri-vidicon-2-line:before{content:"\\f286"}.ri-vidicon-fill:before{content:"\\f287"}.ri-vidicon-line:before{content:"\\f288"}.ri-vimeo-fill:before{content:"\\f289"}.ri-vimeo-line:before{content:"\\f28a"}.ri-vip-crown-2-fill:before{content:"\\f28b"}.ri-vip-crown-2-line:before{content:"\\f28c"}.ri-vip-crown-fill:before{content:"\\f28d"}.ri-vip-crown-line:before{content:"\\f28e"}.ri-vip-diamond-fill:before{content:"\\f28f"}.ri-vip-diamond-line:before{content:"\\f290"}.ri-vip-fill:before{content:"\\f291"}.ri-vip-line:before{content:"\\f292"}.ri-virus-fill:before{content:"\\f293"}.ri-virus-line:before{content:"\\f294"}.ri-visa-fill:before{content:"\\f295"}.ri-visa-line:before{content:"\\f296"}.ri-voice-recognition-fill:before{content:"\\f297"}.ri-voice-recognition-line:before{content:"\\f298"}.ri-voiceprint-fill:before{content:"\\f299"}.ri-voiceprint-line:before{content:"\\f29a"}.ri-volume-down-fill:before{content:"\\f29b"}.ri-volume-down-line:before{content:"\\f29c"}.ri-volume-mute-fill:before{content:"\\f29d"}.ri-volume-mute-line:before{content:"\\f29e"}.ri-volume-off-vibrate-fill:before{content:"\\f29f"}.ri-volume-off-vibrate-line:before{content:"\\f2a0"}.ri-volume-up-fill:before{content:"\\f2a1"}.ri-volume-up-line:before{content:"\\f2a2"}.ri-volume-vibrate-fill:before{content:"\\f2a3"}.ri-volume-vibrate-line:before{content:"\\f2a4"}.ri-vuejs-fill:before{content:"\\f2a5"}.ri-vuejs-line:before{content:"\\f2a6"}.ri-walk-fill:before{content:"\\f2a7"}.ri-walk-line:before{content:"\\f2a8"}.ri-wallet-2-fill:before{content:"\\f2a9"}.ri-wallet-2-line:before{content:"\\f2aa"}.ri-wallet-3-fill:before{content:"\\f2ab"}.ri-wallet-3-line:before{content:"\\f2ac"}.ri-wallet-fill:before{content:"\\f2ad"}.ri-wallet-line:before{content:"\\f2ae"}.ri-water-flash-fill:before{content:"\\f2af"}.ri-water-flash-line:before{content:"\\f2b0"}.ri-webcam-fill:before{content:"\\f2b1"}.ri-webcam-line:before{content:"\\f2b2"}.ri-wechat-2-fill:before{content:"\\f2b3"}.ri-wechat-2-line:before{content:"\\f2b4"}.ri-wechat-fill:before{content:"\\f2b5"}.ri-wechat-line:before{content:"\\f2b6"}.ri-wechat-pay-fill:before{content:"\\f2b7"}.ri-wechat-pay-line:before{content:"\\f2b8"}.ri-weibo-fill:before{content:"\\f2b9"}.ri-weibo-line:before{content:"\\f2ba"}.ri-whatsapp-fill:before{content:"\\f2bb"}.ri-whatsapp-line:before{content:"\\f2bc"}.ri-wheelchair-fill:before{content:"\\f2bd"}.ri-wheelchair-line:before{content:"\\f2be"}.ri-wifi-fill:before{content:"\\f2bf"}.ri-wifi-line:before{content:"\\f2c0"}.ri-wifi-off-fill:before{content:"\\f2c1"}.ri-wifi-off-line:before{content:"\\f2c2"}.ri-window-2-fill:before{content:"\\f2c3"}.ri-window-2-line:before{content:"\\f2c4"}.ri-window-fill:before{content:"\\f2c5"}.ri-window-line:before{content:"\\f2c6"}.ri-windows-fill:before{content:"\\f2c7"}.ri-windows-line:before{content:"\\f2c8"}.ri-windy-fill:before{content:"\\f2c9"}.ri-windy-line:before{content:"\\f2ca"}.ri-wireless-charging-fill:before{content:"\\f2cb"}.ri-wireless-charging-line:before{content:"\\f2cc"}.ri-women-fill:before{content:"\\f2cd"}.ri-women-line:before{content:"\\f2ce"}.ri-wubi-input:before{content:"\\f2cf"}.ri-xbox-fill:before{content:"\\f2d0"}.ri-xbox-line:before{content:"\\f2d1"}.ri-xing-fill:before{content:"\\f2d2"}.ri-xing-line:before{content:"\\f2d3"}.ri-youtube-fill:before{content:"\\f2d4"}.ri-youtube-line:before{content:"\\f2d5"}.ri-zcool-fill:before{content:"\\f2d6"}.ri-zcool-line:before{content:"\\f2d7"}.ri-zhihu-fill:before{content:"\\f2d8"}.ri-zhihu-line:before{content:"\\f2d9"}.ri-zoom-in-fill:before{content:"\\f2da"}.ri-zoom-in-line:before{content:"\\f2db"}.ri-zoom-out-fill:before{content:"\\f2dc"}.ri-zoom-out-line:before{content:"\\f2dd"}.ri-zzz-fill:before{content:"\\f2de"}.ri-zzz-line:before{content:"\\f2df"}.ri-arrow-down-double-fill:before{content:"\\f2e0"}.ri-arrow-down-double-line:before{content:"\\f2e1"}.ri-arrow-left-double-fill:before{content:"\\f2e2"}.ri-arrow-left-double-line:before{content:"\\f2e3"}.ri-arrow-right-double-fill:before{content:"\\f2e4"}.ri-arrow-right-double-line:before{content:"\\f2e5"}.ri-arrow-turn-back-fill:before{content:"\\f2e6"}.ri-arrow-turn-back-line:before{content:"\\f2e7"}.ri-arrow-turn-forward-fill:before{content:"\\f2e8"}.ri-arrow-turn-forward-line:before{content:"\\f2e9"}.ri-arrow-up-double-fill:before{content:"\\f2ea"}.ri-arrow-up-double-line:before{content:"\\f2eb"}.ri-bard-fill:before{content:"\\f2ec"}.ri-bard-line:before{content:"\\f2ed"}.ri-bootstrap-fill:before{content:"\\f2ee"}.ri-bootstrap-line:before{content:"\\f2ef"}.ri-box-1-fill:before{content:"\\f2f0"}.ri-box-1-line:before{content:"\\f2f1"}.ri-box-2-fill:before{content:"\\f2f2"}.ri-box-2-line:before{content:"\\f2f3"}.ri-box-3-fill:before{content:"\\f2f4"}.ri-box-3-line:before{content:"\\f2f5"}.ri-brain-fill:before{content:"\\f2f6"}.ri-brain-line:before{content:"\\f2f7"}.ri-candle-fill:before{content:"\\f2f8"}.ri-candle-line:before{content:"\\f2f9"}.ri-cash-fill:before{content:"\\f2fa"}.ri-cash-line:before{content:"\\f2fb"}.ri-contract-left-fill:before{content:"\\f2fc"}.ri-contract-left-line:before{content:"\\f2fd"}.ri-contract-left-right-fill:before{content:"\\f2fe"}.ri-contract-left-right-line:before{content:"\\f2ff"}.ri-contract-right-fill:before{content:"\\f300"}.ri-contract-right-line:before{content:"\\f301"}.ri-contract-up-down-fill:before{content:"\\f302"}.ri-contract-up-down-line:before{content:"\\f303"}.ri-copilot-fill:before{content:"\\f304"}.ri-copilot-line:before{content:"\\f305"}.ri-corner-down-left-fill:before{content:"\\f306"}.ri-corner-down-left-line:before{content:"\\f307"}.ri-corner-down-right-fill:before{content:"\\f308"}.ri-corner-down-right-line:before{content:"\\f309"}.ri-corner-left-down-fill:before{content:"\\f30a"}.ri-corner-left-down-line:before{content:"\\f30b"}.ri-corner-left-up-fill:before{content:"\\f30c"}.ri-corner-left-up-line:before{content:"\\f30d"}.ri-corner-right-down-fill:before{content:"\\f30e"}.ri-corner-right-down-line:before{content:"\\f30f"}.ri-corner-right-up-fill:before{content:"\\f310"}.ri-corner-right-up-line:before{content:"\\f311"}.ri-corner-up-left-double-fill:before{content:"\\f312"}.ri-corner-up-left-double-line:before{content:"\\f313"}.ri-corner-up-left-fill:before{content:"\\f314"}.ri-corner-up-left-line:before{content:"\\f315"}.ri-corner-up-right-double-fill:before{content:"\\f316"}.ri-corner-up-right-double-line:before{content:"\\f317"}.ri-corner-up-right-fill:before{content:"\\f318"}.ri-corner-up-right-line:before{content:"\\f319"}.ri-cross-fill:before{content:"\\f31a"}.ri-cross-line:before{content:"\\f31b"}.ri-edge-new-fill:before{content:"\\f31c"}.ri-edge-new-line:before{content:"\\f31d"}.ri-equal-fill:before{content:"\\f31e"}.ri-equal-line:before{content:"\\f31f"}.ri-expand-left-fill:before{content:"\\f320"}.ri-expand-left-line:before{content:"\\f321"}.ri-expand-left-right-fill:before{content:"\\f322"}.ri-expand-left-right-line:before{content:"\\f323"}.ri-expand-right-fill:before{content:"\\f324"}.ri-expand-right-line:before{content:"\\f325"}.ri-expand-up-down-fill:before{content:"\\f326"}.ri-expand-up-down-line:before{content:"\\f327"}.ri-flickr-fill:before{content:"\\f328"}.ri-flickr-line:before{content:"\\f329"}.ri-forward-10-fill:before{content:"\\f32a"}.ri-forward-10-line:before{content:"\\f32b"}.ri-forward-15-fill:before{content:"\\f32c"}.ri-forward-15-line:before{content:"\\f32d"}.ri-forward-30-fill:before{content:"\\f32e"}.ri-forward-30-line:before{content:"\\f32f"}.ri-forward-5-fill:before{content:"\\f330"}.ri-forward-5-line:before{content:"\\f331"}.ri-graduation-cap-fill:before{content:"\\f332"}.ri-graduation-cap-line:before{content:"\\f333"}.ri-home-office-fill:before{content:"\\f334"}.ri-home-office-line:before{content:"\\f335"}.ri-hourglass-2-fill:before{content:"\\f336"}.ri-hourglass-2-line:before{content:"\\f337"}.ri-hourglass-fill:before{content:"\\f338"}.ri-hourglass-line:before{content:"\\f339"}.ri-javascript-fill:before{content:"\\f33a"}.ri-javascript-line:before{content:"\\f33b"}.ri-loop-left-fill:before{content:"\\f33c"}.ri-loop-left-line:before{content:"\\f33d"}.ri-loop-right-fill:before{content:"\\f33e"}.ri-loop-right-line:before{content:"\\f33f"}.ri-memories-fill:before{content:"\\f340"}.ri-memories-line:before{content:"\\f341"}.ri-meta-fill:before{content:"\\f342"}.ri-meta-line:before{content:"\\f343"}.ri-microsoft-loop-fill:before{content:"\\f344"}.ri-microsoft-loop-line:before{content:"\\f345"}.ri-nft-fill:before{content:"\\f346"}.ri-nft-line:before{content:"\\f347"}.ri-notion-fill:before{content:"\\f348"}.ri-notion-line:before{content:"\\f349"}.ri-openai-fill:before{content:"\\f34a"}.ri-openai-line:before{content:"\\f34b"}.ri-overline:before{content:"\\f34c"}.ri-p2p-fill:before{content:"\\f34d"}.ri-p2p-line:before{content:"\\f34e"}.ri-presentation-fill:before{content:"\\f34f"}.ri-presentation-line:before{content:"\\f350"}.ri-replay-10-fill:before{content:"\\f351"}.ri-replay-10-line:before{content:"\\f352"}.ri-replay-15-fill:before{content:"\\f353"}.ri-replay-15-line:before{content:"\\f354"}.ri-replay-30-fill:before{content:"\\f355"}.ri-replay-30-line:before{content:"\\f356"}.ri-replay-5-fill:before{content:"\\f357"}.ri-replay-5-line:before{content:"\\f358"}.ri-school-fill:before{content:"\\f359"}.ri-school-line:before{content:"\\f35a"}.ri-shining-2-fill:before{content:"\\f35b"}.ri-shining-2-line:before{content:"\\f35c"}.ri-shining-fill:before{content:"\\f35d"}.ri-shining-line:before{content:"\\f35e"}.ri-sketching:before{content:"\\f35f"}.ri-skip-down-fill:before{content:"\\f360"}.ri-skip-down-line:before{content:"\\f361"}.ri-skip-left-fill:before{content:"\\f362"}.ri-skip-left-line:before{content:"\\f363"}.ri-skip-right-fill:before{content:"\\f364"}.ri-skip-right-line:before{content:"\\f365"}.ri-skip-up-fill:before{content:"\\f366"}.ri-skip-up-line:before{content:"\\f367"}.ri-slow-down-fill:before{content:"\\f368"}.ri-slow-down-line:before{content:"\\f369"}.ri-sparkling-2-fill:before{content:"\\f36a"}.ri-sparkling-2-line:before{content:"\\f36b"}.ri-sparkling-fill:before{content:"\\f36c"}.ri-sparkling-line:before{content:"\\f36d"}.ri-speak-fill:before{content:"\\f36e"}.ri-speak-line:before{content:"\\f36f"}.ri-speed-up-fill:before{content:"\\f370"}.ri-speed-up-line:before{content:"\\f371"}.ri-tiktok-fill:before{content:"\\f372"}.ri-tiktok-line:before{content:"\\f373"}.ri-token-swap-fill:before{content:"\\f374"}.ri-token-swap-line:before{content:"\\f375"}.ri-unpin-fill:before{content:"\\f376"}.ri-unpin-line:before{content:"\\f377"}.ri-wechat-channels-fill:before{content:"\\f378"}.ri-wechat-channels-line:before{content:"\\f379"}.ri-wordpress-fill:before{content:"\\f37a"}.ri-wordpress-line:before{content:"\\f37b"}.ri-blender-fill:before{content:"\\f37c"}.ri-blender-line:before{content:"\\f37d"}.ri-emoji-sticker-fill:before{content:"\\f37e"}.ri-emoji-sticker-line:before{content:"\\f37f"}.ri-git-close-pull-request-fill:before{content:"\\f380"}.ri-git-close-pull-request-line:before{content:"\\f381"}.ri-instance-fill:before{content:"\\f382"}.ri-instance-line:before{content:"\\f383"}.ri-megaphone-fill:before{content:"\\f384"}.ri-megaphone-line:before{content:"\\f385"}.ri-pass-expired-fill:before{content:"\\f386"}.ri-pass-expired-line:before{content:"\\f387"}.ri-pass-pending-fill:before{content:"\\f388"}.ri-pass-pending-line:before{content:"\\f389"}.ri-pass-valid-fill:before{content:"\\f38a"}.ri-pass-valid-line:before{content:"\\f38b"}.ri-ai-generate:before{content:"\\f38c"}.ri-calendar-close-fill:before{content:"\\f38d"}.ri-calendar-close-line:before{content:"\\f38e"}.ri-draggable:before{content:"\\f38f"}.ri-font-family:before{content:"\\f390"}.ri-font-mono:before{content:"\\f391"}.ri-font-sans-serif:before{content:"\\f392"}.ri-hard-drive-3-fill:before{content:"\\f393"}.ri-hard-drive-3-line:before{content:"\\f394"}.ri-kick-fill:before{content:"\\f395"}.ri-kick-line:before{content:"\\f396"}.ri-list-check-3:before{content:"\\f397"}.ri-list-indefinite:before{content:"\\f398"}.ri-list-ordered-2:before{content:"\\f399"}.ri-list-radio:before{content:"\\f39a"}.ri-openbase-fill:before{content:"\\f39b"}.ri-openbase-line:before{content:"\\f39c"}.ri-planet-fill:before{content:"\\f39d"}.ri-planet-line:before{content:"\\f39e"}.ri-prohibited-fill:before{content:"\\f39f"}.ri-prohibited-line:before{content:"\\f3a0"}.ri-quote-text:before{content:"\\f3a1"}.ri-seo-fill:before{content:"\\f3a2"}.ri-seo-line:before{content:"\\f3a3"}.ri-slash-commands:before{content:"\\f3a4"}.ri-archive-2-fill:before{content:"\\f3a5"}.ri-archive-2-line:before{content:"\\f3a6"}.ri-inbox-2-fill:before{content:"\\f3a7"}.ri-inbox-2-line:before{content:"\\f3a8"}.ri-shake-hands-fill:before{content:"\\f3a9"}.ri-shake-hands-line:before{content:"\\f3aa"}.ri-supabase-fill:before{content:"\\f3ab"}.ri-supabase-line:before{content:"\\f3ac"}.ri-water-percent-fill:before{content:"\\f3ad"}.ri-water-percent-line:before{content:"\\f3ae"}.ri-yuque-fill:before{content:"\\f3af"}.ri-yuque-line:before{content:"\\f3b0"}.ri-crosshair-2-fill:before{content:"\\f3b1"}.ri-crosshair-2-line:before{content:"\\f3b2"}.ri-crosshair-fill:before{content:"\\f3b3"}.ri-crosshair-line:before{content:"\\f3b4"}.ri-file-close-fill:before{content:"\\f3b5"}.ri-file-close-line:before{content:"\\f3b6"}.ri-infinity-fill:before{content:"\\f3b7"}.ri-infinity-line:before{content:"\\f3b8"}.ri-rfid-fill:before{content:"\\f3b9"}.ri-rfid-line:before{content:"\\f3ba"}.ri-slash-commands-2:before{content:"\\f3bb"}.ri-user-forbid-fill:before{content:"\\f3bc"}.ri-user-forbid-line:before{content:"\\f3bd"}.ri-beer-fill:before{content:"\\f3be"}.ri-beer-line:before{content:"\\f3bf"}.ri-circle-fill:before{content:"\\f3c0"}.ri-circle-line:before{content:"\\f3c1"}.ri-dropdown-list:before{content:"\\f3c2"}.ri-file-image-fill:before{content:"\\f3c3"}.ri-file-image-line:before{content:"\\f3c4"}.ri-file-pdf-2-fill:before{content:"\\f3c5"}.ri-file-pdf-2-line:before{content:"\\f3c6"}.ri-file-video-fill:before{content:"\\f3c7"}.ri-file-video-line:before{content:"\\f3c8"}.ri-folder-image-fill:before{content:"\\f3c9"}.ri-folder-image-line:before{content:"\\f3ca"}.ri-folder-video-fill:before{content:"\\f3cb"}.ri-folder-video-line:before{content:"\\f3cc"}.ri-hexagon-fill:before{content:"\\f3cd"}.ri-hexagon-line:before{content:"\\f3ce"}.ri-menu-search-fill:before{content:"\\f3cf"}.ri-menu-search-line:before{content:"\\f3d0"}.ri-octagon-fill:before{content:"\\f3d1"}.ri-octagon-line:before{content:"\\f3d2"}.ri-pentagon-fill:before{content:"\\f3d3"}.ri-pentagon-line:before{content:"\\f3d4"}.ri-rectangle-fill:before{content:"\\f3d5"}.ri-rectangle-line:before{content:"\\f3d6"}.ri-robot-2-fill:before{content:"\\f3d7"}.ri-robot-2-line:before{content:"\\f3d8"}.ri-shapes-fill:before{content:"\\f3d9"}.ri-shapes-line:before{content:"\\f3da"}.ri-square-fill:before{content:"\\f3db"}.ri-square-line:before{content:"\\f3dc"}.ri-tent-fill:before{content:"\\f3dd"}.ri-tent-line:before{content:"\\f3de"}.ri-threads-fill:before{content:"\\f3df"}.ri-threads-line:before{content:"\\f3e0"}.ri-tree-fill:before{content:"\\f3e1"}.ri-tree-line:before{content:"\\f3e2"}.ri-triangle-fill:before{content:"\\f3e3"}.ri-triangle-line:before{content:"\\f3e4"}.ri-twitter-x-fill:before{content:"\\f3e5"}.ri-twitter-x-line:before{content:"\\f3e6"}.ri-verified-badge-fill:before{content:"\\f3e7"}.ri-verified-badge-line:before{content:"\\f3e8"}.ri-armchair-fill:before{content:"\\f3e9"}.ri-armchair-line:before{content:"\\f3ea"}.ri-bnb-fill:before{content:"\\f3eb"}.ri-bnb-line:before{content:"\\f3ec"}.ri-bread-fill:before{content:"\\f3ed"}.ri-bread-line:before{content:"\\f3ee"}.ri-btc-fill:before{content:"\\f3ef"}.ri-btc-line:before{content:"\\f3f0"}.ri-calendar-schedule-fill:before{content:"\\f3f1"}.ri-calendar-schedule-line:before{content:"\\f3f2"}.ri-dice-1-fill:before{content:"\\f3f3"}.ri-dice-1-line:before{content:"\\f3f4"}.ri-dice-2-fill:before{content:"\\f3f5"}.ri-dice-2-line:before{content:"\\f3f6"}.ri-dice-3-fill:before{content:"\\f3f7"}.ri-dice-3-line:before{content:"\\f3f8"}.ri-dice-4-fill:before{content:"\\f3f9"}.ri-dice-4-line:before{content:"\\f3fa"}.ri-dice-5-fill:before{content:"\\f3fb"}.ri-dice-5-line:before{content:"\\f3fc"}.ri-dice-6-fill:before{content:"\\f3fd"}.ri-dice-6-line:before{content:"\\f3fe"}.ri-dice-fill:before{content:"\\f3ff"}.ri-dice-line:before{content:"\\f400"}.ri-drinks-fill:before{content:"\\f401"}.ri-drinks-line:before{content:"\\f402"}.ri-equalizer-2-fill:before{content:"\\f403"}.ri-equalizer-2-line:before{content:"\\f404"}.ri-equalizer-3-fill:before{content:"\\f405"}.ri-equalizer-3-line:before{content:"\\f406"}.ri-eth-fill:before{content:"\\f407"}.ri-eth-line:before{content:"\\f408"}.ri-flower-fill:before{content:"\\f409"}.ri-flower-line:before{content:"\\f40a"}.ri-glasses-2-fill:before{content:"\\f40b"}.ri-glasses-2-line:before{content:"\\f40c"}.ri-glasses-fill:before{content:"\\f40d"}.ri-glasses-line:before{content:"\\f40e"}.ri-goggles-fill:before{content:"\\f40f"}.ri-goggles-line:before{content:"\\f410"}.ri-image-circle-fill:before{content:"\\f411"}.ri-image-circle-line:before{content:"\\f412"}.ri-info-i:before{content:"\\f413"}.ri-money-rupee-circle-fill:before{content:"\\f414"}.ri-money-rupee-circle-line:before{content:"\\f415"}.ri-news-fill:before{content:"\\f416"}.ri-news-line:before{content:"\\f417"}.ri-robot-3-fill:before{content:"\\f418"}.ri-robot-3-line:before{content:"\\f419"}.ri-share-2-fill:before{content:"\\f41a"}.ri-share-2-line:before{content:"\\f41b"}.ri-sofa-fill:before{content:"\\f41c"}.ri-sofa-line:before{content:"\\f41d"}.ri-svelte-fill:before{content:"\\f41e"}.ri-svelte-line:before{content:"\\f41f"}.ri-vk-fill:before{content:"\\f420"}.ri-vk-line:before{content:"\\f421"}.ri-xrp-fill:before{content:"\\f422"}.ri-xrp-line:before{content:"\\f423"}.ri-xtz-fill:before{content:"\\f424"}.ri-xtz-line:before{content:"\\f425"}.ri-archive-stack-fill:before{content:"\\f426"}.ri-archive-stack-line:before{content:"\\f427"}.ri-bowl-fill:before{content:"\\f428"}.ri-bowl-line:before{content:"\\f429"}.ri-calendar-view:before{content:"\\f42a"}.ri-carousel-view:before{content:"\\f42b"}.ri-code-block:before{content:"\\f42c"}.ri-color-filter-fill:before{content:"\\f42d"}.ri-color-filter-line:before{content:"\\f42e"}.ri-contacts-book-3-fill:before{content:"\\f42f"}.ri-contacts-book-3-line:before{content:"\\f430"}.ri-contract-fill:before{content:"\\f431"}.ri-contract-line:before{content:"\\f432"}.ri-drinks-2-fill:before{content:"\\f433"}.ri-drinks-2-line:before{content:"\\f434"}.ri-export-fill:before{content:"\\f435"}.ri-export-line:before{content:"\\f436"}.ri-file-check-fill:before{content:"\\f437"}.ri-file-check-line:before{content:"\\f438"}.ri-focus-mode:before{content:"\\f439"}.ri-folder-6-fill:before{content:"\\f43a"}.ri-folder-6-line:before{content:"\\f43b"}.ri-folder-check-fill:before{content:"\\f43c"}.ri-folder-check-line:before{content:"\\f43d"}.ri-folder-close-fill:before{content:"\\f43e"}.ri-folder-close-line:before{content:"\\f43f"}.ri-folder-cloud-fill:before{content:"\\f440"}.ri-folder-cloud-line:before{content:"\\f441"}.ri-gallery-view-2:before{content:"\\f442"}.ri-gallery-view:before{content:"\\f443"}.ri-hand:before{content:"\\f444"}.ri-import-fill:before{content:"\\f445"}.ri-import-line:before{content:"\\f446"}.ri-information-2-fill:before{content:"\\f447"}.ri-information-2-line:before{content:"\\f448"}.ri-kanban-view-2:before{content:"\\f449"}.ri-kanban-view:before{content:"\\f44a"}.ri-list-view:before{content:"\\f44b"}.ri-lock-star-fill:before{content:"\\f44c"}.ri-lock-star-line:before{content:"\\f44d"}.ri-puzzle-2-fill:before{content:"\\f44e"}.ri-puzzle-2-line:before{content:"\\f44f"}.ri-puzzle-fill:before{content:"\\f450"}.ri-puzzle-line:before{content:"\\f451"}.ri-ram-2-fill:before{content:"\\f452"}.ri-ram-2-line:before{content:"\\f453"}.ri-ram-fill:before{content:"\\f454"}.ri-ram-line:before{content:"\\f455"}.ri-receipt-fill:before{content:"\\f456"}.ri-receipt-line:before{content:"\\f457"}.ri-shadow-fill:before{content:"\\f458"}.ri-shadow-line:before{content:"\\f459"}.ri-sidebar-fold-fill:before{content:"\\f45a"}.ri-sidebar-fold-line:before{content:"\\f45b"}.ri-sidebar-unfold-fill:before{content:"\\f45c"}.ri-sidebar-unfold-line:before{content:"\\f45d"}.ri-slideshow-view:before{content:"\\f45e"}.ri-sort-alphabet-asc:before{content:"\\f45f"}.ri-sort-alphabet-desc:before{content:"\\f460"}.ri-sort-number-asc:before{content:"\\f461"}.ri-sort-number-desc:before{content:"\\f462"}.ri-stacked-view:before{content:"\\f463"}.ri-sticky-note-add-fill:before{content:"\\f464"}.ri-sticky-note-add-line:before{content:"\\f465"}.ri-swap-2-fill:before{content:"\\f466"}.ri-swap-2-line:before{content:"\\f467"}.ri-swap-3-fill:before{content:"\\f468"}.ri-swap-3-line:before{content:"\\f469"}.ri-table-3:before{content:"\\f46a"}.ri-table-view:before{content:"\\f46b"}.ri-text-block:before{content:"\\f46c"}.ri-text-snippet:before{content:"\\f46d"}.ri-timeline-view:before{content:"\\f46e"}.ri-blogger-fill:before{content:"\\f46f"}.ri-blogger-line:before{content:"\\f470"}.ri-chat-thread-fill:before{content:"\\f471"}.ri-chat-thread-line:before{content:"\\f472"}.ri-discount-percent-fill:before{content:"\\f473"}.ri-discount-percent-line:before{content:"\\f474"}.ri-exchange-2-fill:before{content:"\\f475"}.ri-exchange-2-line:before{content:"\\f476"}.ri-git-fork-fill:before{content:"\\f477"}.ri-git-fork-line:before{content:"\\f478"}.ri-input-field:before{content:"\\f479"}.ri-progress-1-fill:before{content:"\\f47a"}.ri-progress-1-line:before{content:"\\f47b"}.ri-progress-2-fill:before{content:"\\f47c"}.ri-progress-2-line:before{content:"\\f47d"}.ri-progress-3-fill:before{content:"\\f47e"}.ri-progress-3-line:before{content:"\\f47f"}.ri-progress-4-fill:before{content:"\\f480"}.ri-progress-4-line:before{content:"\\f481"}.ri-progress-5-fill:before{content:"\\f482"}.ri-progress-5-line:before{content:"\\f483"}.ri-progress-6-fill:before{content:"\\f484"}.ri-progress-6-line:before{content:"\\f485"}.ri-progress-7-fill:before{content:"\\f486"}.ri-progress-7-line:before{content:"\\f487"}.ri-progress-8-fill:before{content:"\\f488"}.ri-progress-8-line:before{content:"\\f489"}.ri-remix-run-fill:before{content:"\\f48a"}.ri-remix-run-line:before{content:"\\f48b"}.ri-signpost-fill:before{content:"\\f48c"}.ri-signpost-line:before{content:"\\f48d"}.ri-time-zone-fill:before{content:"\\f48e"}.ri-time-zone-line:before{content:"\\f48f"}.ri-arrow-down-wide-fill:before{content:"\\f490"}.ri-arrow-down-wide-line:before{content:"\\f491"}.ri-arrow-left-wide-fill:before{content:"\\f492"}.ri-arrow-left-wide-line:before{content:"\\f493"}.ri-arrow-right-wide-fill:before{content:"\\f494"}.ri-arrow-right-wide-line:before{content:"\\f495"}.ri-arrow-up-wide-fill:before{content:"\\f496"}.ri-arrow-up-wide-line:before{content:"\\f497"}.ri-bluesky-fill:before{content:"\\f498"}.ri-bluesky-line:before{content:"\\f499"}.ri-expand-height-fill:before{content:"\\f49a"}.ri-expand-height-line:before{content:"\\f49b"}.ri-expand-width-fill:before{content:"\\f49c"}.ri-expand-width-line:before{content:"\\f49d"}.ri-forward-end-fill:before{content:"\\f49e"}.ri-forward-end-line:before{content:"\\f49f"}.ri-forward-end-mini-fill:before{content:"\\f4a0"}.ri-forward-end-mini-line:before{content:"\\f4a1"}.ri-friendica-fill:before{content:"\\f4a2"}.ri-friendica-line:before{content:"\\f4a3"}.ri-git-pr-draft-fill:before{content:"\\f4a4"}.ri-git-pr-draft-line:before{content:"\\f4a5"}.ri-play-reverse-fill:before{content:"\\f4a6"}.ri-play-reverse-line:before{content:"\\f4a7"}.ri-play-reverse-mini-fill:before{content:"\\f4a8"}.ri-play-reverse-mini-line:before{content:"\\f4a9"}.ri-rewind-start-fill:before{content:"\\f4aa"}.ri-rewind-start-line:before{content:"\\f4ab"}.ri-rewind-start-mini-fill:before{content:"\\f4ac"}.ri-rewind-start-mini-line:before{content:"\\f4ad"}.ri-scroll-to-bottom-fill:before{content:"\\f4ae"}.ri-scroll-to-bottom-line:before{content:"\\f4af"}.ri-add-large-fill:before{content:"\\f4b0"}.ri-add-large-line:before{content:"\\f4b1"}.ri-aed-electrodes-fill:before{content:"\\f4b2"}.ri-aed-electrodes-line:before{content:"\\f4b3"}.ri-aed-fill:before{content:"\\f4b4"}.ri-aed-line:before{content:"\\f4b5"}.ri-alibaba-cloud-fill:before{content:"\\f4b6"}.ri-alibaba-cloud-line:before{content:"\\f4b7"}.ri-align-item-bottom-fill:before{content:"\\f4b8"}.ri-align-item-bottom-line:before{content:"\\f4b9"}.ri-align-item-horizontal-center-fill:before{content:"\\f4ba"}.ri-align-item-horizontal-center-line:before{content:"\\f4bb"}.ri-align-item-left-fill:before{content:"\\f4bc"}.ri-align-item-left-line:before{content:"\\f4bd"}.ri-align-item-right-fill:before{content:"\\f4be"}.ri-align-item-right-line:before{content:"\\f4bf"}.ri-align-item-top-fill:before{content:"\\f4c0"}.ri-align-item-top-line:before{content:"\\f4c1"}.ri-align-item-vertical-center-fill:before{content:"\\f4c2"}.ri-align-item-vertical-center-line:before{content:"\\f4c3"}.ri-apps-2-add-fill:before{content:"\\f4c4"}.ri-apps-2-add-line:before{content:"\\f4c5"}.ri-close-large-fill:before{content:"\\f4c6"}.ri-close-large-line:before{content:"\\f4c7"}.ri-collapse-diagonal-2-fill:before{content:"\\f4c8"}.ri-collapse-diagonal-2-line:before{content:"\\f4c9"}.ri-collapse-diagonal-fill:before{content:"\\f4ca"}.ri-collapse-diagonal-line:before{content:"\\f4cb"}.ri-dashboard-horizontal-fill:before{content:"\\f4cc"}.ri-dashboard-horizontal-line:before{content:"\\f4cd"}.ri-expand-diagonal-2-fill:before{content:"\\f4ce"}.ri-expand-diagonal-2-line:before{content:"\\f4cf"}.ri-expand-diagonal-fill:before{content:"\\f4d0"}.ri-expand-diagonal-line:before{content:"\\f4d1"}.ri-firebase-fill:before{content:"\\f4d2"}.ri-firebase-line:before{content:"\\f4d3"}.ri-flip-horizontal-2-fill:before{content:"\\f4d4"}.ri-flip-horizontal-2-line:before{content:"\\f4d5"}.ri-flip-horizontal-fill:before{content:"\\f4d6"}.ri-flip-horizontal-line:before{content:"\\f4d7"}.ri-flip-vertical-2-fill:before{content:"\\f4d8"}.ri-flip-vertical-2-line:before{content:"\\f4d9"}.ri-flip-vertical-fill:before{content:"\\f4da"}.ri-flip-vertical-line:before{content:"\\f4db"}.ri-formula:before{content:"\\f4dc"}.ri-function-add-fill:before{content:"\\f4dd"}.ri-function-add-line:before{content:"\\f4de"}.ri-goblet-2-fill:before{content:"\\f4df"}.ri-goblet-2-line:before{content:"\\f4e0"}.ri-golf-ball-fill:before{content:"\\f4e1"}.ri-golf-ball-line:before{content:"\\f4e2"}.ri-group-3-fill:before{content:"\\f4e3"}.ri-group-3-line:before{content:"\\f4e4"}.ri-heart-add-2-fill:before{content:"\\f4e5"}.ri-heart-add-2-line:before{content:"\\f4e6"}.ri-id-card-fill:before{content:"\\f4e7"}.ri-id-card-line:before{content:"\\f4e8"}.ri-information-off-fill:before{content:"\\f4e9"}.ri-information-off-line:before{content:"\\f4ea"}.ri-java-fill:before{content:"\\f4eb"}.ri-java-line:before{content:"\\f4ec"}.ri-layout-grid-2-fill:before{content:"\\f4ed"}.ri-layout-grid-2-line:before{content:"\\f4ee"}.ri-layout-horizontal-fill:before{content:"\\f4ef"}.ri-layout-horizontal-line:before{content:"\\f4f0"}.ri-layout-vertical-fill:before{content:"\\f4f1"}.ri-layout-vertical-line:before{content:"\\f4f2"}.ri-menu-fold-2-fill:before{content:"\\f4f3"}.ri-menu-fold-2-line:before{content:"\\f4f4"}.ri-menu-fold-3-fill:before{content:"\\f4f5"}.ri-menu-fold-3-line:before{content:"\\f4f6"}.ri-menu-fold-4-fill:before{content:"\\f4f7"}.ri-menu-fold-4-line:before{content:"\\f4f8"}.ri-menu-unfold-2-fill:before{content:"\\f4f9"}.ri-menu-unfold-2-line:before{content:"\\f4fa"}.ri-menu-unfold-3-fill:before{content:"\\f4fb"}.ri-menu-unfold-3-line:before{content:"\\f4fc"}.ri-menu-unfold-4-fill:before{content:"\\f4fd"}.ri-menu-unfold-4-line:before{content:"\\f4fe"}.ri-mobile-download-fill:before{content:"\\f4ff"}.ri-mobile-download-line:before{content:"\\f500"}.ri-nextjs-fill:before{content:"\\f501"}.ri-nextjs-line:before{content:"\\f502"}.ri-nodejs-fill:before{content:"\\f503"}.ri-nodejs-line:before{content:"\\f504"}.ri-pause-large-fill:before{content:"\\f505"}.ri-pause-large-line:before{content:"\\f506"}.ri-play-large-fill:before{content:"\\f507"}.ri-play-large-line:before{content:"\\f508"}.ri-play-reverse-large-fill:before{content:"\\f509"}.ri-play-reverse-large-line:before{content:"\\f50a"}.ri-police-badge-fill:before{content:"\\f50b"}.ri-police-badge-line:before{content:"\\f50c"}.ri-prohibited-2-fill:before{content:"\\f50d"}.ri-prohibited-2-line:before{content:"\\f50e"}.ri-shopping-bag-4-fill:before{content:"\\f50f"}.ri-shopping-bag-4-line:before{content:"\\f510"}.ri-snowflake-fill:before{content:"\\f511"}.ri-snowflake-line:before{content:"\\f512"}.ri-square-root:before{content:"\\f513"}.ri-stop-large-fill:before{content:"\\f514"}.ri-stop-large-line:before{content:"\\f515"}.ri-tailwind-css-fill:before{content:"\\f516"}.ri-tailwind-css-line:before{content:"\\f517"}.ri-tooth-fill:before{content:"\\f518"}.ri-tooth-line:before{content:"\\f519"}.ri-video-off-fill:before{content:"\\f51a"}.ri-video-off-line:before{content:"\\f51b"}.ri-video-on-fill:before{content:"\\f51c"}.ri-video-on-line:before{content:"\\f51d"}.ri-webhook-fill:before{content:"\\f51e"}.ri-webhook-line:before{content:"\\f51f"}.ri-weight-fill:before{content:"\\f520"}.ri-weight-line:before{content:"\\f521"}.ri-book-shelf-fill:before{content:"\\f522"}.ri-book-shelf-line:before{content:"\\f523"}.ri-brain-2-fill:before{content:"\\f524"}.ri-brain-2-line:before{content:"\\f525"}.ri-chat-search-fill:before{content:"\\f526"}.ri-chat-search-line:before{content:"\\f527"}.ri-chat-unread-fill:before{content:"\\f528"}.ri-chat-unread-line:before{content:"\\f529"}.ri-collapse-horizontal-fill:before{content:"\\f52a"}.ri-collapse-horizontal-line:before{content:"\\f52b"}.ri-collapse-vertical-fill:before{content:"\\f52c"}.ri-collapse-vertical-line:before{content:"\\f52d"}.ri-dna-fill:before{content:"\\f52e"}.ri-dna-line:before{content:"\\f52f"}.ri-dropper-fill:before{content:"\\f530"}.ri-dropper-line:before{content:"\\f531"}.ri-expand-diagonal-s-2-fill:before{content:"\\f532"}.ri-expand-diagonal-s-2-line:before{content:"\\f533"}.ri-expand-diagonal-s-fill:before{content:"\\f534"}.ri-expand-diagonal-s-line:before{content:"\\f535"}.ri-expand-horizontal-fill:before{content:"\\f536"}.ri-expand-horizontal-line:before{content:"\\f537"}.ri-expand-horizontal-s-fill:before{content:"\\f538"}.ri-expand-horizontal-s-line:before{content:"\\f539"}.ri-expand-vertical-fill:before{content:"\\f53a"}.ri-expand-vertical-line:before{content:"\\f53b"}.ri-expand-vertical-s-fill:before{content:"\\f53c"}.ri-expand-vertical-s-line:before{content:"\\f53d"}.ri-gemini-fill:before{content:"\\f53e"}.ri-gemini-line:before{content:"\\f53f"}.ri-reset-left-fill:before{content:"\\f540"}.ri-reset-left-line:before{content:"\\f541"}.ri-reset-right-fill:before{content:"\\f542"}.ri-reset-right-line:before{content:"\\f543"}.ri-stairs-fill:before{content:"\\f544"}.ri-stairs-line:before{content:"\\f545"}.ri-telegram-2-fill:before{content:"\\f546"}.ri-telegram-2-line:before{content:"\\f547"}.ri-triangular-flag-fill:before{content:"\\f548"}.ri-triangular-flag-line:before{content:"\\f549"}.ri-user-minus-fill:before{content:"\\f54a"}.ri-user-minus-line:before{content:"\\f54b"}.ri-account-box-2-fill:before{content:"\\f54c"}.ri-account-box-2-line:before{content:"\\f54d"}.ri-account-circle-2-fill:before{content:"\\f54e"}.ri-account-circle-2-line:before{content:"\\f54f"}.ri-alarm-snooze-fill:before{content:"\\f550"}.ri-alarm-snooze-line:before{content:"\\f551"}.ri-arrow-down-box-fill:before{content:"\\f552"}.ri-arrow-down-box-line:before{content:"\\f553"}.ri-arrow-left-box-fill:before{content:"\\f554"}.ri-arrow-left-box-line:before{content:"\\f555"}.ri-arrow-left-down-box-fill:before{content:"\\f556"}.ri-arrow-left-down-box-line:before{content:"\\f557"}.ri-arrow-left-up-box-fill:before{content:"\\f558"}.ri-arrow-left-up-box-line:before{content:"\\f559"}.ri-arrow-right-box-fill:before{content:"\\f55a"}.ri-arrow-right-box-line:before{content:"\\f55b"}.ri-arrow-right-down-box-fill:before{content:"\\f55c"}.ri-arrow-right-down-box-line:before{content:"\\f55d"}.ri-arrow-right-up-box-fill:before{content:"\\f55e"}.ri-arrow-right-up-box-line:before{content:"\\f55f"}.ri-arrow-up-box-fill:before{content:"\\f560"}.ri-arrow-up-box-line:before{content:"\\f561"}.ri-bar-chart-box-ai-fill:before{content:"\\f562"}.ri-bar-chart-box-ai-line:before{content:"\\f563"}.ri-brush-ai-fill:before{content:"\\f564"}.ri-brush-ai-line:before{content:"\\f565"}.ri-camera-ai-fill:before{content:"\\f566"}.ri-camera-ai-line:before{content:"\\f567"}.ri-chat-ai-fill:before{content:"\\f568"}.ri-chat-ai-line:before{content:"\\f569"}.ri-chat-smile-ai-fill:before{content:"\\f56a"}.ri-chat-smile-ai-line:before{content:"\\f56b"}.ri-chat-voice-ai-fill:before{content:"\\f56c"}.ri-chat-voice-ai-line:before{content:"\\f56d"}.ri-code-ai-fill:before{content:"\\f56e"}.ri-code-ai-line:before{content:"\\f56f"}.ri-color-filter-ai-fill:before{content:"\\f570"}.ri-color-filter-ai-line:before{content:"\\f571"}.ri-custom-size:before{content:"\\f572"}.ri-fediverse-fill:before{content:"\\f573"}.ri-fediverse-line:before{content:"\\f574"}.ri-flag-off-fill:before{content:"\\f575"}.ri-flag-off-line:before{content:"\\f576"}.ri-home-9-fill:before{content:"\\f577"}.ri-home-9-line:before{content:"\\f578"}.ri-image-ai-fill:before{content:"\\f579"}.ri-image-ai-line:before{content:"\\f57a"}.ri-image-circle-ai-fill:before{content:"\\f57b"}.ri-image-circle-ai-line:before{content:"\\f57c"}.ri-info-card-fill:before{content:"\\f57d"}.ri-info-card-line:before{content:"\\f57e"}.ri-landscape-ai-fill:before{content:"\\f57f"}.ri-landscape-ai-line:before{content:"\\f580"}.ri-letter-spacing-2:before{content:"\\f581"}.ri-line-height-2:before{content:"\\f582"}.ri-mail-ai-fill:before{content:"\\f583"}.ri-mail-ai-line:before{content:"\\f584"}.ri-mic-2-ai-fill:before{content:"\\f585"}.ri-mic-2-ai-line:before{content:"\\f586"}.ri-mic-ai-fill:before{content:"\\f587"}.ri-mic-ai-line:before{content:"\\f588"}.ri-movie-ai-fill:before{content:"\\f589"}.ri-movie-ai-line:before{content:"\\f58a"}.ri-music-ai-fill:before{content:"\\f58b"}.ri-music-ai-line:before{content:"\\f58c"}.ri-notification-snooze-fill:before{content:"\\f58d"}.ri-notification-snooze-line:before{content:"\\f58e"}.ri-php-fill:before{content:"\\f58f"}.ri-php-line:before{content:"\\f590"}.ri-pix-fill:before{content:"\\f591"}.ri-pix-line:before{content:"\\f592"}.ri-pulse-ai-fill:before{content:"\\f593"}.ri-pulse-ai-line:before{content:"\\f594"}.ri-quill-pen-ai-fill:before{content:"\\f595"}.ri-quill-pen-ai-line:before{content:"\\f596"}.ri-speak-ai-fill:before{content:"\\f597"}.ri-speak-ai-line:before{content:"\\f598"}.ri-star-off-fill:before{content:"\\f599"}.ri-star-off-line:before{content:"\\f59a"}.ri-translate-ai-2:before{content:"\\f59b"}.ri-translate-ai:before{content:"\\f59c"}.ri-user-community-fill:before{content:"\\f59d"}.ri-user-community-line:before{content:"\\f59e"}.ri-vercel-fill:before{content:"\\f59f"}.ri-vercel-line:before{content:"\\f5a0"}.ri-video-ai-fill:before{content:"\\f5a1"}.ri-video-ai-line:before{content:"\\f5a2"}.ri-video-on-ai-fill:before{content:"\\f5a3"}.ri-video-on-ai-line:before{content:"\\f5a4"}.ri-voice-ai-fill:before{content:"\\f5a5"}.ri-voice-ai-line:before{content:"\\f5a6"}.ri-ai-generate-2:before{content:"\\f5a7"}.ri-ai-generate-text:before{content:"\\f5a8"}.ri-anthropic-fill:before{content:"\\f5a9"}.ri-anthropic-line:before{content:"\\f5aa"}.ri-apps-2-ai-fill:before{content:"\\f5ab"}.ri-apps-2-ai-line:before{content:"\\f5ac"}.ri-camera-lens-ai-fill:before{content:"\\f5ad"}.ri-camera-lens-ai-line:before{content:"\\f5ae"}.ri-clapperboard-ai-fill:before{content:"\\f5af"}.ri-clapperboard-ai-line:before{content:"\\f5b0"}.ri-claude-fill:before{content:"\\f5b1"}.ri-claude-line:before{content:"\\f5b2"}.ri-closed-captioning-ai-fill:before{content:"\\f5b3"}.ri-closed-captioning-ai-line:before{content:"\\f5b4"}.ri-dvd-ai-fill:before{content:"\\f5b5"}.ri-dvd-ai-line:before{content:"\\f5b6"}.ri-film-ai-fill:before{content:"\\f5b7"}.ri-film-ai-line:before{content:"\\f5b8"}.ri-font-size-ai:before{content:"\\f5b9"}.ri-mixtral-fill:before{content:"\\f5ba"}.ri-mixtral-line:before{content:"\\f5bb"}.ri-movie-2-ai-fill:before{content:"\\f5bc"}.ri-movie-2-ai-line:before{content:"\\f5bd"}.ri-mv-ai-fill:before{content:"\\f5be"}.ri-mv-ai-line:before{content:"\\f5bf"}.ri-perplexity-fill:before{content:"\\f5c0"}.ri-perplexity-line:before{content:"\\f5c1"}.ri-poker-clubs-fill:before{content:"\\f5c2"}.ri-poker-clubs-line:before{content:"\\f5c3"}.ri-poker-diamonds-fill:before{content:"\\f5c4"}.ri-poker-diamonds-line:before{content:"\\f5c5"}.ri-poker-hearts-fill:before{content:"\\f5c6"}.ri-poker-hearts-line:before{content:"\\f5c7"}.ri-poker-spades-fill:before{content:"\\f5c8"}.ri-poker-spades-line:before{content:"\\f5c9"}.ri-safe-3-fill:before{content:"\\f5ca"}.ri-safe-3-line:before{content:"\\f5cb"}.ri-accessibility-fill:before{content:"\\f5cc"}.ri-accessibility-line:before{content:"\\f5cd"}.ri-alarm-add-fill:before{content:"\\f5ce"}.ri-alarm-add-line:before{content:"\\f5cf"}.ri-arrow-down-long-fill:before{content:"\\f5d0"}.ri-arrow-down-long-line:before{content:"\\f5d1"}.ri-arrow-left-down-long-fill:before{content:"\\f5d2"}.ri-arrow-left-down-long-line:before{content:"\\f5d3"}.ri-arrow-left-long-fill:before{content:"\\f5d4"}.ri-arrow-left-long-line:before{content:"\\f5d5"}.ri-arrow-left-up-long-fill:before{content:"\\f5d6"}.ri-arrow-left-up-long-line:before{content:"\\f5d7"}.ri-arrow-right-down-long-fill:before{content:"\\f5d8"}.ri-arrow-right-down-long-line:before{content:"\\f5d9"}.ri-arrow-right-long-fill:before{content:"\\f5da"}.ri-arrow-right-long-line:before{content:"\\f5db"}.ri-arrow-right-up-long-fill:before{content:"\\f5dc"}.ri-arrow-right-up-long-line:before{content:"\\f5dd"}.ri-arrow-up-long-fill:before{content:"\\f5de"}.ri-arrow-up-long-line:before{content:"\\f5df"}.ri-chess-fill:before{content:"\\f5e0"}.ri-chess-line:before{content:"\\f5e1"}.ri-diamond-fill:before{content:"\\f5e2"}.ri-diamond-line:before{content:"\\f5e3"}.ri-diamond-ring-fill:before{content:"\\f5e4"}.ri-diamond-ring-line:before{content:"\\f5e5"}.ri-figma-fill:before{content:"\\f5e6"}.ri-figma-line:before{content:"\\f5e7"}.ri-firefox-browser-fill:before{content:"\\f5e8"}.ri-firefox-browser-line:before{content:"\\f5e9"}.ri-jewelry-fill:before{content:"\\f5ea"}.ri-jewelry-line:before{content:"\\f5eb"}.ri-multi-image-fill:before{content:"\\f5ec"}.ri-multi-image-line:before{content:"\\f5ed"}.ri-no-credit-card-fill:before{content:"\\f5ee"}.ri-no-credit-card-line:before{content:"\\f5ef"}.ri-service-bell-fill:before{content:"\\f5f0"}.ri-service-bell-line:before{content:"\\f5f1"}.ri-ai-agent-fill:before{content:"\\f5f2"}.ri-ai-agent-line:before{content:"\\f5f3"}.ri-ai-generate-2-fill:before{content:"\\f5f4"}.ri-ai-generate-2-line:before{content:"\\f5f5"}.ri-ai-generate-3d-fill:before{content:"\\f5f6"}.ri-ai-generate-3d-line:before{content:"\\f5f7"}.ri-ai:before{content:"\\f5f8"}.ri-apps-ai-fill:before{content:"\\f5f9"}.ri-apps-ai-line:before{content:"\\f5fa"}.ri-atom-fill:before{content:"\\f5fb"}.ri-atom-line:before{content:"\\f5fc"}.ri-book-ai-fill:before{content:"\\f5fd"}.ri-book-ai-line:before{content:"\\f5fe"}.ri-brain-3-fill:before{content:"\\f5ff"}.ri-brain-3-line:before{content:"\\f600"}.ri-brain-ai-3-fill:before{content:"\\f601"}.ri-brain-ai-3-line:before{content:"\\f602"}.ri-brush-ai-3-fill:before{content:"\\f603"}.ri-brush-ai-3-line:before{content:"\\f604"}.ri-camera-4-fill:before{content:"\\f605"}.ri-camera-4-line:before{content:"\\f606"}.ri-camera-ai-2-fill:before{content:"\\f607"}.ri-camera-ai-2-line:before{content:"\\f608"}.ri-chat-ai-2-fill:before{content:"\\f609"}.ri-chat-ai-2-line:before{content:"\\f60a"}.ri-chat-ai-3-fill:before{content:"\\f60b"}.ri-chat-ai-3-line:before{content:"\\f60c"}.ri-chat-ai-4-fill:before{content:"\\f60d"}.ri-chat-ai-4-line:before{content:"\\f60e"}.ri-chat-smile-ai-3-fill:before{content:"\\f60f"}.ri-chat-smile-ai-3-line:before{content:"\\f610"}.ri-deepseek-fill:before{content:"\\f611"}.ri-deepseek-line:before{content:"\\f612"}.ri-file-ai-2-fill:before{content:"\\f613"}.ri-file-ai-2-line:before{content:"\\f614"}.ri-file-ai-fill:before{content:"\\f615"}.ri-file-ai-line:before{content:"\\f616"}.ri-function-ai-fill:before{content:"\\f617"}.ri-function-ai-line:before{content:"\\f618"}.ri-game-2-fill:before{content:"\\f619"}.ri-game-2-line:before{content:"\\f61a"}.ri-goblet-broken-fill:before{content:"\\f61b"}.ri-goblet-broken-line:before{content:"\\f61c"}.ri-lightbulb-ai-fill:before{content:"\\f61d"}.ri-lightbulb-ai-line:before{content:"\\f61e"}.ri-loop-left-ai-fill:before{content:"\\f61f"}.ri-loop-left-ai-line:before{content:"\\f620"}.ri-loop-right-ai-fill:before{content:"\\f621"}.ri-loop-right-ai-line:before{content:"\\f622"}.ri-message-ai-3-fill:before{content:"\\f623"}.ri-message-ai-3-line:before{content:"\\f624"}.ri-painting-ai-fill:before{content:"\\f625"}.ri-painting-ai-line:before{content:"\\f626"}.ri-painting-fill:before{content:"\\f627"}.ri-painting-line:before{content:"\\f628"}.ri-pencil-ai-2-fill:before{content:"\\f629"}.ri-pencil-ai-2-line:before{content:"\\f62a"}.ri-pencil-ai-fill:before{content:"\\f62b"}.ri-pencil-ai-line:before{content:"\\f62c"}.ri-remix-fill:before{content:"\\f62d"}.ri-remix-line:before{content:"\\f62e"}.ri-search-ai-2-fill:before{content:"\\f62f"}.ri-search-ai-2-line:before{content:"\\f630"}.ri-search-ai-3-fill:before{content:"\\f631"}.ri-search-ai-3-line:before{content:"\\f632"}.ri-search-ai-4-fill:before{content:"\\f633"}.ri-search-ai-4-line:before{content:"\\f634"}.ri-search-ai-fill:before{content:"\\f635"}.ri-search-ai-line:before{content:"\\f636"}.ri-speech-to-text-fill:before{content:"\\f637"}.ri-speech-to-text-line:before{content:"\\f638"}.ri-target-fill:before{content:"\\f639"}.ri-target-line:before{content:"\\f63a"}.ri-text-to-speech-fill:before{content:"\\f63b"}.ri-text-to-speech-line:before{content:"\\f63c"}.ri-wrench-fill:before{content:"\\f63d"}.ri-wrench-line:before{content:"\\f63e"}.ri-area-chart-fill:before{content:"\\f63f"}.ri-area-chart-line:before{content:"\\f640"}.ri-baseball-fill:before{content:"\\f641"}.ri-baseball-line:before{content:"\\f642"}.ri-binoculars-fill:before{content:"\\f643"}.ri-binoculars-line:before{content:"\\f644"}.ri-cursor-hand:before{content:"\\f645"}.ri-emotion-add-fill:before{content:"\\f646"}.ri-emotion-add-line:before{content:"\\f647"}.ri-file-scan-fill:before{content:"\\f648"}.ri-file-scan-line:before{content:"\\f649"}.ri-fiverr-fill:before{content:"\\f64a"}.ri-fiverr-line:before{content:"\\f64b"}.ri-font-serif:before{content:"\\f64c"}.ri-ghost-3-fill:before{content:"\\f64d"}.ri-ghost-3-line:before{content:"\\f64e"}.ri-gitee-fill:before{content:"\\f64f"}.ri-gitee-line:before{content:"\\f650"}.ri-global-off-fill:before{content:"\\f651"}.ri-global-off-line:before{content:"\\f652"}.ri-image-download-fill:before{content:"\\f653"}.ri-image-download-line:before{content:"\\f654"}.ri-image-upload-fill:before{content:"\\f655"}.ri-image-upload-line:before{content:"\\f656"}.ri-issues-fill:before{content:"\\f657"}.ri-issues-line:before{content:"\\f658"}.ri-issues-reopen-fill:before{content:"\\f659"}.ri-issues-reopen-line:before{content:"\\f65a"}.ri-network-error-fill:before{content:"\\f65b"}.ri-network-error-line:before{content:"\\f65c"}.ri-network-fill:before{content:"\\f65d"}.ri-network-line:before{content:"\\f65e"}.ri-network-off-fill:before{content:"\\f65f"}.ri-network-off-line:before{content:"\\f660"}.ri-piano-fill:before{content:"\\f661"}.ri-piano-grand-fill:before{content:"\\f662"}.ri-piano-grand-line:before{content:"\\f663"}.ri-piano-line:before{content:"\\f664"}.ri-plug-3-fill:before{content:"\\f665"}.ri-plug-3-line:before{content:"\\f666"}.ri-send-ins-fill:before{content:"\\f667"}.ri-send-ins-line:before{content:"\\f668"}.ri-signal-cellular-1-fill:before{content:"\\f669"}.ri-signal-cellular-1-line:before{content:"\\f66a"}.ri-signal-cellular-2-fill:before{content:"\\f66b"}.ri-signal-cellular-2-line:before{content:"\\f66c"}.ri-signal-cellular-3-fill:before{content:"\\f66d"}.ri-signal-cellular-3-line:before{content:"\\f66e"}.ri-signal-cellular-off-fill:before{content:"\\f66f"}.ri-signal-cellular-off-line:before{content:"\\f670"}.ri-stacked-chart-fill:before{content:"\\f671"}.ri-stacked-chart-line:before{content:"\\f672"}.ri-upwork-fill:before{content:"\\f673"}.ri-upwork-line:before{content:"\\f674"}.ri-brain-4-fill:before{content:"\\f675"}.ri-brain-4-line:before{content:"\\f676"}.ri-certificate-2-fill:before{content:"\\f677"}.ri-certificate-2-line:before{content:"\\f678"}.ri-certificate-fill:before{content:"\\f679"}.ri-certificate-line:before{content:"\\f67a"}.ri-cookie-fill:before{content:"\\f67b"}.ri-cookie-line:before{content:"\\f67c"}.ri-cursor-ai-fill:before{content:"\\f67d"}.ri-cursor-ai-line:before{content:"\\f67e"}.ri-draw-fill:before{content:"\\f67f"}.ri-draw-line:before{content:"\\f680"}.ri-ghost-4-fill:before{content:"\\f681"}.ri-ghost-4-line:before{content:"\\f682"}.ri-gitbook-fill:before{content:"\\f683"}.ri-gitbook-line:before{content:"\\f684"}.ri-grok-ai-fill:before{content:"\\f685"}.ri-grok-ai-line:before{content:"\\f686"}.ri-hand-2:before{content:"\\f687"}.ri-megaphone-2-fill:before{content:"\\f688"}.ri-megaphone-2-line:before{content:"\\f689"}.ri-microsoft-copilot-fill:before{content:"\\f68a"}.ri-microsoft-copilot-line:before{content:"\\f68b"}.ri-mosaic-fill:before{content:"\\f68c"}.ri-mosaic-line:before{content:"\\f68d"}.ri-qr-scan-ai-fill:before{content:"\\f68e"}.ri-qr-scan-ai-line:before{content:"\\f68f"}.ri-qwen-ai-fill:before{content:"\\f690"}.ri-qwen-ai-line:before{content:"\\f691"}.ri-reddit-2-fill:before{content:"\\f692"}.ri-reddit-2-line:before{content:"\\f693"}.ri-sim-card-warning-fill:before{content:"\\f694"}.ri-sim-card-warning-line:before{content:"\\f695"}.ri-space-ship-2-fill:before{content:"\\f696"}.ri-space-ship-2-line:before{content:"\\f697"}.ri-subreddit-fill:before{content:"\\f698"}.ri-subreddit-line:before{content:"\\f699"}.ri-zhipu-ai-fill:before{content:"\\f69a"}.ri-zhipu-ai-line:before{content:"\\f69b"}.ri-connector-fill:before{content:"\\f69c"}.ri-connector-line:before{content:"\\f69d"}html{height:100%}body{height:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:rgb(var(--surface-ground));color:rgb(var(--text-color));overscroll-behavior:none}app-root{display:flex;flex-direction:column;height:100%}body.theme-light{--primary-color: 98 101 241;--secondary-color: 16 185 129;--accent-color: 245 158 11;--surface-card: 255 255 255;--surface-100: 248 250 252;--surface-200: 226 232 240;--border-color: 203 213 225;--text-color: 15 23 42;--text-color-secondary: 100 116 139}body.theme-dark{--primary-color: 139 143 255;--secondary-color: 34 197 94;--accent-color: 251 191 36;--surface-card: 30 41 59;--surface-100: 51 65 85;--surface-200: 71 85 105;--border-color: 100 116 139;--text-color: 226 232 240;--text-color-secondary: 148 163 184}body.theme-ocean{--primary-color: 14 116 144;--secondary-color: 6 182 212;--accent-color: 249 115 22;--surface-card: 248 250 252;--surface-100: 240 249 255;--surface-200: 186 230 253;--border-color: 125 211 252;--text-color: 8 47 73;--text-color-secondary: 14 116 144}:host{font-family:Montserrat,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}::-webkit-scrollbar{width:3px}::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #d3d3d3;border-radius:10px}::-webkit-scrollbar-thumb{background:rgb(var(--primary-color, 98 101 241));border-radius:10px}::-webkit-scrollbar-thumb:hover{background:rgb(var(--primary-color, 98 101 241) / .86)}.panel-scroll-body{max-height:calc(100dvh - 190px);overflow-y:auto;overflow-x:hidden}.panel-body{display:flex;flex-direction:column;gap:.95rem;min-height:0;padding:.35rem .15rem .6rem}.panel-body .child-panel{border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.9rem;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));box-shadow:0 8px 22px #0f172a0f;padding:.9rem}.panel-body .child-panel__label{display:inline-flex;align-items:center;gap:.35rem;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--primary-color, 98 101 241));margin-bottom:.65rem}.panel-body .child-accordion{width:100%}.panel-body .child-panel :where(input,select,textarea){background:rgb(var(--surface-card, 255 255 255))}.canvas-content{height:calc(100dvh - 180px)}.p-slider.p-slider-horizontal{height:5px!important}.ri-add-line,.ri-subtract-line{width:25px;height:25px;background:#fff;border-radius:50%;color:#585858;border:1px solid #585858;line-height:1.9}:is(.ri-add-line,.ri-subtract-line):hover{border-color:#6265f1;color:#6265f1}.p-button-text:not(:disabled):hover{background:transparent!important}.slider-scale-box{background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.75rem;padding:.65rem;box-shadow:0 5px 14px #0f172a0d}@media(max-width:991px){.panel-scroll-body{max-height:unset}.canvas-content{height:auto;min-height:0;flex:1}.editor-main-box{min-height:auto}}@media(max-width:640px){.panel-body{gap:.65rem;padding:.25rem .1rem .5rem}.panel-body .child-panel{padding:.65rem}}@media(max-width:480px){.panel-body{gap:.5rem;padding:.2rem .1rem .4rem}.panel-body .child-panel{padding:.5rem;border-radius:.65rem}}.name-number-overlay-box .p-button,.name-number-overlay-box .p-button-icon,.name-number-overlay-box .p-button-label{color:#333!important;transform:none!important}.name-number-overlay-box .p-fileupload-choose-button,.name-number-overlay-box .p-fileupload-choose-button .p-button-label{color:#fff!important}.panel-body .p-accordion.p-component{width:100%}.p-accordioncontent[data-p-active=false] .p-accordioncontent-content{display:none}.manifest-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}.manifest-loader .message{color:var(--p-text-color, #0f172a);font-weight:500}.manifest-loader .loader{--duration: 3s;--primary: rgb(167, 11, 11);width:200px;height:365px;position:relative;transform-style:preserve-3d}@media(max-width:480px){.manifest-loader .loader{zoom:.44}}.manifest-loader .loader .box{--x: 0;--y: 0;position:absolute;animation:var(--duration) linear forwards infinite;transform:translate(var(--x),var(--y))}.manifest-loader .loader .box div{background-color:var(--primary);width:48px;height:48px;position:relative;transform-style:preserve-3d;animation:var(--duration) ease forwards infinite;transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}.manifest-loader .loader .box div:before,.manifest-loader .loader .box div:after{--rx: 90deg;--ry: 0deg;--z: 24px;--y: -24px;--x: 0;content:"";position:absolute;background-color:inherit;width:inherit;height:inherit;transform:rotateX(var(--rx)) rotateY(var(--ry)) translate(var(--x),var(--y)) translateZ(var(--z));filter:brightness(var(--b, 1.2))}.manifest-loader .loader .box div:after{--rx: 0deg;--ry: 90deg;--x: 24px;--y: 0;--b: 1.4}.manifest-loader .loader .box.box0{--x: -220px;--y: -120px;left:58px;top:108px}.manifest-loader .loader .box.box1{--x: -260px;--y: 120px;left:25px;top:120px}.manifest-loader .loader .box.box2{--x: 120px;--y: -190px;left:58px;top:64px}.manifest-loader .loader .box.box3{--x: 280px;--y: -40px;left:91px;top:120px}.manifest-loader .loader .box.box4{--x: 60px;--y: 200px;left:58px;top:132px}.manifest-loader .loader .box.box5{--x: -220px;--y: -120px;left:25px;top:76px}.manifest-loader .loader .box.box6{--x: -260px;--y: 120px;left:91px;top:76px}.manifest-loader .loader .box.box7{--x: -240px;--y: 200px;left:58px;top:87px}.manifest-loader .loader .box0{animation-name:box-move0}.manifest-loader .loader .box0 div{animation-name:box-scale0}.manifest-loader .loader .box1{animation-name:box-move1}.manifest-loader .loader .box1 div{animation-name:box-scale1}.manifest-loader .loader .box2{animation-name:box-move2}.manifest-loader .loader .box2 div{animation-name:box-scale2}.manifest-loader .loader .box3{animation-name:box-move3}.manifest-loader .loader .box3 div{animation-name:box-scale3}.manifest-loader .loader .box4{animation-name:box-move4}.manifest-loader .loader .box4 div{animation-name:box-scale4}.manifest-loader .loader .box5{animation-name:box-move5}.manifest-loader .loader .box5 div{animation-name:box-scale5}.manifest-loader .loader .box6{animation-name:box-move6}.manifest-loader .loader .box6 div{animation-name:box-scale6}.manifest-loader .loader .box7{animation-name:box-move7}.manifest-loader .loader .box7 div{animation-name:box-scale7}@keyframes box-move0{12%{transform:translate(var(--x),var(--y))}25%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale0{6%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}14%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move1{16%{transform:translate(var(--x),var(--y))}29%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale1{10%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}18%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move2{20%{transform:translate(var(--x),var(--y))}33%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale2{14%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}22%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move3{24%{transform:translate(var(--x),var(--y))}37%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale3{18%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}26%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move4{28%{transform:translate(var(--x),var(--y))}41%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale4{22%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}30%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move5{32%{transform:translate(var(--x),var(--y))}45%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale5{26%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}34%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move6{36%{transform:translate(var(--x),var(--y))}49%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale6{30%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}38%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move7{40%{transform:translate(var(--x),var(--y))}53%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale7{34%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}42%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes mask{0%,65%{opacity:0}66%,to{opacity:1}}.p-accordion-panel:last-child .p-accordion-header{border:none!important}.viewer-container{width:100%;height:80%;display:block}:host ::ng-deep canvas[data-view]{width:100%!important;height:100%!important}.header{padding:12px 20px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a14}.header-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px;margin-bottom:0;flex-wrap:wrap}.logo{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42))}.brand{display:flex;align-items:center;min-height:32px}.brand-logo-img{width:auto;height:32px;max-width:240px;object-fit:contain;display:block}.tabs{display:flex;gap:5px}.tab{padding:8px 20px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.tab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.tab:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .12)}.header-right{display:flex;gap:10px;align-items:center}.btn-export,.btn-save{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost{padding:8px 12px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost:disabled{opacity:.5;cursor:not-allowed}.btn-ghost:not(:disabled):hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.btn-export:hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.btn-export:disabled,.btn-save:disabled{opacity:.6;cursor:not-allowed}.btn-reset{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-reset:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--secondary-color, 16 185 129))}.btn-reset:disabled{opacity:.6;cursor:not-allowed}.btn-exit{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-exit:hover{background:rgb(var(--surface-100, 248 250 252));border-color:#ef4444}.btn-exit:disabled{opacity:.6;cursor:not-allowed}.btn-menu{padding:8px 12px;border:none;background:transparent;font-size:20px;cursor:pointer;color:rgb(var(--text-color-secondary, 100 116 139))}.unified-alignment-controls{display:flex;align-items:center;height:auto}.alignment-controls-container{display:flex;align-items:center;width:100%}.controls-group{display:flex;align-items:center;gap:16px;padding:10px 16px;background:linear-gradient(135deg,rgb(var(--surface-50, 248 250 252) / .8),rgb(var(--surface-100, 248 250 252) / .6));border:1px solid rgb(var(--border-color, 203 213 225) / .6);border-radius:8px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.toggle-buttons{display:flex;align-items:center;gap:6px;padding:0;background:rgb(var(--surface-card, 255 255 255));border-radius:6px;border:1px solid rgb(var(--border-color, 203 213 225))}.alignment-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;font-weight:500;cursor:pointer;border-radius:5px;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.alignment-btn i{font-size:16px;display:flex;align-items:center}.alignment-btn .btn-label{white-space:nowrap;font-weight:500}.alignment-btn:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .08);color:rgb(var(--text-color, 15 23 42))}.alignment-btn.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4)}.alignment-btn.active:hover{background:rgb(var(--primary-color, 98 101 241) / .92)}.grid-size-section{display:flex;align-items:center}.grid-size-label{display:flex;flex-direction:column;gap:8px;cursor:pointer}.label-header{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:rgb(var(--text-color, 15 23 42));text-transform:uppercase;letter-spacing:.5px}.label-header i{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.slider-wrapper{display:flex;align-items:center;gap:10px;min-width:280px}.grid-size-slider{flex:1;height:6px;border-radius:3px;background:linear-gradient(to right,rgb(var(--primary-color, 98 101 241) / .2),rgb(var(--primary-color, 98 101 241) / .1));outline:none;-webkit-appearance:none;appearance:none;cursor:pointer}.grid-size-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-webkit-slider-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;border:none;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-moz-range-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-track{background:transparent;border:none}.grid-size-slider::-moz-range-progress{background:rgb(var(--primary-color, 98 101 241) / .3);border-radius:3px}.grid-size-value{display:flex;align-items:center;justify-content:center;min-width:56px;padding:4px 8px;font-size:12px;font-weight:500;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:4px;font-family:inherit}@media(max-width:1200px){.controls-group{gap:12px;padding:8px 12px}.slider-wrapper{min-width:220px}}@media(max-width:768px){.unified-alignment-controls{width:100%}.alignment-controls-container{flex-direction:column;gap:10px}.controls-group{flex-direction:column;gap:10px;width:100%}.toggle-buttons{width:100%;justify-content:space-between}.alignment-btn{flex:1;padding:10px 12px}.alignment-btn .btn-label{display:none}.grid-size-section,.grid-size-label{width:100%}.slider-wrapper{width:100%;min-width:unset}.grid-size-value{padding:6px 10px;font-size:11px}}@media(max-width:480px){.controls-group{padding:8px 10px;gap:8px}.toggle-buttons{gap:4px}.alignment-btn{padding:8px 10px;font-size:12px}.alignment-btn i{font-size:15px}.label-header{font-size:11px}.slider-wrapper{gap:8px}}.main-container{display:flex;height:calc(100dvh - 57px);background:rgb(var(--surface-100, 248 250 252))}.canvas-area{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:1px;background:rgb(var(--border-color, 203 213 225));overflow:hidden}.canvas-area.canvas-area-single{grid-template-columns:1fr}.view-section{display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));position:relative;overflow:hidden}.view-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 16px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a0d}.view-header h3{font-size:16px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0}.view-header .view-controls{display:flex;gap:5px;background:rgb(var(--surface-100, 248 250 252));padding:4px;border-radius:6px}.canvas-toolbar{position:absolute;top:70px;left:20px;display:flex;gap:8px;background:rgb(var(--surface-card, 255 255 255));padding:10px;border-radius:8px;box-shadow:0 2px 8px #0f172a1a;z-index:10}.canvas-toolbar-2d{top:70px}.toolbar-btn{width:36px;height:36px;border:none;background:transparent;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.toolbar-btn:hover{background:rgb(var(--surface-100, 248 250 252))}.view-controls{display:flex;gap:5px}.view-btn,.view-btn-2d{padding:6px 16px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;cursor:pointer;border-radius:4px;transition:all .2s}.view-btn.active,.view-btn-2d.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.view-btn:hover:not(.active),.view-btn-2d:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .15)}.canvas-content{flex:1;display:flex;align-items:center;justify-content:center}.jersey-model,.jersey-2d{display:flex;flex-direction:column;align-items:center;gap:20px}.model-text{text-align:center}.model-text h3{font-size:18px;color:#666;margin-bottom:5px}.model-text p{font-size:13px;color:#999}.canvas-footer{display:flex;justify-content:center;align-items:center;gap:20px;padding:16px;background:#fff;border-radius:0;margin:0;border-top:1px solid #e0e0e0}.zoom-control{display:flex;align-items:center;gap:10px;font-size:13px;color:#666}.zoom-btn{width:32px;height:32px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.zoom-btn:hover{background:#f5f5f5}.zoom-value{min-width:50px;text-align:center;font-weight:500;color:#1a1a1a}.view-options{display:flex;gap:10px}.option-btn{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:14px;border-radius:6px;transition:all .2s}.option-btn:hover{background:#f5f5f5}.right-panel{width:420px;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;box-shadow:inset 1px 0 #fffc}.right-panel>section{display:flex;flex:1;min-height:0}.right-panel-shell,.icon-nav-shell{display:flex;min-height:0;height:100%}.panel-icon-nav{width:90px;height:100%;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;justify-content:space-between}.icon-nav-list{display:flex;flex-direction:column;overflow:auto}.icon-btn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 10px;border:none;background:transparent;color:#666;font-size:11px;cursor:pointer;transition:all .2s;border-left:3px solid transparent}.icon-btn i{font-size:20px}.icon-btn.active{color:rgb(var(--primary-color, 98 101 241));border-left-color:rgb(var(--primary-color, 98 101 241));background:rgb(var(--primary-color, 98 101 241) / .12)}.icon-btn:hover:not(.active){background:#f5f5f5}.icon-nav-bottom{display:flex;justify-content:center;gap:5px;padding:16px 10px;border-top:1px solid #e0e0e0}.icon-btn-small{width:36px;height:36px;padding:6px;border:none;background:transparent;color:#666;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.icon-btn-small:hover{background:#f0f0f0}.toggle-more-btn,.expanded-nav-menu,.mobile-canvas-toggle,.mobile-actions-bar{display:none}.panel-content{width:100%;display:flex;flex:1;flex-direction:column;min-height:0}.panel-content[style*="display: flex"]{display:flex!important}.panel-header{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #eef2f7;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255) / .98),rgb(var(--surface-100, 248 250 252) / .88));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.panel-header h2{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0 0 4px;letter-spacing:.01em}.panel-subtitle{font-size:13px;color:#666;margin:0}.help-btn{width:28px;height:28px;border:2px solid #2196f3;background:#fff;color:#2196f3;border-radius:50%;cursor:pointer;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:all .2s}.help-btn:hover{background:#2196f3;color:#fff}.panel-tabs{display:flex;border-bottom:2px solid #f0f0f0;padding:0 24px}.panel-tab{flex:1;padding:12px 16px;border:none;background:transparent;color:#666;font-size:14px;font-weight:500;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;transition:all .2s}.panel-tab.active{color:#2196f3;border-bottom-color:#2196f3}.panel-tab:hover:not(.active){color:#333}.tab-content{flex:1;overflow-y:auto}.panel-body{flex:1}.color-list{padding:0}.color-item{display:flex;align-items:center;gap:16px;padding:16px 24px;border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background .2s}.color-item:hover{background:#f8f8f8}.color-preview{width:40px;height:40px;border-radius:50%;flex-shrink:0;box-shadow:0 2px 4px #0000001a}.color-label{flex:1;font-size:15px;color:#1a1a1a;font-weight:400}.arrow-btn{width:32px;height:32px;border:none;background:transparent;color:#999;font-size:24px;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.arrow-btn:hover{background:#f0f0f0;color:#666}.custom-color-section{padding:24px}.color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:16px}.color-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative}.color-swatch.white{background:#fff}.color-swatch.black{background:#000}.color-swatch.active{border-color:#1a1a1a;border-width:3px}.color-swatch.active:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.color-swatch.white.active:after{color:#1a1a1a}.color-swatch.add-color{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.color-swatch:hover{border-color:#999}.custom-color{margin-top:15px}.custom-color label{display:block;font-size:12px;color:#666;margin-bottom:8px}.color-input-group{display:flex;gap:10px;align-items:center}.color-input{flex:1;padding:10px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#666}.color-picker{width:50px;height:42px;border:none;border-radius:6px;cursor:pointer;background:#000}.pattern-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:15px}.pattern-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative;overflow:hidden}.pattern-swatch.active{border-color:#1a1a1a;border-width:3px}.pattern-swatch.active:first-child:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.pattern-swatch:first-child{background:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;color:#666}.pattern-swatch.solid{background:#5a5a5a}.pattern-swatch.diagonal-lines{background:repeating-linear-gradient(45deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.dots{background:radial-gradient(circle,#5a5a5a 1px,transparent 1px);background-size:8px 8px}.pattern-swatch.horizontal-lines{background:repeating-linear-gradient(0deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.add-pattern{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.pattern-swatch:hover{border-color:#999}.slider-control{margin-top:15px}.slider-control label{display:block;font-size:12px;color:#666;margin-bottom:10px}.slider{width:100%;height:6px;border-radius:3px;background:#e0e0e0;outline:none;-webkit-appearance:none;appearance:none}.slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;box-shadow:0 2px 4px #0003}.slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;border:none;box-shadow:0 2px 4px #0003}.form-group{margin-bottom:16px}.form-group label{display:block;font-size:12px;color:#666;margin-bottom:8px;font-weight:500}.form-row{display:flex;gap:12px;margin-bottom:16px}.form-group.half{flex:1}.text-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;transition:all .2s}.text-input:focus{outline:none;border-color:#1a1a1a}.text-input::placeholder{color:#999}.number-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a}.dropdown{width:100%;padding:10px 32px 10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;background:#fff;cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.dropdown:hover{border-color:#999}.dropdown.small{font-size:13px}.text-formatting{display:flex;gap:8px;margin-bottom:16px}.format-btn{flex:1;padding:10px;border:1px solid #e0e0e0;background:#fff;font-size:14px;font-weight:700;cursor:pointer;border-radius:6px;transition:all .2s}.format-btn.italic{font-style:italic;font-weight:700}.format-btn:hover{background:#f5f5f5;border-color:#999}.format-btn.active{background:#1a1a1a;color:#fff;border-color:#1a1a1a}.upload-area{width:100%;padding:40px 20px;border:2px dashed #d0d0d0;border-radius:8px;text-align:center;cursor:pointer;transition:all .2s;margin-bottom:16px;background:#fafafa}.upload-area:hover{border-color:#999;background:#f5f5f5}.upload-icon{width:48px;height:48px;margin:0 auto 12px;background:#e0e0e0;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;color:#666}.upload-text{font-size:14px;color:#1a1a1a;margin-bottom:4px;font-weight:500}.upload-hint{font-size:12px;color:#999}.add-btn{width:100%;padding:12px;border:none;background:#1a1a1a;color:#fff;font-size:14px;font-weight:600;cursor:pointer;border-radius:6px;transition:all .2s}.add-btn:hover{background:#333}.button-row{display:flex;gap:10px}.action-btn{padding:10px 16px;border:1px solid #e0e0e0;background:#fff;color:#1a1a1a;font-size:13px;font-weight:500;cursor:pointer;border-radius:6px;transition:all .2s}.action-btn.half{flex:1}.action-btn:hover{background:#f5f5f5;border-color:#999}.panel-content::-webkit-scrollbar,.tab-content::-webkit-scrollbar,.panel-body::-webkit-scrollbar{width:6px}.panel-content::-webkit-scrollbar-track,.tab-content::-webkit-scrollbar-track,.panel-body::-webkit-scrollbar-track{background:rgb(var(--surface-100, 248 250 252))}.panel-content::-webkit-scrollbar-thumb,.tab-content::-webkit-scrollbar-thumb,.panel-body::-webkit-scrollbar-thumb{background:rgb(var(--surface-400, 148 163 184));border-radius:3px}.panel-content::-webkit-scrollbar-thumb:hover,.tab-content::-webkit-scrollbar-thumb:hover,.panel-body::-webkit-scrollbar-thumb:hover{background:rgb(var(--surface-500, 100 116 139))}.main-canvas-area{display:grid;grid-template-columns:1fr 1fr;min-height:0;background:rgb(var(--surface-100, 248 250 252));position:relative}.main-canvas-area.single{grid-template-columns:1fr}.view-section{position:relative;display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));overflow:hidden}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:1px solid rgb(var(--surface-300, 203 213 225))}.view-section.hidden{display:none}.editor-main-box{height:calc(100% - 112px);max-height:calc(100dvh - 112px)!important;align-items:stretch;overflow:hidden}.main-canvas-area.single{padding-right:20px}.main-canvas-area .view-section,.main-canvas-area .view-section>.view-section,.canvas-area,.canvas-area-single,.jersey-model,app-two-d-ui,app-three-d-ui{min-height:0;height:100%}.main-canvas-area.canvas-loading .view-section{pointer-events:none}.canvas-manifest-loader{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;background:rgb(var(--surface-0, 255 255 255));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@supports (color: color-mix(in lab,red,red)){.canvas-manifest-loader{background:color-mix(in srgb,rgb(var(--surface-0, 255 255 255)) 85%,transparent)}}.canvas-manifest-loader :where(.manifest-loader .loader){--primary: rgb(var(--primary-color, 98 101 241));width:160px;height:220px}.canvas-manifest-loader-subtitle{margin:0;font-size:.8125rem;font-weight:500;color:rgb(var(--text-color-secondary, 100 116 139))}.panel-scroll-body{flex:1;min-height:0;max-height:none;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:.45rem .65rem .85rem}@media(max-width:1199px){.right-panel{width:360px}.panel-icon-nav{width:78px}.main-canvas-area.single{padding-right:12px}.main-canvas-area:not(.single){grid-auto-rows:1fr;grid-template-columns:1fr}}.mobile-panel-toggle{display:none}@media(max-width:991px){:host{display:flex;flex-direction:column;height:100dvh;overflow:hidden}.header{flex-shrink:0}.editor-main-box{flex:1;min-height:0;display:flex;flex-direction:column;height:auto;padding-bottom:116px}.main-canvas-area{flex:1;min-height:0;width:100%;grid-template-columns:1fr;grid-auto-rows:1fr;padding:0;overflow-y:auto}.main-canvas-area:not(.single){grid-auto-rows:minmax(220px,1fr)}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:0;border-top:1px solid rgb(var(--surface-300, 203 213 225))}.right-panel-shell,.icon-nav-shell{flex-shrink:0;width:100%;height:auto}.right-panel,.panel-icon-nav{width:100%;height:auto;border-left:0;border-top:1px solid rgb(var(--surface-200, 226 232 240))}.right-panel{max-height:min(44svh,400px);overflow:hidden;background:rgb(var(--surface-card, 255 255 255))}.panel-content{display:flex;min-height:0}.panel-header{position:sticky;top:0;z-index:2;background:rgb(var(--surface-card, 255 255 255));padding:12px 16px 10px}.panel-header h2{font-size:16px;line-height:1.2}.panel-scroll-body{flex:1;min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 8px 10px}.panel-icon-nav{position:fixed;bottom:0;left:0;width:100%;z-index:30;background:rgb(var(--surface-card, 255 255 255));box-shadow:0 -3px 14px #0f172a14;border-top:1px solid rgb(var(--surface-200, 226 232 240));z-index:9999999}.icon-nav-list{flex-direction:row;overflow-x:auto;gap:6px;padding:6px 8px;scrollbar-width:none;-webkit-overflow-scrolling:touch;justify-content:space-between;z-index:1024}.icon-nav-list::-webkit-scrollbar{display:none}.icon-btn{min-width:80px;min-height:52px;border-radius:10px;padding:8px;gap:4px;border-left:0;border-bottom:3px solid transparent;flex:0 0 auto;font-size:11px}.icon-btn.active{border-bottom-color:rgb(var(--primary-color, 98 101 241));border-left-color:transparent}.icon-nav-bottom{padding:8px;border-top:1px solid rgb(var(--surface-100, 248 250 252))}.icon-btn-small{width:40px;height:40px}.toggle-more-btn{display:flex}.expanded-nav-menu{display:flex;inset:auto 0 100%;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;border-radius:8px 8px 0 0;box-shadow:0 -4px 12px #0f172a1a;border:1px solid rgb(var(--border-color, 203 213 225));border-left:none;border-right:none;border-bottom:none;padding:4px 8px;margin-bottom:-1px;gap:6px;justify-content:space-between}.expanded-nav-menu .icon-btn{min-width:80px;min-height:52px;border-left:0;border-bottom:3px solid transparent;padding:8px;width:auto}.mobile-actions-bar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--surface-100, 248 250 252))}.mobile-panel-toggle{display:flex;align-items:center;gap:6px;padding:8px 14px;border:none;border-radius:6px;background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241));font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s}.mobile-panel-toggle:active{background:rgb(var(--primary-color, 98 101 241) / .2)}.mobile-panel-toggle i{font-size:18px;line-height:1}.main-canvas-area{position:relative}.mobile-panel-hidden .right-panel-shell{max-height:0!important;overflow:hidden!important;border-top:0!important;pointer-events:none}.mobile-panel-hidden .main-canvas-area{flex:1 1 100%}.mobile-canvas-hidden .main-canvas-area{display:none!important}.mobile-canvas-hidden .right-panel{max-height:none;height:100%;flex:1}.mobile-canvas-hidden .panel-scroll-body{max-height:100%!important}.mobile-canvas-toggle{display:flex;align-items:center;justify-content:center;gap:6px;padding:2px 7px;background:transparent;border:1px solid rgb(var(--surface-200, 226 232 240));border-radius:6px;color:rgb(var(--text-color, 15 23 42));font-size:13px;font-weight:600;cursor:pointer;transition:background .2s;margin-left:auto}.mobile-canvas-toggle:active{background:rgb(var(--surface-100, 248 250 252))}.mobile-canvas-toggle i{font-size:16px}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}.brand-logo-img{height:24px}}@media(max-width:640px){.header{padding:8px 12px 0}.header>div{flex-wrap:wrap;gap:6px}.header-right{gap:6px;flex-wrap:wrap}.logo{font-size:17px}.btn-export,.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 10px}.main-canvas-area{grid-auto-rows:1fr}.right-panel{max-height:min(45svh,380px)}.panel-header{padding:10px 12px 8px}.panel-header h2{font-size:15px}.panel-scroll-body{max-height:min(38svh,310px);padding:0 6px 8px}.icon-btn{min-width:68px;min-height:50px;padding:6px 4px;font-size:10px}.icon-btn i{font-size:18px}.icon-nav-list{gap:2px;padding:4px 6px}.icon-nav-bottom{padding:4px 6px}.expanded-nav-menu .icon-btn{min-width:68px;min-height:50px}.mobile-panel-toggle{font-size:12px;padding:7px 14px;bottom:10px}.mobile-panel-toggle i{font-size:16px}}@media(max-width:480px){.header{padding:6px 10px 0}.logo{font-size:16px}.btn-export{display:none}.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 12px}.right-panel{max-height:min(46svh,360px)}.panel-scroll-body{max-height:min(39svh,235px)}.icon-btn{min-width:60px;min-height:48px;gap:3px;font-size:9px}.icon-btn i{font-size:17px}.expanded-nav-menu .icon-btn{min-width:60px;min-height:48px}.mobile-panel-toggle{font-size:11px;padding:6px 12px;gap:4px;bottom:8px}.mobile-panel-toggle i{font-size:15px}}@media(max-width:991px)and (orientation:landscape)and (max-height:500px){.editor-main-box{flex-direction:row;flex-wrap:nowrap}.main-canvas-area{flex:1;min-width:0;grid-template-columns:1fr;grid-auto-rows:100%}.mobile-panel-toggle{bottom:8px;left:auto;right:12px;transform:none;font-size:12px;padding:6px 12px}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{max-height:unset!important;width:0!important;overflow:hidden!important;border:none!important}.right-panel-shell{flex-direction:column;width:auto;height:100%;flex-shrink:0}.right-panel{width:280px;max-height:100%;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240))}.panel-scroll-body{max-height:100%}.icon-nav-shell{width:auto;height:100%;flex-shrink:0}.panel-icon-nav{width:64px;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240));box-shadow:none;overflow-y:auto}.icon-nav-list{flex-direction:column;overflow-x:visible;overflow-y:auto;padding:4px}.icon-btn{min-width:unset;min-height:52px;width:100%;border-bottom:0;border-left:3px solid transparent;font-size:9px}.icon-btn.active{border-left-color:rgb(var(--primary-color, 98 101 241));border-bottom-color:transparent}}.manifest-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92))}.save-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.manifest-error-card{width:min(520px,calc(100vw - 2rem));padding:1.25rem;border-radius:12px;background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e2e8f0);box-shadow:0 10px 30px #02061726}.manifest-error-title{font-size:1rem;font-weight:700;color:var(--p-text-color, #0f172a);margin-bottom:.5rem}.manifest-error-message{color:var(--p-text-muted-color, #475569);margin-bottom:1rem;word-break:break-word}.manifest-retry-btn{appearance:none;border:0;border-radius:10px;padding:.6rem 1rem;font-weight:600;cursor:pointer;background:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-contrast-color, 255 255 255))}.manifest-retry-btn:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.toggle-text{position:absolute;top:50%;transform:translateY(-50%);font-size:14px;font-weight:500;transition:opacity .2s ease;line-height:0}.off-text{left:38px;color:rgb(var(--text-color, 15 23 42))}.on-text{right:38px;color:rgb(var(--primary-contrast-color, 255 255 255));opacity:0}.toggle-input:checked+.toggle-track{background:rgb(var(--primary-color, 98 101 241))}.toggle-input:checked+.toggle-track .off-text{opacity:0}.toggle-input:checked+.toggle-track .on-text{opacity:1}.toggle-input:checked~.toggle-knob{transform:translate(96px)}.child-accordion{width:100%!important}@media(min-width:992px)and (max-width:1350px){.mobile-panel-toggle{display:flex;align-items:center;gap:6px;position:absolute;bottom:20px;right:20px;z-index:20;padding:8px 18px;border:none;border-radius:999px;background:rgb(var(--primary-color, 98 101 241));color:#fff;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 4px 16px #6265f159;white-space:nowrap;transition:background .2s,box-shadow .2s,transform .15s}.mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 6px 20px #6265f16b}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{display:none!important}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}}.jersey-model{position:relative}.shortcuts-wrap{position:absolute;bottom:12px;right:12px;z-index:20}.shortcuts-fab{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:8px;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:18px;cursor:pointer;box-shadow:0 2px 8px #0f172a26;transition:all .2s}.shortcuts-fab:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.shortcuts-fab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 4px 12px rgb(var(--primary-color, 98 101 241) / .4)}.shortcuts-popover{position:absolute;bottom:calc(100% + 10px);right:0;width:300px;height:360px;overflow-y:auto;background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:10px;box-shadow:0 8px 24px #0f172a24;padding:.75rem}.shortcuts-popover-header{display:flex;align-items:center;gap:.5rem;font-size:.8rem;font-weight:700;color:rgb(var(--text-color, 15 23 42));padding-bottom:.6rem;margin-bottom:.25rem;border-bottom:1px solid rgb(var(--border-color, 203 213 225))}.shortcuts-popover-header i{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.mobile-canvas-hidden .panel-scroll-body{height:100%;max-height:100%}.mobile-canvas-hidden .panel-content,.mobile-canvas-hidden .right-panel,.mobile-canvas-hidden .right-panel-shell{height:100%}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-blur{syntax: "*"; inherits: false;}@property --tw-brightness{syntax: "*"; inherits: false;}@property --tw-contrast{syntax: "*"; inherits: false;}@property --tw-grayscale{syntax: "*"; inherits: false;}@property --tw-hue-rotate{syntax: "*"; inherits: false;}@property --tw-invert{syntax: "*"; inherits: false;}@property --tw-opacity{syntax: "*"; inherits: false;}@property --tw-saturate{syntax: "*"; inherits: false;}@property --tw-sepia{syntax: "*"; inherits: false;}@property --tw-drop-shadow{syntax: "*"; inherits: false;}@property --tw-drop-shadow-color{syntax: "*"; inherits: false;}@property --tw-drop-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-drop-shadow-size{syntax: "*"; inherits: false;}@property --tw-backdrop-blur{syntax: "*"; inherits: false;}@property --tw-backdrop-brightness{syntax: "*"; inherits: false;}@property --tw-backdrop-contrast{syntax: "*"; inherits: false;}@property --tw-backdrop-grayscale{syntax: "*"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: "*"; inherits: false;}@property --tw-backdrop-invert{syntax: "*"; inherits: false;}@property --tw-backdrop-opacity{syntax: "*"; inherits: false;}@property --tw-backdrop-saturate{syntax: "*"; inherits: false;}@property --tw-backdrop-sepia{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial;--tw-ease: initial}}}
|
|
4615
|
+
`):i}function zre(i,e){let t=i.match(/^(\s*)(map_\S+|bump|disp|decal|refl)\s+(.+)$/i);if(!t)return i;let[,n,r,o]=t,s=o.trim().split(/\s+/);if(!s.length)return i;let a=s[s.length-1];if(Vre(a))return i;let l=Gre(e,a);return l?(s[s.length-1]=l,`${n}${r} ${s.join(" ")}`):i}function Vre(i){let e=i.trim();return/^https?:\/\//i.test(e)||/^\/\//.test(e)}function Gre(i,e){let n=e.split("?")[0].split("#")[0].split(/[\\/]/).pop();if(!n)return e;if(!i)return n;try{return new URL(n,i).toString()}catch{let r=i.endsWith("/")?"":"/";return`${i}${r}${n}`}}async function Hre(i,e){let t=i.type==="url"?await jre(i.value):i.value,n=new Blob([t],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(n);try{let o=await Wre(r),s=document.createElement("canvas");s.width=YB,s.height=YB;let a=s.getContext("2d");if(!a)throw new Error("Failed to create canvas context for SVG texture.");a.imageSmoothingEnabled=!0,a.imageSmoothingQuality="high",a.clearRect(0,0,s.width,s.height);let l=o.width/o.height,c=s.width,d=s.height;l>1?d=s.height/l:c=s.width*l,a.drawImage(o,0,0,c,d);let u=new ws(s);return u.colorSpace=bn,u.minFilter=go,u.magFilter=jn,u.anisotropy=e.capabilities.getMaxAnisotropy(),u.flipY=!0,u.wrapS=Oi,u.wrapT=Oi,u.needsUpdate=!0,u}finally{URL.revokeObjectURL(r)}}function qB(i){if(!i)return"";try{if(typeof window<"u")return new URL(".",new URL(i,window.location.href)).toString()}catch{}let e=i.split("?")[0].split("#")[0],t=e.lastIndexOf("/");return t>=0?e.slice(0,t+1):""}async function jre(i){let e=await fetch(i,{cache:"no-cache"});if(!e.ok)throw new Error(`Failed to load SVG (${e.status})`);return e.text()}function Wre(i){return new Promise((e,t)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>e(n),n.onerror=()=>t(new Error("Failed to decode SVG image.")),n.src=i})}function $re(i){Yre(i);let t=new Yi().setFromObject(i).getSize(new G),n=Math.max(t.x,t.y,t.z);if(!Number.isFinite(n)||n<=0)return;i.scale.setScalar(4/n);let o=new Yi().setFromObject(i).getCenter(new G);i.position.sub(o),i.traverse(s=>{let a=s;!a.isMesh||!a.geometry||(a.geometry.computeVertexNormals(),a.castShadow=!1,a.receiveShadow=!1)})}function Xre(i){let e=t=>{if(!t)return new Ca({color:16777215,roughness:.8,metalness:.1});let n=t,r=t;return new Ca({map:n.map??null,color:r.color?.clone()??new ct(16777215),roughness:.8,metalness:.1})};i.traverse(t=>{let n=t;if(!n.isMesh)return;let r=n.material;Array.isArray(r)?n.material=r.map(o=>e(o)):n.material=e(r),n.castShadow=!0,n.receiveShadow=!0})}function Yre(i){i.traverse(e=>{let t=e;if(!t.isMesh||!(t.geometry instanceof ei))return;let n=Tx(t.geometry.clone(),1e-5);n.deleteAttribute("normal"),n.computeVertexNormals(),n.normalizeNormals(),n.computeBoundingBox(),n.computeBoundingSphere(),t.geometry.dispose(),t.geometry=n,(Array.isArray(t.material)?t.material:[t.material]).forEach(o=>{o&&("flatShading"in o&&(o.flatShading=!1),o.side=Xi,o.needsUpdate=!0)})})}function qre(i){let e=new ed(16777215,.6);i.add(e);let t=new Uo(16777215,1.2);t.position.set(100,150,100),i.add(t);let n=new Uo(16777215,.6);n.position.set(-100,50,100),i.add(n);let r=new Uo(16777215,.8);r.position.set(0,100,-150),i.add(r);let o=new Qc(16777215,13421772,.5);o.position.set(0,200,0),i.add(o)}function Kre(i,e,t){let n=new WeakMap,r=new WeakMap,o=QB(e);i.traverse(s=>{let a=s;!a.isMesh||!a.material||(Array.isArray(a.material)?a.material.forEach(l=>{KB(l,e,o,n,r,t)}):KB(a.material,e,o,n,r,t))})}function KB(i,e,t,n,r,o){if(!Zre(i))return;n.has(i)||n.set(i,i.map??null);let s=n.get(i)??null;if(Qre(i,!!s,r),!s||!t){s&&o.add(s),i.map=e,i.needsUpdate=!0;return}let a=QB(s),l=a?e4(a):null;if(!a||!l){o.add(s),i.map=e,i.needsUpdate=!0;return}let c=toe(a,t,l.width,l.height);if(!c){o.add(s),i.map=e,i.needsUpdate=!0;return}o.add(s);let d=new ws(c);eoe(d,s,e),d.needsUpdate=!0,o.add(d),i.map=d,i.needsUpdate=!0}function Zre(i){return"map"in i}function Jre(i){return"color"in i&&i.color instanceof ct}function Qre(i,e,t){if(Jre(i)){if(t.has(i)||t.set(i,i.color.clone()),e){i.color.copy(t.get(i));return}i.color.set(16777215)}}function eoe(i,e,t){i.colorSpace=e.colorSpace??t.colorSpace,i.flipY=e.flipY,i.wrapS=e.wrapS,i.wrapT=e.wrapT,i.magFilter=e.magFilter,i.minFilter=e.minFilter,i.anisotropy=e.anisotropy||t.anisotropy,i.generateMipmaps=e.generateMipmaps,i.premultiplyAlpha=e.premultiplyAlpha,i.unpackAlignment=e.unpackAlignment,i.repeat.copy(e.repeat),i.offset.copy(e.offset),i.center.copy(e.center),i.rotation=e.rotation,i.matrixAutoUpdate=e.matrixAutoUpdate,i.matrix.copy(e.matrix)}function QB(i){let e=i.source?.data??i.image;if(!e)return null;let t=e4(e);return!t||t.width<=0||t.height<=0?null:e}function e4(i){if(i instanceof HTMLVideoElement)return!i.videoWidth||!i.videoHeight?null:{width:i.videoWidth,height:i.videoHeight};let e=i;return!e.width||!e.height?null:{width:e.width,height:e.height}}function toe(i,e,t,n){let r=document.createElement("canvas");r.width=t,r.height=n;let o=r.getContext("2d");if(!o)return null;try{return o.clearRect(0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,o.drawImage(i,0,0,t,n),o.globalCompositeOperation="multiply",o.globalAlpha=1,o.drawImage(e,0,0,t,n),o.globalCompositeOperation="source-over",o.globalAlpha=1,r}catch{let s=document.createElement("canvas");s.width=t,s.height=n;let a=s.getContext("2d");return a?(a.clearRect(0,0,t,n),a.drawImage(i,0,0,t,n),a.drawImage(e,0,0,t,n),s):null}}function noe(i,e,t){let n=new Yi().setFromObject(e),r=n.getCenter(new G),o=n.getSize(new G),s=Math.max(o.x,o.y,o.z)*.5,a=Math.max(s,.5),l=t.fov*(Math.PI/180),c=a/Math.tan(l/2)*1.45;return t.near=Math.max(c/200,.05),t.far=Math.max(c*20,500),t.updateProjectionMatrix(),i.updateMatrixWorld(!0),{center:r,distance:c}}function ioe(i,e){let t=new Set;i.traverse(n=>{let r=n;if(r.isMesh&&(r.geometry?.dispose(),!!r.material)){if(Array.isArray(r.material)){r.material.forEach(o=>ZB(o,t));return}ZB(r.material,t)}}),e.forEach(n=>{t.has(n)||(n.dispose(),t.add(n))})}function ZB(i,e){let t=i;Gd(t.map,e),Gd(t.lightMap,e),Gd(t.normalMap,e),Gd(t.roughnessMap,e),Gd(t.metalnessMap,e),Gd(t.aoMap,e),Gd(t.emissiveMap,e),i.dispose()}function Gd(i,e){!i||e.has(i)||(i.dispose(),e.add(i))}var b_=class i{async generateThumbnails(e,t,n,r){return v_(e,t,n,r)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var y_=(l=>(l.PREDESIGNS="predesigns",l.COLOR="color",l.PATTERN="pattern",l.PERSONALIZATION="personalization",l.OVERLAY="overlay",l.BACKGROUND="background",l.RENDER_ORDER="render-order",l.CANVAS_GUIDE="canvas-guide",l))(y_||{}),x_={PREDESIGNS:"predesigns-fixed",RENDER_ORDER:"render-order-fixed",CANVAS_GUIDE:"canvas-guide-fixed"},Hd={DESIGNS:"Designs",RENDER_POSITION:"Render Position",CUSTOMIZATION:"Customization",PERSONALIZATION:"Personalization"},__={PATTERN:"pattern",OVERLAY:"overlay",UNKNOWN:"Unknown"},t4="ri-stack-line",n4="panel";var roe=["*"],lh=class i{value=Me.required();valueChange=kt();isActive(e){return this.value()===e}select(e){this.value()!==e&&this.valueChange.emit(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-tabs"]],inputs:{value:[1,"value"]},outputs:{valueChange:"valueChange"},ngContentSelectors:roe,decls:2,vars:0,consts:[[1,"ui-tabs"]],template:function(t,n){t&1&&(_i(),re(0,"div",0),Si(1),he())},styles:[".ui-tabs[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};var ooe=["*"],S_=class i{value=Me.required();tabs=Q(lh,{host:!0});active=De(()=>this.tabs.isActive(this.value()));onSelect(){this.tabs.select(this.value())}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-tab"]],inputs:{value:[1,"value"]},ngContentSelectors:ooe,decls:2,vars:2,consts:[["type","button",1,"ui-tab",3,"click"]],template:function(t,n){t&1&&(_i(),re(0,"button",0),Gn("click",function(){return n.onSelect()}),Si(1),he()),t&2&&pt("ui-tab--active",n.active())},styles:[".ui-tab[_ngcontent-%COMP%]{border:0;border-radius:0;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:.84rem;font-weight:500;line-height:1;padding:.7rem .95rem .72rem;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;transition:color .2s ease,border-color .2s ease}.ui-tab[_ngcontent-%COMP%]:hover{color:rgb(var(--text-color, 15 23 42));border-bottom-color:rgb(var(--surface-300, 203 213 225))}.ui-tab--active[_ngcontent-%COMP%]{color:rgb(var(--primary-color, 98 101 241));border-bottom-color:rgb(var(--primary-color, 98 101 241))}.ui-tab[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:inset 0 -2px rgb(var(--primary-color, 98 101 241))}"],changeDetection:0})};var soe=["*"],C_=class i{static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-ui-tablist"]],ngContentSelectors:soe,decls:2,vars:0,consts:[[1,"ui-tablist"]],template:function(t,n){t&1&&(_i(),re(0,"div",0),Si(1),he())},styles:[".ui-tablist[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.35rem;border-bottom:1px solid rgb(var(--surface-200, 226 232 240));background:transparent;padding:0}@media(max-width:992px){.ui-tablist[_ngcontent-%COMP%]{margin-top:5px}}"],changeDetection:0})};var w_=class i{buildStepLookup(e){let t=new Map,n=r=>{r.forEach(o=>{t.set(o.id,o),o.children?.length&&n(o.children)})};return n(e),t}flattenSteps(e,t=0){return[...e].sort((r,o)=>r.position-o.position).flatMap(r=>[{id:r.id,name:r.name,iconClass:r.iconClass,depth:t},...this.flattenSteps(r.children??[],t+1)])}buildParentNav(e,t,n){return[...[...e].filter(r=>!r.parentStepId).sort((r,o)=>r.position-o.position).map(r=>({id:r.id,name:r.name,iconClass:r.iconClass,depth:0})),{id:t,name:Hd.RENDER_POSITION,iconClass:n,depth:0}]}buildPanelsByStep(e){let{stepNav:t,customizations:n,personalizationItems:r,stepLookup:o,renderOrderStepId:s,renderOrderItems:a}=e,l=new Map;t.forEach(d=>{this.buildCustomizationPanels(d.id,n,o).forEach(u=>this.addPanelToMap(l,d.id,u)),this.buildPersonalizationPanels(d.id,r,o).forEach(u=>this.addPanelToMap(l,d.id,u))}),this.addPanelToMap(l,s,{kind:"render-order",trackId:`${s}-${n4}`,title:Hd.RENDER_POSITION,items:a});let c="canvas-guide-fixed";return this.addPanelToMap(l,c,{kind:"canvas-guide",trackId:`${c}-panel`,title:"Canvas Guide"}),l}hasPlacementType(e,t){return(e??"").trim().toUpperCase()===t}addPanelToMap(e,t,n){let r=e.get(t)??[];e.set(t,[...r,n])}buildCustomizationPanels(e,t,n){let r=t.filter(a=>a.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??Hd.CUSTOMIZATION,s=r.reduce((a,l)=>{let c=l.type??__.UNKNOWN;return a[c]=a[c]?[...a[c],l]:[l],a},{});return Object.entries(s).map(([a,l])=>{let c=[...l].sort((u,f)=>u.position-f.position),d=this.isPatternCustomizationType(a)?"pattern":"color";return{kind:d,trackId:`${e}-${d}-${a}`,title:o,customizations:c}})}buildPersonalizationPanels(e,t,n){let r=t.filter(d=>d.stepId===e);if(!r.length)return[];let o=n.get(e)?.name??Hd.PERSONALIZATION,s=[],a=r.filter(d=>this.hasPlacementType(d.type,"TEXT")||this.hasPlacementType(d.type,"LOGO"));a.length&&s.push({kind:"personalization",trackId:`${e}-personalization`,title:o,items:a});let l=r.filter(d=>this.hasPlacementType(d.type,"OVERLAY"));l.length&&s.push({kind:"overlay",trackId:`${e}-overlay`,title:o,items:l});let c=r.filter(d=>this.hasPlacementType(d.type,"BACKGROUND"));return c.length&&s.push({kind:"background",trackId:`${e}-background`,title:o,templates:c}),s}isPatternCustomizationType(e){let t=e.trim().toLowerCase();return t.includes(__.PATTERN)||t===__.OVERLAY}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var E_=class i{async fetchFileAsText(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch file: ${t.statusText}`);return t.text()}createJsonFile(e,t){return new File([e],`${t}-${Date.now()}.json`,{type:"application/json"})}downloadFile(e){if(typeof document>"u")return;let t=URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download=e.name,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}async copyTextToClipboard(e){if(typeof navigator<"u"&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}if(typeof document>"u")return!1;let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}finally{document.body.removeChild(t)}return n}downloadDataUrlFile(e,t){if(typeof document>"u")return;let n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),document.body.removeChild(n)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function o4(i){let e=i.svgDoc.documentElement;return{exportedAt:new Date().toISOString(),preDesignId:i.preDesignId,svg:{width:i.svgWidth,height:i.svgHeight,viewBox:i.svgViewBox,rootId:e?.getAttribute("id")??null,content:i.svgString},renderOrder:i.renderOrder,placements:i.placementZones.filter(t=>i.usedPlacementKeys.has(t.placementKey)).map(t=>({id:t.id,placementKey:t.placementKey,label:t.label,elementName:t.elementName,allowedKinds:t.allowedKinds,required:t.required,bounds:t.bounds})),paths:[...i.styledPaths,...i.textPathSummaries],overlays:{text:i.textOverlays,logo:i.logoOverlays},background:{selectedKey:i.selectedBackgroundKey&&i.backgrounds.some(t=>t.actionItemId===i.selectedBackgroundKey)?i.selectedBackgroundKey:null,items:i.backgrounds},pattern:{selectedUploadedPatternId:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternId:null,selectedFileUrl:i.selectedPatternId&&i.usedPatternIds.has(i.selectedPatternId)?i.selectedPatternFileUrl:null,definitions:i.filteredPatternDefinitions,overlays:i.usedPatternOverlays.map(t=>({id:t.id,label:t.label??null,placementId:t.placementId??null,fill:t.fill??null,opacity:t.opacity,sourceUrl:t.sourceUrl??null,thumbnailUrl:t.thumbnailUrl??null,pathData:t.pathData})),targets:i.patternTargets,colors:loe(i.svgDoc,i.usedPatternIds)}}}function s4(i){return new Set(Array.from(i.querySelectorAll('[data-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function a4(i){return new Set(Array.from(i.querySelectorAll('path[data-pattern-overlay="true"][id]')).map(e=>e.getAttribute("id")?.trim()??"").filter(e=>e.length>0))}function l4(i){return Array.from(i.querySelectorAll("path, rect, circle, ellipse, polygon, polyline")).filter(e=>!e.closest("defs")).filter(e=>!e.closest('[data-overlay="true"]')).map(e=>{let t=ch(e,"fill"),n=h4(e,t),r=p4(i,t);return{id:e.getAttribute("id")??null,tag:e.tagName,fill:r?.colors.length?r.colors:t,fillGradient:r,stroke:ch(e,"stroke"),strokeWidth:ch(e,"stroke-width"),opacity:ch(e,"opacity"),transform:e.getAttribute("transform"),patternFill:n}})}function c4(i){return Array.from(i.querySelectorAll("[id]")).filter(e=>!e.closest("defs")).map(e=>{let t=ch(e,"fill"),n=h4(e,t);return n?{targetId:e.id,patternId:n,fill:t}:null}).filter(e=>!!e)}function d4(i){let{patternOverlays:e,patternDefinitions:t,patternTargets:n,usedPatternOverlayIds:r}=i,o=new Set(n.map(l=>l.patternId)),s=e.filter(l=>{if(!r.has(l.id))return!1;let c=aoe(l.fill);return c&&o.add(c),!0}),a=Object.fromEntries(Object.entries(t).filter(([l])=>o.has(l)));return{usedPatternIds:o,usedPatternOverlays:s,filteredPatternDefinitions:a}}function u4(i){let{textOverlays:e,logoOverlays:t,backgrounds:n,usedPatternOverlays:r}=i,o=new Set;return e.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),t.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),n.forEach(s=>{s.placementKey&&o.add(s.placementKey)}),r.forEach(s=>{s.placementId&&o.add(s.placementId)}),o}function f4(i){return i.flatMap(e=>{let t=(e.text??"").trim()||e.id,n=[{id:t,tag:"text",fill:e.style.fill??null,fillGradient:null,stroke:null,strokeWidth:null,opacity:null,transform:null,patternFill:null}];return e.style.stroke&&(e.style.strokeWidth??0)>0&&n.push({id:`${t} Outline 1`,tag:"text-shadow",fill:e.style.stroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.strokeWidth}`,opacity:null,transform:null,patternFill:null}),e.style.secondStroke&&(e.style.secondStrokeWidth??0)>0&&n.push({id:`${t} Outline 2`,tag:"text-shadow",fill:e.style.secondStroke,fillGradient:null,stroke:null,strokeWidth:`${e.style.secondStrokeWidth}`,opacity:null,transform:null,patternFill:null}),n})}function aoe(i){return(i??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]??null}function ch(i,e){let t=i.getAttribute(e);if(t&&t.trim().length>0)return t.trim();let n=i.getAttribute("style");if(!n)return null;let r=e.toLowerCase(),o=n.split(";").map(a=>a.trim()).find(a=>a.toLowerCase().startsWith(`${r}:`));if(!o)return null;let s=o.split(":")[1]?.trim()??null;return s&&s.length>0?s:null}function h4(i,e){let t=i.getAttribute("data-pattern-fill")?.trim();return t||((e??"").match(/^url\(#([^)]+)\)$/i)?.[1]??null)}function p4(i,e){let r=(e??"").trim().match(/^url\(#([^)]+)\)$/i)?.[1]?.trim();if(!r)return null;let o=(l,c=new Set)=>{if(!l||c.has(l))return null;c.add(l);let d=i.getElementById(l);if(!(d instanceof SVGLinearGradientElement)&&!(d instanceof SVGRadialGradientElement))return null;if(Array.from(d.querySelectorAll(":scope > stop")).length>0)return d;let f=d.getAttribute("href")??d.getAttributeNS(Mm,"href"),h=f?.startsWith("#")?f.slice(1).trim():null;return h?o(h,c)??d:d},s=o(r);if(!s)return null;let a=Array.from(s.querySelectorAll(":scope > stop")).map(l=>{let c=l.getAttribute("stop-color")?.trim()??i4(l,"stop-color")??null;if(!c)return null;let d=l.getAttribute("stop-opacity")?.trim()??i4(l,"stop-opacity"),u=d&&d.length>0?Number.parseFloat(d):NaN;return{offset:l.getAttribute("offset")?.trim()??null,color:c,opacity:Number.isFinite(u)?u:null}}).filter(l=>!!l);return a.length===0?null:{gradientId:r,type:s.tagName==="radialGradient"?"radialGradient":"linearGradient",colors:Array.from(new Set(a.map(l=>l.color))),stops:a}}function i4(i,e){let t=i.getAttribute("style");if(!t)return null;let n=e.toLowerCase(),r=t.split(";").map(s=>s.trim()).find(s=>s.toLowerCase().startsWith(`${n}:`));if(!r)return null;let o=r.split(":")[1]?.trim()??null;return o&&o.length>0?o:null}function loe(i,e){let t=coe(i);return Array.from(e).map(n=>{let r=i.getElementById(n);if(!(r instanceof SVGPatternElement))return null;let o=foe(r,i),s=new Map,a=c=>hoe(i,s,c),l=c=>{let d=ch(c,"fill");return d&&d.length>0?d:uoe(c,t)};return o.forEach(c=>{a(l(c)),Array.from(c.querySelectorAll("*")).forEach(u=>{a(l(u))})}),s.size===0?null:{patternId:n,colors:Array.from(s.values())}}).filter(n=>!!n)}function coe(i){let e=new Map;return Array.from(i.querySelectorAll("style")).forEach(n=>{let o=(n.textContent??"").matchAll(/([^{}]+)\{([^{}]*)\}/g);for(let s of o){let a=(s[1]??"").trim(),l=(s[2]??"").trim();if(!a||!l)continue;let c=l.match(/(?:^|;)\s*fill\s*:\s*([^;]+)\s*(?:;|$)/i);if(!c)continue;let d=c[1]?.trim()??"";if(!d)continue;a.split(",").map(f=>f.trim()).filter(f=>f.length>0).forEach(f=>{let h=doe(f);h&&e.set(h,d)})}}),e}function doe(i){let e=i.trim();if(!e)return null;let t=e.split(":")[0]?.trim()??"";if(!t)return null;let n=t.split(/[\s>+~]+/).map(o=>o.trim()).filter(o=>o.length>0),r=n[n.length-1]??"";return r&&(/^#[A-Za-z_][\w-]*$/.test(r)||/^\.[A-Za-z_][\w-]*$/.test(r)||/^[A-Za-z][\w-]*$/.test(r))?r.toLowerCase():null}function uoe(i,e){let t=(i.getAttribute("id")??"").trim();if(t){let o=e.get(`#${t.toLowerCase()}`);if(o)return o}let n=(i.getAttribute("class")??"").trim();if(n){let o=n.split(/\s+/).map(s=>s.trim()).filter(s=>s.length>0);for(let s of o){let a=e.get(`.${s.toLowerCase()}`);if(a)return a}}return e.get(i.tagName.toLowerCase())??null}function foe(i,e){let t=[],n=new Set,r=i;for(;r;){let o=(r.getAttribute("id")??"").trim();if(o&&n.has(o))break;o&&n.add(o),t.push(r);let s=r.getAttribute("href")?.trim()??r.getAttributeNS(Mm,"href")?.trim(),a=s?.startsWith("#")?s.slice(1).trim():null;if(!a)break;let l=e.getElementById(a);r=l instanceof SVGPatternElement?l:null}return t}function hoe(i,e,t){let n=(t??"").trim();if(!n)return;let r=p4(i,n);if(r?.colors.length){r.colors.forEach(a=>{let l=r4(a);if(!l)return;let c=l.toLowerCase();e.has(c)||e.set(c,l)});return}let o=r4(n);if(!o)return;let s=o.toLowerCase();e.has(s)||e.set(s,o)}function r4(i){let e=(i??"").trim();if(!e)return null;let t=e.toLowerCase();return t==="none"||t.startsWith("url(")?null:e}var M_=class i{buildDesignExportPayload(e){let{svgDoc:t,svgString:n,overlays:r,personalizationItems:o,placementZones:s,placementNameByKey:a,backgroundState:l,backgroundImageTemplates:c,patternState:d,patternOverlays:u,renderOrder:f,svgDimensions:h,svgViewBox:p,bounds:v,overlayDimensionsPxById:g,selectedEffectIdByOverlay:m,textStyleResolvers:b,selectedPredesignId:y}=e,x=this.buildEffectFileUrlById(o),_=s4(t),E=a4(t),D=l4(t),A=this.collectTextOverlayExports({overlays:r,bounds:v,effectFileUrlById:x,placementNameByKey:a,usedOverlayIds:_,selectedEffectIdByOverlay:m,overlayDimensionsPxById:g,textStyleResolvers:b}),S=this.collectLogoOverlayExports({overlays:r,bounds:v,placementNameByKey:a,overlayDimensionsPxById:g,usedOverlayIds:_}),I=this.collectBackgroundExports(t,l,c),L=c4(t),H=d4({patternOverlays:u,patternDefinitions:d.definition,patternTargets:L,usedPatternOverlayIds:E}),z=u4({textOverlays:A,logoOverlays:S,backgrounds:I,usedPatternOverlays:H.usedPatternOverlays}),X=f4(A);return o4({preDesignId:y,svgDoc:t,svgString:n,svgWidth:h?.width??null,svgHeight:h?.height??null,svgViewBox:p,renderOrder:f,placementZones:s,usedPlacementKeys:z,styledPaths:D,textPathSummaries:X,textOverlays:A,logoOverlays:S,selectedBackgroundKey:l.selectedKey,backgrounds:I,selectedPatternId:d.selectedId,selectedPatternFileUrl:d.selectedFileUrl,usedPatternIds:H.usedPatternIds,filteredPatternDefinitions:H.filteredPatternDefinitions,usedPatternOverlays:H.usedPatternOverlays,patternTargets:L})}buildEffectFileUrlById(e){return e.reduce((t,n)=>((n.packs??[]).filter(o=>(o.type??"").toLowerCase().includes(La.EFFECT)).forEach(o=>{(o.dataSources??[]).forEach(s=>{let a=s?.id?.trim(),l=s?.fileUrl?.trim();a&&l&&t.set(a,l)})}),t),new Map)}collectTextOverlayExports(e){let{overlays:t,bounds:n,effectFileUrlById:r,placementNameByKey:o,usedOverlayIds:s,selectedEffectIdByOverlay:a,overlayDimensionsPxById:l,textStyleResolvers:c}=e;return t.filter(Et).filter(d=>s.has(d.id)).map(d=>{let u=a.get(d.id)??null,f=u?r.get(u)??null:null,h=this.resolveFontFamily(d,c),p=this.resolveFontWeight(d,c),v=this.resolveFontStyle(d,c),g=this.resolveLetterSpacing(d,c),m=d.lineHeight??c.defaultLineHeight,b=this.resolveStrokeColor(d,c),y=d.strokeWidth??0,x=this.resolveSecondStrokeColor(d,c),_=d.secondStrokeWidth??0,E=this.resolveCurveAmount(d,c),D=d.shadowBlur??c.defaultShadowBlur,A=d.shadowOffsetX??c.defaultShadowOffsetX,S=d.shadowOffsetY??c.defaultShadowOffsetY,I=d.shadowColor??c.defaultShadowColor,L=Number.isFinite(d.horizontalScale)?Math.max(d.horizontalScale,.1):1,H=Number.isFinite(d.verticalScale)?Math.max(d.verticalScale,.1):1,z=d.fontSize*Math.max((d.text??"").trim().length,1)*.5*L,X=d.fontSize*(d.lineHeight??c.defaultLineHeight)*H,q=l?.get(d.id),K=q&&Number.isFinite(q.width)&&q.width>0?q.width:z,j=q&&Number.isFinite(q.height)&&q.height>0?q.height:X,te=Math.abs(D)>1e-4||Math.abs(A)>1e-4||Math.abs(S)>1e-4,ye={applied:[...b&&y>0?["stroke"]:[],...x&&_>0?["secondStroke"]:[],...te?["shadow"]:[],...Math.abs(E)>1e-4?["curve"]:[],...d.warpEnabled===!0?["warp"]:[],...p==="bold"?["bold"]:[],...v==="italic"?["italic"]:[]],stroke:b&&y>0?{color:b,width:y}:null,secondStroke:x&&_>0?{color:x,width:_}:null,shadow:te?{blur:D,offsetX:A,offsetY:S,color:I}:null,curve:Math.abs(E)>1e-4?{amount:E}:null,warp:d.warpEnabled===!0,bold:p==="bold",italic:v==="italic"};return{id:d.id,kind:d.kind,text:d.text,effectId:u,effectFileUrl:f,placementKey:d.placementKey??null,lockAspectRatio:d.lockAspectRatio??!0,placementName:d.placementKey?o.get(d.placementKey)??d.placementKey:null,transform:{normalizedX:d.normalizedX,normalizedY:d.normalizedY,absoluteCenterX:n.x+d.normalizedX*n.width,absoluteCenterY:n.y+d.normalizedY*n.height,angle:d.angle??0},style:{fill:d.fill,fontFamily:h,fontSize:d.fontSize,horizontalScale:L,verticalScale:H,fontWeight:p,fontStyle:v,letterSpacing:g,lineHeight:m,stroke:b,strokeWidth:y,secondStroke:x,secondStrokeWidth:_,curveAmount:E,shadowBlur:D,shadowOffsetX:A,shadowOffsetY:S,shadowColor:I},dimensions:{renderedWidth:K,renderedHeight:j},effects:ye}})}collectLogoOverlayExports(e){let{overlays:t,bounds:n,placementNameByKey:r,overlayDimensionsPxById:o,usedOverlayIds:s}=e;return t.filter(oi).filter(a=>s.has(a.id)).map(a=>{let l=o?.get(a.id),c=l&&Number.isFinite(l.width)&&l.width>0?l.width:a.normalizedWidth*n.width,d=l&&Number.isFinite(l.height)&&l.height>0?l.height:a.normalizedHeight*n.height;return{id:a.id,kind:a.kind,logoBlobId:a.logoBlobId??null,imageName:a.imageName??null,imageSrc:a.imageSrc,placementKey:a.placementKey??null,lockAspectRatio:a.lockAspectRatio??!0,placementName:a.placementKey?r.get(a.placementKey)??a.placementKey:null,transform:{normalizedX:a.normalizedX,normalizedY:a.normalizedY,absoluteCenterX:n.x+a.normalizedX*n.width,absoluteCenterY:n.y+a.normalizedY*n.height,angle:a.angle??0},dimensions:{originalWidth:a.originalWidth,originalHeight:a.originalHeight,normalizedWidth:a.normalizedWidth,normalizedHeight:a.normalizedHeight,renderedWidth:c,renderedHeight:d},opacity:a.opacity??1}})}collectBackgroundExports(e,t,n){return n.map(r=>{let o=t.images[r.actionItemId],s=e.getElementById(r.actionItemId),a=s?.getAttribute("href")??s?.getAttributeNS(Mm,"href"),l=!!o?.transform&&(Math.abs((o.transform.scale??1)-1)>1e-4||Math.abs(o.transform.rotation??0)>1e-4||Math.abs(o.transform.translateX??0)>1e-4||Math.abs(o.transform.translateY??0)>1e-4||Math.abs((o.transform.opacity??1)-1)>1e-4);return{isUsed:!!o?.fileName||!!o?.src?.trim()||!!a?.trim()||l,placementKey:r.placementKey??null,templateId:r.id,actionItemId:r.actionItemId,name:r.name??null,imageSrc:o?.src??null,fileName:o?.fileName??null,transform:o?.transform??null,svgTransform:s?.getAttribute("transform")??null,svgOpacity:s?.getAttribute("opacity")??null}}).filter(r=>r.isUsed).map(s=>{var a=s,{isUsed:r}=a,o=en(a,["isUsed"]);return o})}resolveFontFamily(e,t){let n=e.fontFamily?.trim();return n&&n.length>0?n:t.defaultFontFamily}resolveFontWeight(e,t){return e.fontWeight??t.defaultFontWeight}resolveFontStyle(e,t){return e.fontStyle??t.defaultFontStyle}resolveLetterSpacing(e,t){return Number.isFinite(e.letterSpacing)?e.letterSpacing:t.defaultLetterSpacing}resolveStrokeColor(e,t){if(!((e.strokeWidth??0)>0))return null;let r=e.stroke?.trim();return r&&r.length>0?r:t.defaultStrokeColor}resolveSecondStrokeColor(e,t){if(!((e.secondStrokeWidth??0)>0))return null;let r=e.secondStroke?.trim();return r&&r.length>0?r:t.defaultSecondStrokeColor}resolveCurveAmount(e,t){return Number.isFinite(e.curveAmount)?e.curveAmount:t.defaultCurveAmount}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var poe=10,moe=1,goe=3;var T_=class i{resolveHistoryAction(e){if(!e.ctrlKey&&!e.metaKey)return null;let t=e.key.toLowerCase();return t==="z"?e.shiftKey?"REDO":"UNDO":t==="y"?"REDO":null}resolveOverlayAction(e,t){let n=e.key.toLowerCase(),r=e.shiftKey?poe:moe,o=t*goe;switch(n){case"arrowup":return{kind:"MOVE",deltaXPx:0,deltaYPx:-r};case"arrowdown":return{kind:"MOVE",deltaXPx:0,deltaYPx:r};case"arrowleft":return{kind:"MOVE",deltaXPx:-r,deltaYPx:0};case"arrowright":return{kind:"MOVE",deltaXPx:r,deltaYPx:0};case"q":return{kind:"ROTATE",deltaAngle:e.shiftKey?-o:-t};case"e":return{kind:"ROTATE",deltaAngle:e.shiftKey?o:t};case"[":return{kind:"ROTATE",deltaAngle:-t};case"]":return{kind:"ROTATE",deltaAngle:t};default:return null}}isTextInputTarget(e){let t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"||e.isContentEditable}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var m4=.08,D_=class i{constructor(e){this.measurementService=e}resolveLayerDefinition(e,t){if(!e)return null;let n=e.toLowerCase();return t.find(r=>r.name.toLowerCase()===n)??null}resolveLayerBoundsById(e){let t=e.pathId.trim();if(!t||!e.svgDoc)return{bounds:null};let n=t.toLowerCase();if(e.layerBoundsCache.has(n))return{bounds:e.layerBoundsCache.get(n)??null};let r=e.svgDoc.getElementById(t),o=this.readElementBounds(r);if((!o||o.width<=0||o.height<=0)&&e.svgText&&e.measurementRoot){let l=this.measurementService.queryMeasurementElementById(e.measurementRoot,t);o=this.readElementBounds(l)}let s=o&&o.width>0&&o.height>0?o:null,a=new Map(e.layerBoundsCache);return a.set(n,s),{bounds:s,nextCache:a}}combineBounds(e){let t=1/0,n=1/0,r=-1/0,o=-1/0;for(let l of e)l&&(t=Math.min(t,l.x),n=Math.min(n,l.y),r=Math.max(r,l.x+l.width),o=Math.max(o,l.y+l.height));if(!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(o))return null;let s=r-t,a=o-n;return s<=0||a<=0?null:{x:t,y:n,width:s,height:a}}getLayerPreviewBounds(e,t){if(e.width<=0||e.height<=0||!t)return null;let n=t.width*m4,r=t.height*m4,o=e.x,s=e.y,a=e.x+e.width,l=e.y+e.height,c=Math.max(t.x-n,o),d=Math.max(t.y-r,s),u=Math.min(t.x+t.width+n,a),f=Math.min(t.y+t.height+r,l);return u<=c||f<=d?e:{x:c,y:d,width:u-c,height:f-d}}normalizePreviewBounds(e,t){if(!e||e.width<=0||e.height<=0)return t;let n=t.x,r=t.y,o=t.x+t.width,s=t.y+t.height,a=Math.max(e.x,n),l=Math.max(e.y,r),c=Math.min(e.x+e.width,o),d=Math.min(e.y+e.height,s);return c<=a||d<=l?t:{x:a,y:l,width:c-a,height:d-l}}pointInsideBounds(e,t){return t.width<=0||t.height<=0?!1:e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height}readElementBounds(e){if(!e)return null;try{let t=e.getBBox();return!t||t.width<=0||t.height<=0?null:{x:t.x,y:t.y,width:t.width,height:t.height}}catch{return null}}static \u0275fac=function(t){return new(t||i)(Xe(Hl))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var I_=class i{api=Q(ec);getManifest(e,t,n,r){return this.api.get(`products/${e}/manifest`,R(R({},t?{preDesignId:t}:{}),n!==void 0?{useCdnUrl:n}:{}),r?{"X-API-Key":r}:void 0,{loader:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var P_=class i{api=Q(ec);getPublicDistributor(e){return this.api.get("public/distributor",{},{"X-API-Key":e},{loader:!1,skipHandleError:!0})}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var A_=class i{manifestApi=Q(I_);publicDistributorApi=Q(P_);resolveProductId(e){let t=e.runtimeConfig?.productId?.trim(),n=e.inputProductId?.trim();return t||n||e.fallbackProductId}resolveApiKey(e){let t=e.runtimeConfig?.apiKey?.trim(),n=e.inputApiKey?.trim();return t||n||null}buildManifestConfigSignature(e){let t=this.resolveProductId(e);if(!t)return null;let n=this.resolveApiKey(e)??"";return`${t}::${n}`}async fetchManifest(e){try{let t=await uc(this.manifestApi.getManifest(e.productId,e.preDesignId??null,e.useCdnUrl,e.apiKey));if(!t?.isSuccess)return{ok:!1,message:(t?.errors??["Unable to load manifest"])[0]};let n=t.data;if(!n)return{ok:!1,message:"Unable to load manifest"};let r=await this.resolveDistributorBranding(e.apiKey??null,n.distributorBranding??null);return n.distributorBranding=r,{ok:!0,data:n}}catch{return{ok:!1,message:"Unable to load manifest"}}}normalizeManifestData(e){let{data:t,preDesignId:n,selectedPredesignId:r,activeStepId:o}=e,s=t.preDesigns??[]??[],a=n??t.preDesignId??t.selectedPreDesignId??t.activePreDesignId??(!r&&s.length?s[0]?.id??null:null),l=(t.personalizationObjectIdMap??t.placements??[]).map(d=>R({},d));l.filter(d=>(d.type??"").trim().toUpperCase()==="BACKGROUND").forEach(d=>{let h=(d.actionPathIdsCsv??d.actionItemId??"").toString().trim().split(",").map(p=>p.trim()).filter(p=>p.length>0).map(p=>p.startsWith("#")?p.slice(1).trim():p).filter(p=>p.length>0).join(",");d.actionPathIdsCsv=h,d.actionItemId=h});let c=t.steps??[]??[];return{resolvedPredesignId:a,threeDFileLink:t.threeDFileLink??t.model?.url??"",materialFileLink:t.mtlFileLink??t.model?.mtlUrl??null,svgFileLink:t.svgFileLink??t.model?.svgUrl??"",svgViewBox:t.svgViewBox??null,printAreaWidthInches:Number.isFinite(t.printAreaWidthInches)?t.printAreaWidthInches:null,printAreaHeightInches:Number.isFinite(t.printAreaHeightInches)?t.printAreaHeightInches:null,customizations:t.customizations??[]??[],predesigns:s,steps:c,pathIdAccordingLayers:t.layers??[]??[],renderPathAccordingLayers:t.renderLayers??[]??[],isShowWholeLayersOption:!!t.isShowWholeLayersOption,placements:l,nextActiveStepId:o||c[0]?.id||null,manifestMeta:t.meta??null,distributorBranding:t.distributorBranding??null}}async resolveDistributorBranding(e,t){if(!e)return t;try{let n=await uc(this.publicDistributorApi.getPublicDistributor(e)),r=this.mapPublicDistributorBranding(n);return r?{distributorId:r.distributorId||t?.distributorId||"",distributorName:r.distributorName??t?.distributorName??null,logoUrl:r.logoUrl??t?.logoUrl??null,themePrimaryColor:r.themePrimaryColor??t?.themePrimaryColor??null,themeSecondaryColor:r.themeSecondaryColor??t?.themeSecondaryColor??null,themeAccentColor:r.themeAccentColor??t?.themeAccentColor??null,themeMode:t?.themeMode??null}:t}catch{return t}}mapPublicDistributorBranding(e){return e?.id?{distributorId:e.id,distributorName:e.name??null,logoUrl:e.branding?.logoUrl??null,themePrimaryColor:e.branding?.primaryColor??null,themeSecondaryColor:e.branding?.secondaryColor??null,themeAccentColor:e.branding?.accentColor??null,themeMode:null}:null}static \u0275fac=function(t){return new(t||i)};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var O_=class i{constructor(e){this.manifestService=e}toIdentityInput(e){return{runtimeConfig:e.runtimeConfig,inputProductId:e.inputProductId,inputApiKey:e.inputApiKey,fallbackProductId:e.fallbackProductId}}resolveProductId(e){return this.manifestService.resolveProductId(this.toIdentityInput(e))}resolveApiKey(e){return this.manifestService.resolveApiKey(this.toIdentityInput(e))}buildConfigSignature(e){return this.manifestService.buildManifestConfigSignature(this.toIdentityInput(e))}async loadManifest(e){let t=this.toIdentityInput(e),n=this.manifestService.resolveProductId(t),r=this.manifestService.resolveApiKey(t),o=this.manifestService.buildManifestConfigSignature(t);if(!n)return{ok:!1,message:Rt.missingProductId,productId:null,signature:o};let s=await this.manifestService.fetchManifest({productId:n,preDesignId:e.preDesignId??null,useCdnUrl:e.runtimeConfig?!0:void 0,apiKey:r});return s.ok?{ok:!0,normalized:this.manifestService.normalizeManifestData({data:s.data,preDesignId:e.preDesignId,selectedPredesignId:e.selectedPredesignId,activeStepId:e.activeStepId}),productId:n,apiKey:r,signature:o}:{ok:!1,message:s.message||Rt.manifestLoadFailed,productId:n,signature:o}}static \u0275fac=function(t){return new(t||i)(Xe(A_))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};var CD={COLOR:"color",PATTERN:"pattern"},g4="image/png",v4="lineargradient",b4=1;var R_=class i{constructor(e,t){this.colorState=e;this.customizerState=t}personalizationState=Q(Ql);captureSnapshot(e){if(!e.manifestLoaded||!e.svgDoc)return null;let t=new Map,n=new Map;return e.customizations.forEach(r=>{if(!this.isColorCustomization(r)||!r.actionPathIdsCsv)return;let o=this.readAppliedColorForRegionIds(e.svgDoc,r.actionPathIdsCsv);o&&(t.set(r.actionPathIdsCsv,o),r.name&&n.set(r.name.trim().toLowerCase(),o))}),{targetPredesignId:e.targetPredesignId,colorsByRegion:t,colorsByCustomizationName:n,backgrounds:this.captureBackgroundCarryover(e.backgroundState),patternSelections:this.capturePatternSelections(e.svgDoc,e.customizations,e.patternState),overlayPatterns:this.captureOverlayPatterns(e.svgDoc,e.patternOverlayState),textOverlays:e.overlays.filter(Et).map(r=>R({},r)),logoOverlays:e.overlays.filter(oi).map(r=>R({},r))}}captureOverlayPatterns(e,t){let n=t.state().overlays??[],r=n.reduce((a,l)=>(a.set(l.id,l),a),new Map),s=Array.from(e.querySelectorAll('path[data-pattern-overlay="true"]')).reduce((a,l)=>{let c=(l.getAttribute("id")??"").trim();if(!c)return a;let d=r.get(c),u=this.readSvgPresentationValue(l,"fill")??d?.fill??null,f=this.readSvgPresentationValue(l,"opacity")??(typeof d?.opacity=="number"?`${d.opacity}`:null),h=f!==null?Number.parseFloat(f):NaN,p=Number.isFinite(h)?Math.min(1,Math.max(0,h)):d?.opacity??1,v=(l.getAttribute("data-pattern-source-url")??"").trim()||(d?.sourceUrl??"").trim();return v&&a.push({id:c,label:(l.getAttribute("data-pattern-source-id")??"").trim()||d?.label||c,placementId:(l.getAttribute("data-pattern-placement-id")??"").trim()||d?.placementId||null,fill:u&&u.trim().length>0?u:void 0,opacity:p,pathData:l.getAttribute("d")??d?.pathData??"",sourceUrl:v,thumbnailUrl:(l.getAttribute("data-pattern-thumbnail-url")??"").trim()||d?.thumbnailUrl}),a},[]);return s.length>0?s:n.filter(a=>!!a.sourceUrl).map(a=>R({},a))}readSvgPresentationValue(e,t){let n=e.getAttribute(t);if(n&&n.trim().length>0)return n.trim();let r=e.getAttribute("style");if(!r)return null;let o=t.toLowerCase(),s=r.split(";").map(l=>l.trim()).filter(Boolean).find(l=>l.toLowerCase().startsWith(`${o}:`));if(!s)return null;let a=s.split(":");return a.length<2?null:a[1].trim()}async applyIfNeeded(e){let t=e.snapshot;if(!t||!e.selectedPredesignId||t.targetPredesignId!==e.selectedPredesignId)return!1;await this.restoreBackgroundCarryover(t.backgrounds,e),await this.restorePatternCarryover(t.patternSelections,e),await this.restoreOverlayPatternCarryover(t.overlayPatterns,e),this.restoreOverlayCarryover(t,e),this.restoreColorCarryover(t,e.customizations),await this.customizerState.syncOverlaysToSvgDoc().catch(()=>{});let n=this.customizerState.svgDoc();return n&&this.customizerState.markSvgMutated(n),e.backgroundState.refreshFromSvg(),e.patternState.refreshFromSvg(),e.patternOverlayState.refreshFromSvg(),this.customizerState.render2d(),this.customizerState.requestTextureRebuild(),!0}captureBackgroundCarryover(e){let t=e.state(),n=t.templates??[],r=t.images??{};return n.reduce((o,s)=>{let a=r[s.actionItemId];return a?.src&&o.push({placementKey:s.placementKey,actionItemId:s.actionItemId,name:s.name,state:{src:a.src,fileName:a.fileName,transform:R({},a.transform)}}),o},[])}async restoreBackgroundCarryover(e,t){if(!e.length)return;let n=e.reduce((o,s)=>(o.set(s.placementKey,s),o),new Map),r=e.reduce((o,s)=>(o.set(s.name.trim().toLowerCase(),s),o),new Map);for(let o of t.backgroundTemplates){let s=n.get(o.placementKey)??r.get((o.name??"").trim().toLowerCase());if(!s?.state?.src)continue;let a=await this.createFileFromDataUrl(s.state.src,s.state.fileName??`${o.actionItemId}.png`);a&&(await t.backgroundState.onFileSelected(o.actionItemId,a),t.backgroundState.select(o.actionItemId),this.restoreBackgroundTransform(t.backgroundState,s.state.transform))}}restoreBackgroundTransform(e,t){e.updateTransform("scale",t.scale),e.updateTransform("rotation",t.rotation),e.updateTransform("translateX",t.translateX),e.updateTransform("translateY",t.translateY),e.updateTransform("opacity",t.opacity)}async createFileFromDataUrl(e,t){try{let r=await(await fetch(e)).blob(),o=r.type&&r.type.trim().length>0?r.type:g4;return new File([r],t,{type:o})}catch{return null}}capturePatternSelections(e,t,n){let r=n.selectedPatternFileUrl(),o=n.selectedUploadedPatternId(),s=o?n.patternDefinitionState()[o]??null:null;return r?t.filter(a=>this.isPatternCustomization(a)&&!!a.actionPathIdsCsv).map(a=>{let l=this.resolvePatternSourceMatch(a,r);if(!l)return null;let c=a.actionPathIdsCsv?this.readAppliedColorForRegionIds(e,a.actionPathIdsCsv):null;return{key:this.buildCustomizationCarryoverKey(a.id,a.name),dataSourceId:l.dataSourceId,sourceUrl:l.sourceUrl,transform:s?R({},s):null,color:c,sourceActionPathIdsCsv:a.actionPathIdsCsv??null,sourceName:(a.name??"").trim()||null}}).filter(a=>!!a):[]}async restorePatternCarryover(e,t){if(!e.length)return;let n=t.customizations.filter(s=>this.isPatternCustomization(s)&&!!s.actionPathIdsCsv),r=n.reduce((s,a)=>(s.set(this.buildCustomizationCarryoverKey(a.id,a.name),a),s),new Map),o=new Set;for(let s of e){let a=this.resolvePatternTargetCustomization(s,n,r,o);if(!a?.actionPathIdsCsv)continue;let l=this.resolvePatternSourceUrlForTarget(a,s);if(!l)continue;await t.patternState.applyPatternFromUrl(l,a.actionPathIdsCsv,!0);let c=t.patternState.selectedUploadedPatternId();c&&s.transform&&(t.patternState.onPatternDefinitionScaleChange(c,s.transform.scale),t.patternState.onPatternDefinitionRotationChange(c,s.transform.rotation),t.patternState.onPatternDefinitionTranslateXChange(c,s.transform.translateX),t.patternState.onPatternDefinitionTranslateYChange(c,s.transform.translateY),t.patternState.onPatternDefinitionOpacityChange(c,s.transform.opacity)),s.color&&this.colorState.applyColor(a.actionPathIdsCsv,s.color),o.add(this.buildCustomizationCarryoverKey(a.id,a.name))}}resolvePatternTargetCustomization(e,t,n,r){let o=n.get(e.key);if(o&&!r.has(this.buildCustomizationCarryoverKey(o.id,o.name)))return o;if(e.dataSourceId){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.pack?.dataSources??[]).some(d=>(d.id??"").trim()===e.dataSourceId)});if(a)return a}let s=(e.sourceName??"").trim().toLowerCase();if(s){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.name??"").trim().toLowerCase()===s});if(a)return a}if(e.sourceActionPathIdsCsv){let a=t.find(l=>{let c=this.buildCustomizationCarryoverKey(l.id,l.name);return r.has(c)?!1:(l.actionPathIdsCsv??"").trim()===e.sourceActionPathIdsCsv});if(a)return a}return null}resolvePatternSourceMatch(e,t){let n=(e.pack?.dataSources??[]).find(r=>(r.fileUrl??"").trim()===t);return n?{dataSourceId:(n.id??"").trim()||null,sourceUrl:(n.fileUrl??"").trim()||t}:null}resolvePatternSourceUrlForTarget(e,t){let n=e.pack?.dataSources??[];if(t.dataSourceId){let a=(n.find(l=>(l.id??"").trim()===t.dataSourceId)?.fileUrl??"").trim();if(a)return a}let o=(n.find(s=>(s.fileUrl??"").trim()===t.sourceUrl)?.fileUrl??"").trim();return o||null}async restoreOverlayPatternCarryover(e,t){if(!e.length)return;let n=new Set(t.personalizationItems.map(o=>o.id)),r=this.groupOverlayPatternsForRestore(e,n);for(let o of r){await t.patternOverlayState.onAddPatternPathFromUrl(o.sourceUrl,o.thumbnailUrl,o.placementId);let s=t.patternOverlayState.state().overlays.filter(l=>(l.sourceUrl??"").trim()===o.sourceUrl&&(l.placementId??null)===o.placementId);if(!s.length)continue;let a=new Set;for(let l of o.overlays){let c=this.matchRestoredOverlayCandidate(l,s,a);c&&(a.add(c.id),t.patternOverlayState.onPatternOpacityChange(c.id,l.opacity),l.fill&&this.colorState.applyColor(c.id,l.fill))}}}groupOverlayPatternsForRestore(e,t){let n=new Map;for(let r of e){let o=(r.sourceUrl??"").trim();if(!o)continue;let s=r.placementId??null;if(s&&!t.has(s))continue;let a=`${o}::${s??""}`,l=n.get(a);if(l){l.overlays.push(r);continue}n.set(a,{sourceUrl:o,placementId:s,thumbnailUrl:r.thumbnailUrl,overlays:[r]})}return[...n.values()]}matchRestoredOverlayCandidate(e,t,n){let r=t.find(s=>!n.has(s.id)&&s.pathData===e.pathData);if(r)return r;let o=t.find(s=>!n.has(s.id)&&(s.label??"").trim()===(e.label??"").trim());return o||(t.find(s=>!n.has(s.id))??null)}restoreOverlayCarryover(e,t){let n=new Set(t.personalizationItems.map(s=>s.placementKey)),r=e.textOverlays.map(s=>R({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneTextBounds(R({},s)):s),o=e.logoOverlays.map(s=>R({},s)).filter(s=>!s.placementKey||n.has(s.placementKey)).map(s=>s.placementKey?this.personalizationState.applyPlacementZoneLogoBounds(R({},s)):s);t.overlaysState.set([...r,...o]),t.activeOverlayIdState.set(null),this.customizerState.setActiveOverlay(null)}restoreColorCarryover(e,t){t.forEach(n=>{if(!this.isColorCustomization(n)||!n.actionPathIdsCsv)return;let r=e.colorsByRegion.get(n.actionPathIdsCsv),o=e.colorsByCustomizationName.get((n.name??"").trim().toLowerCase()),s=r??o;s&&this.colorState.applyColor(n.actionPathIdsCsv,s)})}isColorCustomization(e){return(e.type??"").trim().toLowerCase()===CD.COLOR}isPatternCustomization(e){return(e.type??"").trim().toLowerCase()===CD.PATTERN}buildCustomizationCarryoverKey(e,t){return`${(e??"").trim().toLowerCase()}::${(t??"").trim().toLowerCase()}`}readAppliedColorForRegionIds(e,t){let n=this.parseColorTargets(t);for(let{selector:r,stopIndex:o}of n){let s=Array.from(e.querySelectorAll(r));if(s.length===0)continue;let a=s[0];if(a.tagName.toLowerCase()===v4){let c=Array.from(a.querySelectorAll("stop"));if(!c.length)continue;let d=this.resolveGradientStopIndex(o,c.length),u=c[d],f=u.getAttribute("stop-color")??u.style.stopColor??"";if(f.trim())return f;continue}let l=a.getAttribute("fill")??a.style.fill??"";if(l.trim())return l}return null}parseColorTargets(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0).map(t=>{let[n,r]=t.split(">"),o=r!==void 0&&r.trim().length>0?Number.parseInt(r,10):void 0,s=Number.isFinite(o)?o:void 0,a=n.trim();return{selector:a.startsWith("[")||a.startsWith("#")?a:`#${a}`,stopIndex:s}})}resolveGradientStopIndex(e,t){let n=Number.isFinite(e)?e:b4;return Math.min(Math.max(n,0),t-1)}static \u0275fac=function(t){return new(t||i)(Xe(rh),Xe(Bn))};static \u0275prov=_e({token:i,factory:i.\u0275fac,providedIn:"root"})};function boe(i,e){if(i&1){let t=Ne();w(0,"app-ui-button",11),ie("onClick",function(){Z(t);let r=M(2);return J(r.onClose())}),T()}i&2&&ne("icon","ri-close-line")("text",!0)("rounded",!0)}function yoe(i,e){if(i&1&&(w(0,"p",9),k(1),T()),i&2){let t,n=M(2);P(),Ye((t=n.config())==null?null:t.subtitle)}}function xoe(i,e){if(i&1){let t=Ne();w(0,"app-ui-button",13),ie("onClick",function(){let r=Z(t).$implicit,o=M(3);return J(o.onButtonClick(r))}),T()}if(i&2){let t=e.$implicit;ne("label",t.label)("severity",t.isPrimary?"primary":"secondary")}}function _oe(i,e){if(i&1&&(w(0,"div",10),Dt(1,xoe,1,2,"app-ui-button",12,Iu),T()),i&2){let t,n=M(2);P(),It((t=n.config())==null?null:t.buttons)}}function Soe(i,e){if(i&1){let t=Ne();w(0,"div",1),ie("click",function(){Z(t);let r=M();return J(r.onBackdropClick())}),w(1,"div",2),ie("click",function(r){return r.stopPropagation()}),w(2,"div",3)(3,"div",4)(4,"h2",5),k(5),T(),pe(6,boe,1,3,"app-ui-button",6),T(),w(7,"div",7)(8,"p",8),k(9),T(),pe(10,yoe,2,1,"p",9),T(),pe(11,_oe,3,0,"div",10),T()()()}if(i&2){let t,n,r,o,s,a,l=M();P(2),so("dialog-type-"+(((t=l.config())==null?null:t.type)||"custom")),P(3),Ye((n=l.config())==null?null:n.title),P(),me((r=l.config())!=null&&r.closable?6:-1),P(3),Ye((o=l.config())==null?null:o.message),P(),me((s=l.config())!=null&&s.subtitle?10:-1),P(),me((a=l.config())!=null&&a.buttons&&l.config().buttons.length>0?11:-1)}}var k_=class i{dialogService=Q($s);isOpen=this.dialogService.isOpen;config=this.dialogService.currentConfig;ngOnInit(){}onClose(){this.dialogService.cancel()}onBackdropClick(){this.config()?.closable&&this.onClose()}onButtonClick(e){e.action==="confirm"?this.dialogService.confirm():e.action==="cancel"?this.dialogService.cancel():e.action==="custom"&&e.customId&&this.dialogService.handleCustomAction(e.customId)}getButtonClass(e){let t=["dialog-btn"];return e.isPrimary&&t.push("dialog-btn-primary"),e.isDestructive&&t.push("dialog-btn-destructive"),t.join(" ")}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-generic-dialog"]],decls:1,vars:1,consts:[[1,"dialog-overlay"],[1,"dialog-overlay",3,"click"],[1,"dialog-container",3,"click"],[1,"dialog"],[1,"dialog-header"],[1,"dialog-title"],["severity","primary","aria-label","Close dialog",3,"icon","text","rounded"],[1,"dialog-content"],[1,"dialog-message"],[1,"dialog-subtitle"],[1,"dialog-actions"],["severity","primary","aria-label","Close dialog",3,"onClick","icon","text","rounded"],[3,"label","severity"],[3,"onClick","label","severity"]],template:function(t,n){t&1&&pe(0,Soe,12,7,"div",0),t&2&&me(n.isOpen()?0:-1)},dependencies:[qt,Xs],styles:[".dialog-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;z-index:9999;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:_ngcontent-%COMP%_dialogFadeIn .2s ease-out}@keyframes _ngcontent-%COMP%_dialogFadeIn{0%{opacity:0;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}to{opacity:1;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}}.dialog-container[_ngcontent-%COMP%]{position:relative;z-index:10000;animation:_ngcontent-%COMP%_dialogSlideUp .3s ease-out;max-width:90vw;max-height:90vh}@keyframes _ngcontent-%COMP%_dialogSlideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.dialog[_ngcontent-%COMP%]{background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:12px;box-shadow:0 20px 60px #0f172a26;overflow:hidden;min-width:380px;display:flex;flex-direction:column}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid rgb(var(--border-color, 203 213 225));background:linear-gradient(135deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)))}.dialog-title[_ngcontent-%COMP%]{margin:0;font-size:18px;font-weight:600;color:rgb(var(--text-color, 15 23 42));line-height:1.3}.dialog-close[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:18px;cursor:pointer;border-radius:6px;transition:all .2s;flex-shrink:0}.dialog-close[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.dialog-content[_ngcontent-%COMP%]{padding:24px;color:rgb(var(--text-color, 15 23 42))}.dialog-message[_ngcontent-%COMP%]{margin:0 0 12px;font-size:14px;line-height:1.5;font-weight:500}.dialog-message[_ngcontent-%COMP%]:last-child{margin-bottom:0}.dialog-subtitle[_ngcontent-%COMP%]{color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;margin:0;line-height:1.5}.dialog-actions[_ngcontent-%COMP%]{display:flex;gap:12px;padding:20px 24px;border-top:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-100, 248 250 252) / .5);justify-content:flex-end}.dialog-btn[_ngcontent-%COMP%]{padding:10px 20px;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s;min-width:100px;text-align:center;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));border:1px solid rgb(var(--border-color, 203 213 225))}.dialog-btn[_ngcontent-%COMP%]:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--text-color-secondary, 100 116 139))}.dialog-btn[_ngcontent-%COMP%]:active{transform:scale(.98)}.dialog-btn-primary[_ngcontent-%COMP%]{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.dialog-btn-primary[_ngcontent-%COMP%]:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 4px 12px #6265f14d}.dialog-btn-destructive[_ngcontent-%COMP%]{background:#ef4444;color:#fff;border:none}.dialog-btn-destructive[_ngcontent-%COMP%]:hover{background:#dc2626;box-shadow:0 4px 12px #ef44444d}.dialog-type-warning[_ngcontent-%COMP%]{border-top:4px solid rgb(249,115,22)}.dialog-type-success[_ngcontent-%COMP%]{border-top:4px solid rgb(16,185,129)}.dialog-type-error[_ngcontent-%COMP%]{border-top:4px solid rgb(239,68,68)}@media(max-width:640px){.dialog[_ngcontent-%COMP%]{min-width:350px;max-width:100%}.dialog-content[_ngcontent-%COMP%], .dialog-header[_ngcontent-%COMP%]{padding:20px}.dialog-btn[_ngcontent-%COMP%]{width:100%;min-width:unset}}"]})};var Coe=["threeDUI"],y4=(i,e)=>e.id,x4=(i,e)=>e.trackId;function woe(i,e){if(i&1&&Y(0,"img",4),i&2){let t=M();ne("src",t.distributorHeaderLogoUrl(),ji)}}function Eoe(i,e){i&1&&(w(0,"app-ui-tab",15),k(1,"2D Editor"),T(),w(2,"app-ui-tab",16),k(3,"Both"),T())}function Moe(i,e){if(i&1&&(w(0,"div",12),Y(1,"app-manifest-loader",17),T()),i&2){let t=M();P(),ne("message",t.manifestLoaderMessage)}}function Toe(i,e){if(i&1){let t=Ne();w(0,"button",22),ie("click",function(){Z(t);let r=M(2);return J(r.retryManifestLoad())}),k(1," Retry "),T()}}function Doe(i,e){if(i&1&&(w(0,"div",12)(1,"div",18)(2,"div",19),k(3,"Unable to load manifest"),T(),w(4,"div",20),k(5),T(),pe(6,Toe,2,0,"button",21),T()()),i&2){let t=M();P(5),Ye(t.manifestError()),P(),me(t.isSdkRuntime()?-1:6)}}function Ioe(i,e){if(i&1&&(w(0,"div",13),Y(1,"app-save-loader",23),T()),i&2){let t=M();P(),ne("message",t.designSaveMessage()||"Saving design\u2026")("subtitle","Please wait while your design is being processed")}}function Poe(i,e){i&1&&Y(0,"app-three-d-loader")}function Aoe(i,e){if(i&1){let t=Ne();w(0,"app-three-d-ui",46,0),tp("svgTextChange",function(r){Z(t);let o=M(2);return bs(o.svgText,r)||(o.svgText=r),J(r)})("svgDimensionsChange",function(r){Z(t);let o=M(2);return bs(o.svgDimensions,r)||(o.svgDimensions=r),J(r)})("svgViewBoxChange",function(r){Z(t);let o=M(2);return bs(o.svgViewBox,r)||(o.svgViewBox=r),J(r)})("showPlacementGuidesChange",function(r){Z(t);let o=M(2);return bs(o.showPlacementGuides,r)||(o.showPlacementGuides=r),J(r)})("placementZonesChange",function(r){Z(t);let o=M(2);return bs(o.placementZones,r)||(o.placementZones=r),J(r)})("overlaysChange",function(r){Z(t);let o=M(2);return bs(o.overlays,r)||(o.overlays=r),J(r)})("activeOverlayIdChange",function(r){Z(t);let o=M(2);return bs(o.activeOverlayId,r)||(o.activeOverlayId=r),J(r)}),ie("activeOverlayChange",function(r){Z(t);let o=M(2);return J(o.setActiveOverlay(r))})("overlayPositionChange",function(r){Z(t);let o=M(2);return J(o.onOverlayPositionChange(r))})("overlayRotationChange",function(r){Z(t);let o=M(2);return J(o.onOverlayRotationChange(r))})("overlayResizeChange",function(r){Z(t);let o=M(2);return J(o.onOverlayResizeChange(r))})("onUndo",function(){Z(t);let r=M(2);return J(r.onUndo())})("onRedo",function(){Z(t);let r=M(2);return J(r.onRedo())}),T()}if(i&2){let t=M(2);Rc("svgText",t.svgText),ne("isActive",t.editorMode()!=="2d")("mtlText",t.mtlText())("objText",t.objText())("materialSourceUrl",t.materialFileLink()),Rc("svgDimensions",t.svgDimensions),ne("overlayBounds",t.threeDOverlayBounds())("printAreaWidthInches",t.printAreaWidthInches())("printAreaHeightInches",t.printAreaHeightInches())("gridSizeInches",t.twoDGridSizeInches()),Rc("svgViewBox",t.svgViewBox)("showPlacementGuides",t.showPlacementGuides)("placementZones",t.placementZones)("overlays",t.overlays)("activeOverlayId",t.activeOverlayId),ne("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("gridSize",t.threeDGridSizeNormalized())}}function Ooe(i,e){i&1&&(w(0,"div",50)(1,"div",51),Y(2,"i",49),w(3,"span"),k(4,"Keyboard Shortcuts"),T()(),Y(5,"app-keyboard-shortcuts-panel"),T())}function Roe(i,e){if(i&1){let t=Ne();w(0,"div",47),ie("click",function(r){return r.stopPropagation()}),w(1,"button",48),ie("click",function(r){Z(t);let o=M(2);return J(o.toggleShortcuts(r))}),Y(2,"i",49),T(),pe(3,Ooe,6,0,"div",50),T()}if(i&2){let t=M(2);P(),pt("active",t.showShortcuts()),P(2),me(t.showShortcuts()?3:-1)}}function koe(i,e){if(i&1&&(w(0,"div",32),Y(1,"app-manifest-loader",17),w(2,"p",52),k(3),T()()),i&2){let t=M(2);P(),ne("message",t.predesignLoaderMessage),P(2),Ye(t.predesignLoaderSubtitle)}}function Foe(i,e){i&1&&(w(0,"p",35),k(1,"No actions available for this step."),T())}function Noe(i,e){if(i&1){let t=Ne();w(0,"app-pre-designs-panel",62),ie("designSelected",function(r){Z(t);let o=M(4);return J(o.onPredesignSelected(r))}),T()}if(i&2){let t=M().$implicit,n=M(3);ne("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function Loe(i,e){if(i&1&&Y(0,"app-customizer-color-panel",57),i&2){let t=M().$implicit;ne("items",t.customizations)}}function Uoe(i,e){if(i&1&&Y(0,"app-customizer-pattern-panel",57),i&2){let t=M().$implicit;ne("items",t.customizations)}}function Boe(i,e){if(i&1&&Y(0,"app-customizer-personalization-panel",57),i&2){let t=M().$implicit;ne("items",t.items)}}function zoe(i,e){if(i&1&&Y(0,"app-overlay-panel",58),i&2){let t=M().$implicit;ne("items",t.items)("useAccordion",t.items.length>1)}}function Voe(i,e){if(i&1&&Y(0,"app-customizer-background-panel",59),i&2){let t=M().$implicit;ne("templates",t.templates)}}function Goe(i,e){if(i&1){let t=Ne();w(0,"app-render-order-panel",63),ie("moveTowardFront",function(r){Z(t);let o=M(4);return J(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){Z(t);let o=M(4);return J(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){Z(t);let o=M(4);return J(o.onRenderOrderReorder(r))})("selectItem",function(r){Z(t);let o=M(4);return J(o.onRenderOrderSelect(r))}),T()}if(i&2){let t=M().$implicit,n=M(3);ne("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function Hoe(i,e){if(i&1){let t=Ne();w(0,"app-canvas-guide-panel",64),ie("onGridToggle",function(){Z(t);let r=M(4);return J(r.onGridToggle())})("onSnapToggle",function(){Z(t);let r=M(4);return J(r.onSnapToggle())})("onGuidesToggle",function(){Z(t);let r=M(4);return J(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){Z(t);let o=M(4);return J(o.onTwoDGridSizeChange(r))}),T()}if(i&2){let t=M(4);ne("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function joe(i,e){if(i&1&&(w(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2"),k(4),T()(),w(5,"div",55),pe(6,Noe,1,2,"app-pre-designs-panel",56)(7,Loe,1,1,"app-customizer-color-panel",57)(8,Uoe,1,1,"app-customizer-pattern-panel",57)(9,Boe,1,1,"app-customizer-personalization-panel",57)(10,zoe,1,2,"app-overlay-panel",58)(11,Voe,1,1,"app-customizer-background-panel",59)(12,Goe,1,2,"app-render-order-panel",60)(13,Hoe,1,7,"app-canvas-guide-panel",61),T()()()),i&2){let t,n=e.$implicit,r=M(3);P(4),Ye(n.title),P(2),me((t=n.kind)===r.panelKind.PREDESIGNS?6:t===r.panelKind.COLOR?7:t===r.panelKind.PATTERN?8:t===r.panelKind.PERSONALIZATION?9:t===r.panelKind.OVERLAY?10:t===r.panelKind.BACKGROUND?11:t===r.panelKind.RENDER_ORDER?12:t===r.panelKind.CANVAS_GUIDE?13:-1)}}function Woe(i,e){if(i&1&&Dt(0,joe,14,2,"section",36,x4),i&2){let t=M(2);It(t.activePanels())}}function $oe(i,e){if(i&1){let t=Ne();w(0,"app-pre-designs-panel",62),ie("designSelected",function(r){Z(t);let o=M(4);return J(o.onPredesignSelected(r))}),T()}if(i&2){let t=M().$implicit,n=M(3);ne("predesigns",t.predesigns)("selectedId",n.selectedPredesignId())}}function Xoe(i,e){if(i&1&&Y(0,"app-customizer-color-panel",57),i&2){let t=M().$implicit;ne("items",t.customizations)}}function Yoe(i,e){if(i&1&&Y(0,"app-customizer-pattern-panel",57),i&2){let t=M().$implicit;ne("items",t.customizations)}}function qoe(i,e){if(i&1&&Y(0,"app-customizer-personalization-panel",57),i&2){let t=M().$implicit;ne("items",t.items)}}function Koe(i,e){if(i&1&&Y(0,"app-overlay-panel",58),i&2){let t=M().$implicit;ne("items",t.items)("useAccordion",t.items.length>1)}}function Zoe(i,e){if(i&1&&Y(0,"app-customizer-background-panel",59),i&2){let t=M().$implicit;ne("templates",t.templates)}}function Joe(i,e){if(i&1){let t=Ne();w(0,"app-render-order-panel",63),ie("moveTowardFront",function(r){Z(t);let o=M(4);return J(o.onRenderOrderMoveTowardFront(r))})("moveTowardBack",function(r){Z(t);let o=M(4);return J(o.onRenderOrderMoveTowardBack(r))})("reorder",function(r){Z(t);let o=M(4);return J(o.onRenderOrderReorder(r))})("selectItem",function(r){Z(t);let o=M(4);return J(o.onRenderOrderSelect(r))}),T()}if(i&2){let t=M().$implicit,n=M(3);ne("items",t.items)("activeOverlayId",n.activeRenderOrderItemId())}}function Qoe(i,e){if(i&1){let t=Ne();w(0,"app-canvas-guide-panel",64),ie("onGridToggle",function(){Z(t);let r=M(4);return J(r.onGridToggle())})("onSnapToggle",function(){Z(t);let r=M(4);return J(r.onSnapToggle())})("onGuidesToggle",function(){Z(t);let r=M(4);return J(r.onGuidesToggle())})("onTwoDGridSizeChange",function(r){Z(t);let o=M(4);return J(o.onTwoDGridSizeChange(r))}),T()}if(i&2){let t=M(4);ne("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridRatio",t.gridRatio())("editorMode",t.editorMode())("threeDGridSizeNormalized",t.threeDGridSizeNormalized())("twoDGridSizeInches",t.twoDGridSizeInches())}}function ese(i,e){if(i&1&&(w(0,"app-ui-accordion-panel",67)(1,"app-ui-accordion-header")(2,"div",68)(3,"span"),k(4),T()()(),w(5,"app-ui-accordion-content")(6,"div",69),pe(7,$oe,1,2,"app-pre-designs-panel",56)(8,Xoe,1,1,"app-customizer-color-panel",57)(9,Yoe,1,1,"app-customizer-pattern-panel",57)(10,qoe,1,1,"app-customizer-personalization-panel",57)(11,Koe,1,2,"app-overlay-panel",58)(12,Zoe,1,1,"app-customizer-background-panel",59)(13,Joe,1,2,"app-render-order-panel",60)(14,Qoe,1,7,"app-canvas-guide-panel",61),T()()()),i&2){let t,n=e.$implicit,r=M(3);ne("value",n.trackId),P(4),Ye(n.title),P(3),me((t=n.kind)===r.panelKind.PREDESIGNS?7:t===r.panelKind.COLOR?8:t===r.panelKind.PATTERN?9:t===r.panelKind.PERSONALIZATION?10:t===r.panelKind.OVERLAY?11:t===r.panelKind.BACKGROUND?12:t===r.panelKind.RENDER_ORDER?13:t===r.panelKind.CANVAS_GUIDE?14:-1)}}function tse(i,e){if(i&1&&(w(0,"section",36)(1,"div",53)(2,"div",54)(3,"h2",65),k(4),T()(),w(5,"div",55)(6,"app-ui-accordion",66),Dt(7,ese,15,3,"app-ui-accordion-panel",67,x4),T()()()()),i&2){let t,n=M(2);P(4),Ye(n.selectedStepLabel()),P(2),ne("value",(t=n.activePanels()[0])==null?null:t.trackId),P(),It(n.activePanels())}}function nse(i,e){i&1&&(Y(0,"i",71),w(1,"span"),k(2,"Hide Options"),T())}function ise(i,e){i&1&&(Y(0,"i",72),w(1,"span"),k(2,"Show Options"),T())}function rse(i,e){if(i&1){let t=Ne();w(0,"button",70),ie("click",function(){Z(t);let r=M(2);return J(r.toggleMobilePanel())}),pe(1,nse,3,0)(2,ise,3,0),T()}if(i&2){let t=M(2);Pn("aria-label",t.mobilePanelVisible()?"Hide options panel":"Show options panel"),P(),me(t.mobilePanelVisible()?1:2)}}function ose(i,e){i&1&&(Y(0,"i",71),w(1,"span"),k(2,"Show Preview"),T())}function sse(i,e){i&1&&(Y(0,"i",74),w(1,"span"),k(2,"Expand Panel"),T())}function ase(i,e){if(i&1){let t=Ne();w(0,"button",73),ie("click",function(){Z(t);let r=M(2);return J(r.toggleMobileCanvas())}),pe(1,ose,3,0)(2,sse,3,0),T()}if(i&2){let t=M(2);P(),me(t.mobileCanvasHidden()?1:2)}}function lse(i,e){if(i&1&&Y(0,"i"),i&2){let t=M().$implicit;so(t.iconClass)}}function cse(i,e){if(i&1){let t=Ne();w(0,"button",76),ie("click",function(){let r=Z(t).$implicit,o=M(3);return J(o.onNavItemClick(r.id))}),pe(1,lse,1,2,"i",77),w(2,"span",78),k(3),T()()}if(i&2){let t=e.$implicit,n=M(3);pt("active",t.id===n.activeStepId()),P(),me(t.iconClass?1:-1),P(),oo("padding-left",t.depth*12,"px"),P(),Ye(t.name)}}function dse(i,e){if(i&1&&(w(0,"div",42),Dt(1,cse,4,6,"button",75,y4),T()),i&2){let t=M(2);P(),It(t.hiddenNavItems())}}function use(i,e){if(i&1&&Y(0,"i"),i&2){let t=M().$implicit;so(t.iconClass)}}function fse(i,e){if(i&1){let t=Ne();w(0,"button",79),ie("click",function(){let r=Z(t).$implicit,o=M(2);return J(o.onNavItemClick(r.id))}),pe(1,use,1,2,"i",77),w(2,"span",78),k(3),T()()}if(i&2){let t=e.$implicit,n=M(2);pt("active",t.id===n.activeStepId()),P(),me(t.iconClass?1:-1),P(),oo("padding-left",t.depth*12,"px"),P(),Ye(t.name)}}function hse(i,e){i&1&&(Y(0,"i",81),w(1,"span",78),k(2,"Hide"),T())}function pse(i,e){i&1&&(Y(0,"i",82),w(1,"span",78),k(2,"Show More"),T())}function mse(i,e){if(i&1){let t=Ne();w(0,"button",80),ie("click",function(){Z(t);let r=M(2);return J(r.toggleNavExpanded())}),pe(1,hse,3,0)(2,pse,3,0),T()}if(i&2){let t=M(2);P(),me(t.navExpanded()?1:2)}}function gse(i,e){if(i&1){let t=Ne();w(0,"div",24)(1,"main",25)(2,"section",26)(3,"div",26)(4,"app-two-d-ui",27),ie("layerToggle",function(r){Z(t);let o=M();return J(o.onLayerToggle(r))})("canvasReady",function(r){Z(t);let o=M();return J(o.onTwoDCanvasReady(r))})("canvasDetached",function(){Z(t);let r=M();return J(r.onTwoDCanvasDestroyed())})("zoomIn",function(){Z(t);let r=M();return J(r.onTwoDZoomIn())})("zoomOut",function(){Z(t);let r=M();return J(r.onTwoDZoomOut())})("resetView",function(){Z(t);let r=M();return J(r.onTwoDReset())})("onUndo",function(){Z(t);let r=M();return J(r.onUndo())})("onRedo",function(){Z(t);let r=M();return J(r.onRedo())}),T()()(),w(5,"section",26)(6,"main",28)(7,"div",29),pe(8,Poe,1,0,"app-three-d-loader"),pe(9,Aoe,2,18,"app-three-d-ui",30),T()()(),pe(10,Roe,4,3,"div",31),pe(11,koe,4,2,"div",32),T(),w(12,"section",33)(13,"aside",34),pe(14,Foe,2,0,"p",35)(15,Woe,2,0)(16,tse,9,2,"section",36),T()(),w(17,"section",37)(18,"div",38)(19,"div",39),pe(20,rse,3,2,"button",40),pe(21,ase,3,1,"button",41),T(),pe(22,dse,3,0,"div",42),w(23,"div",43),Dt(24,fse,4,6,"button",44,y4),pe(26,mse,3,1,"button",45),T()()()()}if(i&2){let t=M();pt("mobile-panel-hidden",!t.mobilePanelVisible())("mobile-canvas-hidden",t.mobileCanvasHidden()),P(),pt("single",t.editorMode()!=="both")("canvas-loading",t.showCanvasManifestLoader()),P(),pt("hidden",t.editorMode()==="3d"),P(2),ne("svgText",t.svgText())("isActive",t.editorMode()!=="3d")("layers",t.layers())("selectedLayerKey",t.selectedLayerKey())("isShowAllLayersOption",t.isShowWholeLayersOption())("gridEnabled",t.gridEnabled())("snapEnabled",t.snapEnabled())("showPlacementGuides",t.showPlacementGuides())("gridSize",t.twoDGridSize()),P(),pt("hidden",t.editorMode()==="2d"),P(3),me(t.loading()?8:-1),P(),me((t.editorMode()==="3d"||t.editorMode()==="both")&&t.objText()?9:-1),P(),me(t.isMobile()?-1:10),P(),me(t.showCanvasManifestLoader()?11:-1),P(3),me(t.activePanels().length===0?14:t.activePanels().length===1?15:16),P(6),me(t.mobileCanvasHidden()?-1:20),P(),me(t.mobilePanelVisible()?21:-1),P(),me(t.navExpanded()?22:-1),P(),pt("nav-expanded",t.navExpanded()),P(),It(t.visibleNavItems()),P(2),me(t.hiddenNavItems().length>0?26:-1)}}var F_=class i{panelKind=y_;apiKey=Me(null);productId=Me(null);submissionNumber=Me(null);predesignId=Me(null);threeDUI=Pu("threeDUI");editorMode=N("3d");customizerState=Q(Bn);measurementService=Q(Hl);fontAssetService=Q(Zx);textLayoutService=Q(Jx);printAreaMeasurementService=Q(Bl);svgRenderService=Q(Qx);overlayStyleService=Q(e_);renderOrderState=Q(t_);backgroundState=Q(Jf);personalizationState=Q(Ql);patternState=Q(oh);patternOverlayState=Q(ah);designHistory=Q(Ll);destroyRef=Q(sr);manifestFlowService=Q(O_);threeThumbnailService=Q(b_);submissionApi=Q(f_);toaster=Q(da);panelService=Q(w_);fileService=Q(E_);designExportService=Q(M_);themeService=Q(Yf);keyboardShortcutService=Q(T_);layerBoundsService=Q(D_);imageCompressionService=Q(zs);predesignCarryoverService=Q(R_);dialogService=Q($s);sdkRuntimeConfig=Q(g_,{optional:!0});selectedStepLabel=De(()=>this.parentNav().find(e=>e.id===this.activeStepId())?.name??"");fallbackProductId=A3;isSdkRuntime=N(!!this.sdkRuntimeConfig);mobilePanelVisible=N(!0);mobileCanvasHidden=N(!1);isMobile=N(!1);toggleMobileCanvas(){this.mobileCanvasHidden.update(e=>!e)}manifestLoading=N(!1);manifestError=N(null);predesignSwitchLoading=N(!1);showBlockingManifestLoader=De(()=>this.manifestLoading()&&!this.predesignSwitchLoading());showCanvasManifestLoader=De(()=>this.manifestLoading()&&this.predesignSwitchLoading());showBlockingManifestError=De(()=>!!this.manifestError()&&!this.manifestLoaded);manifestLoaderMessage="Loading product manifest\u2026";predesignLoaderMessage="Applying selected design\u2026";predesignLoaderSubtitle="Updating 2D and 3D previews";selectedPredesignId=N(null);designSavingInProgress=N(!1);designSaveMessage=N(null);distributorHeaderLogoUrl=N(null);submissionThumbnailViews=["front","right","back","left"];manifestRequestToken=null;pendingPredesignCarryover=null;viewInitialized=!1;manifestLoaded=!1;filesLoaded=!1;hasInitializedManifestLoad=!1;lastManifestConfigSignature=null;pendingSubmissionPayload=null;editableSubmissionCompressionToken=null;suspendTextureRebuild=!1;pendingTextureRebuildWhileSuspended=!1;pendingEditableTextEffects=N([]);appliedEditableTextEffectKeys=N(new Set);replayPendingEffectsInFlight=!1;svgText=this.customizerState.svgTextState;svgDoc=this.customizerState.svgDocState;svgTextForExport=N(null);baseSvgText=N(null);predesignBaseSvgText=N(null);mtlText=N(null);objText=N(null);threeDFileLink=N("");materialFileLink=N(null);pathIdAccordingLayers=N([]);renderPathAccordingLayers=N([]);layers=De(()=>this.pathIdAccordingLayers().map(e=>e.name));selectedLayerKey=N(null);placementZones=this.personalizationState.placementZones;showPlacementGuides=this.personalizationState.showPlacementGuides;loading=N(!1);sanitizer=Q(fp);minFontSize=N(12);maxFontSize=N(400);fontSizeStep=N(2);rotationStep=N(5);builtInFontOptions=N(Fx.map(({label:e,value:t})=>({label:e,value:t})));fontOptions=N([...this.builtInFontOptions()]);defaultFontFamily=N(this.builtInFontOptions()[0]?.value??Fx[0]?.value??pr);defaultFontWeight=N("normal");defaultFontStyle=N("normal");defaultLineHeight=N(1.2);defaultLetterSpacing=N(0);strokeWidthStep=N(.5);letterSpacingStep=N(.5);defaultCurveAmount=N(0);defaultShadowBlur=N(0);shadowBlurStep=N(1);defaultShadowOffsetX=N(0);defaultShadowOffsetY=N(0);defaultShadowColor=N(wm);warpEnvelopeFileName=N(null);warpUploadError=N(null);overlays=this.customizerState.overlays;svgDimensions=N(null);svgViewBox=N({minX:0,minY:0,width:1e3,height:1e3});activeOverlayId=N(null);threeDOverlayBounds=De(()=>this.getOverlayBoundingRect());gridEnabled=N(!1);snapEnabled=N(!1);gridRatio=N((Wr.TWO_D_GRID_SIZE-8)/112);printAreaWidthInches=De(()=>this.customizerState.printAreaWidthInches());printAreaHeightInches=De(()=>this.customizerState.printAreaHeightInches());twoDGridSizeInches=N(1);twoDGridStepPx=De(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox(),o=this.twoDGridSizeInches();return e&&e>0&&n&&n>0&&o>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(o,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(o,r.height,n)))}:{x:Wr.TWO_D_GRID_SIZE,y:Wr.TWO_D_GRID_SIZE}});twoDGridSize=De(()=>this.twoDGridStepPx().x);twoDGridMajorStepPx=De(()=>{let e=this.customizerState.printAreaWidthInches(),t=this.customizerState.printAreaHeightInches(),n=t&&t>0?t:e,r=this.svgViewBox();return e&&e>0&&n&&n>0?{x:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsX(1,r.width,e))),y:Math.max(1,Math.round(this.printAreaMeasurementService.inchesToSvgUnitsY(1,r.height,n)))}:{x:Wr.INCH_IN_PIXELS,y:Wr.INCH_IN_PIXELS}});twoDGridMajorSize=De(()=>this.twoDGridMajorStepPx().x);threeDGridSizeNormalized=De(()=>{let e=this.gridRatio();return Math.round((e*(.2-.01)+.01)*100)/100});svgFileLink=N("");customizations=N([]);predesigns=N([]);isShowWholeLayersOption=N(!1);personlizationPlacements=De(()=>this.personalizationState.placements());twoDCanvasElement=null;fabricCanvas=null;fabricCanvasCleanup=null;fabricCanvasSyncDimensions=null;fabricReady=N(!1);canvasLoadToken=N(null);baseElementCache=this.customizerState.baseElementCache;baseBBoxCache=this.customizerState.baseBBoxCache;measurementHost=this.customizerState.measurementHost;measurementSvgRoot=this.customizerState.measurementSvgRoot;measurementCloneDirty=this.customizerState.measurementCloneDirty;canvasTransform=N(null);fabricLayoutState=N(null);fabricViewZoom=N(1);minFabricViewZoom=N(.25);maxFabricViewZoom=N(5);isBrowser=this.customizerState.isBrowser;textureUpdateScheduled=N(!1);overlaySyncPromise=N(Promise.resolve());backgroundImageTemplates=De(()=>this.backgroundState.state().templates);placementZoneBounds=N(new Map);overlayFabricObjects=N(new Map);fabricVisibleOverlayIds=N(new Set);layerBoundsCache=this.customizerState.layerBoundsCache;pendingLogoLoads=N(new Map);fontSourceMap=N(R({},WT));fontBinaryPromises=N(new Map);fontOutlinePromises=N(new Map);fontFacePromises=N(new Map);fontFacesReady=N(new Set);svgImageHrefCache=new Map;svgImageHrefPending=new Map;canUndo=this.designHistory.canUndo;canRedo=this.designHistory.canRedo;historyInitialized=!1;historyDebounceHandle=null;sdkReadyNotified=!1;isUndoingRedoing=N(!1);historyCaptureSuspended=!1;preserveHistoryOnNextSvgLoad=!1;placementGuideObjects=N(new Map);fabricGridState=N({horizontal:[],vertical:[]});fabricGuideState=N({lines:[]});twoDSnapRuntime=N(Fi());twoDCursorCanvasPoint=N(null);twoDDraggingOverlayId=N(null);fabricSelectionClearSuppressionCount=0;lastHandledRenderCommandId=0;lastHandledTextureCommandId=0;lastHandledOverlaySyncCommandId=0;predesignStepId=x_.PREDESIGNS;renderOrderStepId=x_.RENDER_ORDER;canvasGuideStepId=x_.CANVAS_GUIDE;steps=N([]);personalizationItems=N([]);activeStepId=N(null);activeRenderOrderItemId=De(()=>this.activeOverlayId()?`overlay:${this.activeOverlayId()}`:null);stepNav=De(()=>this.panelService.flattenSteps(this.steps()));renderOrderItems=De(()=>{let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});return this.renderOrderState.stack().map(t=>e.get(t)).filter(t=>!!t)});stepLookup=De(()=>this.panelService.buildStepLookup(this.steps()));parentNav=De(()=>this.panelService.buildParentNav(this.steps(),this.renderOrderStepId,t4));navExpanded=N(!1);dynamicSlotId=N(null);isDesktop=N(!0);showShortcuts=N(!1);toggleShortcuts(e){e.stopPropagation(),this.showShortcuts.update(t=>!t)}closeShortcuts(){this.showShortcuts.set(!1)}onResize(){if(this.isBrowser()){let e=window.innerWidth;this.isDesktop.set(e>=992),this.isMobile.set(e<768)}}allNavItems=De(()=>{let e=this.predesigns(),t=[];return e&&e.length>0&&t.push({id:this.predesignStepId,name:"Designs",iconClass:"ri-pencil-fill",depth:0}),t.push(...this.parentNav()),t.push({id:this.canvasGuideStepId,name:"Canvas Guide",iconClass:"ri-layout-grid-line",depth:0}),t});visibleNavItems=De(()=>{let e=this.allNavItems();if(this.isDesktop()||e.length<=4)return e;let t=this.dynamicSlotId(),n=this.activeStepId(),r=n&&e.findIndex(a=>a.id===n)>=3?n:t;(!r||e.findIndex(a=>a.id===r)<3)&&(r=e[3].id);let o=e.slice(0,3),s=e.find(a=>a.id===r)||e[3];return[...o,s]});hiddenNavItems=De(()=>{let e=this.allNavItems();if(e.length<=4)return[];let t=new Set(this.visibleNavItems().map(n=>n.id));return e.filter(n=>!t.has(n.id))});toggleNavExpanded(){this.navExpanded.update(e=>!e)}onNavItemClick(e){this.setActiveStep(e),this.navExpanded.set(!1),this.dynamicSlotId.set(e)}predesignPanel=De(()=>{let e=this.predesigns();return e.length?{kind:"predesigns",trackId:this.predesignStepId,title:Hd.DESIGNS,predesigns:e}:null});canvasGuidePanel=De(()=>({kind:"canvas-guide",trackId:this.canvasGuideStepId,title:"Canvas Guide"}));panelsByStep=De(()=>this.panelService.buildPanelsByStep({stepNav:this.stepNav(),customizations:this.customizations(),personalizationItems:this.personalizationItems(),stepLookup:this.stepLookup(),renderOrderStepId:this.renderOrderStepId,renderOrderItems:this.renderOrderItems()}));activePanels=De(()=>{let e=this.activeStepId();if(!e)return[];if(e===this.predesignStepId){let s=this.predesignPanel();return s?[s]:[]}if(e===this.renderOrderStepId)return this.panelsByStep().get(this.renderOrderStepId)??[];if(e===this.canvasGuideStepId){let s=this.canvasGuidePanel();return s?[s]:[]}let t=this.stepLookup(),n=this.panelsByStep(),r=s=>{let a=n.get(s.id)??[],l=(s.children??[]).flatMap(c=>r(c));return[...a,...l]},o=t.get(e);return o?r(o):[]});constructor(){Yt(()=>{this.customizerState.fabricReadyState.set(this.fabricReady())}),Yt(()=>{this.customizerState.canvasTransformState.set(this.canvasTransform())}),Yt(()=>{let e=this.customizerState.render2dCommandId();e===0||e===this.lastHandledRenderCommandId||(this.lastHandledRenderCommandId=e,gn(()=>this.render2dView()))}),Yt(()=>{let e=this.customizerState.textureRebuildCommandId();e===0||e===this.lastHandledTextureCommandId||(this.lastHandledTextureCommandId=e,gn(()=>this.requestTextureRebuild()))}),Yt(()=>{let e=this.customizerState.overlaySyncCommandId();e===0||e===this.lastHandledOverlaySyncCommandId||(this.lastHandledOverlaySyncCommandId=e,gn(()=>{this.syncOverlaysToSvgDoc().then(()=>this.customizerState.completeOverlaySyncCommand(e)).catch(t=>this.customizerState.completeOverlaySyncCommand(e,t))}))}),Yt(()=>{this.apiKey(),this.productId();let e=this.submissionNumber()?.trim()??"",t=this.predesignId()?.trim()??"";if(!this.hasInitializedManifestLoad)return;let n=this.getManifestConfigSignature(),r=n?`${n}::${e}::${t}`:null;!r||r===this.lastManifestConfigSignature||(this.lastManifestConfigSignature=r,gn(()=>{if(e){this.selectedPredesignId.set(null),this.bootstrapEditableSubmission(e);return}t?this.selectedPredesignId.set(t):this.selectedPredesignId.set(null),this.pendingSubmissionPayload=null,this.loadManifest(t||void 0)}))}),Yt(()=>{let e=this.fabricReady(),t=this.showPlacementGuides(),n=this.placementZones().length,r=!!this.canvasTransform(),o=this.fabricCanvas;if(!o||!e||!r||n===0){o&&(gn(()=>this.clearPlacementGuides(o)),o.requestRenderAll());return}if(!t){gn(()=>this.clearPlacementGuides(o)),o.requestRenderAll();return}gn(()=>this.updatePlacementGuideVisibility())}),Yt(()=>{this.gridEnabled(),this.twoDGridStepPx(),this.twoDGridMajorStepPx(),this.twoDGridSizeInches(),gn(()=>this.render2dView())}),Yt(()=>{this.svgDoc(),this.svgText(),this.overlays(),this.patternState.state(),this.patternOverlayState.state().overlays,this.backgroundState.state().images,this.backgroundImageTemplates(),this.renderPathAccordingLayers(),gn(()=>this.synchronizeRenderOrderStack())}),Yt(()=>{this.svgText(),this.overlays(),this.selectedLayerKey(),this.showPlacementGuides(),this.backgroundState.state(),this.patternState.state(),gn(()=>{this.isUndoingRedoing()?this.isUndoingRedoing.set(!1):this.scheduleHistoryCapture()})}),Yt(()=>{this.ingestFontPacks(this.personalizationItems())}),Yt(()=>{this.personalizationItems(),this.overlays(),this.pendingEditableTextEffects().length&&gn(()=>{this.replayPendingEditableTextEffects()})}),Yt(()=>{let e=this.svgDoc();gn(()=>{if(!e){this.baseElementCache.set(null),this.baseBBoxCache.set(null);return}let t=e.documentElement;if(this.baseElementCache.set(t),t instanceof SVGGraphicsElement)try{this.baseBBoxCache.set(t.getBBox())}catch{this.baseBBoxCache.set(null)}})}),Yt(()=>{let e=this.editorMode();gn(()=>{(e==="3d"||e==="both")&&setTimeout(()=>{this.threeDUI()?.resizeHandler()},0),(e==="2d"||e==="both")&&setTimeout(()=>{this.fabricCanvasSyncDimensions?.(),this.render2dView()},0)})}),this.fontAssetService.queueFontFaceLoad(this.defaultFontFamily(),this.fontDeps()),this.registerKeyboardShortcuts()}ngOnInit(){if(this.isBrowser()){let n=window.innerWidth;this.isDesktop.set(n>=992),this.isMobile.set(n<768)}let e=this.submissionNumber()?.trim()??"",t=this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput());if(this.lastManifestConfigSignature=t?`${t}::${e}`:null,this.hasInitializedManifestLoad=!0,e){this.bootstrapEditableSubmission(e);return}}async bootstrapEditableSubmission(e){let t=this.resolveApiKey();if(this.pendingEditableTextEffects.set([]),this.appliedEditableTextEffectKeys.set(new Set),!t){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Rt.missingApiKey);return}this.manifestLoading.set(!0);let n=this.resolveProductId()?.trim();if(!n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Rt.missingProductId),this.manifestLoading.set(!1);return}this.manifestError.set(null);try{let r=await uc(this.submissionApi.getSubmissionByNumber(e,t)),o=this.resolveEditableSubmissionData(r?.data);if(!r?.isSuccess||!o){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let l=r?.errors?.[0]??r?.message??Rt.submissionNotFound;this.manifestError.set(l),this.manifestLoading.set(!1),this.toaster.showError(l);return}let s=o.productId?.trim();if(!s||s!==n){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Rt.submissionProductMismatch),this.manifestLoading.set(!1),this.toaster.showError(Rt.submissionProductMismatch);return}if(!this.isValidEditablePayload(o.designPayload)){this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestError.set(Rt.submissionInvalidPayload),this.toaster.showError(Rt.submissionInvalidPayload),this.manifestLoading.set(!1);return}let a=o.preDesignId?.trim()||null;this.selectedPredesignId.set(a),this.pendingSubmissionPayload=o.designPayload,await this.loadManifest(a)}catch{this.pendingSubmissionPayload=null,this.manifestLoaded=!1,this.manifestLoading.set(!1),this.manifestError.set(Rt.submissionLoadFailed),this.toaster.showError(Rt.submissionLoadFailed)}}resolveEditableSubmissionData(e){if(!e)return null;if(Array.isArray(e)){let t=e[0];return t&&typeof t=="object"?t:null}return typeof e!="object"?null:e}isValidEditablePayload(e){if(!e||typeof e!="object")return!1;let t=e.svg?.content,n=e.svg?.contentUrl,r=typeof t=="string"&&t.trim().length>0,o=typeof n=="string"&&n.trim().length>0;return r||o}async loadManifest(e){let t=Symbol();this.manifestRequestToken=t;let n=!!e&&this.manifestLoaded;this.manifestLoading.set(!0),this.predesignSwitchLoading.set(n),this.manifestError.set(null),n||(this.manifestLoaded=!1),this.filesLoaded=!1;try{let r=await this.manifestFlowService.loadManifest(ue(R({},this.getManifestIdentityInput()),{preDesignId:e??null,selectedPredesignId:this.selectedPredesignId(),activeStepId:this.activeStepId()}));if(this.manifestRequestToken!==t)return;if(!r.ok){this.pendingPredesignCarryover=null,this.manifestError.set(r.message),this.notifyManifestLoadFailed(r.message);return}this.applyManifestData(r.normalized)}catch{if(this.manifestRequestToken!==t)return;this.pendingPredesignCarryover=null,this.manifestError.set(Rt.manifestLoadFailed),this.notifyManifestLoadFailed(Rt.manifestLoadFailed)}finally{this.manifestRequestToken===t&&(this.manifestLoading.set(!1),this.predesignSwitchLoading.set(!1))}}retryManifestLoad(){this.loadManifest()}toggleMobilePanel(){this.mobilePanelVisible.update(e=>!e)}async onPredesignSelected(e){let t=e?.id??null;t&&(this.manifestLoading()||t===this.selectedPredesignId()||(this.pendingPredesignCarryover=this.capturePredesignCarryover(t),this.preserveHistoryOnNextSvgLoad=!1,this.selectedPredesignId.set(t),await this.loadManifest(t)))}tryLoadFilesFromManifest(e=!1){!this.viewInitialized||!this.manifestLoaded||this.filesLoaded||(this.filesLoaded=!0,this.loadFilesFromUrls(e))}ngAfterViewInit(){this.initFabricCanvases(),this.viewInitialized=!0,this.tryLoadFilesFromManifest()}registerKeyboardShortcuts(){if(!this.isBrowser)return;let e=t=>{let n=t.composedPath?.()[0]||t.target;if(n&&this.keyboardShortcutService.isTextInputTarget(n))return;let r=this.keyboardShortcutService.resolveHistoryAction(t);if(r==="UNDO"){this.onUndo(),t.preventDefault();return}if(r==="REDO"){this.onRedo(),t.preventDefault();return}this.tryHandleOverlayKeyboardShortcut(t)&&t.preventDefault()};window.addEventListener("keydown",e,{passive:!1}),this.destroyRef.onDestroy(()=>window.removeEventListener("keydown",e))}tryHandleOverlayKeyboardShortcut(e){let t=this.keyboardShortcutService.resolveOverlayAction(e,this.rotationStep());return t?t.kind==="MOVE"?this.nudgeActiveOverlayByPixels(t.deltaXPx,t.deltaYPx):this.rotateActiveOverlayByStep(t.deltaAngle):!1}nudgeActiveOverlayByPixels(e,t){let n=this.resolveKeyboardTargetOverlay();if(!n)return!1;let r=this.getOverlayBoundingRect();if(r.width<=0||r.height<=0)return!1;let o=n.normalizedX+e/r.width,s=n.normalizedY+t/r.height;return this.setOverlayNormalizedPosition(n,o,s),!0}rotateActiveOverlayByStep(e){let t=this.resolveKeyboardTargetOverlay();return t?(this.onOverlayRotationChange({overlay:t,angle:(t.angle??0)+e}),!0):!1}resolveKeyboardTargetOverlay(){let e=this.findOverlayById(this.activeOverlayId());if(e)return e;if(this.editorMode()==="2d")return null;let t=this.overlays(),n=t.length>0?t[t.length-1]:null;return n?(this.setActiveOverlay(n),n):null}async loadFilesFromUrls(e=!1){this.preserveHistoryOnNextSvgLoad=!1;try{if(this.loading.set(!0),this.svgFileLink()){let n=await this.fileService.fetchFileAsText(this.svgFileLink());if(this.svgText.set(n),this.loadSVGFromText(n,!0),await this.applyPredesignCarryoverIfNeeded(),this.pendingSubmissionPayload)try{await this.applyEditableSubmissionPayload(this.pendingSubmissionPayload),this.pendingSubmissionPayload=null}catch(r){this.pendingSubmissionPayload=null,this.manifestLoaded=!1;let o=r instanceof Error&&r.message===Rt.submissionInvalidPayload?Rt.submissionInvalidPayload:Rt.submissionLoadFailed;this.manifestError.set(o),this.toaster.showError(o);return}}if(this.threeDFileLink()&&this.objText.set(await this.fileService.fetchFileAsText(this.threeDFileLink())),this.materialFileLink()&&this.mtlText.set(await this.fileService.fetchFileAsText(this.materialFileLink())),this.loading.set(!1),this.sdkRuntimeConfig&&!this.sdkReadyNotified){this.sdkReadyNotified=!0;let n=this.resolveProductId();n&&this.sdkRuntimeConfig.onReady?.({productId:n})}e&&setTimeout(()=>{this.threeDUI()?.rebuildSVGTexture()},0)}catch(n){if(console.error(Rt.errorLoadingFilesFromUrls,n),this.sdkRuntimeConfig){this.manifestError.set(Rt.manifestAssetsLoadFailed);let r=this.resolveProductId();r&&this.sdkRuntimeConfig.onAssetLoadFailed?.({productId:r,code:"ASSET_LOAD_FAILED",message:Rt.manifestAssetsLoadDetail})}this.loading.set(!1)}}async applyEditableSubmissionPayload(e){let t=Symbol();this.editableSubmissionCompressionToken=t,this.suspendTextureRebuild=!0,this.pendingTextureRebuildWhileSuspended=!1,this.predesignBaseSvgText.set(this.baseSvgText());let n=e.svg?.content?.trim()??"";if(!n){let r=e.svg?.contentUrl?.trim();if(!r)throw new Error(Rt.submissionInvalidPayload);n=(await this.fileService.fetchFileAsText(r)).trim()}if(!n)throw new Error(Rt.submissionInvalidPayload);try{this.loadSVGFromText(n,!1);let r=this.parseTextOverlays(e.overlays?.text??[]),o=this.parseLogoOverlays(e.overlays?.logo??[]),s=this.ensureUniqueOverlayIds([...r,...o]);this.overlays.set(s),this.hydrateEditableOverlayRuntimeDimensions(e,s),this.activeOverlayId.set(s[0]?.id??null);let a=(e.overlays?.text??[]).filter(c=>!!c?.id).map(c=>({overlayId:c.id,effectId:c.effectId??null}));if(this.personalizationState.setSelectedEffectByOverlay(a),this.appliedEditableTextEffectKeys.set(new Set),this.pendingEditableTextEffects.set(this.buildPendingEditableTextEffects(e.overlays?.text??[],s)),await this.replayPendingEditableTextEffects(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),e.background?.selectedKey&&this.backgroundState.select(e.background.selectedKey),await this.prepareEditableSubmissionAssetsFor3d(s,t),this.editableSubmissionCompressionToken!==t)return;e.pattern?.selectedUploadedPatternId&&this.patternState.setSelectedUploadedPattern(e.pattern.selectedUploadedPatternId),this.patternState.setSelectedPatternFileUrl(e.pattern?.selectedFileUrl??null);let l=(e.renderOrder??[]).filter(c=>typeof c=="string"&&c.trim().length>0);if(l.length){this.renderOrderState.enableManualOrdering(),this.renderOrderState.setStack(l);let c=this.svgDoc()?.documentElement;c&&this.renderOrderState.applyStackToSvg(c,this.renderPathAccordingLayers())}await this.syncOverlaysToSvgDoc(),this.requestTextureRebuild(),this.render2dView(),this.resetHistoryWithCurrentState("Edited submission initial state")}finally{if(this.editableSubmissionCompressionToken!==t)return;this.editableSubmissionCompressionToken=null,this.suspendTextureRebuild=!1,this.pendingTextureRebuildWhileSuspended&&(this.pendingTextureRebuildWhileSuspended=!1,this.requestTextureRebuild())}}async prepareEditableSubmissionAssetsFor3d(e,t){await Promise.all([this.compressEditableSubmissionLogoOverlaysFor3d(e,t),this.backgroundState.ensureCompressedSourcesFor3d()]),this.editableSubmissionCompressionToken===t&&this.overlays.set([...e])}async compressEditableSubmissionLogoOverlaysFor3d(e,t){let n=e.filter(oi);n.length&&await Promise.all(n.map(async r=>{let o=r.imageSrc?.trim();if(!(!o||r.imageSrc3d))try{let s=await this.imageCompressionService.compressImageToDataUrl(o);if(this.editableSubmissionCompressionToken!==t)return;r.imageSrc3d=s}catch(s){console.warn("[CustomizerUiComponent] Failed to compress editable submission logo, using original",s)}}))}parseTextOverlays(e){return e.filter(t=>!!t?.id).map(t=>({id:t.id,kind:"text",text:t.text??"",fill:t.style?.fill??"#1f2937",fontSize:Number.isFinite(t.style?.fontSize)?t.style?.fontSize:24,horizontalScale:this.normalizeOverlayScale(t.style?.horizontalScale,1),verticalScale:this.normalizeOverlayScale(t.style?.verticalScale,1),fontFamily:t.style?.fontFamily??this.defaultFontFamily(),fontWeight:t.style?.fontWeight??this.defaultFontWeight(),fontStyle:t.style?.fontStyle??this.defaultFontStyle(),letterSpacing:Number.isFinite(t.style?.letterSpacing)?t.style?.letterSpacing:this.defaultLetterSpacing(),lineHeight:Number.isFinite(t.style?.lineHeight)?t.style?.lineHeight:this.defaultLineHeight(),stroke:t.style?.stroke??qf,strokeWidth:Number.isFinite(t.style?.strokeWidth)?t.style?.strokeWidth:0,secondStroke:t.style?.secondStroke??Kf,secondStrokeWidth:Number.isFinite(t.style?.secondStrokeWidth)?t.style?.secondStrokeWidth:0,curveAmount:Number.isFinite(t.style?.curveAmount)?t.style?.curveAmount:this.defaultCurveAmount(),shadowBlur:Number.isFinite(t.style?.shadowBlur)?t.style?.shadowBlur:this.defaultShadowBlur(),shadowOffsetX:Number.isFinite(t.style?.shadowOffsetX)?t.style?.shadowOffsetX:this.defaultShadowOffsetX(),shadowOffsetY:Number.isFinite(t.style?.shadowOffsetY)?t.style?.shadowOffsetY:this.defaultShadowOffsetY(),shadowColor:t.style?.shadowColor??wm,warpEnabled:t.effects?.warp===!0,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,placementKey:t.placementKey??null,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0}))}parseLogoOverlays(e){return e.filter(t=>!!t?.id&&!!t?.imageSrc).map(t=>({id:t.id,kind:"logo",logoBlobId:t.logoBlobId??null,imageSrc:t.imageSrc,imageName:t.imageName??void 0,placementKey:t.placementKey??null,opacity:Number.isFinite(t.opacity)?t.opacity:1,lockAspectRatio:typeof t.lockAspectRatio=="boolean"?t.lockAspectRatio:!0,normalizedX:this.normalizeOverlayCoordinate(t.transform?.normalizedX,.5),normalizedY:this.normalizeOverlayCoordinate(t.transform?.normalizedY,.5),angle:Number.isFinite(t.transform?.angle)?t.transform?.angle:0,originalWidth:Number.isFinite(t.dimensions?.originalWidth)?t.dimensions?.originalWidth:0,originalHeight:Number.isFinite(t.dimensions?.originalHeight)?t.dimensions?.originalHeight:0,normalizedWidth:this.normalizeOverlayCoordinate(t.dimensions?.normalizedWidth,.2),normalizedHeight:this.normalizeOverlayCoordinate(t.dimensions?.normalizedHeight,.2)}))}hydrateEditableOverlayRuntimeDimensions(e,t){let n=new Map,r=new Map(t.filter(Et).map(s=>[s.id,s]));(e.overlays?.text??[]).forEach(s=>{if(!s?.id)return;let a=r.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})});let o=new Map(t.filter(oi).map(s=>[s.id,s]));(e.overlays?.logo??[]).forEach(s=>{if(!s?.id)return;let a=o.get(s.id);if(!a)return;let l=s.dimensions?.renderedWidth,c=s.dimensions?.renderedHeight;Number.isFinite(l)&&Number.isFinite(c)&&l>0&&c>0&&n.set(a.id,{width:l,height:c})}),this.customizerState.overlayRuntimeDimensionsPx.set(n)}normalizeOverlayCoordinate(e,t){return Number.isFinite(e)?nn.clamp(e,0,1):t}normalizeOverlayScale(e,t){return Number.isFinite(e)?nn.clamp(e,.1,8):t}buildPendingEditableTextEffects(e,t){let n=new Map(t.filter(Et).map(o=>[o.id,o])),r=[];for(let o of e){let s=o?.effectId?.trim();if(!o?.id||!s)continue;let a=n.get(o.id);a&&r.push({overlayId:a.id,placementKey:a.placementKey??o.placementKey??null,effectId:s})}return r}async replayPendingEditableTextEffects(){if(this.replayPendingEffectsInFlight)return;let e=this.pendingEditableTextEffects();if(!(!e.length||!this.hasAnyEffectDataSources())){this.replayPendingEffectsInFlight=!0;try{let t=new Map(this.overlays().map(o=>[o.id,o])),n=new Set(this.appliedEditableTextEffectKeys()),r=[];for(let o of e){let s=`${o.overlayId}::${o.effectId}`;if(n.has(s))continue;let a=t.get(o.overlayId);if(!a||!Et(a))continue;let l=this.findEffectDataSource(o.effectId,o.placementKey);if(!l){r.push(o);continue}await this.personalizationState.applyTextEffect(a,l),n.add(s)}this.appliedEditableTextEffectKeys.set(n),this.pendingEditableTextEffects.set(r)}finally{this.replayPendingEffectsInFlight=!1}}}hasAnyEffectDataSources(){return(this.personalizationItems()??[]).some(e=>(e.packs??[]).some(t=>(t.type??"").toLowerCase().includes("effect")&&(t.dataSources?.length??0)>0))}findEffectDataSource(e,t){let n=e.trim();if(!n)return null;let r=(this.personalizationItems()??[]).filter(o=>!t||o.placementKey===t).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n);return r||((this.personalizationItems()??[]).flatMap(o=>(o.packs??[]).filter(s=>(s.type??"").toLowerCase().includes("effect")).flatMap(s=>s.dataSources??[])).find(o=>o?.id===n)??null)}ensureUniqueOverlayIds(e){let t=new Map;return e.map(n=>{let r=t.get(n.id)??0;return t.set(n.id,r+1),r===0?n:ue(R({},n),{id:`${n.id}-${r}`})})}capturePredesignCarryover(e){return this.predesignCarryoverService.captureSnapshot({targetPredesignId:e,manifestLoaded:this.manifestLoaded,svgDoc:this.svgDoc(),customizations:this.customizations(),overlays:this.overlays(),backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}async applyPredesignCarryoverIfNeeded(){let e=this.pendingPredesignCarryover;if(!e)return;let t=this.selectedPredesignId();this.pendingPredesignCarryover=null,await this.predesignCarryoverService.applyIfNeeded({snapshot:e,selectedPredesignId:t,customizations:this.customizations(),personalizationItems:this.personalizationItems(),backgroundTemplates:this.backgroundImageTemplates(),overlaysState:this.overlays,activeOverlayIdState:this.activeOverlayId,backgroundState:this.backgroundState,patternState:this.patternState,patternOverlayState:this.patternOverlayState})}applyManifestData(e){this.predesignBaseSvgText.set(null),e.distributorBranding?(this.themeService.applyDistributorBranding(e.distributorBranding,{lock:!0}),this.distributorHeaderLogoUrl.set(e.distributorBranding.logoUrl??null)):(this.themeService.clearDistributorBranding(),this.distributorHeaderLogoUrl.set(null)),this.editorMode.set((e.isShowWholeLayersOption||e.pathIdAccordingLayers.length>0)&&!this.isMobile()?"both":"3d"),e.resolvedPredesignId&&this.selectedPredesignId.set(e.resolvedPredesignId),this.threeDFileLink.set(e.threeDFileLink),this.materialFileLink.set(e.materialFileLink),this.svgFileLink.set(e.svgFileLink),e.svgViewBox&&this.svgViewBox.set(e.svgViewBox),this.customizations.set(e.customizations),this.predesigns.set(e.predesigns),this.steps.set(e.steps),this.pathIdAccordingLayers.set(e.pathIdAccordingLayers),this.renderPathAccordingLayers.set(e.renderPathAccordingLayers),this.isShowWholeLayersOption.set(e.isShowWholeLayersOption),this.customizerState.setPrintAreaInches(e.printAreaWidthInches,e.printAreaHeightInches),this.personalizationState.setPlacements(e.placements),this.backgroundState.setTemplates(e.placements),this.personalizationItems.set(e.placements),e.nextActiveStepId&&!this.activeStepId()&&this.activeStepId.set(e.nextActiveStepId),this.sdkReadyNotified=!1,this.manifestLoaded=!0;let t=this.resolveProductId();this.sdkRuntimeConfig&&t&&this.sdkRuntimeConfig.onManifestLoaded?.({productId:t,manifestMeta:e.manifestMeta}),this.tryLoadFilesFromManifest(!0)}getManifestIdentityInput(){return{runtimeConfig:this.sdkRuntimeConfig,inputProductId:this.productId(),inputApiKey:this.apiKey(),fallbackProductId:this.fallbackProductId}}resolveProductId(){return this.manifestFlowService.resolveProductId(this.getManifestIdentityInput())}resolveApiKey(){return this.manifestFlowService.resolveApiKey(this.getManifestIdentityInput())}getManifestConfigSignature(){return this.manifestFlowService.buildConfigSignature(this.getManifestIdentityInput())}notifyManifestLoadFailed(e){if(!this.sdkRuntimeConfig)return;let t=this.resolveProductId();t&&this.sdkRuntimeConfig.onManifestLoadFailed?.({productId:t,code:"MANIFEST_LOAD_FAILED",message:e})}loadSVGFromText(e,t=!0){this.baseSvgText.set(e),this.svgText.set(e),this.measurementCloneDirty.set(!0),this.overlays.set([]),this.customizerState.clearAllTextGlyphPlans(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.fabricLayoutState.set(null),this.svgDimensions.set(null),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3}),this.activeOverlayId.set(null);let n=this.isShowWholeLayersOption()?null:this.pathIdAccordingLayers()[0]?.name??null;this.selectedLayerKey.set(n),this.patternState.reset(),this.patternOverlayState.reset(),this.renderOrderState.reset(),this.placementZones.set([]),this.placementZoneBounds.set(new Map),this.personalizationState.reset(),this.backgroundState.reset(),this.resetFabricViewTransform(),this.parseSVGRegions(this.svgText()),this.personalizationState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.patternState.refreshFromSvg(),this.patternOverlayState.refreshFromSvg(),this.render2dView(),this.requestTextureRebuild(),t&&!this.designHistory.isRestoring()&&this.resetHistoryWithCurrentState("Initial state")}resetHistoryWithCurrentState(e){let t=this.buildHistorySnapshot(e);this.designHistory.seed(t),this.historyInitialized=!0}scheduleHistoryCapture(e){!this.historyInitialized||this.designHistory.isRestoring()||this.historyCaptureSuspended||(this.historyDebounceHandle&&clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=setTimeout(()=>{this.designHistory.record(this.buildHistorySnapshot(e)),this.historyDebounceHandle=null},120))}setHistoryCaptureSuspended(e){this.historyCaptureSuspended=e,e&&this.historyDebounceHandle&&(clearTimeout(this.historyDebounceHandle),this.historyDebounceHandle=null)}buildHistorySnapshot(e,t){let n=t===void 0?this.selectedPredesignId():t;return{svgText:this.svgText(),overlays:JSON.parse(JSON.stringify(this.overlays()??[])),activeOverlayId:this.activeOverlayId(),selectedLayerKey:this.selectedLayerKey(),showPlacementGuides:this.showPlacementGuides(),selectedPredesignId:n,label:e,timestamp:Date.now()}}async applySnapshot(e){this.designHistory.beginRestore();try{let t=this.selectedPredesignId(),n=e.selectedPredesignId??null;if(t!==n){this.selectedPredesignId.set(n),await this.loadManifest(n);return}e.svgText?this.loadSVGFromText(e.svgText,!1):(this.svgText.set(null),this.render2dView()),this.overlays.set(JSON.parse(JSON.stringify(e.overlays??[]))),this.activeOverlayId.set(e.activeOverlayId??null),this.selectedLayerKey.set(e.selectedLayerKey??null),this.showPlacementGuides.set(!!e.showPlacementGuides),this.syncOverlaysToSvgDoc().finally(()=>{this.requestTextureRebuild(),this.render2dView()})}finally{this.designHistory.endRestore(),this.historyInitialized=!0}}onUndo(){let e=this.designHistory.undo(this.buildHistorySnapshot("undo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onRedo(){let e=this.designHistory.redo(this.buildHistorySnapshot("redo-current"));e&&(this.isUndoingRedoing.set(!0),this.applySnapshot(e))}onTwoDCanvasReady(e){this.twoDCanvasElement!==e&&(this.twoDCanvasElement=e,this.initFabricCanvases())}onTwoDCanvasDestroyed(){this.twoDCanvasElement=null,this.disposeFabricCanvases()}render2dView(){this.render2dViewAsync(),this.updatePlacementGuideVisibility()}async render2dViewAsync(){if(!this.fabricReady()||!this.fabricCanvas)return;try{await this.overlaySyncPromise()}catch{return}if(!this.svgDoc()){this.fabricCanvas.clear(),this.fabricCanvas.renderAll(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.twoDSnapRuntime.set(Fi());return}let e=this.getActiveLayerPathIds(),t=this.renderOrderState.resolveFabricVisibleOverlayIds(this.overlays()),n=this.overlays().map(s=>s.id).filter(s=>!t.has(s));this.fabricVisibleOverlayIds.set(t);let r=this.svgRenderService.buildSvgForView(this.svgDoc(),this.pathIdAccordingLayers(),e.length>0?e:void 0,{preserveOverlayIds:n}),o=e.length>0?this.getLayerPreviewBounds(e):null;this.renderSvgOnCanvas(this.fabricCanvas,r,o),this.fabricGuideState.set({lines:[]}),this.twoDSnapRuntime.set(Fi())}onLayerToggle(e){let t=this.selectedLayerKey(),n=this.isShowWholeLayersOption(),r=e===null||t===e?n?null:t:e;t!==r&&(this.selectedLayerKey.set(r),this.render2dView())}getActiveLayerPathIds(){let e=this.selectedLayerKey();if(!e)return[];let t=this.pathIdAccordingLayers().find(n=>n.name.toLowerCase()===e.toLowerCase());return t?t.actionPathIdsCsv.split(",").map(n=>n.replace("#","").trim()):[]}getAllLayerPathIds(){let e=new Set;for(let t of this.pathIdAccordingLayers())for(let n of t.actionPathIdsCsv.split(",")){let r=n.replace("#","").trim();r&&e.add(r)}return[...e]}renderSvgOnCanvas(e,t,n){let r=this.overlayFabricObjects().size>0,o=this.canvasTransform();if(!t){e.clear(),this.overlayFabricObjects.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.canvasLoadToken.set(null),e.backgroundImage=void 0,e.renderAll();return}let s=Symbol();this.canvasLoadToken.set(s),this.svgDimensions()||this.computeSvgDimensions();let a=this.getOverlayBoundingRect(),l=this.normalizePreviewBounds(n??null,a);Z3({canvas:e,svgMarkup:t,fabricViewZoom:this.fabricViewZoom(),svgViewBox:this.svgViewBox(),svgDimensions:this.svgDimensions(),targetBounds:l,baseBounds:a,loadToken:s}).then(c=>{if(!c||this.canvasLoadToken()!==c.token)return;let{image:d,transform:u,layout:f}=c;r&&o||(e.clear(),this.overlayFabricObjects.set(new Map)),e.backgroundImage=d,this.canvasTransform.set(u),this.fabricLayoutState.set(f),this.renderOverlaysOnCanvas(e),this.renderTwoDAlignmentLayers(e),e.requestRenderAll(),this.canvasLoadToken.set(null)}).catch(c=>{console.error(Rt.failedRenderSvgOnCanvas,c),this.canvasLoadToken.set(null)})}createOverlayTextObject(e,t,n){let r=this.getCachedTextGlyphPlan(e);if(!r)return this.ensureTextGlyphPlan(e),this.overlayFabricObjects().get(e.id);let o=this.getTextGlyphPlanSignature(e),s=this.getTextLayoutSignature(e),a=this.overlayFabricObjects().get(e.id);if(a){let x=a.textPlanSignature,_=a.layoutSignature;if(x===o&&_===s)return this.applyShadowToFabricGroup(a,e),a}a&&(t.getActiveObject()===a&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(a),this.overlayFabricObjects.update(x=>{let _=new Map(x);return _.delete(e.id),_}));let l=this.getOrBuildTextLayout(e,r);if(!l.length)return null;let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,g=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0,m=(x,_,E,D,A)=>{let S=new As(x.d,{fill:e.fill,stroke:_,strokeWidth:E,strokeLineJoin:"round",strokeLineCap:"round",paintFirst:D,originX:"center",originY:"center",left:x.x,angle:x.angle,strokeUniform:!0});return S.outlineLayer=A,S},b=[];l.forEach(x=>{g>0&&b.push(m(x,e.fill,g,"stroke","faux-bold"));let _=h>0?p+(d>0?u:0):0;_>0&&b.push(m(x,f??void 0,_,"stroke","secondary-stroke"));let E=d>0?u:0;b.push(m(x,c??void 0,E,E>0?"stroke":"fill","primary-stroke"))});let y=new Yo(b,{originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,centeredRotation:!0,lockScalingFlip:!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)});return y.set("lockUniScaling",e.lockAspectRatio??!0),y.set("skewX",e.fontStyle==="italic"?-12:0),y.set("skewY",0),y.dataOverlayId=e.id,y.textPlanSignature=o,y.layoutSignature=s,this.applyShadowToFabricGroup(y,e),y.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,y),this.constrainOverlayWithinView(e,y)}),y.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,y),this.constrainOverlayWithinView(e,y)}),y.on("modified",()=>{this.twoDSnapRuntime.set(Fi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let x=this.resolveOverlayForFabricObject(y);x&&Et(x)&&this.finalizeOverlayFromFabric(x,y)}),y.on("mousedown",()=>{let x=this.resolveOverlayForFabricObject(y);x&&this.setActiveOverlay(x)}),y.on("selected",()=>{let x=this.resolveOverlayForFabricObject(y);x&&this.setActiveOverlay(x)}),this.overlayFabricObjects.update(x=>{let _=new Map(x);return _.set(e.id,y),_}),t.add(y),this.activeOverlayId()===e.id&&t.setActiveObject(y),t.requestRenderAll(),y}ensureLogoFabricObject(e,t){let n=this.overlayFabricObjects().get(e.id);if(n){if(n.dataImageSrc!==e.imageSrc)t.getActiveObject()===n&&this.discardActiveObjectWithoutSelectionClear(t),t.remove(n),this.overlayFabricObjects.update(s=>{let a=new Map(s);return a.delete(e.id),a});else return this.syncFabricObjectWithOverlay(e,n),this.activeOverlayId()===e.id&&t.setActiveObject(n),n;this.pendingLogoLoads.update(s=>{let a=new Map(s);return a.delete(e.id),a}),t.getObjects().includes(n)&&t.requestRenderAll()}let r=Symbol();return this.pendingLogoLoads.update(o=>{let s=new Map(o);return s.set(e.id,r),s}),Br.fromURL(e.imageSrc).then(o=>{this.pendingLogoLoads().get(e.id)===r&&(o.set({originX:"center",originY:"center",selectable:!0,evented:!0,centeredScaling:!0,lockScalingFlip:!0,lockUniScaling:e.lockAspectRatio??!0,hoverCursor:"move",padding:6,transparentCorners:!1,cornerStyle:"circle",cornerColor:"#6366f1",borderColor:"#6366f1",cornerSize:12}),o.dataOverlayId=e.id,o.dataImageSrc=e.imageSrc,o.on("moving",()=>{this.twoDDraggingOverlayId.set(e.id),this.applySmartAlignmentForFabricMove(e,o),this.constrainOverlayWithinView(e,o)}),o.on("scaling",()=>{this.publishOverlayRuntimeDimensions(e.id,o),this.constrainOverlayWithinView(e,o)}),o.on("modified",()=>{this.twoDSnapRuntime.set(Fi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides();let s=this.resolveOverlayForFabricObject(o);s&&oi(s)&&this.finalizeOverlayFromFabric(s,o)}),o.on("mousedown",()=>{let s=this.resolveOverlayForFabricObject(o);s&&this.setActiveOverlay(s)}),o.on("selected",()=>{let s=this.resolveOverlayForFabricObject(o);s&&this.setActiveOverlay(s)}),this.overlayFabricObjects.update(s=>{let a=new Map(s);return a.set(e.id,o),a}),t.add(o),this.syncFabricObjectWithOverlay(e,o),this.constrainOverlayWithinView(e,o),this.applyFabricStackByOverlayOrder(t),this.activeOverlayId()===e.id&&t.setActiveObject(o),t.requestRenderAll())}).finally(()=>{this.pendingLogoLoads().get(e.id)===r&&this.pendingLogoLoads.update(o=>{let s=new Map(o);return s.delete(e.id),s})}),null}renderOverlaysOnCanvas(e){let t=this.canvasTransform();if(!t){e.requestRenderAll();return}this.renderPlacementGuides(e);let n=new Set;this.overlays().forEach(o=>{if(this.fabricVisibleOverlayIds().has(o.id)&&this.overlayMatchesLayer(o,this.selectedLayerKey()))if(Et(o)){if(o.text.trim().length===0)return;let s=this.overlayFabricObjects().get(o.id),a=this.getTextGlyphPlanSignature(o),l=this.getTextLayoutSignature(o),c=!s||s.textPlanSignature!==a||s.layoutSignature!==l,d=c?this.createOverlayTextObject(o,e,t):s;d&&(!c&&d instanceof Yo&&(this.applyShadowToFabricGroup(d,o),d.layoutSignature=l,d.textPlanSignature=a),this.syncFabricObjectWithOverlay(o,d),this.activeOverlayId()===o.id&&e.setActiveObject(d),n.add(o.id))}else oi(o)&&this.ensureLogoFabricObject(o,e)&&n.add(o.id)}),Array.from(this.overlayFabricObjects().entries()).forEach(([o,s])=>{n.has(o)||(e.getActiveObject()===s&&this.discardActiveObjectWithoutSelectionClear(e),e.remove(s),this.overlayFabricObjects.update(a=>{let l=new Map(a);return l.delete(o),l}))}),this.applyFabricStackByOverlayOrder(e);let r=this.activeOverlayId();if(r){let o=this.overlayFabricObjects().get(r);o&&e.setActiveObject(o)}e.requestRenderAll()}applyFabricStackByOverlayOrder(e){this.overlays().forEach(r=>{if(!this.fabricVisibleOverlayIds().has(r.id)||!this.overlayMatchesLayer(r,this.selectedLayerKey())||Et(r)&&r.text.trim().length===0)return;let o=this.overlayFabricObjects().get(r.id);o&&e.bringObjectToFront(o)});let t=this.fabricGridState();t.horizontal.forEach(r=>e.bringObjectToFront(r)),t.vertical.forEach(r=>e.bringObjectToFront(r)),this.fabricGuideState().lines.forEach(r=>e.bringObjectToFront(r))}updatePlacementGuideVisibility(){let e=this.fabricCanvas,t=this.canvasTransform();!e||!t||(this.renderPlacementGuides(e),e.requestRenderAll(),this.threeDUI()?.currentObject()&&this.requestTextureRebuild())}renderPlacementGuides(e){let t=this.canvasTransform();if(!t){this.clearPlacementGuides(e);return}let n=this.placementZones().map(o=>({placementKey:o.placementKey,allowedKinds:o.allowedKinds,bounds:o.bounds})),r=J3(e,{show:this.showPlacementGuides()&&n.length>0,transform:t,zones:n,state:{objects:this.placementGuideObjects()}});this.placementGuideObjects.set(r.objects)}clearPlacementGuides(e){this.placementGuideObjects().size&&(jT(e,this.placementGuideObjects()),this.placementGuideObjects.set(new Map))}renderTwoDAlignmentLayers(e){let t=this.activeOverlay(),n=t?this.overlayFabricObjects().get(t.id):null,r=n?.left??null,o=n?.top??null,s=this.twoDCursorCanvasPoint()}clearTwoDSmartGuides(){this.fabricCanvas&&this.fabricGuideState.set(VT(this.fabricCanvas,this.fabricGuideState()))}applySmartAlignmentForFabricMove(e,t){let n=this.fabricCanvas;if(!n)return;let r=t.left??0,o=t.top??0;if(this.twoDCursorCanvasPoint.set({x:r,y:o}),!this.snapEnabled()){this.twoDSnapRuntime.set(Fi()),this.clearTwoDSmartGuides();return}let s=Math.max((t.getScaledWidth()||0)/2,1),a=Math.max((t.getScaledHeight()||0)/2,1),l={id:e.id,cx:r,cy:o,halfW:s,halfH:a},c=this.overlays().filter(f=>f.id!==e.id).map(f=>this.overlayFabricObjects().get(f.id)).filter(f=>!!f).map(f=>({id:f?.dataOverlayId,cx:f.left??0,cy:f.top??0,halfW:Math.max((f.getScaledWidth()||0)/2,1),halfH:Math.max((f.getScaledHeight()||0)/2,1)})),d=this.getTwoDGridStepPx(),u=Ox({x:r,y:o},l,c,{x:n.getWidth()/2,y:n.getHeight()/2},{snapEnabled:this.snapEnabled(),snapToGrid:this.gridEnabled(),gridStepX:d.x,gridStepY:d.y,tolerance:Wr.TWO_D_SNAP_TOLERANCE_PX},this.twoDSnapRuntime());this.twoDSnapRuntime.set(u.state),t.set({left:u.x,top:u.y}),t.setCoords(),this.fabricGuideState.set(j3(n,u.guides,this.fabricGuideState(),n.getWidth(),n.getHeight()))}resolveOverlayForFabricObject(e){let t=e?.dataOverlayId;return t?this.findOverlayById(t)??null:null}syncFabricObjectWithOverlay(e,t){let n=this.canvasTransform();if(!n)return;let r=this.getOverlayBoundingRect(),o=r.x+e.normalizedX*r.width,s=r.y+e.normalizedY*r.height,a=n.offsetX+o*n.scale,l=n.offsetY+s*n.scale;if(Et(e)){let c=this.resolveStrokeColor(e),d=e.strokeWidth??0,u=d*n.scale,f=this.resolveSecondStrokeColor(e),h=e.secondStrokeWidth??0,p=h*n.scale,v=this.getShadowCanvasShift(e,n),g=a+v.x,m=l+v.y,b=t;b.getObjects().forEach(y=>{if(y instanceof As){let x=y.outlineLayer,_,E=0,D="fill";if(x==="faux-bold"){let A=e.fontWeight==="bold"&&e.fontSize?Math.max(e.fontSize*.06*n.scale,.8*n.scale):0;_=e.fill,E=A,D=A>0?"stroke":"fill"}else x==="secondary-stroke"?(_=f??void 0,E=h>0?p+(d>0?u:0):0,D=E>0?"stroke":"fill"):(_=c??void 0,E=d>0?u:0,D=E>0?"stroke":"fill");y.set({fill:e.fill,stroke:_,strokeWidth:E,paintFirst:D,strokeUniform:!0}),y.dirty=!0}}),b.dirty=!0,b.set({originX:"center",originY:"center",angle:e.angle??0,scaleX:n.scale*this.normalizeOverlayScale(e.horizontalScale,1),scaleY:n.scale*this.normalizeOverlayScale(e.verticalScale,1)}),b.set("lockUniScaling",e.lockAspectRatio??!0),b.setPositionByOrigin(new oe(g,m),"center","center"),this.applyShadowToFabricGroup(b,e),b.setCoords(),this.publishOverlayRuntimeDimensions(e.id,b);return}if(oi(e)){let c=t,d=e.normalizedWidth*r.width,u=e.normalizedHeight*r.height,f=Math.max(c.width??d,1),h=Math.max(c.height??u,1),p=d*n.scale/f,v=u*n.scale/h;c.set({originX:"center",originY:"center",angle:e.angle??0,lockUniScaling:e.lockAspectRatio??!0,scaleX:p,scaleY:v,opacity:e.opacity??1}),c.setPositionByOrigin(new oe(a,l),"center","center"),c.setCoords(),this.publishOverlayRuntimeDimensions(e.id,c)}}applyShadowToFabricGroup(e,t){let n=this.resolveShadowSettings(t);this.overlayStyleService.applyShadowToFabricGroup(e,n)}finalizeOverlayFromFabric(e,t){let n=this.canvasTransform(),r=this.getOverlayBoundingRect();if(!n||r.width<=0||r.height<=0)return;let o=t.left??n.offsetX,s=t.top??n.offsetY;if(Et(e)){let f=this.getShadowCanvasShift(e,n);o-=f.x,s-=f.y}let a=(o-n.offsetX)/n.scale,l=(s-n.offsetY)/n.scale,c=(a-r.x)/r.width,d=(l-r.y)/r.height,u=this.clampNormalizedToPlacementZone(e,c,d);if(e.normalizedX=u.x,e.normalizedY=u.y,e.angle=this.normalizeAngle(t.angle??0),Et(e)){let f=t,h=Math.abs(f.scaleX??n.scale),p=Math.abs(f.scaleY??h),v=n.scale||1,g=this.normalizeOverlayScale(h/v,1),m=this.normalizeOverlayScale(p/v,g);if(e.lockAspectRatio??!0){let b=this.normalizeOverlayScale((g+m)/2,1);g=b,m=b}if(e.horizontalScale=g,e.verticalScale=m,this.customizerState.clearTextGlyphPlan(e.id),e.placementKey){let b=this.applyPlacementZoneTextBounds(R({},e));Object.assign(e,b)}}else if(oi(e)){let f=t.getScaledWidth()||0,h=t.getScaledHeight()||0,p=f/n.scale,v=h/n.scale;if(e.lockAspectRatio??!0){let g=Math.max(e.normalizedWidth,.02)*r.width,m=Math.max(e.normalizedHeight,.02)*r.height,b=g>0?p/g:1,y=m>0?v/m:b,x=this.normalizeOverlayScale((b+y)/2,1);e.normalizedWidth=Math.min(Math.max(Math.max(e.normalizedWidth,.02)*x,.02),1),e.normalizedHeight=Math.min(Math.max(Math.max(e.normalizedHeight,.02)*x,.02),1)}else p>0&&(e.normalizedWidth=Math.min(Math.max(p/r.width,.02),1)),v>0&&(e.normalizedHeight=Math.min(Math.max(v/r.height,.02),1));if(typeof t.opacity=="number"&&(e.opacity=t.opacity),e.placementKey){let g=this.applyPlacementZoneLogoBounds(R({},e));Object.assign(e,g)}}this.commitOverlayUpdate(),this.customizerState.clearOverlayRuntimeDimensions(e.id),this.syncFabricObjectWithOverlay(e,t),t.canvas?.requestRenderAll()}publishOverlayRuntimeDimensions(e,t){let n=this.canvasTransform();if(!n||n.scale<=0)return;let r=Math.max((t.getScaledWidth()||0)/n.scale,1),o=Math.max((t.getScaledHeight()||0)/n.scale,1);this.customizerState.setOverlayRuntimeDimensionsPx(e,r,o)}constrainOverlayWithinView(e,t){let n=this.canvasTransform();if(!n)return;let o=(e.placementKey?this.personalizationState.getPlacementZoneBoundsByKey(e.placementKey):null)??this.getOverlayBoundingRect(),s=(t.getScaledWidth()||0)/2,a=(t.getScaledHeight()||0)/2,l=n.offsetX+o.x*n.scale+s,c=n.offsetX+(o.x+o.width)*n.scale-s,d=n.offsetY+o.y*n.scale+a,u=n.offsetY+(o.y+o.height)*n.scale-a,f=Math.min(Math.max(t.left??l,l),c),h=Math.min(Math.max(t.top??d,d),u);t.set({left:f,top:h}),t.setCoords()}getOverlayBoundingRect(){let e=this.getBaseBoundingBox();!this.svgDimensions()&&!e&&this.computeSvgDimensions();let t=this.svgDimensions(),n=this.svgViewBox(),r=t?{width:t.width,height:t.height,x:n.minX,y:n.minY}:null;return Dx(e,r)}getOverlayCenterPoint(e){let t=this.getOverlayBoundingRect();return{x:t.x+e.normalizedX*t.width,y:t.y+e.normalizedY*t.height}}overlayMatchesLayer(e,t){if(e.placementKey||!t)return!0;let n=this.resolveLayerDefinition(t);if(!n)return!0;let r=this.getOverlayCenterPoint(e),o=!1;for(let s of n.actionPathIdsCsv){let a=this.getLayerBoundsById(s);if(a&&(o=!0,this.pointInsideBounds(r,a)))return!0}return!o}resolveLayerDefinition(e){return this.layerBoundsService.resolveLayerDefinition(e,this.pathIdAccordingLayers())}getLayerBoundsById(e){let t=this.layerBoundsService.resolveLayerBoundsById({pathId:e,svgDoc:this.svgDoc(),svgText:this.svgText(),layerBoundsCache:this.layerBoundsCache(),measurementRoot:this.svgText()?this.ensureMeasurementSvgClone():null});return t.nextCache&&this.layerBoundsCache.set(t.nextCache),t.bounds}combineBoundsForPathIds(e){let t=e.map(n=>this.getLayerBoundsById(n));return this.layerBoundsService.combineBounds(t)}getLayerPreviewBounds(e){if(e.length===0)return null;let t=this.getOverlayBoundingRect();if(t.width<=0||t.height<=0)return null;let n=this.combineBoundsForPathIds(e);return this.layerBoundsService.getLayerPreviewBounds(t,n)}normalizePreviewBounds(e,t){return this.layerBoundsService.normalizePreviewBounds(e,t)}pointInsideBounds(e,t){return this.layerBoundsService.pointInsideBounds(e,t)}readElementBounds(e){return this.layerBoundsService.readElementBounds(e)}ensureMeasurementSvgClone(){return this.customizerState.ensureMeasurementSvgClone(this.svgText)}refreshPlacementZonesFromSvg(){this.personalizationState.refreshFromSvg()}clampNormalizedToPlacementZone(e,t,n){return this.personalizationState.clampNormalizedToPlacementZone(e,t,n)}applyPlacementZoneTextBounds(e){return this.personalizationState.applyPlacementZoneTextBounds(e)}applyPlacementZoneLogoBounds(e){return this.personalizationState.applyPlacementZoneLogoBounds(e)}resolveOverlayLabel(e){return this.personalizationState.resolveOverlayLabel(e)}setActiveOverlay(e){if(!e){this.activeOverlayId.set(null),this.customizerState.setActiveOverlay(null),this.fabricCanvas&&this.fabricCanvas.getActiveObject()&&(this.fabricCanvas.discardActiveObject(),this.fabricCanvas.requestRenderAll()),this.threeDUI()?.rebuildSVGTexture();return}this.activeOverlayId.set(e.id),this.customizerState.setActiveOverlay(e),this.threeDUI()?.rebuildSVGTexture();let t=this.overlayFabricObjects().get(e.id);this.fabricCanvas&&t&&this.fabricCanvas.getActiveObject()!==t&&(this.fabricCanvas.setActiveObject(t),this.fabricCanvas.requestRenderAll())}findOverlayById(e){return e?this.overlays().find(t=>t.id===e)??null:null}async commitOverlayUpdate(){this.overlays.set([...this.overlays()]),await this.syncOverlaysToSvgDoc(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}onRenderOrderMoveTowardFront(e){let t=this.renderOrderState.moveInStack(e,-1);t&&this.applyRenderStackChange(t)}onRenderOrderMoveTowardBack(e){let t=this.renderOrderState.moveInStack(e,1);t&&this.applyRenderStackChange(t)}onRenderOrderReorder(e){let t=this.renderOrderState.reorderInStack(e);t&&this.applyRenderStackChange(t)}onRenderOrderSelect(e){let[t,n]=this.renderOrderState.parseRenderItemId(e);if(t!=="overlay")return;let r=this.findOverlayById(n);r&&this.setActiveOverlay(r)}async applyRenderStackChange(e){if(this.renderOrderState.enableManualOrdering(),!this.renderOrderState.setStack(e))return;let t=this.renderOrderState.syncOverlayOrderFromStack(this.overlays(),e);t!==this.overlays()&&this.overlays.set(t),await this.syncOverlaysToSvgDoc();let n=this.svgDoc();n&&this.customizerState.markSvgMutated(n),this.patternOverlayState.refreshFromSvg(),this.backgroundState.refreshFromSvg(),this.customizerState.refreshFabricOverlays(),this.requestTextureRebuild()}synchronizeRenderOrderStack(){let e=this.renderOrderState.buildCatalog({svgDoc:this.svgDoc(),overlays:this.overlays(),patternOverlays:this.patternOverlayState.state().overlays,backgroundTemplates:this.backgroundImageTemplates(),backgroundImages:this.backgroundState.state().images,renderLayers:this.renderPathAccordingLayers(),placementNameByKey:this.buildPlacementNameByKeyMap()});this.renderOrderState.synchronizeStack(e,this.svgDoc(),this.renderPathAccordingLayers())}applyRenderOrderStackToSvg(e){return this.renderOrderState.applyStackToSvg(e,this.renderPathAccordingLayers())}buildPlacementNameByKeyMap(){return this.personalizationItems().reduce((e,t)=>(t?.placementKey&&e.set(t.placementKey,t.name??t.placementKey),e),new Map)}resolveFontFamily(e){let t=e.fontFamily,n=t&&t.trim().length>0?t:this.defaultFontFamily(),r=this.fontSourceMap()[n]?n:this.defaultFontFamily();return this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()),r}resolveFontWeight(e){return e.fontWeight??this.defaultFontWeight()}resolveFontStyle(e){return e.fontStyle??this.defaultFontStyle()}resolveLetterSpacing(e){let t=e.letterSpacing;return Number.isFinite(t)?t:this.defaultLetterSpacing()}resolveStrokeColor(e){if(!((e.strokeWidth??0)>0))return null;let n=e.stroke;return n&&n.trim().length>0?n:qf}resolveSecondStrokeColor(e){if(!((e.secondStrokeWidth??0)>0))return null;let n=e.secondStroke;return n&&n.trim().length>0?n:Kf}resolveCurveAmount(e){let t=e.curveAmount;return Number.isFinite(t)?t:this.defaultCurveAmount()}resolveCurveControlY(e){let t=this.resolveCurveAmount(e)/100,n=e.fontSize||this.minFontSize();return t*n}shadowDefaults(){return{blur:this.defaultShadowBlur(),offsetX:this.defaultShadowOffsetX(),offsetY:this.defaultShadowOffsetY(),color:this.defaultShadowColor()}}resolveShadowSettings(e){return this.overlayStyleService.resolveShadowSettings(e,this.shadowDefaults())}getShadowCanvasShift(e,t){let n=this.resolveShadowSettings(e);return this.overlayStyleService.getShadowCanvasShift(n,t?.scale??1)}getTextGlyphPlanSignature(e){return[e.text,this.resolveFontFamily(e),this.resolveFontWeight(e),this.resolveFontStyle(e),e.fontSize,this.resolveLetterSpacing(e)].join("|")}getTextLayoutSignature(e){let t=e.warpEnvelope??null,n=e.warpEnabled&&t?`warp:on:${t.viewBox.minX},${t.viewBox.minY},${t.viewBox.width},${t.viewBox.height}|${t.topPathD}|${t.bottomPathD}`:"warp:off",r=(e.secondStrokeWidth??0)>0?"1":"0";return`${this.getTextGlyphPlanSignature(e)}|curve:${this.resolveCurveAmount(e)}|${n}|ss:${r}`}async computeTextGlyphPlan(e){let t=await this.resolveOpentypeFont(e);return this.textLayoutService.computeTextGlyphPlan(e,{font:t,letterSpacing:this.resolveLetterSpacing(e)})}async getOrBuildTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);if(n)return n;let r=await this.computeTextGlyphPlan(e);return r&&this.customizerState.storeTextGlyphPlan(e.id,t,r),r}getCachedTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e),n=this.customizerState.getTextGlyphPlanIfFresh(e.id,t);return n||(this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e)),null)}ensureTextGlyphPlan(e){let t=this.getTextGlyphPlanSignature(e);this.customizerState.queueTextGlyphPlanBuild(e.id,t,this.computeTextGlyphPlan(e))}getOrBuildTextLayout(e,t){let n=this.getTextLayoutSignature(e),r=this.customizerState.textLayoutCache().get(e.id);if(r&&r.signature===n)return r.layout.map(s=>R({},s));let o=this.textLayoutService.buildTextLayoutFromPlan(e,t,this.textLayoutCtx(e));return this.customizerState.textLayoutCache.update(s=>{var a=new Map(s);return a.set(e.id,{signature:n,layout:o}),a}),o.map(s=>R({},s))}textLayoutCtx(e){let t=e.warpEnvelope??null;return{shouldApplyWarp:!!(e.warpEnabled&&t),textWarpEnvelope:t,curveControlY:this.resolveCurveControlY(e)}}ingestFontPacks(e){let t=R({},WT),n=new Map;this.builtInFontOptions().forEach(({label:o,value:s},a)=>{n.set(s,{label:o,value:s,position:a})}),e.forEach(o=>{(o.packs??[]).filter(a=>(a.type??"").toLowerCase().includes("font")).forEach(a=>{(a.dataSources??[]).forEach(l=>{if(!l||l.isActive===!1)return;let c=(l.fontFamily??l.name??"").trim();if(!c)return;let d=this.resolveFontSource(l);d&&(t[c]=d,n.has(c)||n.set(c,{label:(l.name??c).trim()||c,value:c,position:l.position??n.size+1}))})})});let r=[...n.values()].sort((o,s)=>o.position-s.position).map(({label:o,value:s})=>({label:o,value:s}));this.fontSourceMap.set(t),this.fontOptions.set(r),this.queueInitialFontFaceLoads(r)}queueInitialFontFaceLoads(e){let t=new Set,n=this.defaultFontFamily().trim();if(n&&t.add(n),this.overlays().filter(Et).forEach(r=>{let o=r.fontFamily?.trim();o&&t.add(o)}),!t.size){let r=e[0]?.value?.trim();r&&t.add(r)}t.forEach(r=>this.fontAssetService.queueFontFaceLoad(r,this.fontDeps()))}fontDeps(){return{isBrowser:this.isBrowser,fontSourceMap:this.fontSourceMap,fontFacesReady:this.fontFacesReady,fontFacePromises:this.fontFacePromises,fontBinaryPromises:this.fontBinaryPromises,fontOutlinePromises:this.fontOutlinePromises,defaultFontFamily:this.defaultFontFamily}}resolveFontSource(e){let t=e?.fontUrl?.trim?.();return t||(e?.fileUrl?.trim?.()?e.fileUrl:null)}resolveOpentypeFont(e){return this.fontAssetService.resolveOpentypeFont(e,this.fontDeps())}normalizeFontSize(e){if(!Number.isFinite(e))return this.minFontSize();let t=Math.round(e);return Math.min(this.maxFontSize(),Math.max(this.minFontSize(),t))}normalizeAngle(e){if(!Number.isFinite(e))return 0;let t=e%360;return t>180?t-=360:t<=-180&&(t+=360),Math.round(t*10)/10}activeOverlay(){let e=this.findOverlayById(this.activeOverlayId());return e&&this.overlayMatchesLayer(e,this.selectedLayerKey())?e:null}onOverlayPositionChange(e){this.setOverlayNormalizedPosition(e.overlay,e.normalizedX,e.normalizedY)}onOverlayRotationChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;t.angle=this.normalizeAngle(e.angle),this.commitOverlayUpdate();let n=this.overlayFabricObjects().get(t.id);n&&(this.syncFabricObjectWithOverlay(t,n),n.canvas?.requestRenderAll())}onOverlayResizeChange(e){let t=this.findOverlayById(e.overlay.id);if(!t)return;let n=R({},t);if(this.customizerState.clearOverlayRuntimeDimensions(n.id),Et(t)&&"fontSize"in e&&(n=ue(R({},n),{fontSize:this.normalizeFontSize(e.fontSize)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(R({},n)))),Et(t)&&"horizontalScale"in e&&"verticalScale"in e&&(n=ue(R({},n),{horizontalScale:this.normalizeOverlayScale(e.horizontalScale,1),verticalScale:this.normalizeOverlayScale(e.verticalScale,1)}),this.customizerState.clearTextGlyphPlan(n.id),n.placementKey&&(n=this.applyPlacementZoneTextBounds(R({},n)))),oi(t)&&"normalizedWidth"in e&&"normalizedHeight"in e){if(t.lockAspectRatio??!0){let l=Math.max(t.normalizedWidth,.02),c=Math.max(t.normalizedHeight,.02),d=Math.max(e.normalizedWidth,.02)/l,u=Math.max(e.normalizedHeight,.02)/c,f=Math.max((d+u)/2,.02);n=ue(R({},n),{normalizedWidth:Math.min(Math.max(l*f,.02),1),normalizedHeight:Math.min(Math.max(c*f,.02),1)})}else n=ue(R({},n),{normalizedWidth:Math.min(Math.max(e.normalizedWidth,.02),1),normalizedHeight:Math.min(Math.max(e.normalizedHeight,.02),1)});n.placementKey&&(n=this.applyPlacementZoneLogoBounds(R({},n)))}let r=this.overlays(),o=r.findIndex(l=>l.id===n.id);if(o<0)return;let s=[...r];s[o]=n,this.overlays.set(s),this.customizerState.setActiveOverlay(n),this.commitOverlayUpdate();let a=this.overlayFabricObjects().get(n.id);a&&(this.syncFabricObjectWithOverlay(n,a),a.canvas?.requestRenderAll())}setOverlayNormalizedPosition(e,t,n){this.setActiveOverlay(e);let{x:r,y:o}=this.clampNormalizedToPlacementZone(e,t,n);if(Math.abs(r-e.normalizedX)<1e-4&&Math.abs(o-e.normalizedY)<1e-4)return;e.normalizedX=r,e.normalizedY=o,this.commitOverlayUpdate();let s=this.overlayFabricObjects().get(e.id);s&&(this.syncFabricObjectWithOverlay(e,s),s.canvas?.requestRenderAll())}syncOverlaysToSvgDoc(){let e=this.executeOverlaySync();return this.overlaySyncPromise.set(e.catch(t=>{throw console.error(Rt.overlaySyncFailed,t),t})),this.overlaySyncPromise()}async buildSvgText(e,t){if(!this.svgDoc())return;let n=this.svgDoc()?.documentElement;if(!n)return;let r=this.svgRenderService.ensureDefsElement(this.svgDoc());if(!r)return;this.svgRenderService.clearOverlayFilterDefs(r),Array.from(n.querySelectorAll('[data-overlay="true"]')).forEach(l=>{l.parentNode?.removeChild(l)});let o=n.querySelector("#OverlayLayer");o&&!o.childNodes.length&&o.parentNode?.removeChild(o),this.svgDimensions()||this.computeSvgDimensions();let s=n.namespaceURI||Ci,a=this.getOverlayBoundingRect();for(let l of this.overlays()){let c=a.x+l.normalizedX*a.width,d=a.y+l.normalizedY*a.height;if(Et(l)){if(l.text.trim().length===0)continue;try{let u=await this.getOrBuildTextGlyphPlan(l);if(!u||u.glyphs.length===0)continue;let f=this.getOrBuildTextLayout(l,u);if(!f.length)continue;let h=this.resolveStrokeColor(l),p=l.strokeWidth??0,v=this.resolveSecondStrokeColor(l),g=l.secondStrokeWidth??0,m=this.resolveShadowSettings(l);this.svgRenderService.appendTextOverlayAsPath({overlay:l,layout:f,center:{x:c,y:d},overlayContainer:n,defs:r,svgDoc:this.svgDoc(),strokeColor:h,strokeWidth:p,secondStrokeColor:v,secondStrokeWidth:g,shadowSettings:m})}catch(u){console.error(F3(l.id),u)}continue}if(oi(l)){let u=l.normalizedWidth*a.width,f=l.normalizedHeight*a.height;if(u<=0||f<=0)continue;let h=c-u/2,p=d-f/2,v=this.svgDoc().createElementNS(s,"image");v.setAttribute("id",l.id),v.setAttribute("data-overlay","true"),v.setAttribute("x",`${h}`),v.setAttribute("y",`${p}`),v.setAttribute("width",`${u}`),v.setAttribute("height",`${f}`),v.setAttribute("preserveAspectRatio","none"),l.opacity!==void 0&&v.setAttribute("opacity",`${l.opacity}`);let g;e==="compressed"?g=l.imageSrc3d||l.imageSrc:g=l.imageSrc;let m=await this.resolveSvgImageHref(g);v.setAttribute("href",m);let b=l.angle??0;Math.abs(b)>.01&&v.setAttribute("transform",`rotate(${b} ${c} ${d})`),l.imageName&&v.setAttribute("data-source-name",l.imageName),n.appendChild(v)}}this.synchronizeRenderOrderStack(),this.applyRenderOrderStackToSvg(n),await this.backgroundState.syncBackgroundsToSvgWithQuality(e),t.set(new XMLSerializer().serializeToString(this.svgDoc())),this.measurementCloneDirty.set(!0)}async executeOverlaySyncForView(){return this.buildSvgText("compressed",this.svgText)}async executeOverlaySyncForExport(){return this.buildSvgText("original",this.svgTextForExport)}async executeOverlaySync(){return this.executeOverlaySyncForView()}async resolveSvgImageHref(e){let t=e?.trim()??"";if(!t)return"";if(t.startsWith("data:"))return t;let n=this.svgImageHrefCache.get(t);if(n)return n;let r=this.svgImageHrefPending.get(t);if(r)return r;let o=this.convertImageUrlToDataUrl(t).then(s=>{let a=s||t;return this.svgImageHrefCache.set(t,a),a}).finally(()=>{this.svgImageHrefPending.delete(t)});return this.svgImageHrefPending.set(t,o),o}async convertImageUrlToDataUrl(e){try{let t=await fetch(e,{mode:"cors",credentials:"omit"});if(!t.ok)return null;let n=await t.blob();return!n||n.size===0?null:await this.blobToDataUrl(n)}catch{return null}}blobToDataUrl(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let o=r.result;if(typeof o=="string"){t(o);return}n(new Error("Unable to convert blob to data URL."))},r.onerror=()=>n(r.error??new Error("FileReader failed.")),r.readAsDataURL(e)})}computeSvgDimensions(){if(!this.svgDoc()){this.svgDimensions.set(null);return}let e=this.svgDoc()?.documentElement;if(!e){this.svgDimensions.set(null);return}let t=e.getAttribute("viewBox");if(t){let a=t.split(/[\s,]+/).map(l=>Number.parseFloat(l)).filter(l=>Number.isFinite(l));if(a.length===4){let[l,c,d,u]=a;if(d>0&&u>0){this.svgDimensions.set({width:d,height:u}),this.svgViewBox.set({minX:l,minY:c,width:d,height:u});return}}}let n=e.getAttribute("width"),r=e.getAttribute("height"),o=n?Number.parseFloat(n):NaN,s=r?Number.parseFloat(r):NaN;if(Number.isFinite(o)&&Number.isFinite(s)&&o>0&&s>0){this.svgDimensions.set({width:o,height:s}),this.svgViewBox.set({minX:0,minY:0,width:o,height:s});return}this.svgDimensions.set({width:1e3,height:1e3}),this.svgViewBox.set({minX:0,minY:0,width:1e3,height:1e3})}requestTextureRebuild(){if(this.svgText()){if(this.suspendTextureRebuild){this.pendingTextureRebuildWhileSuspended=!0;return}this.textureUpdateScheduled()||(this.textureUpdateScheduled.set(!0),requestAnimationFrame(()=>{this.overlaySyncPromise().catch(()=>{}).finally(()=>{this.textureUpdateScheduled.set(!1),this.svgText()&&this.threeDUI()?.rebuildSVGTexture()})}))}}getBaseElement(){return this.svgDoc()?this.baseElementCache()?this.baseElementCache():this.svgDoc()?.documentElement:null}getBaseBoundingBox(){if(this.baseBBoxCache())return this.baseBBoxCache();let e=this.getBaseElement();if(!e||!(e instanceof SVGGraphicsElement))return null;try{return e.getBBox()}catch{return null}}invalidateBaseCaches(){this.customizerState.invalidateBaseCaches(()=>this.refreshPlacementZonesFromSvg())}disposeFabricCanvases(){this.fabricCanvas&&(this.clearPlacementGuides(this.fabricCanvas),this.fabricGridState.set(z3(this.fabricCanvas,this.fabricGridState())),this.fabricGuideState.set(VT(this.fabricCanvas,this.fabricGuideState())),this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null)),this.placementGuideObjects.set(new Map),this.fabricReady.set(!1),this.overlayFabricObjects.set(new Map),this.pendingLogoLoads.set(new Map),this.canvasTransform.set(null),this.resetFabricViewTransform(),this.fabricLayoutState.set(null),this.twoDSnapRuntime.set(Fi()),this.twoDCursorCanvasPoint.set(null),this.twoDDraggingOverlayId.set(null)}initFabricCanvases(){if(!this.twoDCanvasElement){this.disposeFabricCanvases();return}this.setupFabricCanvasInstance(this.twoDCanvasElement)}setupFabricCanvasInstance(e){this.fabricCanvas&&(this.fabricCanvasCleanup?.(),this.fabricCanvasCleanup=null,this.fabricCanvasSyncDimensions=null,this.fabricCanvas=null,this.customizerState.fabricCanvasState.set(null));let{canvas:t,events:n,cleanup:r,syncDimensions:o}=q3(e),s=h=>{let v=h.detail?.overlayId;if(!v)return;let g=this.findOverlayById(v);g&&this.setActiveOverlay(g)},a=()=>{this.fabricSelectionClearSuppressionCount>0||(this.activeOverlayId.set(null),this.twoDSnapRuntime.set(Fi()),this.twoDDraggingOverlayId.set(null),this.clearTwoDSmartGuides())},l=h=>{let g=(h.detail?.deltaY??0)<0?1.08:.92;this.updateFabricViewZoom(g)},c=h=>{let v=h.detail?.multiplier;!Number.isFinite(v)||v<=0||this.updateFabricViewZoom(v)},d=()=>{this.render2dView()},u=h=>{let v=h.detail;!v||!Number.isFinite(v.x)||!Number.isFinite(v.y)||this.twoDCursorCanvasPoint.set({x:v.x,y:v.y})};n.addEventListener(ri.OVERLAY_SELECT,s),n.addEventListener(ri.SELECTION_CLEARED,a),n.addEventListener(ri.WHEEL,l),n.addEventListener(ri.PINCH,c),n.addEventListener(ri.POINTER_MOVE,u),n.addEventListener(ri.RESIZE,d);let f=()=>{n.removeEventListener(ri.OVERLAY_SELECT,s),n.removeEventListener(ri.SELECTION_CLEARED,a),n.removeEventListener(ri.WHEEL,l),n.removeEventListener(ri.PINCH,c),n.removeEventListener(ri.POINTER_MOVE,u),n.removeEventListener(ri.RESIZE,d),r()};this.fabricCanvasCleanup=f,this.fabricCanvasSyncDimensions=o,this.fabricCanvas=t,this.customizerState.fabricCanvasState.set(t),t.on("after:render",h=>{if(this.gridEnabled()){let p=h.ctx,v=t.viewportTransform;if(p&&v){let g=this.getTwoDGridStepPx(),m=this.getTwoDGridMajorStepPx();G3(p,t.getWidth(),t.getHeight(),v,g.x,g.y,m.x,m.y)}}}),this.fabricReady.set(!0),this.render2dView()}discardActiveObjectWithoutSelectionClear(e){this.fabricSelectionClearSuppressionCount+=1;try{e.discardActiveObject()}finally{queueMicrotask(()=>{this.fabricSelectionClearSuppressionCount=Math.max(0,this.fabricSelectionClearSuppressionCount-1)})}}resetFabricViewTransform(){this.fabricViewZoom.set(1),this.fabricCanvas&&this.fabricCanvas.setViewportTransform([1,0,0,1,0,0])}updateFabricViewZoom(e){let t=nn.clamp(this.fabricViewZoom()*e,this.minFabricViewZoom(),this.maxFabricViewZoom());Math.abs(t-this.fabricViewZoom())<.001||(this.fabricViewZoom.set(t),this.applyFabricViewZoom()||this.render2dView())}applyFabricViewZoom(){if(!this.fabricCanvas||!this.canvasTransform()||!this.fabricLayoutState())return!1;let{baseScale:e,targetBounds:t,canvasWidth:n,canvasHeight:r,pxPerUnit:o}=this.fabricLayoutState(),s=e*this.fabricViewZoom(),a=t.width*s,l=t.height*s,c=(n-a)/2-t.x*s,d=(r-l)/2-t.y*s,u=s/(o||1);this.canvasTransform.set({scale:s,offsetX:c,offsetY:d});let f=this.fabricCanvas.backgroundImage;return f&&f.set({left:c,top:d,scaleX:u,scaleY:u,originX:"left",originY:"top",selectable:!1,evented:!1}),this.renderOverlaysOnCanvas(this.fabricCanvas),this.fabricCanvas.requestRenderAll(),!0}ngOnDestroy(){this.disposeFabricCanvases(),this.twoDCanvasElement=null,this.measurementService.disposeMeasurementHost(this.measurementHost),this.measurementSvgRoot.set(null),this.customizerState.resetWarpResources()}parseSVGRegions(e){let t=new DOMParser;this.svgDoc.set(t.parseFromString(e,Qo)),this.invalidateBaseCaches(),this.computeSvgDimensions(),this.backgroundState.refreshFromSvg(),this.refreshPlacementZonesFromSvg()}async exportCurrentSvg(){if(!this.svgDoc()){console.warn(Rt.noSvgLoadedToExport);return}this.downloadCurrentSvgSnapshot()}async onSaveDesignClick(){if(!this.svgDoc()){this.toaster.showError(Rt.noSvgDocumentLoaded);return}this.designSavingInProgress.set(!0),this.designSaveMessage.set("Preparing design\u2026");try{await this.syncOverlaysToSvgDoc(),await this.executeOverlaySyncForExport();let t=this.svgTextForExport();if(!t){this.toaster.showError(Rt.failedToSerializeSvg);return}let n=this.buildDesignExportPayload(t),r=JSON.stringify(n,null,2),o=this.fileService.createJsonFile(r,I3),s=this.resolveApiKey(),a=this.resolveProductId();if(!s){this.toaster.showError(Rt.missingApiKey);return}this.designSaveMessage.set("Generating preview images\u2026");let l;try{l=await this.generateSubmissionThumbnails()}catch(u){let f=u instanceof Error?u.message:Rt.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}let c,d=l.map(u=>u.view);try{let u=Date.now();c=l.map(f=>this.dataUrlToPngFile(f.dataUrl,f.view,u))}catch(u){let f=u instanceof Error?u.message:Rt.failedGenerateSubmissionThumbnails;this.toaster.showError(f);return}this.designSaveMessage.set("Uploading design\u2026");try{let u=await uc(this.submissionApi.createSubmission(o,s,a??void 0,d,c));if(!u?.isSuccess||!u?.data){let h=u?.errors?.[0]??Rt.designSubmissionFailed;this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:h,errors:u?.errors??void 0}),this.toaster.showError(h);return}let f=u.data;this.sdkRuntimeConfig?.onSubmissionSuccess?.({productId:a??void 0,previews:this.mapSubmissionPreviewUrls(f),submissionNumber:f.submissionNumber,personalizationPlacements:f.personalizationPlacements}),this.toaster.showSuccess(k3(f.submissionNumber),Rt.designSubmittedTitle)}catch{this.sdkRuntimeConfig?.onSubmissionFailed?.({productId:a??void 0,views:d,message:Rt.designSubmissionFailed}),this.toaster.showError(Rt.designSubmissionFailed)}}finally{this.designSavingInProgress.set(!1),this.designSaveMessage.set(null)}}async onResetDesignClick(){let e=this.predesignBaseSvgText()||this.baseSvgText();if(!e){this.toaster.showError("No design loaded to reset to");return}if((await this.dialogService.showDialog({type:"confirmation",title:"Reset Design",message:"Are you sure you want to reset all customizations?",subtitle:"This will remove all applied customizations and revert to the current base design.",buttons:[{label:"Cancel",action:"cancel"},{label:"Reset",action:"confirm",isPrimary:!0,isDestructive:!0}]})).action==="confirm")try{this.loadSVGFromText(e,!0),this.toaster.showSuccess("All customizations have been reset")}catch(n){let r=n instanceof Error?n.message:"Failed to reset design";this.toaster.showError(r)}}onExitClick(){this.sdkRuntimeConfig?.onClose?.()}async generateSubmissionThumbnails(){let e=this.svgDoc();if(!e)throw new Error(Rt.noSvgDesignLoaded);await this.syncOverlaysToSvgDoc();let t=this.svgRenderService.serializeSvg(e);if(!t)throw new Error(Rt.failedSerializeSvgForThumbnail);let n=this.objText();if(!n)throw new Error(Rt.no3dModelForThumbnail);let r=this.mtlText();try{let o={type:"text",value:t},s={type:"text",value:n},a=r?{type:"text",value:r}:void 0,l=await this.threeThumbnailService.generateThumbnails(o,s,a,this.materialFileLink());if(!l.length)throw new Error(Rt.noThumbnailsGenerated);return this.normalizeSubmissionThumbnails(l)}catch(o){throw o instanceof Error?o:new Error(Rt.failedGenerateThumbnails)}}normalizeSubmissionThumbnails(e){let t=new Map,n=new Set(this.submissionThumbnailViews);if(e.forEach(r=>{n.has(r.view)&&(t.has(r.view)||t.set(r.view,r))}),t.size!==this.submissionThumbnailViews.length)throw new Error(Rt.invalidSubmissionThumbnails);return this.submissionThumbnailViews.map(r=>t.get(r))}dataUrlToPngFile(e,t,n=Date.now()){let r=/^data:(image\/png);base64,(.+)$/i.exec(e);if(!r)throw new Error(Rt.failedGenerateSubmissionThumbnails);let o=r[1],s=atob(r[2]),a=new Uint8Array(s.length);for(let l=0;l<s.length;l+=1)a[l]=s.charCodeAt(l);return new File([a],`preview-${t}-${n}.png`,{type:o})}mapSubmissionPreviewUrls(e){return(e.previews??[]).map(t=>({viewType:t.viewType,url:t.url,width:t.width,height:t.height})).filter(t=>!!t.url)}get getSvgTextForFinal(){return this.svgText()?this.sanitizer.bypassSecurityTrustHtml(this.svgText()):null}onTwoDZoomIn(){this.updateFabricViewZoom(1.1)}onTwoDZoomOut(){this.updateFabricViewZoom(.9)}onTwoDReset(){this.resetFabricViewTransform(),this.updateFabricViewZoom(1),this.render2dView()}onGridToggle(){this.gridEnabled.update(e=>!e)}onSnapToggle(){this.snapEnabled.update(e=>!e)}onGuidesToggle(){this.showPlacementGuides.update(e=>!e)}onGridSizeChange(e){let t=Number(e);if(!Number.isFinite(t))return;let n=Math.max(0,Math.min(1,t));this.gridRatio.set(n)}getTwoDGridStepPx(){let e=this.canvasTransform(),t=this.twoDGridStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}getTwoDGridMajorStepPx(){let e=this.canvasTransform(),t=this.twoDGridMajorStepPx();return e?.scale&&e.scale>0?{x:Math.max(t.x*e.scale,1),y:Math.max(t.y*e.scale,1)}:t}onTwoDGridSizeChange(e){let t=Number(e);Number.isFinite(t)&&this.twoDGridSizeInches.set(Math.max(.25,Math.min(4,t)))}setActiveStep(e){this.activeStepId.set(e)}downloadCurrentSvgSnapshot(){let e=this.serializeCurrentSvgSnapshot();return e?(this.svgRenderService.downloadSvg(e,`${P3}-${Date.now()}.svg`),e):null}serializeCurrentSvgSnapshot(){let e=this.svgRenderService.serializeSvg(this.svgDoc());return e||null}buildDesignExportPayload(e){let t=this.svgDoc();if(!t)return{};let n=this.overlays().reduce((o,s)=>{let a=this.personalizationState.getSelectedEffectIdForOverlay(s.id);return a&&o.set(s.id,a),o},new Map),r=this.collectOverlayDimensionsPxById(this.overlays());return this.designExportService.buildDesignExportPayload({selectedPredesignId:this.selectedPredesignId(),svgDoc:t,svgString:e,overlays:this.overlays(),personalizationItems:this.personalizationItems(),placementZones:this.placementZones(),placementNameByKey:this.buildPlacementNameByKeyMap(),backgroundState:this.backgroundState.state(),backgroundImageTemplates:this.backgroundImageTemplates(),patternState:this.patternState.state(),patternOverlays:this.patternOverlayState.state().overlays,renderOrder:this.renderOrderState.stack(),svgDimensions:this.svgDimensions(),svgViewBox:this.svgViewBox(),bounds:this.getOverlayBoundingRect(),overlayDimensionsPxById:r,selectedEffectIdByOverlay:n,textStyleResolvers:{defaultFontFamily:this.defaultFontFamily(),defaultFontWeight:this.defaultFontWeight(),defaultFontStyle:this.defaultFontStyle(),defaultLetterSpacing:this.defaultLetterSpacing(),defaultStrokeColor:qf,defaultSecondStrokeColor:Kf,defaultCurveAmount:this.defaultCurveAmount(),defaultLineHeight:this.defaultLineHeight(),defaultShadowBlur:this.defaultShadowBlur(),defaultShadowOffsetX:this.defaultShadowOffsetX(),defaultShadowOffsetY:this.defaultShadowOffsetY(),defaultShadowColor:this.defaultShadowColor()}})}collectOverlayDimensionsPxById(e){let t=new Map;return e.forEach(n=>{let r=this.personalizationState.getOverlayDimensionsPx(n);if(r.width>0&&r.height>0){t.set(n.id,{width:r.width,height:r.height});return}let o=this.customizerState.overlayRuntimeDimensionsPx().get(n.id);o&&o.width>0&&o.height>0&&t.set(n.id,{width:o.width,height:o.height})}),t}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=at({type:i,selectors:[["app-customizer-ui"]],viewQuery:function(t,n){t&1&&nl(n.threeDUI,Coe,5),t&2&&Oc()},hostBindings:function(t,n){t&1&&ie("click",function(){return n.closeShortcuts()},PC)("resize",function(){return n.onResize()},IC)},inputs:{apiKey:[1,"apiKey"],productId:[1,"productId"],submissionNumber:[1,"submissionNumber"],predesignId:[1,"predesignId"]},decls:22,vars:8,consts:[["threeDUI",""],[1,"header"],[1,"flex","items-center","justify-between"],[1,"brand"],["alt","Distributor logo",1,"brand-logo-img",3,"src"],[1,"header-right"],["type","button","title","Exit and close the customizer",1,"btn-exit",3,"click","disabled"],["type","button","title","Reset all customizations to the current predesign base",1,"btn-reset",3,"click","disabled"],["type","button",1,"btn-save",3,"click","disabled"],[1,"header-bottom"],[3,"valueChange","value"],["value","3d"],[1,"manifest-loader-overlay"],[1,"save-loader-overlay"],[1,"flex","editor-main-box",3,"mobile-panel-hidden","mobile-canvas-hidden"],["value","2d"],["value","both"],[3,"message"],["role","alert",1,"manifest-error-card"],[1,"manifest-error-title"],[1,"manifest-error-message"],["type","button",1,"manifest-retry-btn"],["type","button",1,"manifest-retry-btn",3,"click"],[3,"message","subtitle"],[1,"flex","editor-main-box"],[1,"main-canvas-area","flex-1"],[1,"view-section"],[3,"layerToggle","canvasReady","canvasDetached","zoomIn","zoomOut","resetView","onUndo","onRedo","svgText","isActive","layers","selectedLayerKey","isShowAllLayersOption","gridEnabled","snapEnabled","showPlacementGuides","gridSize"],[1,"canvas-area","canvas-area-single"],[1,"jersey-model"],[1,"w-full",3,"svgText","isActive","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap"],["role","status","aria-live","polite",1,"canvas-manifest-loader"],[1,"right-panel-shell"],[1,"right-panel"],[1,"text-sm","text-surface-500"],[1,""],[1,"icon-nav-shell"],[1,"panel-icon-nav"],[1,"mobile-actions-bar"],["type","button",1,"mobile-panel-toggle"],["type","button",1,"mobile-canvas-toggle"],[1,"expanded-nav-menu"],[1,"icon-nav-list"],[1,"icon-btn",3,"active"],[1,"icon-btn","toggle-more-btn"],[1,"w-full",3,"svgTextChange","svgDimensionsChange","svgViewBoxChange","showPlacementGuidesChange","placementZonesChange","overlaysChange","activeOverlayIdChange","activeOverlayChange","overlayPositionChange","overlayRotationChange","overlayResizeChange","onUndo","onRedo","svgText","isActive","mtlText","objText","materialSourceUrl","svgDimensions","overlayBounds","printAreaWidthInches","printAreaHeightInches","gridSizeInches","svgViewBox","showPlacementGuides","placementZones","overlays","activeOverlayId","gridEnabled","snapEnabled","gridSize"],[1,"shortcuts-wrap",3,"click"],["title","Keyboard Shortcuts",1,"shortcuts-fab",3,"click"],[1,"ri-keyboard-line"],[1,"shortcuts-popover"],[1,"shortcuts-popover-header"],[1,"canvas-manifest-loader-subtitle"],[1,"panel-content"],[1,"panel-header"],[1,"panel-scroll-body"],[3,"predesigns","selectedId"],[3,"items"],[3,"items","useAccordion"],[3,"templates"],[3,"items","activeOverlayId"],[3,"gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[3,"designSelected","predesigns","selectedId"],[3,"moveTowardFront","moveTowardBack","reorder","selectItem","items","activeOverlayId"],[3,"onGridToggle","onSnapToggle","onGuidesToggle","onTwoDGridSizeChange","gridEnabled","snapEnabled","showPlacementGuides","gridRatio","editorMode","threeDGridSizeNormalized","twoDGridSizeInches"],[1,"text-gray-900"],[1,"child-accordion",3,"value"],[3,"value"],[1,"flex","items-center","gap-2"],[1,"child-panel"],["type","button",1,"mobile-panel-toggle",3,"click"],[1,"ri-arrow-down-s-line"],[1,"ri-arrow-up-s-line"],["type","button",1,"mobile-canvas-toggle",3,"click"],[1,"ri-fullscreen-line"],[1,"icon-btn","expanded-btn",3,"active"],[1,"icon-btn","expanded-btn",3,"click"],[3,"class"],[1,"w-full"],[1,"icon-btn",3,"click"],[1,"icon-btn","toggle-more-btn",3,"click"],[1,"ri-close-line"],[1,"ri-more-fill"]],template:function(t,n){t&1&&(w(0,"header",1)(1,"div",2)(2,"div",3),pe(3,woe,1,1,"img",4),T(),w(4,"div",5)(5,"button",6),ie("click",function(){return n.onExitClick()}),k(6," Exit "),T(),w(7,"button",7),ie("click",function(){return n.onResetDesignClick()}),k(8," Reset "),T(),w(9,"button",8),ie("click",function(){return n.onSaveDesignClick()}),k(10),T()()(),w(11,"div",9)(12,"app-ui-tabs",10),tp("valueChange",function(o){return bs(n.editorMode,o)||(n.editorMode=o),o}),w(13,"app-ui-tablist")(14,"app-ui-tab",11),k(15,"3D Editor"),T(),pe(16,Eoe,4,0),T()()()(),pe(17,Moe,2,1,"div",12)(18,Doe,7,2,"div",12)(19,Ioe,2,2,"div",13)(20,gse,27,32,"div",14),Y(21,"app-generic-dialog")),t&2&&(P(3),me(n.distributorHeaderLogoUrl()?3:-1),P(2),ne("disabled",n.designSavingInProgress()),P(2),ne("disabled",n.designSavingInProgress()),P(2),ne("disabled",n.designSavingInProgress()),P(),zt(" ",n.designSavingInProgress()?"Saving\u2026":"Save Design"," "),P(2),Rc("value",n.editorMode),P(4),me(n.isShowWholeLayersOption()||n.layers().length>0?16:-1),P(),me(n.showBlockingManifestLoader()?17:n.showBlockingManifestError()?18:n.designSavingInProgress()?19:20))},dependencies:[qt,fo,kx,Rx,Jl,i_,r_,o_,a_,l_,c_,u_,lh,C_,S_,Ni,bi,gr,mr,h_,p_,m_,k_,d_],styles:[`@layer properties;@layer theme,utilities;@layer theme{:root,:host{--color-gray-300: oklch(87.2% .01 258.338);--color-gray-700: oklch(37.3% .034 259.733);--color-gray-900: oklch(21% .034 264.665);--color-white: #fff;--spacing: .25rem;--text-sm: .875rem;--text-sm--line-height: calc(1.25 / .875);--font-weight-medium: 500;--ease-in-out: cubic-bezier(.4, 0, .2, 1);--animate-spin: spin 1s linear infinite;--default-transition-duration: .15s;--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1)}}@layer utilities{.visible{visibility:visible}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border-width:0}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.container{width:100%}@media(width>=40rem){.container{max-width:40rem}}@media(width>=48rem){.container{max-width:48rem}}@media(width>=64rem){.container{max-width:64rem}}@media(width>=80rem){.container{max-width:80rem}}@media(width>=96rem){.container{max-width:96rem}}.mt-3{margin-top:calc(var(--spacing) * 3)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing) * 2)}.h-full{height:100%}.w-2{width:calc(var(--spacing) * 2)}.w-full{width:100%}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.resize{resize:both}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-2{gap:calc(var(--spacing) * 2)}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:calc(infinity * 1px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-300{border-color:var(--color-gray-300)}.bg-white{background-color:var(--color-white)}.object-center{object-position:center}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-1{padding-block:calc(var(--spacing) * 1)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading, var(--text-sm--line-height))}.font-medium{--tw-font-weight: var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-gray-700{color:var(--color-gray-700)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.shadow{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 var(--tw-shadow-color, rgb(0 0 0 / .05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease, var(--default-transition-timing-function));transition-duration:var(--tw-duration, var(--default-transition-duration))}.ease-in-out{--tw-ease: var(--ease-in-out);transition-timing-function:var(--ease-in-out)}}@font-face{font-family:remixicon;src:url("./media/remixicon.eot?t=1769685282643");src:url("./media/remixicon.eot?t=1769685282643#iefix") format("embedded-opentype"),url("./media/remixicon.woff2?t=1769685282643") format("woff2"),url("./media/remixicon.woff?t=1769685282643") format("woff"),url("./media/remixicon.ttf?t=1769685282643") format("truetype"),url("./media/remixicon.svg?t=1769685282643#remixicon") format("svg");font-display:swap}[class^=ri-],[class*=" ri-"]{font-family:remixicon!important;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-xl{font-size:1.5em;line-height:.6666em;vertical-align:-.075em}.ri-xxs{font-size:.5em}.ri-xs{font-size:.75em}.ri-sm{font-size:.875em}.ri-1x{font-size:1em}.ri-2x{font-size:2em}.ri-3x{font-size:3em}.ri-4x{font-size:4em}.ri-5x{font-size:5em}.ri-6x{font-size:6em}.ri-7x{font-size:7em}.ri-8x{font-size:8em}.ri-9x{font-size:9em}.ri-10x{font-size:10em}.ri-fw{text-align:center;width:1.25em}.ri-24-hours-fill:before{content:"\\ea01"}.ri-24-hours-line:before{content:"\\ea02"}.ri-4k-fill:before{content:"\\ea03"}.ri-4k-line:before{content:"\\ea04"}.ri-a-b:before{content:"\\ea05"}.ri-account-box-fill:before{content:"\\ea06"}.ri-account-box-line:before{content:"\\ea07"}.ri-account-circle-fill:before{content:"\\ea08"}.ri-account-circle-line:before{content:"\\ea09"}.ri-account-pin-box-fill:before{content:"\\ea0a"}.ri-account-pin-box-line:before{content:"\\ea0b"}.ri-account-pin-circle-fill:before{content:"\\ea0c"}.ri-account-pin-circle-line:before{content:"\\ea0d"}.ri-add-box-fill:before{content:"\\ea0e"}.ri-add-box-line:before{content:"\\ea0f"}.ri-add-circle-fill:before{content:"\\ea10"}.ri-add-circle-line:before{content:"\\ea11"}.ri-add-fill:before{content:"\\ea12"}.ri-add-line:before{content:"\\ea13"}.ri-admin-fill:before{content:"\\ea14"}.ri-admin-line:before{content:"\\ea15"}.ri-advertisement-fill:before{content:"\\ea16"}.ri-advertisement-line:before{content:"\\ea17"}.ri-airplay-fill:before{content:"\\ea18"}.ri-airplay-line:before{content:"\\ea19"}.ri-alarm-fill:before{content:"\\ea1a"}.ri-alarm-line:before{content:"\\ea1b"}.ri-alarm-warning-fill:before{content:"\\ea1c"}.ri-alarm-warning-line:before{content:"\\ea1d"}.ri-album-fill:before{content:"\\ea1e"}.ri-album-line:before{content:"\\ea1f"}.ri-alert-fill:before{content:"\\ea20"}.ri-alert-line:before{content:"\\ea21"}.ri-aliens-fill:before{content:"\\ea22"}.ri-aliens-line:before{content:"\\ea23"}.ri-align-bottom:before{content:"\\ea24"}.ri-align-center:before{content:"\\ea25"}.ri-align-justify:before{content:"\\ea26"}.ri-align-left:before{content:"\\ea27"}.ri-align-right:before{content:"\\ea28"}.ri-align-top:before{content:"\\ea29"}.ri-align-vertically:before{content:"\\ea2a"}.ri-alipay-fill:before{content:"\\ea2b"}.ri-alipay-line:before{content:"\\ea2c"}.ri-amazon-fill:before{content:"\\ea2d"}.ri-amazon-line:before{content:"\\ea2e"}.ri-anchor-fill:before{content:"\\ea2f"}.ri-anchor-line:before{content:"\\ea30"}.ri-ancient-gate-fill:before{content:"\\ea31"}.ri-ancient-gate-line:before{content:"\\ea32"}.ri-ancient-pavilion-fill:before{content:"\\ea33"}.ri-ancient-pavilion-line:before{content:"\\ea34"}.ri-android-fill:before{content:"\\ea35"}.ri-android-line:before{content:"\\ea36"}.ri-angularjs-fill:before{content:"\\ea37"}.ri-angularjs-line:before{content:"\\ea38"}.ri-anticlockwise-2-fill:before{content:"\\ea39"}.ri-anticlockwise-2-line:before{content:"\\ea3a"}.ri-anticlockwise-fill:before{content:"\\ea3b"}.ri-anticlockwise-line:before{content:"\\ea3c"}.ri-app-store-fill:before{content:"\\ea3d"}.ri-app-store-line:before{content:"\\ea3e"}.ri-apple-fill:before{content:"\\ea3f"}.ri-apple-line:before{content:"\\ea40"}.ri-apps-2-fill:before{content:"\\ea41"}.ri-apps-2-line:before{content:"\\ea42"}.ri-apps-fill:before{content:"\\ea43"}.ri-apps-line:before{content:"\\ea44"}.ri-archive-drawer-fill:before{content:"\\ea45"}.ri-archive-drawer-line:before{content:"\\ea46"}.ri-archive-fill:before{content:"\\ea47"}.ri-archive-line:before{content:"\\ea48"}.ri-arrow-down-circle-fill:before{content:"\\ea49"}.ri-arrow-down-circle-line:before{content:"\\ea4a"}.ri-arrow-down-fill:before{content:"\\ea4b"}.ri-arrow-down-line:before{content:"\\ea4c"}.ri-arrow-down-s-fill:before{content:"\\ea4d"}.ri-arrow-down-s-line:before{content:"\\ea4e"}.ri-arrow-drop-down-fill:before{content:"\\ea4f"}.ri-arrow-drop-down-line:before{content:"\\ea50"}.ri-arrow-drop-left-fill:before{content:"\\ea51"}.ri-arrow-drop-left-line:before{content:"\\ea52"}.ri-arrow-drop-right-fill:before{content:"\\ea53"}.ri-arrow-drop-right-line:before{content:"\\ea54"}.ri-arrow-drop-up-fill:before{content:"\\ea55"}.ri-arrow-drop-up-line:before{content:"\\ea56"}.ri-arrow-go-back-fill:before{content:"\\ea57"}.ri-arrow-go-back-line:before{content:"\\ea58"}.ri-arrow-go-forward-fill:before{content:"\\ea59"}.ri-arrow-go-forward-line:before{content:"\\ea5a"}.ri-arrow-left-circle-fill:before{content:"\\ea5b"}.ri-arrow-left-circle-line:before{content:"\\ea5c"}.ri-arrow-left-down-fill:before{content:"\\ea5d"}.ri-arrow-left-down-line:before{content:"\\ea5e"}.ri-arrow-left-fill:before{content:"\\ea5f"}.ri-arrow-left-line:before{content:"\\ea60"}.ri-arrow-left-right-fill:before{content:"\\ea61"}.ri-arrow-left-right-line:before{content:"\\ea62"}.ri-arrow-left-s-fill:before{content:"\\ea63"}.ri-arrow-left-s-line:before{content:"\\ea64"}.ri-arrow-left-up-fill:before{content:"\\ea65"}.ri-arrow-left-up-line:before{content:"\\ea66"}.ri-arrow-right-circle-fill:before{content:"\\ea67"}.ri-arrow-right-circle-line:before{content:"\\ea68"}.ri-arrow-right-down-fill:before{content:"\\ea69"}.ri-arrow-right-down-line:before{content:"\\ea6a"}.ri-arrow-right-fill:before{content:"\\ea6b"}.ri-arrow-right-line:before{content:"\\ea6c"}.ri-arrow-right-s-fill:before{content:"\\ea6d"}.ri-arrow-right-s-line:before{content:"\\ea6e"}.ri-arrow-right-up-fill:before{content:"\\ea6f"}.ri-arrow-right-up-line:before{content:"\\ea70"}.ri-arrow-up-circle-fill:before{content:"\\ea71"}.ri-arrow-up-circle-line:before{content:"\\ea72"}.ri-arrow-up-down-fill:before{content:"\\ea73"}.ri-arrow-up-down-line:before{content:"\\ea74"}.ri-arrow-up-fill:before{content:"\\ea75"}.ri-arrow-up-line:before{content:"\\ea76"}.ri-arrow-up-s-fill:before{content:"\\ea77"}.ri-arrow-up-s-line:before{content:"\\ea78"}.ri-artboard-2-fill:before{content:"\\ea79"}.ri-artboard-2-line:before{content:"\\ea7a"}.ri-artboard-fill:before{content:"\\ea7b"}.ri-artboard-line:before{content:"\\ea7c"}.ri-article-fill:before{content:"\\ea7d"}.ri-article-line:before{content:"\\ea7e"}.ri-aspect-ratio-fill:before{content:"\\ea7f"}.ri-aspect-ratio-line:before{content:"\\ea80"}.ri-asterisk:before{content:"\\ea81"}.ri-at-fill:before{content:"\\ea82"}.ri-at-line:before{content:"\\ea83"}.ri-attachment-2:before{content:"\\ea84"}.ri-attachment-fill:before{content:"\\ea85"}.ri-attachment-line:before{content:"\\ea86"}.ri-auction-fill:before{content:"\\ea87"}.ri-auction-line:before{content:"\\ea88"}.ri-award-fill:before{content:"\\ea89"}.ri-award-line:before{content:"\\ea8a"}.ri-baidu-fill:before{content:"\\ea8b"}.ri-baidu-line:before{content:"\\ea8c"}.ri-ball-pen-fill:before{content:"\\ea8d"}.ri-ball-pen-line:before{content:"\\ea8e"}.ri-bank-card-2-fill:before{content:"\\ea8f"}.ri-bank-card-2-line:before{content:"\\ea90"}.ri-bank-card-fill:before{content:"\\ea91"}.ri-bank-card-line:before{content:"\\ea92"}.ri-bank-fill:before{content:"\\ea93"}.ri-bank-line:before{content:"\\ea94"}.ri-bar-chart-2-fill:before{content:"\\ea95"}.ri-bar-chart-2-line:before{content:"\\ea96"}.ri-bar-chart-box-fill:before{content:"\\ea97"}.ri-bar-chart-box-line:before{content:"\\ea98"}.ri-bar-chart-fill:before{content:"\\ea99"}.ri-bar-chart-grouped-fill:before{content:"\\ea9a"}.ri-bar-chart-grouped-line:before{content:"\\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\\ea9d"}.ri-bar-chart-line:before{content:"\\ea9e"}.ri-barcode-box-fill:before{content:"\\ea9f"}.ri-barcode-box-line:before{content:"\\eaa0"}.ri-barcode-fill:before{content:"\\eaa1"}.ri-barcode-line:before{content:"\\eaa2"}.ri-barricade-fill:before{content:"\\eaa3"}.ri-barricade-line:before{content:"\\eaa4"}.ri-base-station-fill:before{content:"\\eaa5"}.ri-base-station-line:before{content:"\\eaa6"}.ri-basketball-fill:before{content:"\\eaa7"}.ri-basketball-line:before{content:"\\eaa8"}.ri-battery-2-charge-fill:before{content:"\\eaa9"}.ri-battery-2-charge-line:before{content:"\\eaaa"}.ri-battery-2-fill:before{content:"\\eaab"}.ri-battery-2-line:before{content:"\\eaac"}.ri-battery-charge-fill:before{content:"\\eaad"}.ri-battery-charge-line:before{content:"\\eaae"}.ri-battery-fill:before{content:"\\eaaf"}.ri-battery-line:before{content:"\\eab0"}.ri-battery-low-fill:before{content:"\\eab1"}.ri-battery-low-line:before{content:"\\eab2"}.ri-battery-saver-fill:before{content:"\\eab3"}.ri-battery-saver-line:before{content:"\\eab4"}.ri-battery-share-fill:before{content:"\\eab5"}.ri-battery-share-line:before{content:"\\eab6"}.ri-bear-smile-fill:before{content:"\\eab7"}.ri-bear-smile-line:before{content:"\\eab8"}.ri-behance-fill:before{content:"\\eab9"}.ri-behance-line:before{content:"\\eaba"}.ri-bell-fill:before{content:"\\eabb"}.ri-bell-line:before{content:"\\eabc"}.ri-bike-fill:before{content:"\\eabd"}.ri-bike-line:before{content:"\\eabe"}.ri-bilibili-fill:before{content:"\\eabf"}.ri-bilibili-line:before{content:"\\eac0"}.ri-bill-fill:before{content:"\\eac1"}.ri-bill-line:before{content:"\\eac2"}.ri-billiards-fill:before{content:"\\eac3"}.ri-billiards-line:before{content:"\\eac4"}.ri-bit-coin-fill:before{content:"\\eac5"}.ri-bit-coin-line:before{content:"\\eac6"}.ri-blaze-fill:before{content:"\\eac7"}.ri-blaze-line:before{content:"\\eac8"}.ri-bluetooth-connect-fill:before{content:"\\eac9"}.ri-bluetooth-connect-line:before{content:"\\eaca"}.ri-bluetooth-fill:before{content:"\\eacb"}.ri-bluetooth-line:before{content:"\\eacc"}.ri-blur-off-fill:before{content:"\\eacd"}.ri-blur-off-line:before{content:"\\eace"}.ri-body-scan-fill:before{content:"\\eacf"}.ri-body-scan-line:before{content:"\\ead0"}.ri-bold:before{content:"\\ead1"}.ri-book-2-fill:before{content:"\\ead2"}.ri-book-2-line:before{content:"\\ead3"}.ri-book-3-fill:before{content:"\\ead4"}.ri-book-3-line:before{content:"\\ead5"}.ri-book-fill:before{content:"\\ead6"}.ri-book-line:before{content:"\\ead7"}.ri-book-marked-fill:before{content:"\\ead8"}.ri-book-marked-line:before{content:"\\ead9"}.ri-book-open-fill:before{content:"\\eada"}.ri-book-open-line:before{content:"\\eadb"}.ri-book-read-fill:before{content:"\\eadc"}.ri-book-read-line:before{content:"\\eadd"}.ri-booklet-fill:before{content:"\\eade"}.ri-booklet-line:before{content:"\\eadf"}.ri-bookmark-2-fill:before{content:"\\eae0"}.ri-bookmark-2-line:before{content:"\\eae1"}.ri-bookmark-3-fill:before{content:"\\eae2"}.ri-bookmark-3-line:before{content:"\\eae3"}.ri-bookmark-fill:before{content:"\\eae4"}.ri-bookmark-line:before{content:"\\eae5"}.ri-boxing-fill:before{content:"\\eae6"}.ri-boxing-line:before{content:"\\eae7"}.ri-braces-fill:before{content:"\\eae8"}.ri-braces-line:before{content:"\\eae9"}.ri-brackets-fill:before{content:"\\eaea"}.ri-brackets-line:before{content:"\\eaeb"}.ri-briefcase-2-fill:before{content:"\\eaec"}.ri-briefcase-2-line:before{content:"\\eaed"}.ri-briefcase-3-fill:before{content:"\\eaee"}.ri-briefcase-3-line:before{content:"\\eaef"}.ri-briefcase-4-fill:before{content:"\\eaf0"}.ri-briefcase-4-line:before{content:"\\eaf1"}.ri-briefcase-5-fill:before{content:"\\eaf2"}.ri-briefcase-5-line:before{content:"\\eaf3"}.ri-briefcase-fill:before{content:"\\eaf4"}.ri-briefcase-line:before{content:"\\eaf5"}.ri-bring-forward:before{content:"\\eaf6"}.ri-bring-to-front:before{content:"\\eaf7"}.ri-broadcast-fill:before{content:"\\eaf8"}.ri-broadcast-line:before{content:"\\eaf9"}.ri-brush-2-fill:before{content:"\\eafa"}.ri-brush-2-line:before{content:"\\eafb"}.ri-brush-3-fill:before{content:"\\eafc"}.ri-brush-3-line:before{content:"\\eafd"}.ri-brush-4-fill:before{content:"\\eafe"}.ri-brush-4-line:before{content:"\\eaff"}.ri-brush-fill:before{content:"\\eb00"}.ri-brush-line:before{content:"\\eb01"}.ri-bubble-chart-fill:before{content:"\\eb02"}.ri-bubble-chart-line:before{content:"\\eb03"}.ri-bug-2-fill:before{content:"\\eb04"}.ri-bug-2-line:before{content:"\\eb05"}.ri-bug-fill:before{content:"\\eb06"}.ri-bug-line:before{content:"\\eb07"}.ri-building-2-fill:before{content:"\\eb08"}.ri-building-2-line:before{content:"\\eb09"}.ri-building-3-fill:before{content:"\\eb0a"}.ri-building-3-line:before{content:"\\eb0b"}.ri-building-4-fill:before{content:"\\eb0c"}.ri-building-4-line:before{content:"\\eb0d"}.ri-building-fill:before{content:"\\eb0e"}.ri-building-line:before{content:"\\eb0f"}.ri-bus-2-fill:before{content:"\\eb10"}.ri-bus-2-line:before{content:"\\eb11"}.ri-bus-fill:before{content:"\\eb12"}.ri-bus-line:before{content:"\\eb13"}.ri-bus-wifi-fill:before{content:"\\eb14"}.ri-bus-wifi-line:before{content:"\\eb15"}.ri-cactus-fill:before{content:"\\eb16"}.ri-cactus-line:before{content:"\\eb17"}.ri-cake-2-fill:before{content:"\\eb18"}.ri-cake-2-line:before{content:"\\eb19"}.ri-cake-3-fill:before{content:"\\eb1a"}.ri-cake-3-line:before{content:"\\eb1b"}.ri-cake-fill:before{content:"\\eb1c"}.ri-cake-line:before{content:"\\eb1d"}.ri-calculator-fill:before{content:"\\eb1e"}.ri-calculator-line:before{content:"\\eb1f"}.ri-calendar-2-fill:before{content:"\\eb20"}.ri-calendar-2-line:before{content:"\\eb21"}.ri-calendar-check-fill:before{content:"\\eb22"}.ri-calendar-check-line:before{content:"\\eb23"}.ri-calendar-event-fill:before{content:"\\eb24"}.ri-calendar-event-line:before{content:"\\eb25"}.ri-calendar-fill:before{content:"\\eb26"}.ri-calendar-line:before{content:"\\eb27"}.ri-calendar-todo-fill:before{content:"\\eb28"}.ri-calendar-todo-line:before{content:"\\eb29"}.ri-camera-2-fill:before{content:"\\eb2a"}.ri-camera-2-line:before{content:"\\eb2b"}.ri-camera-3-fill:before{content:"\\eb2c"}.ri-camera-3-line:before{content:"\\eb2d"}.ri-camera-fill:before{content:"\\eb2e"}.ri-camera-lens-fill:before{content:"\\eb2f"}.ri-camera-lens-line:before{content:"\\eb30"}.ri-camera-line:before{content:"\\eb31"}.ri-camera-off-fill:before{content:"\\eb32"}.ri-camera-off-line:before{content:"\\eb33"}.ri-camera-switch-fill:before{content:"\\eb34"}.ri-camera-switch-line:before{content:"\\eb35"}.ri-capsule-fill:before{content:"\\eb36"}.ri-capsule-line:before{content:"\\eb37"}.ri-car-fill:before{content:"\\eb38"}.ri-car-line:before{content:"\\eb39"}.ri-car-washing-fill:before{content:"\\eb3a"}.ri-car-washing-line:before{content:"\\eb3b"}.ri-caravan-fill:before{content:"\\eb3c"}.ri-caravan-line:before{content:"\\eb3d"}.ri-cast-fill:before{content:"\\eb3e"}.ri-cast-line:before{content:"\\eb3f"}.ri-cellphone-fill:before{content:"\\eb40"}.ri-cellphone-line:before{content:"\\eb41"}.ri-celsius-fill:before{content:"\\eb42"}.ri-celsius-line:before{content:"\\eb43"}.ri-centos-fill:before{content:"\\eb44"}.ri-centos-line:before{content:"\\eb45"}.ri-character-recognition-fill:before{content:"\\eb46"}.ri-character-recognition-line:before{content:"\\eb47"}.ri-charging-pile-2-fill:before{content:"\\eb48"}.ri-charging-pile-2-line:before{content:"\\eb49"}.ri-charging-pile-fill:before{content:"\\eb4a"}.ri-charging-pile-line:before{content:"\\eb4b"}.ri-chat-1-fill:before{content:"\\eb4c"}.ri-chat-1-line:before{content:"\\eb4d"}.ri-chat-2-fill:before{content:"\\eb4e"}.ri-chat-2-line:before{content:"\\eb4f"}.ri-chat-3-fill:before{content:"\\eb50"}.ri-chat-3-line:before{content:"\\eb51"}.ri-chat-4-fill:before{content:"\\eb52"}.ri-chat-4-line:before{content:"\\eb53"}.ri-chat-check-fill:before{content:"\\eb54"}.ri-chat-check-line:before{content:"\\eb55"}.ri-chat-delete-fill:before{content:"\\eb56"}.ri-chat-delete-line:before{content:"\\eb57"}.ri-chat-download-fill:before{content:"\\eb58"}.ri-chat-download-line:before{content:"\\eb59"}.ri-chat-follow-up-fill:before{content:"\\eb5a"}.ri-chat-follow-up-line:before{content:"\\eb5b"}.ri-chat-forward-fill:before{content:"\\eb5c"}.ri-chat-forward-line:before{content:"\\eb5d"}.ri-chat-heart-fill:before{content:"\\eb5e"}.ri-chat-heart-line:before{content:"\\eb5f"}.ri-chat-history-fill:before{content:"\\eb60"}.ri-chat-history-line:before{content:"\\eb61"}.ri-chat-new-fill:before{content:"\\eb62"}.ri-chat-new-line:before{content:"\\eb63"}.ri-chat-off-fill:before{content:"\\eb64"}.ri-chat-off-line:before{content:"\\eb65"}.ri-chat-poll-fill:before{content:"\\eb66"}.ri-chat-poll-line:before{content:"\\eb67"}.ri-chat-private-fill:before{content:"\\eb68"}.ri-chat-private-line:before{content:"\\eb69"}.ri-chat-quote-fill:before{content:"\\eb6a"}.ri-chat-quote-line:before{content:"\\eb6b"}.ri-chat-settings-fill:before{content:"\\eb6c"}.ri-chat-settings-line:before{content:"\\eb6d"}.ri-chat-smile-2-fill:before{content:"\\eb6e"}.ri-chat-smile-2-line:before{content:"\\eb6f"}.ri-chat-smile-3-fill:before{content:"\\eb70"}.ri-chat-smile-3-line:before{content:"\\eb71"}.ri-chat-smile-fill:before{content:"\\eb72"}.ri-chat-smile-line:before{content:"\\eb73"}.ri-chat-upload-fill:before{content:"\\eb74"}.ri-chat-upload-line:before{content:"\\eb75"}.ri-chat-voice-fill:before{content:"\\eb76"}.ri-chat-voice-line:before{content:"\\eb77"}.ri-check-double-fill:before{content:"\\eb78"}.ri-check-double-line:before{content:"\\eb79"}.ri-check-fill:before{content:"\\eb7a"}.ri-check-line:before{content:"\\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\\eb7d"}.ri-checkbox-blank-fill:before{content:"\\eb7e"}.ri-checkbox-blank-line:before{content:"\\eb7f"}.ri-checkbox-circle-fill:before{content:"\\eb80"}.ri-checkbox-circle-line:before{content:"\\eb81"}.ri-checkbox-fill:before{content:"\\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\\eb83"}.ri-checkbox-indeterminate-line:before{content:"\\eb84"}.ri-checkbox-line:before{content:"\\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\\eb87"}.ri-checkbox-multiple-fill:before{content:"\\eb88"}.ri-checkbox-multiple-line:before{content:"\\eb89"}.ri-china-railway-fill:before{content:"\\eb8a"}.ri-china-railway-line:before{content:"\\eb8b"}.ri-chrome-fill:before{content:"\\eb8c"}.ri-chrome-line:before{content:"\\eb8d"}.ri-clapperboard-fill:before{content:"\\eb8e"}.ri-clapperboard-line:before{content:"\\eb8f"}.ri-clipboard-fill:before{content:"\\eb90"}.ri-clipboard-line:before{content:"\\eb91"}.ri-clockwise-2-fill:before{content:"\\eb92"}.ri-clockwise-2-line:before{content:"\\eb93"}.ri-clockwise-fill:before{content:"\\eb94"}.ri-clockwise-line:before{content:"\\eb95"}.ri-close-circle-fill:before{content:"\\eb96"}.ri-close-circle-line:before{content:"\\eb97"}.ri-close-fill:before{content:"\\eb98"}.ri-close-line:before{content:"\\eb99"}.ri-closed-captioning-fill:before{content:"\\eb9a"}.ri-closed-captioning-line:before{content:"\\eb9b"}.ri-cloud-fill:before{content:"\\eb9c"}.ri-cloud-line:before{content:"\\eb9d"}.ri-cloud-off-fill:before{content:"\\eb9e"}.ri-cloud-off-line:before{content:"\\eb9f"}.ri-cloud-windy-fill:before{content:"\\eba0"}.ri-cloud-windy-line:before{content:"\\eba1"}.ri-cloudy-2-fill:before{content:"\\eba2"}.ri-cloudy-2-line:before{content:"\\eba3"}.ri-cloudy-fill:before{content:"\\eba4"}.ri-cloudy-line:before{content:"\\eba5"}.ri-code-box-fill:before{content:"\\eba6"}.ri-code-box-line:before{content:"\\eba7"}.ri-code-fill:before{content:"\\eba8"}.ri-code-line:before{content:"\\eba9"}.ri-code-s-fill:before{content:"\\ebaa"}.ri-code-s-line:before{content:"\\ebab"}.ri-code-s-slash-fill:before{content:"\\ebac"}.ri-code-s-slash-line:before{content:"\\ebad"}.ri-code-view:before{content:"\\ebae"}.ri-codepen-fill:before{content:"\\ebaf"}.ri-codepen-line:before{content:"\\ebb0"}.ri-coin-fill:before{content:"\\ebb1"}.ri-coin-line:before{content:"\\ebb2"}.ri-coins-fill:before{content:"\\ebb3"}.ri-coins-line:before{content:"\\ebb4"}.ri-collage-fill:before{content:"\\ebb5"}.ri-collage-line:before{content:"\\ebb6"}.ri-command-fill:before{content:"\\ebb7"}.ri-command-line:before{content:"\\ebb8"}.ri-community-fill:before{content:"\\ebb9"}.ri-community-line:before{content:"\\ebba"}.ri-compass-2-fill:before{content:"\\ebbb"}.ri-compass-2-line:before{content:"\\ebbc"}.ri-compass-3-fill:before{content:"\\ebbd"}.ri-compass-3-line:before{content:"\\ebbe"}.ri-compass-4-fill:before{content:"\\ebbf"}.ri-compass-4-line:before{content:"\\ebc0"}.ri-compass-discover-fill:before{content:"\\ebc1"}.ri-compass-discover-line:before{content:"\\ebc2"}.ri-compass-fill:before{content:"\\ebc3"}.ri-compass-line:before{content:"\\ebc4"}.ri-compasses-2-fill:before{content:"\\ebc5"}.ri-compasses-2-line:before{content:"\\ebc6"}.ri-compasses-fill:before{content:"\\ebc7"}.ri-compasses-line:before{content:"\\ebc8"}.ri-computer-fill:before{content:"\\ebc9"}.ri-computer-line:before{content:"\\ebca"}.ri-contacts-book-2-fill:before{content:"\\ebcb"}.ri-contacts-book-2-line:before{content:"\\ebcc"}.ri-contacts-book-fill:before{content:"\\ebcd"}.ri-contacts-book-line:before{content:"\\ebce"}.ri-contacts-book-upload-fill:before{content:"\\ebcf"}.ri-contacts-book-upload-line:before{content:"\\ebd0"}.ri-contacts-fill:before{content:"\\ebd1"}.ri-contacts-line:before{content:"\\ebd2"}.ri-contrast-2-fill:before{content:"\\ebd3"}.ri-contrast-2-line:before{content:"\\ebd4"}.ri-contrast-drop-2-fill:before{content:"\\ebd5"}.ri-contrast-drop-2-line:before{content:"\\ebd6"}.ri-contrast-drop-fill:before{content:"\\ebd7"}.ri-contrast-drop-line:before{content:"\\ebd8"}.ri-contrast-fill:before{content:"\\ebd9"}.ri-contrast-line:before{content:"\\ebda"}.ri-copper-coin-fill:before{content:"\\ebdb"}.ri-copper-coin-line:before{content:"\\ebdc"}.ri-copper-diamond-fill:before{content:"\\ebdd"}.ri-copper-diamond-line:before{content:"\\ebde"}.ri-copyleft-fill:before{content:"\\ebdf"}.ri-copyleft-line:before{content:"\\ebe0"}.ri-copyright-fill:before{content:"\\ebe1"}.ri-copyright-line:before{content:"\\ebe2"}.ri-coreos-fill:before{content:"\\ebe3"}.ri-coreos-line:before{content:"\\ebe4"}.ri-coupon-2-fill:before{content:"\\ebe5"}.ri-coupon-2-line:before{content:"\\ebe6"}.ri-coupon-3-fill:before{content:"\\ebe7"}.ri-coupon-3-line:before{content:"\\ebe8"}.ri-coupon-4-fill:before{content:"\\ebe9"}.ri-coupon-4-line:before{content:"\\ebea"}.ri-coupon-5-fill:before{content:"\\ebeb"}.ri-coupon-5-line:before{content:"\\ebec"}.ri-coupon-fill:before{content:"\\ebed"}.ri-coupon-line:before{content:"\\ebee"}.ri-cpu-fill:before{content:"\\ebef"}.ri-cpu-line:before{content:"\\ebf0"}.ri-creative-commons-by-fill:before{content:"\\ebf1"}.ri-creative-commons-by-line:before{content:"\\ebf2"}.ri-creative-commons-fill:before{content:"\\ebf3"}.ri-creative-commons-line:before{content:"\\ebf4"}.ri-creative-commons-nc-fill:before{content:"\\ebf5"}.ri-creative-commons-nc-line:before{content:"\\ebf6"}.ri-creative-commons-nd-fill:before{content:"\\ebf7"}.ri-creative-commons-nd-line:before{content:"\\ebf8"}.ri-creative-commons-sa-fill:before{content:"\\ebf9"}.ri-creative-commons-sa-line:before{content:"\\ebfa"}.ri-creative-commons-zero-fill:before{content:"\\ebfb"}.ri-creative-commons-zero-line:before{content:"\\ebfc"}.ri-criminal-fill:before{content:"\\ebfd"}.ri-criminal-line:before{content:"\\ebfe"}.ri-crop-2-fill:before{content:"\\ebff"}.ri-crop-2-line:before{content:"\\ec00"}.ri-crop-fill:before{content:"\\ec01"}.ri-crop-line:before{content:"\\ec02"}.ri-css3-fill:before{content:"\\ec03"}.ri-css3-line:before{content:"\\ec04"}.ri-cup-fill:before{content:"\\ec05"}.ri-cup-line:before{content:"\\ec06"}.ri-currency-fill:before{content:"\\ec07"}.ri-currency-line:before{content:"\\ec08"}.ri-cursor-fill:before{content:"\\ec09"}.ri-cursor-line:before{content:"\\ec0a"}.ri-customer-service-2-fill:before{content:"\\ec0b"}.ri-customer-service-2-line:before{content:"\\ec0c"}.ri-customer-service-fill:before{content:"\\ec0d"}.ri-customer-service-line:before{content:"\\ec0e"}.ri-dashboard-2-fill:before{content:"\\ec0f"}.ri-dashboard-2-line:before{content:"\\ec10"}.ri-dashboard-3-fill:before{content:"\\ec11"}.ri-dashboard-3-line:before{content:"\\ec12"}.ri-dashboard-fill:before{content:"\\ec13"}.ri-dashboard-line:before{content:"\\ec14"}.ri-database-2-fill:before{content:"\\ec15"}.ri-database-2-line:before{content:"\\ec16"}.ri-database-fill:before{content:"\\ec17"}.ri-database-line:before{content:"\\ec18"}.ri-delete-back-2-fill:before{content:"\\ec19"}.ri-delete-back-2-line:before{content:"\\ec1a"}.ri-delete-back-fill:before{content:"\\ec1b"}.ri-delete-back-line:before{content:"\\ec1c"}.ri-delete-bin-2-fill:before{content:"\\ec1d"}.ri-delete-bin-2-line:before{content:"\\ec1e"}.ri-delete-bin-3-fill:before{content:"\\ec1f"}.ri-delete-bin-3-line:before{content:"\\ec20"}.ri-delete-bin-4-fill:before{content:"\\ec21"}.ri-delete-bin-4-line:before{content:"\\ec22"}.ri-delete-bin-5-fill:before{content:"\\ec23"}.ri-delete-bin-5-line:before{content:"\\ec24"}.ri-delete-bin-6-fill:before{content:"\\ec25"}.ri-delete-bin-6-line:before{content:"\\ec26"}.ri-delete-bin-7-fill:before{content:"\\ec27"}.ri-delete-bin-7-line:before{content:"\\ec28"}.ri-delete-bin-fill:before{content:"\\ec29"}.ri-delete-bin-line:before{content:"\\ec2a"}.ri-delete-column:before{content:"\\ec2b"}.ri-delete-row:before{content:"\\ec2c"}.ri-device-fill:before{content:"\\ec2d"}.ri-device-line:before{content:"\\ec2e"}.ri-device-recover-fill:before{content:"\\ec2f"}.ri-device-recover-line:before{content:"\\ec30"}.ri-dingding-fill:before{content:"\\ec31"}.ri-dingding-line:before{content:"\\ec32"}.ri-direction-fill:before{content:"\\ec33"}.ri-direction-line:before{content:"\\ec34"}.ri-disc-fill:before{content:"\\ec35"}.ri-disc-line:before{content:"\\ec36"}.ri-discord-fill:before{content:"\\ec37"}.ri-discord-line:before{content:"\\ec38"}.ri-discuss-fill:before{content:"\\ec39"}.ri-discuss-line:before{content:"\\ec3a"}.ri-dislike-fill:before{content:"\\ec3b"}.ri-dislike-line:before{content:"\\ec3c"}.ri-disqus-fill:before{content:"\\ec3d"}.ri-disqus-line:before{content:"\\ec3e"}.ri-divide-fill:before{content:"\\ec3f"}.ri-divide-line:before{content:"\\ec40"}.ri-donut-chart-fill:before{content:"\\ec41"}.ri-donut-chart-line:before{content:"\\ec42"}.ri-door-closed-fill:before{content:"\\ec43"}.ri-door-closed-line:before{content:"\\ec44"}.ri-door-fill:before{content:"\\ec45"}.ri-door-line:before{content:"\\ec46"}.ri-door-lock-box-fill:before{content:"\\ec47"}.ri-door-lock-box-line:before{content:"\\ec48"}.ri-door-lock-fill:before{content:"\\ec49"}.ri-door-lock-line:before{content:"\\ec4a"}.ri-door-open-fill:before{content:"\\ec4b"}.ri-door-open-line:before{content:"\\ec4c"}.ri-dossier-fill:before{content:"\\ec4d"}.ri-dossier-line:before{content:"\\ec4e"}.ri-douban-fill:before{content:"\\ec4f"}.ri-douban-line:before{content:"\\ec50"}.ri-double-quotes-l:before{content:"\\ec51"}.ri-double-quotes-r:before{content:"\\ec52"}.ri-download-2-fill:before{content:"\\ec53"}.ri-download-2-line:before{content:"\\ec54"}.ri-download-cloud-2-fill:before{content:"\\ec55"}.ri-download-cloud-2-line:before{content:"\\ec56"}.ri-download-cloud-fill:before{content:"\\ec57"}.ri-download-cloud-line:before{content:"\\ec58"}.ri-download-fill:before{content:"\\ec59"}.ri-download-line:before{content:"\\ec5a"}.ri-draft-fill:before{content:"\\ec5b"}.ri-draft-line:before{content:"\\ec5c"}.ri-drag-drop-fill:before{content:"\\ec5d"}.ri-drag-drop-line:before{content:"\\ec5e"}.ri-drag-move-2-fill:before{content:"\\ec5f"}.ri-drag-move-2-line:before{content:"\\ec60"}.ri-drag-move-fill:before{content:"\\ec61"}.ri-drag-move-line:before{content:"\\ec62"}.ri-dribbble-fill:before{content:"\\ec63"}.ri-dribbble-line:before{content:"\\ec64"}.ri-drive-fill:before{content:"\\ec65"}.ri-drive-line:before{content:"\\ec66"}.ri-drizzle-fill:before{content:"\\ec67"}.ri-drizzle-line:before{content:"\\ec68"}.ri-drop-fill:before{content:"\\ec69"}.ri-drop-line:before{content:"\\ec6a"}.ri-dropbox-fill:before{content:"\\ec6b"}.ri-dropbox-line:before{content:"\\ec6c"}.ri-dual-sim-1-fill:before{content:"\\ec6d"}.ri-dual-sim-1-line:before{content:"\\ec6e"}.ri-dual-sim-2-fill:before{content:"\\ec6f"}.ri-dual-sim-2-line:before{content:"\\ec70"}.ri-dv-fill:before{content:"\\ec71"}.ri-dv-line:before{content:"\\ec72"}.ri-dvd-fill:before{content:"\\ec73"}.ri-dvd-line:before{content:"\\ec74"}.ri-e-bike-2-fill:before{content:"\\ec75"}.ri-e-bike-2-line:before{content:"\\ec76"}.ri-e-bike-fill:before{content:"\\ec77"}.ri-e-bike-line:before{content:"\\ec78"}.ri-earth-fill:before{content:"\\ec79"}.ri-earth-line:before{content:"\\ec7a"}.ri-earthquake-fill:before{content:"\\ec7b"}.ri-earthquake-line:before{content:"\\ec7c"}.ri-edge-fill:before{content:"\\ec7d"}.ri-edge-line:before{content:"\\ec7e"}.ri-edit-2-fill:before{content:"\\ec7f"}.ri-edit-2-line:before{content:"\\ec80"}.ri-edit-box-fill:before{content:"\\ec81"}.ri-edit-box-line:before{content:"\\ec82"}.ri-edit-circle-fill:before{content:"\\ec83"}.ri-edit-circle-line:before{content:"\\ec84"}.ri-edit-fill:before{content:"\\ec85"}.ri-edit-line:before{content:"\\ec86"}.ri-eject-fill:before{content:"\\ec87"}.ri-eject-line:before{content:"\\ec88"}.ri-emotion-2-fill:before{content:"\\ec89"}.ri-emotion-2-line:before{content:"\\ec8a"}.ri-emotion-fill:before{content:"\\ec8b"}.ri-emotion-happy-fill:before{content:"\\ec8c"}.ri-emotion-happy-line:before{content:"\\ec8d"}.ri-emotion-laugh-fill:before{content:"\\ec8e"}.ri-emotion-laugh-line:before{content:"\\ec8f"}.ri-emotion-line:before{content:"\\ec90"}.ri-emotion-normal-fill:before{content:"\\ec91"}.ri-emotion-normal-line:before{content:"\\ec92"}.ri-emotion-sad-fill:before{content:"\\ec93"}.ri-emotion-sad-line:before{content:"\\ec94"}.ri-emotion-unhappy-fill:before{content:"\\ec95"}.ri-emotion-unhappy-line:before{content:"\\ec96"}.ri-empathize-fill:before{content:"\\ec97"}.ri-empathize-line:before{content:"\\ec98"}.ri-emphasis-cn:before{content:"\\ec99"}.ri-emphasis:before{content:"\\ec9a"}.ri-english-input:before{content:"\\ec9b"}.ri-equalizer-fill:before{content:"\\ec9c"}.ri-equalizer-line:before{content:"\\ec9d"}.ri-eraser-fill:before{content:"\\ec9e"}.ri-eraser-line:before{content:"\\ec9f"}.ri-error-warning-fill:before{content:"\\eca0"}.ri-error-warning-line:before{content:"\\eca1"}.ri-evernote-fill:before{content:"\\eca2"}.ri-evernote-line:before{content:"\\eca3"}.ri-exchange-box-fill:before{content:"\\eca4"}.ri-exchange-box-line:before{content:"\\eca5"}.ri-exchange-cny-fill:before{content:"\\eca6"}.ri-exchange-cny-line:before{content:"\\eca7"}.ri-exchange-dollar-fill:before{content:"\\eca8"}.ri-exchange-dollar-line:before{content:"\\eca9"}.ri-exchange-fill:before{content:"\\ecaa"}.ri-exchange-funds-fill:before{content:"\\ecab"}.ri-exchange-funds-line:before{content:"\\ecac"}.ri-exchange-line:before{content:"\\ecad"}.ri-external-link-fill:before{content:"\\ecae"}.ri-external-link-line:before{content:"\\ecaf"}.ri-eye-2-fill:before{content:"\\ecb0"}.ri-eye-2-line:before{content:"\\ecb1"}.ri-eye-close-fill:before{content:"\\ecb2"}.ri-eye-close-line:before{content:"\\ecb3"}.ri-eye-fill:before{content:"\\ecb4"}.ri-eye-line:before{content:"\\ecb5"}.ri-eye-off-fill:before{content:"\\ecb6"}.ri-eye-off-line:before{content:"\\ecb7"}.ri-facebook-box-fill:before{content:"\\ecb8"}.ri-facebook-box-line:before{content:"\\ecb9"}.ri-facebook-circle-fill:before{content:"\\ecba"}.ri-facebook-circle-line:before{content:"\\ecbb"}.ri-facebook-fill:before{content:"\\ecbc"}.ri-facebook-line:before{content:"\\ecbd"}.ri-fahrenheit-fill:before{content:"\\ecbe"}.ri-fahrenheit-line:before{content:"\\ecbf"}.ri-feedback-fill:before{content:"\\ecc0"}.ri-feedback-line:before{content:"\\ecc1"}.ri-file-2-fill:before{content:"\\ecc2"}.ri-file-2-line:before{content:"\\ecc3"}.ri-file-3-fill:before{content:"\\ecc4"}.ri-file-3-line:before{content:"\\ecc5"}.ri-file-4-fill:before{content:"\\ecc6"}.ri-file-4-line:before{content:"\\ecc7"}.ri-file-add-fill:before{content:"\\ecc8"}.ri-file-add-line:before{content:"\\ecc9"}.ri-file-chart-2-fill:before{content:"\\ecca"}.ri-file-chart-2-line:before{content:"\\eccb"}.ri-file-chart-fill:before{content:"\\eccc"}.ri-file-chart-line:before{content:"\\eccd"}.ri-file-cloud-fill:before{content:"\\ecce"}.ri-file-cloud-line:before{content:"\\eccf"}.ri-file-code-fill:before{content:"\\ecd0"}.ri-file-code-line:before{content:"\\ecd1"}.ri-file-copy-2-fill:before{content:"\\ecd2"}.ri-file-copy-2-line:before{content:"\\ecd3"}.ri-file-copy-fill:before{content:"\\ecd4"}.ri-file-copy-line:before{content:"\\ecd5"}.ri-file-damage-fill:before{content:"\\ecd6"}.ri-file-damage-line:before{content:"\\ecd7"}.ri-file-download-fill:before{content:"\\ecd8"}.ri-file-download-line:before{content:"\\ecd9"}.ri-file-edit-fill:before{content:"\\ecda"}.ri-file-edit-line:before{content:"\\ecdb"}.ri-file-excel-2-fill:before{content:"\\ecdc"}.ri-file-excel-2-line:before{content:"\\ecdd"}.ri-file-excel-fill:before{content:"\\ecde"}.ri-file-excel-line:before{content:"\\ecdf"}.ri-file-fill:before{content:"\\ece0"}.ri-file-forbid-fill:before{content:"\\ece1"}.ri-file-forbid-line:before{content:"\\ece2"}.ri-file-gif-fill:before{content:"\\ece3"}.ri-file-gif-line:before{content:"\\ece4"}.ri-file-history-fill:before{content:"\\ece5"}.ri-file-history-line:before{content:"\\ece6"}.ri-file-hwp-fill:before{content:"\\ece7"}.ri-file-hwp-line:before{content:"\\ece8"}.ri-file-info-fill:before{content:"\\ece9"}.ri-file-info-line:before{content:"\\ecea"}.ri-file-line:before{content:"\\eceb"}.ri-file-list-2-fill:before{content:"\\ecec"}.ri-file-list-2-line:before{content:"\\eced"}.ri-file-list-3-fill:before{content:"\\ecee"}.ri-file-list-3-line:before{content:"\\ecef"}.ri-file-list-fill:before{content:"\\ecf0"}.ri-file-list-line:before{content:"\\ecf1"}.ri-file-lock-fill:before{content:"\\ecf2"}.ri-file-lock-line:before{content:"\\ecf3"}.ri-file-marked-fill:before{content:"\\ecf4"}.ri-file-marked-line:before{content:"\\ecf5"}.ri-file-music-fill:before{content:"\\ecf6"}.ri-file-music-line:before{content:"\\ecf7"}.ri-file-paper-2-fill:before{content:"\\ecf8"}.ri-file-paper-2-line:before{content:"\\ecf9"}.ri-file-paper-fill:before{content:"\\ecfa"}.ri-file-paper-line:before{content:"\\ecfb"}.ri-file-pdf-fill:before{content:"\\ecfc"}.ri-file-pdf-line:before{content:"\\ecfd"}.ri-file-ppt-2-fill:before{content:"\\ecfe"}.ri-file-ppt-2-line:before{content:"\\ecff"}.ri-file-ppt-fill:before{content:"\\ed00"}.ri-file-ppt-line:before{content:"\\ed01"}.ri-file-reduce-fill:before{content:"\\ed02"}.ri-file-reduce-line:before{content:"\\ed03"}.ri-file-search-fill:before{content:"\\ed04"}.ri-file-search-line:before{content:"\\ed05"}.ri-file-settings-fill:before{content:"\\ed06"}.ri-file-settings-line:before{content:"\\ed07"}.ri-file-shield-2-fill:before{content:"\\ed08"}.ri-file-shield-2-line:before{content:"\\ed09"}.ri-file-shield-fill:before{content:"\\ed0a"}.ri-file-shield-line:before{content:"\\ed0b"}.ri-file-shred-fill:before{content:"\\ed0c"}.ri-file-shred-line:before{content:"\\ed0d"}.ri-file-text-fill:before{content:"\\ed0e"}.ri-file-text-line:before{content:"\\ed0f"}.ri-file-transfer-fill:before{content:"\\ed10"}.ri-file-transfer-line:before{content:"\\ed11"}.ri-file-unknow-fill:before{content:"\\ed12"}.ri-file-unknow-line:before{content:"\\ed13"}.ri-file-upload-fill:before{content:"\\ed14"}.ri-file-upload-line:before{content:"\\ed15"}.ri-file-user-fill:before{content:"\\ed16"}.ri-file-user-line:before{content:"\\ed17"}.ri-file-warning-fill:before{content:"\\ed18"}.ri-file-warning-line:before{content:"\\ed19"}.ri-file-word-2-fill:before{content:"\\ed1a"}.ri-file-word-2-line:before{content:"\\ed1b"}.ri-file-word-fill:before{content:"\\ed1c"}.ri-file-word-line:before{content:"\\ed1d"}.ri-file-zip-fill:before{content:"\\ed1e"}.ri-file-zip-line:before{content:"\\ed1f"}.ri-film-fill:before{content:"\\ed20"}.ri-film-line:before{content:"\\ed21"}.ri-filter-2-fill:before{content:"\\ed22"}.ri-filter-2-line:before{content:"\\ed23"}.ri-filter-3-fill:before{content:"\\ed24"}.ri-filter-3-line:before{content:"\\ed25"}.ri-filter-fill:before{content:"\\ed26"}.ri-filter-line:before{content:"\\ed27"}.ri-filter-off-fill:before{content:"\\ed28"}.ri-filter-off-line:before{content:"\\ed29"}.ri-find-replace-fill:before{content:"\\ed2a"}.ri-find-replace-line:before{content:"\\ed2b"}.ri-finder-fill:before{content:"\\ed2c"}.ri-finder-line:before{content:"\\ed2d"}.ri-fingerprint-2-fill:before{content:"\\ed2e"}.ri-fingerprint-2-line:before{content:"\\ed2f"}.ri-fingerprint-fill:before{content:"\\ed30"}.ri-fingerprint-line:before{content:"\\ed31"}.ri-fire-fill:before{content:"\\ed32"}.ri-fire-line:before{content:"\\ed33"}.ri-firefox-fill:before{content:"\\ed34"}.ri-firefox-line:before{content:"\\ed35"}.ri-first-aid-kit-fill:before{content:"\\ed36"}.ri-first-aid-kit-line:before{content:"\\ed37"}.ri-flag-2-fill:before{content:"\\ed38"}.ri-flag-2-line:before{content:"\\ed39"}.ri-flag-fill:before{content:"\\ed3a"}.ri-flag-line:before{content:"\\ed3b"}.ri-flashlight-fill:before{content:"\\ed3c"}.ri-flashlight-line:before{content:"\\ed3d"}.ri-flask-fill:before{content:"\\ed3e"}.ri-flask-line:before{content:"\\ed3f"}.ri-flight-land-fill:before{content:"\\ed40"}.ri-flight-land-line:before{content:"\\ed41"}.ri-flight-takeoff-fill:before{content:"\\ed42"}.ri-flight-takeoff-line:before{content:"\\ed43"}.ri-flood-fill:before{content:"\\ed44"}.ri-flood-line:before{content:"\\ed45"}.ri-flow-chart:before{content:"\\ed46"}.ri-flutter-fill:before{content:"\\ed47"}.ri-flutter-line:before{content:"\\ed48"}.ri-focus-2-fill:before{content:"\\ed49"}.ri-focus-2-line:before{content:"\\ed4a"}.ri-focus-3-fill:before{content:"\\ed4b"}.ri-focus-3-line:before{content:"\\ed4c"}.ri-focus-fill:before{content:"\\ed4d"}.ri-focus-line:before{content:"\\ed4e"}.ri-foggy-fill:before{content:"\\ed4f"}.ri-foggy-line:before{content:"\\ed50"}.ri-folder-2-fill:before{content:"\\ed51"}.ri-folder-2-line:before{content:"\\ed52"}.ri-folder-3-fill:before{content:"\\ed53"}.ri-folder-3-line:before{content:"\\ed54"}.ri-folder-4-fill:before{content:"\\ed55"}.ri-folder-4-line:before{content:"\\ed56"}.ri-folder-5-fill:before{content:"\\ed57"}.ri-folder-5-line:before{content:"\\ed58"}.ri-folder-add-fill:before{content:"\\ed59"}.ri-folder-add-line:before{content:"\\ed5a"}.ri-folder-chart-2-fill:before{content:"\\ed5b"}.ri-folder-chart-2-line:before{content:"\\ed5c"}.ri-folder-chart-fill:before{content:"\\ed5d"}.ri-folder-chart-line:before{content:"\\ed5e"}.ri-folder-download-fill:before{content:"\\ed5f"}.ri-folder-download-line:before{content:"\\ed60"}.ri-folder-fill:before{content:"\\ed61"}.ri-folder-forbid-fill:before{content:"\\ed62"}.ri-folder-forbid-line:before{content:"\\ed63"}.ri-folder-history-fill:before{content:"\\ed64"}.ri-folder-history-line:before{content:"\\ed65"}.ri-folder-info-fill:before{content:"\\ed66"}.ri-folder-info-line:before{content:"\\ed67"}.ri-folder-keyhole-fill:before{content:"\\ed68"}.ri-folder-keyhole-line:before{content:"\\ed69"}.ri-folder-line:before{content:"\\ed6a"}.ri-folder-lock-fill:before{content:"\\ed6b"}.ri-folder-lock-line:before{content:"\\ed6c"}.ri-folder-music-fill:before{content:"\\ed6d"}.ri-folder-music-line:before{content:"\\ed6e"}.ri-folder-open-fill:before{content:"\\ed6f"}.ri-folder-open-line:before{content:"\\ed70"}.ri-folder-received-fill:before{content:"\\ed71"}.ri-folder-received-line:before{content:"\\ed72"}.ri-folder-reduce-fill:before{content:"\\ed73"}.ri-folder-reduce-line:before{content:"\\ed74"}.ri-folder-settings-fill:before{content:"\\ed75"}.ri-folder-settings-line:before{content:"\\ed76"}.ri-folder-shared-fill:before{content:"\\ed77"}.ri-folder-shared-line:before{content:"\\ed78"}.ri-folder-shield-2-fill:before{content:"\\ed79"}.ri-folder-shield-2-line:before{content:"\\ed7a"}.ri-folder-shield-fill:before{content:"\\ed7b"}.ri-folder-shield-line:before{content:"\\ed7c"}.ri-folder-transfer-fill:before{content:"\\ed7d"}.ri-folder-transfer-line:before{content:"\\ed7e"}.ri-folder-unknow-fill:before{content:"\\ed7f"}.ri-folder-unknow-line:before{content:"\\ed80"}.ri-folder-upload-fill:before{content:"\\ed81"}.ri-folder-upload-line:before{content:"\\ed82"}.ri-folder-user-fill:before{content:"\\ed83"}.ri-folder-user-line:before{content:"\\ed84"}.ri-folder-warning-fill:before{content:"\\ed85"}.ri-folder-warning-line:before{content:"\\ed86"}.ri-folder-zip-fill:before{content:"\\ed87"}.ri-folder-zip-line:before{content:"\\ed88"}.ri-folders-fill:before{content:"\\ed89"}.ri-folders-line:before{content:"\\ed8a"}.ri-font-color:before{content:"\\ed8b"}.ri-font-size-2:before{content:"\\ed8c"}.ri-font-size:before{content:"\\ed8d"}.ri-football-fill:before{content:"\\ed8e"}.ri-football-line:before{content:"\\ed8f"}.ri-footprint-fill:before{content:"\\ed90"}.ri-footprint-line:before{content:"\\ed91"}.ri-forbid-2-fill:before{content:"\\ed92"}.ri-forbid-2-line:before{content:"\\ed93"}.ri-forbid-fill:before{content:"\\ed94"}.ri-forbid-line:before{content:"\\ed95"}.ri-format-clear:before{content:"\\ed96"}.ri-fridge-fill:before{content:"\\ed97"}.ri-fridge-line:before{content:"\\ed98"}.ri-fullscreen-exit-fill:before{content:"\\ed99"}.ri-fullscreen-exit-line:before{content:"\\ed9a"}.ri-fullscreen-fill:before{content:"\\ed9b"}.ri-fullscreen-line:before{content:"\\ed9c"}.ri-function-fill:before{content:"\\ed9d"}.ri-function-line:before{content:"\\ed9e"}.ri-functions:before{content:"\\ed9f"}.ri-funds-box-fill:before{content:"\\eda0"}.ri-funds-box-line:before{content:"\\eda1"}.ri-funds-fill:before{content:"\\eda2"}.ri-funds-line:before{content:"\\eda3"}.ri-gallery-fill:before{content:"\\eda4"}.ri-gallery-line:before{content:"\\eda5"}.ri-gallery-upload-fill:before{content:"\\eda6"}.ri-gallery-upload-line:before{content:"\\eda7"}.ri-game-fill:before{content:"\\eda8"}.ri-game-line:before{content:"\\eda9"}.ri-gamepad-fill:before{content:"\\edaa"}.ri-gamepad-line:before{content:"\\edab"}.ri-gas-station-fill:before{content:"\\edac"}.ri-gas-station-line:before{content:"\\edad"}.ri-gatsby-fill:before{content:"\\edae"}.ri-gatsby-line:before{content:"\\edaf"}.ri-genderless-fill:before{content:"\\edb0"}.ri-genderless-line:before{content:"\\edb1"}.ri-ghost-2-fill:before{content:"\\edb2"}.ri-ghost-2-line:before{content:"\\edb3"}.ri-ghost-fill:before{content:"\\edb4"}.ri-ghost-line:before{content:"\\edb5"}.ri-ghost-smile-fill:before{content:"\\edb6"}.ri-ghost-smile-line:before{content:"\\edb7"}.ri-gift-2-fill:before{content:"\\edb8"}.ri-gift-2-line:before{content:"\\edb9"}.ri-gift-fill:before{content:"\\edba"}.ri-gift-line:before{content:"\\edbb"}.ri-git-branch-fill:before{content:"\\edbc"}.ri-git-branch-line:before{content:"\\edbd"}.ri-git-commit-fill:before{content:"\\edbe"}.ri-git-commit-line:before{content:"\\edbf"}.ri-git-merge-fill:before{content:"\\edc0"}.ri-git-merge-line:before{content:"\\edc1"}.ri-git-pull-request-fill:before{content:"\\edc2"}.ri-git-pull-request-line:before{content:"\\edc3"}.ri-git-repository-commits-fill:before{content:"\\edc4"}.ri-git-repository-commits-line:before{content:"\\edc5"}.ri-git-repository-fill:before{content:"\\edc6"}.ri-git-repository-line:before{content:"\\edc7"}.ri-git-repository-private-fill:before{content:"\\edc8"}.ri-git-repository-private-line:before{content:"\\edc9"}.ri-github-fill:before{content:"\\edca"}.ri-github-line:before{content:"\\edcb"}.ri-gitlab-fill:before{content:"\\edcc"}.ri-gitlab-line:before{content:"\\edcd"}.ri-global-fill:before{content:"\\edce"}.ri-global-line:before{content:"\\edcf"}.ri-globe-fill:before{content:"\\edd0"}.ri-globe-line:before{content:"\\edd1"}.ri-goblet-fill:before{content:"\\edd2"}.ri-goblet-line:before{content:"\\edd3"}.ri-google-fill:before{content:"\\edd4"}.ri-google-line:before{content:"\\edd5"}.ri-google-play-fill:before{content:"\\edd6"}.ri-google-play-line:before{content:"\\edd7"}.ri-government-fill:before{content:"\\edd8"}.ri-government-line:before{content:"\\edd9"}.ri-gps-fill:before{content:"\\edda"}.ri-gps-line:before{content:"\\eddb"}.ri-gradienter-fill:before{content:"\\eddc"}.ri-gradienter-line:before{content:"\\eddd"}.ri-grid-fill:before{content:"\\edde"}.ri-grid-line:before{content:"\\eddf"}.ri-group-2-fill:before{content:"\\ede0"}.ri-group-2-line:before{content:"\\ede1"}.ri-group-fill:before{content:"\\ede2"}.ri-group-line:before{content:"\\ede3"}.ri-guide-fill:before{content:"\\ede4"}.ri-guide-line:before{content:"\\ede5"}.ri-h-1:before{content:"\\ede6"}.ri-h-2:before{content:"\\ede7"}.ri-h-3:before{content:"\\ede8"}.ri-h-4:before{content:"\\ede9"}.ri-h-5:before{content:"\\edea"}.ri-h-6:before{content:"\\edeb"}.ri-hail-fill:before{content:"\\edec"}.ri-hail-line:before{content:"\\eded"}.ri-hammer-fill:before{content:"\\edee"}.ri-hammer-line:before{content:"\\edef"}.ri-hand-coin-fill:before{content:"\\edf0"}.ri-hand-coin-line:before{content:"\\edf1"}.ri-hand-heart-fill:before{content:"\\edf2"}.ri-hand-heart-line:before{content:"\\edf3"}.ri-hand-sanitizer-fill:before{content:"\\edf4"}.ri-hand-sanitizer-line:before{content:"\\edf5"}.ri-handbag-fill:before{content:"\\edf6"}.ri-handbag-line:before{content:"\\edf7"}.ri-hard-drive-2-fill:before{content:"\\edf8"}.ri-hard-drive-2-line:before{content:"\\edf9"}.ri-hard-drive-fill:before{content:"\\edfa"}.ri-hard-drive-line:before{content:"\\edfb"}.ri-hashtag:before{content:"\\edfc"}.ri-haze-2-fill:before{content:"\\edfd"}.ri-haze-2-line:before{content:"\\edfe"}.ri-haze-fill:before{content:"\\edff"}.ri-haze-line:before{content:"\\ee00"}.ri-hd-fill:before{content:"\\ee01"}.ri-hd-line:before{content:"\\ee02"}.ri-heading:before{content:"\\ee03"}.ri-headphone-fill:before{content:"\\ee04"}.ri-headphone-line:before{content:"\\ee05"}.ri-health-book-fill:before{content:"\\ee06"}.ri-health-book-line:before{content:"\\ee07"}.ri-heart-2-fill:before{content:"\\ee08"}.ri-heart-2-line:before{content:"\\ee09"}.ri-heart-3-fill:before{content:"\\ee0a"}.ri-heart-3-line:before{content:"\\ee0b"}.ri-heart-add-fill:before{content:"\\ee0c"}.ri-heart-add-line:before{content:"\\ee0d"}.ri-heart-fill:before{content:"\\ee0e"}.ri-heart-line:before{content:"\\ee0f"}.ri-heart-pulse-fill:before{content:"\\ee10"}.ri-heart-pulse-line:before{content:"\\ee11"}.ri-hearts-fill:before{content:"\\ee12"}.ri-hearts-line:before{content:"\\ee13"}.ri-heavy-showers-fill:before{content:"\\ee14"}.ri-heavy-showers-line:before{content:"\\ee15"}.ri-history-fill:before{content:"\\ee16"}.ri-history-line:before{content:"\\ee17"}.ri-home-2-fill:before{content:"\\ee18"}.ri-home-2-line:before{content:"\\ee19"}.ri-home-3-fill:before{content:"\\ee1a"}.ri-home-3-line:before{content:"\\ee1b"}.ri-home-4-fill:before{content:"\\ee1c"}.ri-home-4-line:before{content:"\\ee1d"}.ri-home-5-fill:before{content:"\\ee1e"}.ri-home-5-line:before{content:"\\ee1f"}.ri-home-6-fill:before{content:"\\ee20"}.ri-home-6-line:before{content:"\\ee21"}.ri-home-7-fill:before{content:"\\ee22"}.ri-home-7-line:before{content:"\\ee23"}.ri-home-8-fill:before{content:"\\ee24"}.ri-home-8-line:before{content:"\\ee25"}.ri-home-fill:before{content:"\\ee26"}.ri-home-gear-fill:before{content:"\\ee27"}.ri-home-gear-line:before{content:"\\ee28"}.ri-home-heart-fill:before{content:"\\ee29"}.ri-home-heart-line:before{content:"\\ee2a"}.ri-home-line:before{content:"\\ee2b"}.ri-home-smile-2-fill:before{content:"\\ee2c"}.ri-home-smile-2-line:before{content:"\\ee2d"}.ri-home-smile-fill:before{content:"\\ee2e"}.ri-home-smile-line:before{content:"\\ee2f"}.ri-home-wifi-fill:before{content:"\\ee30"}.ri-home-wifi-line:before{content:"\\ee31"}.ri-honor-of-kings-fill:before{content:"\\ee32"}.ri-honor-of-kings-line:before{content:"\\ee33"}.ri-honour-fill:before{content:"\\ee34"}.ri-honour-line:before{content:"\\ee35"}.ri-hospital-fill:before{content:"\\ee36"}.ri-hospital-line:before{content:"\\ee37"}.ri-hotel-bed-fill:before{content:"\\ee38"}.ri-hotel-bed-line:before{content:"\\ee39"}.ri-hotel-fill:before{content:"\\ee3a"}.ri-hotel-line:before{content:"\\ee3b"}.ri-hotspot-fill:before{content:"\\ee3c"}.ri-hotspot-line:before{content:"\\ee3d"}.ri-hq-fill:before{content:"\\ee3e"}.ri-hq-line:before{content:"\\ee3f"}.ri-html5-fill:before{content:"\\ee40"}.ri-html5-line:before{content:"\\ee41"}.ri-ie-fill:before{content:"\\ee42"}.ri-ie-line:before{content:"\\ee43"}.ri-image-2-fill:before{content:"\\ee44"}.ri-image-2-line:before{content:"\\ee45"}.ri-image-add-fill:before{content:"\\ee46"}.ri-image-add-line:before{content:"\\ee47"}.ri-image-edit-fill:before{content:"\\ee48"}.ri-image-edit-line:before{content:"\\ee49"}.ri-image-fill:before{content:"\\ee4a"}.ri-image-line:before{content:"\\ee4b"}.ri-inbox-archive-fill:before{content:"\\ee4c"}.ri-inbox-archive-line:before{content:"\\ee4d"}.ri-inbox-fill:before{content:"\\ee4e"}.ri-inbox-line:before{content:"\\ee4f"}.ri-inbox-unarchive-fill:before{content:"\\ee50"}.ri-inbox-unarchive-line:before{content:"\\ee51"}.ri-increase-decrease-fill:before{content:"\\ee52"}.ri-increase-decrease-line:before{content:"\\ee53"}.ri-indent-decrease:before{content:"\\ee54"}.ri-indent-increase:before{content:"\\ee55"}.ri-indeterminate-circle-fill:before{content:"\\ee56"}.ri-indeterminate-circle-line:before{content:"\\ee57"}.ri-information-fill:before{content:"\\ee58"}.ri-information-line:before{content:"\\ee59"}.ri-infrared-thermometer-fill:before{content:"\\ee5a"}.ri-infrared-thermometer-line:before{content:"\\ee5b"}.ri-ink-bottle-fill:before{content:"\\ee5c"}.ri-ink-bottle-line:before{content:"\\ee5d"}.ri-input-cursor-move:before{content:"\\ee5e"}.ri-input-method-fill:before{content:"\\ee5f"}.ri-input-method-line:before{content:"\\ee60"}.ri-insert-column-left:before{content:"\\ee61"}.ri-insert-column-right:before{content:"\\ee62"}.ri-insert-row-bottom:before{content:"\\ee63"}.ri-insert-row-top:before{content:"\\ee64"}.ri-instagram-fill:before{content:"\\ee65"}.ri-instagram-line:before{content:"\\ee66"}.ri-install-fill:before{content:"\\ee67"}.ri-install-line:before{content:"\\ee68"}.ri-invision-fill:before{content:"\\ee69"}.ri-invision-line:before{content:"\\ee6a"}.ri-italic:before{content:"\\ee6b"}.ri-kakao-talk-fill:before{content:"\\ee6c"}.ri-kakao-talk-line:before{content:"\\ee6d"}.ri-key-2-fill:before{content:"\\ee6e"}.ri-key-2-line:before{content:"\\ee6f"}.ri-key-fill:before{content:"\\ee70"}.ri-key-line:before{content:"\\ee71"}.ri-keyboard-box-fill:before{content:"\\ee72"}.ri-keyboard-box-line:before{content:"\\ee73"}.ri-keyboard-fill:before{content:"\\ee74"}.ri-keyboard-line:before{content:"\\ee75"}.ri-keynote-fill:before{content:"\\ee76"}.ri-keynote-line:before{content:"\\ee77"}.ri-knife-blood-fill:before{content:"\\ee78"}.ri-knife-blood-line:before{content:"\\ee79"}.ri-knife-fill:before{content:"\\ee7a"}.ri-knife-line:before{content:"\\ee7b"}.ri-landscape-fill:before{content:"\\ee7c"}.ri-landscape-line:before{content:"\\ee7d"}.ri-layout-2-fill:before{content:"\\ee7e"}.ri-layout-2-line:before{content:"\\ee7f"}.ri-layout-3-fill:before{content:"\\ee80"}.ri-layout-3-line:before{content:"\\ee81"}.ri-layout-4-fill:before{content:"\\ee82"}.ri-layout-4-line:before{content:"\\ee83"}.ri-layout-5-fill:before{content:"\\ee84"}.ri-layout-5-line:before{content:"\\ee85"}.ri-layout-6-fill:before{content:"\\ee86"}.ri-layout-6-line:before{content:"\\ee87"}.ri-layout-bottom-2-fill:before{content:"\\ee88"}.ri-layout-bottom-2-line:before{content:"\\ee89"}.ri-layout-bottom-fill:before{content:"\\ee8a"}.ri-layout-bottom-line:before{content:"\\ee8b"}.ri-layout-column-fill:before{content:"\\ee8c"}.ri-layout-column-line:before{content:"\\ee8d"}.ri-layout-fill:before{content:"\\ee8e"}.ri-layout-grid-fill:before{content:"\\ee8f"}.ri-layout-grid-line:before{content:"\\ee90"}.ri-layout-left-2-fill:before{content:"\\ee91"}.ri-layout-left-2-line:before{content:"\\ee92"}.ri-layout-left-fill:before{content:"\\ee93"}.ri-layout-left-line:before{content:"\\ee94"}.ri-layout-line:before{content:"\\ee95"}.ri-layout-masonry-fill:before{content:"\\ee96"}.ri-layout-masonry-line:before{content:"\\ee97"}.ri-layout-right-2-fill:before{content:"\\ee98"}.ri-layout-right-2-line:before{content:"\\ee99"}.ri-layout-right-fill:before{content:"\\ee9a"}.ri-layout-right-line:before{content:"\\ee9b"}.ri-layout-row-fill:before{content:"\\ee9c"}.ri-layout-row-line:before{content:"\\ee9d"}.ri-layout-top-2-fill:before{content:"\\ee9e"}.ri-layout-top-2-line:before{content:"\\ee9f"}.ri-layout-top-fill:before{content:"\\eea0"}.ri-layout-top-line:before{content:"\\eea1"}.ri-leaf-fill:before{content:"\\eea2"}.ri-leaf-line:before{content:"\\eea3"}.ri-lifebuoy-fill:before{content:"\\eea4"}.ri-lifebuoy-line:before{content:"\\eea5"}.ri-lightbulb-fill:before{content:"\\eea6"}.ri-lightbulb-flash-fill:before{content:"\\eea7"}.ri-lightbulb-flash-line:before{content:"\\eea8"}.ri-lightbulb-line:before{content:"\\eea9"}.ri-line-chart-fill:before{content:"\\eeaa"}.ri-line-chart-line:before{content:"\\eeab"}.ri-line-fill:before{content:"\\eeac"}.ri-line-height:before{content:"\\eead"}.ri-line-line:before{content:"\\eeae"}.ri-link-m:before{content:"\\eeaf"}.ri-link-unlink-m:before{content:"\\eeb0"}.ri-link-unlink:before{content:"\\eeb1"}.ri-link:before{content:"\\eeb2"}.ri-linkedin-box-fill:before{content:"\\eeb3"}.ri-linkedin-box-line:before{content:"\\eeb4"}.ri-linkedin-fill:before{content:"\\eeb5"}.ri-linkedin-line:before{content:"\\eeb6"}.ri-links-fill:before{content:"\\eeb7"}.ri-links-line:before{content:"\\eeb8"}.ri-list-check-2:before{content:"\\eeb9"}.ri-list-check:before{content:"\\eeba"}.ri-list-ordered:before{content:"\\eebb"}.ri-list-settings-fill:before{content:"\\eebc"}.ri-list-settings-line:before{content:"\\eebd"}.ri-list-unordered:before{content:"\\eebe"}.ri-live-fill:before{content:"\\eebf"}.ri-live-line:before{content:"\\eec0"}.ri-loader-2-fill:before{content:"\\eec1"}.ri-loader-2-line:before{content:"\\eec2"}.ri-loader-3-fill:before{content:"\\eec3"}.ri-loader-3-line:before{content:"\\eec4"}.ri-loader-4-fill:before{content:"\\eec5"}.ri-loader-4-line:before{content:"\\eec6"}.ri-loader-5-fill:before{content:"\\eec7"}.ri-loader-5-line:before{content:"\\eec8"}.ri-loader-fill:before{content:"\\eec9"}.ri-loader-line:before{content:"\\eeca"}.ri-lock-2-fill:before{content:"\\eecb"}.ri-lock-2-line:before{content:"\\eecc"}.ri-lock-fill:before{content:"\\eecd"}.ri-lock-line:before{content:"\\eece"}.ri-lock-password-fill:before{content:"\\eecf"}.ri-lock-password-line:before{content:"\\eed0"}.ri-lock-unlock-fill:before{content:"\\eed1"}.ri-lock-unlock-line:before{content:"\\eed2"}.ri-login-box-fill:before{content:"\\eed3"}.ri-login-box-line:before{content:"\\eed4"}.ri-login-circle-fill:before{content:"\\eed5"}.ri-login-circle-line:before{content:"\\eed6"}.ri-logout-box-fill:before{content:"\\eed7"}.ri-logout-box-line:before{content:"\\eed8"}.ri-logout-box-r-fill:before{content:"\\eed9"}.ri-logout-box-r-line:before{content:"\\eeda"}.ri-logout-circle-fill:before{content:"\\eedb"}.ri-logout-circle-line:before{content:"\\eedc"}.ri-logout-circle-r-fill:before{content:"\\eedd"}.ri-logout-circle-r-line:before{content:"\\eede"}.ri-luggage-cart-fill:before{content:"\\eedf"}.ri-luggage-cart-line:before{content:"\\eee0"}.ri-luggage-deposit-fill:before{content:"\\eee1"}.ri-luggage-deposit-line:before{content:"\\eee2"}.ri-lungs-fill:before{content:"\\eee3"}.ri-lungs-line:before{content:"\\eee4"}.ri-mac-fill:before{content:"\\eee5"}.ri-mac-line:before{content:"\\eee6"}.ri-macbook-fill:before{content:"\\eee7"}.ri-macbook-line:before{content:"\\eee8"}.ri-magic-fill:before{content:"\\eee9"}.ri-magic-line:before{content:"\\eeea"}.ri-mail-add-fill:before{content:"\\eeeb"}.ri-mail-add-line:before{content:"\\eeec"}.ri-mail-check-fill:before{content:"\\eeed"}.ri-mail-check-line:before{content:"\\eeee"}.ri-mail-close-fill:before{content:"\\eeef"}.ri-mail-close-line:before{content:"\\eef0"}.ri-mail-download-fill:before{content:"\\eef1"}.ri-mail-download-line:before{content:"\\eef2"}.ri-mail-fill:before{content:"\\eef3"}.ri-mail-forbid-fill:before{content:"\\eef4"}.ri-mail-forbid-line:before{content:"\\eef5"}.ri-mail-line:before{content:"\\eef6"}.ri-mail-lock-fill:before{content:"\\eef7"}.ri-mail-lock-line:before{content:"\\eef8"}.ri-mail-open-fill:before{content:"\\eef9"}.ri-mail-open-line:before{content:"\\eefa"}.ri-mail-send-fill:before{content:"\\eefb"}.ri-mail-send-line:before{content:"\\eefc"}.ri-mail-settings-fill:before{content:"\\eefd"}.ri-mail-settings-line:before{content:"\\eefe"}.ri-mail-star-fill:before{content:"\\eeff"}.ri-mail-star-line:before{content:"\\ef00"}.ri-mail-unread-fill:before{content:"\\ef01"}.ri-mail-unread-line:before{content:"\\ef02"}.ri-mail-volume-fill:before{content:"\\ef03"}.ri-mail-volume-line:before{content:"\\ef04"}.ri-map-2-fill:before{content:"\\ef05"}.ri-map-2-line:before{content:"\\ef06"}.ri-map-fill:before{content:"\\ef07"}.ri-map-line:before{content:"\\ef08"}.ri-map-pin-2-fill:before{content:"\\ef09"}.ri-map-pin-2-line:before{content:"\\ef0a"}.ri-map-pin-3-fill:before{content:"\\ef0b"}.ri-map-pin-3-line:before{content:"\\ef0c"}.ri-map-pin-4-fill:before{content:"\\ef0d"}.ri-map-pin-4-line:before{content:"\\ef0e"}.ri-map-pin-5-fill:before{content:"\\ef0f"}.ri-map-pin-5-line:before{content:"\\ef10"}.ri-map-pin-add-fill:before{content:"\\ef11"}.ri-map-pin-add-line:before{content:"\\ef12"}.ri-map-pin-fill:before{content:"\\ef13"}.ri-map-pin-line:before{content:"\\ef14"}.ri-map-pin-range-fill:before{content:"\\ef15"}.ri-map-pin-range-line:before{content:"\\ef16"}.ri-map-pin-time-fill:before{content:"\\ef17"}.ri-map-pin-time-line:before{content:"\\ef18"}.ri-map-pin-user-fill:before{content:"\\ef19"}.ri-map-pin-user-line:before{content:"\\ef1a"}.ri-mark-pen-fill:before{content:"\\ef1b"}.ri-mark-pen-line:before{content:"\\ef1c"}.ri-markdown-fill:before{content:"\\ef1d"}.ri-markdown-line:before{content:"\\ef1e"}.ri-markup-fill:before{content:"\\ef1f"}.ri-markup-line:before{content:"\\ef20"}.ri-mastercard-fill:before{content:"\\ef21"}.ri-mastercard-line:before{content:"\\ef22"}.ri-mastodon-fill:before{content:"\\ef23"}.ri-mastodon-line:before{content:"\\ef24"}.ri-medal-2-fill:before{content:"\\ef25"}.ri-medal-2-line:before{content:"\\ef26"}.ri-medal-fill:before{content:"\\ef27"}.ri-medal-line:before{content:"\\ef28"}.ri-medicine-bottle-fill:before{content:"\\ef29"}.ri-medicine-bottle-line:before{content:"\\ef2a"}.ri-medium-fill:before{content:"\\ef2b"}.ri-medium-line:before{content:"\\ef2c"}.ri-men-fill:before{content:"\\ef2d"}.ri-men-line:before{content:"\\ef2e"}.ri-mental-health-fill:before{content:"\\ef2f"}.ri-mental-health-line:before{content:"\\ef30"}.ri-menu-2-fill:before{content:"\\ef31"}.ri-menu-2-line:before{content:"\\ef32"}.ri-menu-3-fill:before{content:"\\ef33"}.ri-menu-3-line:before{content:"\\ef34"}.ri-menu-4-fill:before{content:"\\ef35"}.ri-menu-4-line:before{content:"\\ef36"}.ri-menu-5-fill:before{content:"\\ef37"}.ri-menu-5-line:before{content:"\\ef38"}.ri-menu-add-fill:before{content:"\\ef39"}.ri-menu-add-line:before{content:"\\ef3a"}.ri-menu-fill:before{content:"\\ef3b"}.ri-menu-fold-fill:before{content:"\\ef3c"}.ri-menu-fold-line:before{content:"\\ef3d"}.ri-menu-line:before{content:"\\ef3e"}.ri-menu-unfold-fill:before{content:"\\ef3f"}.ri-menu-unfold-line:before{content:"\\ef40"}.ri-merge-cells-horizontal:before{content:"\\ef41"}.ri-merge-cells-vertical:before{content:"\\ef42"}.ri-message-2-fill:before{content:"\\ef43"}.ri-message-2-line:before{content:"\\ef44"}.ri-message-3-fill:before{content:"\\ef45"}.ri-message-3-line:before{content:"\\ef46"}.ri-message-fill:before{content:"\\ef47"}.ri-message-line:before{content:"\\ef48"}.ri-messenger-fill:before{content:"\\ef49"}.ri-messenger-line:before{content:"\\ef4a"}.ri-meteor-fill:before{content:"\\ef4b"}.ri-meteor-line:before{content:"\\ef4c"}.ri-mic-2-fill:before{content:"\\ef4d"}.ri-mic-2-line:before{content:"\\ef4e"}.ri-mic-fill:before{content:"\\ef4f"}.ri-mic-line:before{content:"\\ef50"}.ri-mic-off-fill:before{content:"\\ef51"}.ri-mic-off-line:before{content:"\\ef52"}.ri-mickey-fill:before{content:"\\ef53"}.ri-mickey-line:before{content:"\\ef54"}.ri-microscope-fill:before{content:"\\ef55"}.ri-microscope-line:before{content:"\\ef56"}.ri-microsoft-fill:before{content:"\\ef57"}.ri-microsoft-line:before{content:"\\ef58"}.ri-mind-map:before{content:"\\ef59"}.ri-mini-program-fill:before{content:"\\ef5a"}.ri-mini-program-line:before{content:"\\ef5b"}.ri-mist-fill:before{content:"\\ef5c"}.ri-mist-line:before{content:"\\ef5d"}.ri-money-cny-box-fill:before{content:"\\ef5e"}.ri-money-cny-box-line:before{content:"\\ef5f"}.ri-money-cny-circle-fill:before{content:"\\ef60"}.ri-money-cny-circle-line:before{content:"\\ef61"}.ri-money-dollar-box-fill:before{content:"\\ef62"}.ri-money-dollar-box-line:before{content:"\\ef63"}.ri-money-dollar-circle-fill:before{content:"\\ef64"}.ri-money-dollar-circle-line:before{content:"\\ef65"}.ri-money-euro-box-fill:before{content:"\\ef66"}.ri-money-euro-box-line:before{content:"\\ef67"}.ri-money-euro-circle-fill:before{content:"\\ef68"}.ri-money-euro-circle-line:before{content:"\\ef69"}.ri-money-pound-box-fill:before{content:"\\ef6a"}.ri-money-pound-box-line:before{content:"\\ef6b"}.ri-money-pound-circle-fill:before{content:"\\ef6c"}.ri-money-pound-circle-line:before{content:"\\ef6d"}.ri-moon-clear-fill:before{content:"\\ef6e"}.ri-moon-clear-line:before{content:"\\ef6f"}.ri-moon-cloudy-fill:before{content:"\\ef70"}.ri-moon-cloudy-line:before{content:"\\ef71"}.ri-moon-fill:before{content:"\\ef72"}.ri-moon-foggy-fill:before{content:"\\ef73"}.ri-moon-foggy-line:before{content:"\\ef74"}.ri-moon-line:before{content:"\\ef75"}.ri-more-2-fill:before{content:"\\ef76"}.ri-more-2-line:before{content:"\\ef77"}.ri-more-fill:before{content:"\\ef78"}.ri-more-line:before{content:"\\ef79"}.ri-motorbike-fill:before{content:"\\ef7a"}.ri-motorbike-line:before{content:"\\ef7b"}.ri-mouse-fill:before{content:"\\ef7c"}.ri-mouse-line:before{content:"\\ef7d"}.ri-movie-2-fill:before{content:"\\ef7e"}.ri-movie-2-line:before{content:"\\ef7f"}.ri-movie-fill:before{content:"\\ef80"}.ri-movie-line:before{content:"\\ef81"}.ri-music-2-fill:before{content:"\\ef82"}.ri-music-2-line:before{content:"\\ef83"}.ri-music-fill:before{content:"\\ef84"}.ri-music-line:before{content:"\\ef85"}.ri-mv-fill:before{content:"\\ef86"}.ri-mv-line:before{content:"\\ef87"}.ri-navigation-fill:before{content:"\\ef88"}.ri-navigation-line:before{content:"\\ef89"}.ri-netease-cloud-music-fill:before{content:"\\ef8a"}.ri-netease-cloud-music-line:before{content:"\\ef8b"}.ri-netflix-fill:before{content:"\\ef8c"}.ri-netflix-line:before{content:"\\ef8d"}.ri-newspaper-fill:before{content:"\\ef8e"}.ri-newspaper-line:before{content:"\\ef8f"}.ri-node-tree:before{content:"\\ef90"}.ri-notification-2-fill:before{content:"\\ef91"}.ri-notification-2-line:before{content:"\\ef92"}.ri-notification-3-fill:before{content:"\\ef93"}.ri-notification-3-line:before{content:"\\ef94"}.ri-notification-4-fill:before{content:"\\ef95"}.ri-notification-4-line:before{content:"\\ef96"}.ri-notification-badge-fill:before{content:"\\ef97"}.ri-notification-badge-line:before{content:"\\ef98"}.ri-notification-fill:before{content:"\\ef99"}.ri-notification-line:before{content:"\\ef9a"}.ri-notification-off-fill:before{content:"\\ef9b"}.ri-notification-off-line:before{content:"\\ef9c"}.ri-npmjs-fill:before{content:"\\ef9d"}.ri-npmjs-line:before{content:"\\ef9e"}.ri-number-0:before{content:"\\ef9f"}.ri-number-1:before{content:"\\efa0"}.ri-number-2:before{content:"\\efa1"}.ri-number-3:before{content:"\\efa2"}.ri-number-4:before{content:"\\efa3"}.ri-number-5:before{content:"\\efa4"}.ri-number-6:before{content:"\\efa5"}.ri-number-7:before{content:"\\efa6"}.ri-number-8:before{content:"\\efa7"}.ri-number-9:before{content:"\\efa8"}.ri-numbers-fill:before{content:"\\efa9"}.ri-numbers-line:before{content:"\\efaa"}.ri-nurse-fill:before{content:"\\efab"}.ri-nurse-line:before{content:"\\efac"}.ri-oil-fill:before{content:"\\efad"}.ri-oil-line:before{content:"\\efae"}.ri-omega:before{content:"\\efaf"}.ri-open-arm-fill:before{content:"\\efb0"}.ri-open-arm-line:before{content:"\\efb1"}.ri-open-source-fill:before{content:"\\efb2"}.ri-open-source-line:before{content:"\\efb3"}.ri-opera-fill:before{content:"\\efb4"}.ri-opera-line:before{content:"\\efb5"}.ri-order-play-fill:before{content:"\\efb6"}.ri-order-play-line:before{content:"\\efb7"}.ri-organization-chart:before{content:"\\efb8"}.ri-outlet-2-fill:before{content:"\\efb9"}.ri-outlet-2-line:before{content:"\\efba"}.ri-outlet-fill:before{content:"\\efbb"}.ri-outlet-line:before{content:"\\efbc"}.ri-page-separator:before{content:"\\efbd"}.ri-pages-fill:before{content:"\\efbe"}.ri-pages-line:before{content:"\\efbf"}.ri-paint-brush-fill:before{content:"\\efc0"}.ri-paint-brush-line:before{content:"\\efc1"}.ri-paint-fill:before{content:"\\efc2"}.ri-paint-line:before{content:"\\efc3"}.ri-palette-fill:before{content:"\\efc4"}.ri-palette-line:before{content:"\\efc5"}.ri-pantone-fill:before{content:"\\efc6"}.ri-pantone-line:before{content:"\\efc7"}.ri-paragraph:before{content:"\\efc8"}.ri-parent-fill:before{content:"\\efc9"}.ri-parent-line:before{content:"\\efca"}.ri-parentheses-fill:before{content:"\\efcb"}.ri-parentheses-line:before{content:"\\efcc"}.ri-parking-box-fill:before{content:"\\efcd"}.ri-parking-box-line:before{content:"\\efce"}.ri-parking-fill:before{content:"\\efcf"}.ri-parking-line:before{content:"\\efd0"}.ri-passport-fill:before{content:"\\efd1"}.ri-passport-line:before{content:"\\efd2"}.ri-patreon-fill:before{content:"\\efd3"}.ri-patreon-line:before{content:"\\efd4"}.ri-pause-circle-fill:before{content:"\\efd5"}.ri-pause-circle-line:before{content:"\\efd6"}.ri-pause-fill:before{content:"\\efd7"}.ri-pause-line:before{content:"\\efd8"}.ri-pause-mini-fill:before{content:"\\efd9"}.ri-pause-mini-line:before{content:"\\efda"}.ri-paypal-fill:before{content:"\\efdb"}.ri-paypal-line:before{content:"\\efdc"}.ri-pen-nib-fill:before{content:"\\efdd"}.ri-pen-nib-line:before{content:"\\efde"}.ri-pencil-fill:before{content:"\\efdf"}.ri-pencil-line:before{content:"\\efe0"}.ri-pencil-ruler-2-fill:before{content:"\\efe1"}.ri-pencil-ruler-2-line:before{content:"\\efe2"}.ri-pencil-ruler-fill:before{content:"\\efe3"}.ri-pencil-ruler-line:before{content:"\\efe4"}.ri-percent-fill:before{content:"\\efe5"}.ri-percent-line:before{content:"\\efe6"}.ri-phone-camera-fill:before{content:"\\efe7"}.ri-phone-camera-line:before{content:"\\efe8"}.ri-phone-fill:before{content:"\\efe9"}.ri-phone-find-fill:before{content:"\\efea"}.ri-phone-find-line:before{content:"\\efeb"}.ri-phone-line:before{content:"\\efec"}.ri-phone-lock-fill:before{content:"\\efed"}.ri-phone-lock-line:before{content:"\\efee"}.ri-picture-in-picture-2-fill:before{content:"\\efef"}.ri-picture-in-picture-2-line:before{content:"\\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\\eff1"}.ri-picture-in-picture-exit-line:before{content:"\\eff2"}.ri-picture-in-picture-fill:before{content:"\\eff3"}.ri-picture-in-picture-line:before{content:"\\eff4"}.ri-pie-chart-2-fill:before{content:"\\eff5"}.ri-pie-chart-2-line:before{content:"\\eff6"}.ri-pie-chart-box-fill:before{content:"\\eff7"}.ri-pie-chart-box-line:before{content:"\\eff8"}.ri-pie-chart-fill:before{content:"\\eff9"}.ri-pie-chart-line:before{content:"\\effa"}.ri-pin-distance-fill:before{content:"\\effb"}.ri-pin-distance-line:before{content:"\\effc"}.ri-ping-pong-fill:before{content:"\\effd"}.ri-ping-pong-line:before{content:"\\effe"}.ri-pinterest-fill:before{content:"\\efff"}.ri-pinterest-line:before{content:"\\f000"}.ri-pinyin-input:before{content:"\\f001"}.ri-pixelfed-fill:before{content:"\\f002"}.ri-pixelfed-line:before{content:"\\f003"}.ri-plane-fill:before{content:"\\f004"}.ri-plane-line:before{content:"\\f005"}.ri-plant-fill:before{content:"\\f006"}.ri-plant-line:before{content:"\\f007"}.ri-play-circle-fill:before{content:"\\f008"}.ri-play-circle-line:before{content:"\\f009"}.ri-play-fill:before{content:"\\f00a"}.ri-play-line:before{content:"\\f00b"}.ri-play-list-2-fill:before{content:"\\f00c"}.ri-play-list-2-line:before{content:"\\f00d"}.ri-play-list-add-fill:before{content:"\\f00e"}.ri-play-list-add-line:before{content:"\\f00f"}.ri-play-list-fill:before{content:"\\f010"}.ri-play-list-line:before{content:"\\f011"}.ri-play-mini-fill:before{content:"\\f012"}.ri-play-mini-line:before{content:"\\f013"}.ri-playstation-fill:before{content:"\\f014"}.ri-playstation-line:before{content:"\\f015"}.ri-plug-2-fill:before{content:"\\f016"}.ri-plug-2-line:before{content:"\\f017"}.ri-plug-fill:before{content:"\\f018"}.ri-plug-line:before{content:"\\f019"}.ri-polaroid-2-fill:before{content:"\\f01a"}.ri-polaroid-2-line:before{content:"\\f01b"}.ri-polaroid-fill:before{content:"\\f01c"}.ri-polaroid-line:before{content:"\\f01d"}.ri-police-car-fill:before{content:"\\f01e"}.ri-police-car-line:before{content:"\\f01f"}.ri-price-tag-2-fill:before{content:"\\f020"}.ri-price-tag-2-line:before{content:"\\f021"}.ri-price-tag-3-fill:before{content:"\\f022"}.ri-price-tag-3-line:before{content:"\\f023"}.ri-price-tag-fill:before{content:"\\f024"}.ri-price-tag-line:before{content:"\\f025"}.ri-printer-cloud-fill:before{content:"\\f026"}.ri-printer-cloud-line:before{content:"\\f027"}.ri-printer-fill:before{content:"\\f028"}.ri-printer-line:before{content:"\\f029"}.ri-product-hunt-fill:before{content:"\\f02a"}.ri-product-hunt-line:before{content:"\\f02b"}.ri-profile-fill:before{content:"\\f02c"}.ri-profile-line:before{content:"\\f02d"}.ri-projector-2-fill:before{content:"\\f02e"}.ri-projector-2-line:before{content:"\\f02f"}.ri-projector-fill:before{content:"\\f030"}.ri-projector-line:before{content:"\\f031"}.ri-psychotherapy-fill:before{content:"\\f032"}.ri-psychotherapy-line:before{content:"\\f033"}.ri-pulse-fill:before{content:"\\f034"}.ri-pulse-line:before{content:"\\f035"}.ri-pushpin-2-fill:before{content:"\\f036"}.ri-pushpin-2-line:before{content:"\\f037"}.ri-pushpin-fill:before{content:"\\f038"}.ri-pushpin-line:before{content:"\\f039"}.ri-qq-fill:before{content:"\\f03a"}.ri-qq-line:before{content:"\\f03b"}.ri-qr-code-fill:before{content:"\\f03c"}.ri-qr-code-line:before{content:"\\f03d"}.ri-qr-scan-2-fill:before{content:"\\f03e"}.ri-qr-scan-2-line:before{content:"\\f03f"}.ri-qr-scan-fill:before{content:"\\f040"}.ri-qr-scan-line:before{content:"\\f041"}.ri-question-answer-fill:before{content:"\\f042"}.ri-question-answer-line:before{content:"\\f043"}.ri-question-fill:before{content:"\\f044"}.ri-question-line:before{content:"\\f045"}.ri-question-mark:before{content:"\\f046"}.ri-questionnaire-fill:before{content:"\\f047"}.ri-questionnaire-line:before{content:"\\f048"}.ri-quill-pen-fill:before{content:"\\f049"}.ri-quill-pen-line:before{content:"\\f04a"}.ri-radar-fill:before{content:"\\f04b"}.ri-radar-line:before{content:"\\f04c"}.ri-radio-2-fill:before{content:"\\f04d"}.ri-radio-2-line:before{content:"\\f04e"}.ri-radio-button-fill:before{content:"\\f04f"}.ri-radio-button-line:before{content:"\\f050"}.ri-radio-fill:before{content:"\\f051"}.ri-radio-line:before{content:"\\f052"}.ri-rainbow-fill:before{content:"\\f053"}.ri-rainbow-line:before{content:"\\f054"}.ri-rainy-fill:before{content:"\\f055"}.ri-rainy-line:before{content:"\\f056"}.ri-reactjs-fill:before{content:"\\f057"}.ri-reactjs-line:before{content:"\\f058"}.ri-record-circle-fill:before{content:"\\f059"}.ri-record-circle-line:before{content:"\\f05a"}.ri-record-mail-fill:before{content:"\\f05b"}.ri-record-mail-line:before{content:"\\f05c"}.ri-recycle-fill:before{content:"\\f05d"}.ri-recycle-line:before{content:"\\f05e"}.ri-red-packet-fill:before{content:"\\f05f"}.ri-red-packet-line:before{content:"\\f060"}.ri-reddit-fill:before{content:"\\f061"}.ri-reddit-line:before{content:"\\f062"}.ri-refresh-fill:before{content:"\\f063"}.ri-refresh-line:before{content:"\\f064"}.ri-refund-2-fill:before{content:"\\f065"}.ri-refund-2-line:before{content:"\\f066"}.ri-refund-fill:before{content:"\\f067"}.ri-refund-line:before{content:"\\f068"}.ri-registered-fill:before{content:"\\f069"}.ri-registered-line:before{content:"\\f06a"}.ri-remixicon-fill:before{content:"\\f06b"}.ri-remixicon-line:before{content:"\\f06c"}.ri-remote-control-2-fill:before{content:"\\f06d"}.ri-remote-control-2-line:before{content:"\\f06e"}.ri-remote-control-fill:before{content:"\\f06f"}.ri-remote-control-line:before{content:"\\f070"}.ri-repeat-2-fill:before{content:"\\f071"}.ri-repeat-2-line:before{content:"\\f072"}.ri-repeat-fill:before{content:"\\f073"}.ri-repeat-line:before{content:"\\f074"}.ri-repeat-one-fill:before{content:"\\f075"}.ri-repeat-one-line:before{content:"\\f076"}.ri-reply-all-fill:before{content:"\\f077"}.ri-reply-all-line:before{content:"\\f078"}.ri-reply-fill:before{content:"\\f079"}.ri-reply-line:before{content:"\\f07a"}.ri-reserved-fill:before{content:"\\f07b"}.ri-reserved-line:before{content:"\\f07c"}.ri-rest-time-fill:before{content:"\\f07d"}.ri-rest-time-line:before{content:"\\f07e"}.ri-restart-fill:before{content:"\\f07f"}.ri-restart-line:before{content:"\\f080"}.ri-restaurant-2-fill:before{content:"\\f081"}.ri-restaurant-2-line:before{content:"\\f082"}.ri-restaurant-fill:before{content:"\\f083"}.ri-restaurant-line:before{content:"\\f084"}.ri-rewind-fill:before{content:"\\f085"}.ri-rewind-line:before{content:"\\f086"}.ri-rewind-mini-fill:before{content:"\\f087"}.ri-rewind-mini-line:before{content:"\\f088"}.ri-rhythm-fill:before{content:"\\f089"}.ri-rhythm-line:before{content:"\\f08a"}.ri-riding-fill:before{content:"\\f08b"}.ri-riding-line:before{content:"\\f08c"}.ri-road-map-fill:before{content:"\\f08d"}.ri-road-map-line:before{content:"\\f08e"}.ri-roadster-fill:before{content:"\\f08f"}.ri-roadster-line:before{content:"\\f090"}.ri-robot-fill:before{content:"\\f091"}.ri-robot-line:before{content:"\\f092"}.ri-rocket-2-fill:before{content:"\\f093"}.ri-rocket-2-line:before{content:"\\f094"}.ri-rocket-fill:before{content:"\\f095"}.ri-rocket-line:before{content:"\\f096"}.ri-rotate-lock-fill:before{content:"\\f097"}.ri-rotate-lock-line:before{content:"\\f098"}.ri-rounded-corner:before{content:"\\f099"}.ri-route-fill:before{content:"\\f09a"}.ri-route-line:before{content:"\\f09b"}.ri-router-fill:before{content:"\\f09c"}.ri-router-line:before{content:"\\f09d"}.ri-rss-fill:before{content:"\\f09e"}.ri-rss-line:before{content:"\\f09f"}.ri-ruler-2-fill:before{content:"\\f0a0"}.ri-ruler-2-line:before{content:"\\f0a1"}.ri-ruler-fill:before{content:"\\f0a2"}.ri-ruler-line:before{content:"\\f0a3"}.ri-run-fill:before{content:"\\f0a4"}.ri-run-line:before{content:"\\f0a5"}.ri-safari-fill:before{content:"\\f0a6"}.ri-safari-line:before{content:"\\f0a7"}.ri-safe-2-fill:before{content:"\\f0a8"}.ri-safe-2-line:before{content:"\\f0a9"}.ri-safe-fill:before{content:"\\f0aa"}.ri-safe-line:before{content:"\\f0ab"}.ri-sailboat-fill:before{content:"\\f0ac"}.ri-sailboat-line:before{content:"\\f0ad"}.ri-save-2-fill:before{content:"\\f0ae"}.ri-save-2-line:before{content:"\\f0af"}.ri-save-3-fill:before{content:"\\f0b0"}.ri-save-3-line:before{content:"\\f0b1"}.ri-save-fill:before{content:"\\f0b2"}.ri-save-line:before{content:"\\f0b3"}.ri-scales-2-fill:before{content:"\\f0b4"}.ri-scales-2-line:before{content:"\\f0b5"}.ri-scales-3-fill:before{content:"\\f0b6"}.ri-scales-3-line:before{content:"\\f0b7"}.ri-scales-fill:before{content:"\\f0b8"}.ri-scales-line:before{content:"\\f0b9"}.ri-scan-2-fill:before{content:"\\f0ba"}.ri-scan-2-line:before{content:"\\f0bb"}.ri-scan-fill:before{content:"\\f0bc"}.ri-scan-line:before{content:"\\f0bd"}.ri-scissors-2-fill:before{content:"\\f0be"}.ri-scissors-2-line:before{content:"\\f0bf"}.ri-scissors-cut-fill:before{content:"\\f0c0"}.ri-scissors-cut-line:before{content:"\\f0c1"}.ri-scissors-fill:before{content:"\\f0c2"}.ri-scissors-line:before{content:"\\f0c3"}.ri-screenshot-2-fill:before{content:"\\f0c4"}.ri-screenshot-2-line:before{content:"\\f0c5"}.ri-screenshot-fill:before{content:"\\f0c6"}.ri-screenshot-line:before{content:"\\f0c7"}.ri-sd-card-fill:before{content:"\\f0c8"}.ri-sd-card-line:before{content:"\\f0c9"}.ri-sd-card-mini-fill:before{content:"\\f0ca"}.ri-sd-card-mini-line:before{content:"\\f0cb"}.ri-search-2-fill:before{content:"\\f0cc"}.ri-search-2-line:before{content:"\\f0cd"}.ri-search-eye-fill:before{content:"\\f0ce"}.ri-search-eye-line:before{content:"\\f0cf"}.ri-search-fill:before{content:"\\f0d0"}.ri-search-line:before{content:"\\f0d1"}.ri-secure-payment-fill:before{content:"\\f0d2"}.ri-secure-payment-line:before{content:"\\f0d3"}.ri-seedling-fill:before{content:"\\f0d4"}.ri-seedling-line:before{content:"\\f0d5"}.ri-send-backward:before{content:"\\f0d6"}.ri-send-plane-2-fill:before{content:"\\f0d7"}.ri-send-plane-2-line:before{content:"\\f0d8"}.ri-send-plane-fill:before{content:"\\f0d9"}.ri-send-plane-line:before{content:"\\f0da"}.ri-send-to-back:before{content:"\\f0db"}.ri-sensor-fill:before{content:"\\f0dc"}.ri-sensor-line:before{content:"\\f0dd"}.ri-separator:before{content:"\\f0de"}.ri-server-fill:before{content:"\\f0df"}.ri-server-line:before{content:"\\f0e0"}.ri-service-fill:before{content:"\\f0e1"}.ri-service-line:before{content:"\\f0e2"}.ri-settings-2-fill:before{content:"\\f0e3"}.ri-settings-2-line:before{content:"\\f0e4"}.ri-settings-3-fill:before{content:"\\f0e5"}.ri-settings-3-line:before{content:"\\f0e6"}.ri-settings-4-fill:before{content:"\\f0e7"}.ri-settings-4-line:before{content:"\\f0e8"}.ri-settings-5-fill:before{content:"\\f0e9"}.ri-settings-5-line:before{content:"\\f0ea"}.ri-settings-6-fill:before{content:"\\f0eb"}.ri-settings-6-line:before{content:"\\f0ec"}.ri-settings-fill:before{content:"\\f0ed"}.ri-settings-line:before{content:"\\f0ee"}.ri-shape-2-fill:before{content:"\\f0ef"}.ri-shape-2-line:before{content:"\\f0f0"}.ri-shape-fill:before{content:"\\f0f1"}.ri-shape-line:before{content:"\\f0f2"}.ri-share-box-fill:before{content:"\\f0f3"}.ri-share-box-line:before{content:"\\f0f4"}.ri-share-circle-fill:before{content:"\\f0f5"}.ri-share-circle-line:before{content:"\\f0f6"}.ri-share-fill:before{content:"\\f0f7"}.ri-share-forward-2-fill:before{content:"\\f0f8"}.ri-share-forward-2-line:before{content:"\\f0f9"}.ri-share-forward-box-fill:before{content:"\\f0fa"}.ri-share-forward-box-line:before{content:"\\f0fb"}.ri-share-forward-fill:before{content:"\\f0fc"}.ri-share-forward-line:before{content:"\\f0fd"}.ri-share-line:before{content:"\\f0fe"}.ri-shield-check-fill:before{content:"\\f0ff"}.ri-shield-check-line:before{content:"\\f100"}.ri-shield-cross-fill:before{content:"\\f101"}.ri-shield-cross-line:before{content:"\\f102"}.ri-shield-fill:before{content:"\\f103"}.ri-shield-flash-fill:before{content:"\\f104"}.ri-shield-flash-line:before{content:"\\f105"}.ri-shield-keyhole-fill:before{content:"\\f106"}.ri-shield-keyhole-line:before{content:"\\f107"}.ri-shield-line:before{content:"\\f108"}.ri-shield-star-fill:before{content:"\\f109"}.ri-shield-star-line:before{content:"\\f10a"}.ri-shield-user-fill:before{content:"\\f10b"}.ri-shield-user-line:before{content:"\\f10c"}.ri-ship-2-fill:before{content:"\\f10d"}.ri-ship-2-line:before{content:"\\f10e"}.ri-ship-fill:before{content:"\\f10f"}.ri-ship-line:before{content:"\\f110"}.ri-shirt-fill:before{content:"\\f111"}.ri-shirt-line:before{content:"\\f112"}.ri-shopping-bag-2-fill:before{content:"\\f113"}.ri-shopping-bag-2-line:before{content:"\\f114"}.ri-shopping-bag-3-fill:before{content:"\\f115"}.ri-shopping-bag-3-line:before{content:"\\f116"}.ri-shopping-bag-fill:before{content:"\\f117"}.ri-shopping-bag-line:before{content:"\\f118"}.ri-shopping-basket-2-fill:before{content:"\\f119"}.ri-shopping-basket-2-line:before{content:"\\f11a"}.ri-shopping-basket-fill:before{content:"\\f11b"}.ri-shopping-basket-line:before{content:"\\f11c"}.ri-shopping-cart-2-fill:before{content:"\\f11d"}.ri-shopping-cart-2-line:before{content:"\\f11e"}.ri-shopping-cart-fill:before{content:"\\f11f"}.ri-shopping-cart-line:before{content:"\\f120"}.ri-showers-fill:before{content:"\\f121"}.ri-showers-line:before{content:"\\f122"}.ri-shuffle-fill:before{content:"\\f123"}.ri-shuffle-line:before{content:"\\f124"}.ri-shut-down-fill:before{content:"\\f125"}.ri-shut-down-line:before{content:"\\f126"}.ri-side-bar-fill:before{content:"\\f127"}.ri-side-bar-line:before{content:"\\f128"}.ri-signal-tower-fill:before{content:"\\f129"}.ri-signal-tower-line:before{content:"\\f12a"}.ri-signal-wifi-1-fill:before{content:"\\f12b"}.ri-signal-wifi-1-line:before{content:"\\f12c"}.ri-signal-wifi-2-fill:before{content:"\\f12d"}.ri-signal-wifi-2-line:before{content:"\\f12e"}.ri-signal-wifi-3-fill:before{content:"\\f12f"}.ri-signal-wifi-3-line:before{content:"\\f130"}.ri-signal-wifi-error-fill:before{content:"\\f131"}.ri-signal-wifi-error-line:before{content:"\\f132"}.ri-signal-wifi-fill:before{content:"\\f133"}.ri-signal-wifi-line:before{content:"\\f134"}.ri-signal-wifi-off-fill:before{content:"\\f135"}.ri-signal-wifi-off-line:before{content:"\\f136"}.ri-sim-card-2-fill:before{content:"\\f137"}.ri-sim-card-2-line:before{content:"\\f138"}.ri-sim-card-fill:before{content:"\\f139"}.ri-sim-card-line:before{content:"\\f13a"}.ri-single-quotes-l:before{content:"\\f13b"}.ri-single-quotes-r:before{content:"\\f13c"}.ri-sip-fill:before{content:"\\f13d"}.ri-sip-line:before{content:"\\f13e"}.ri-skip-back-fill:before{content:"\\f13f"}.ri-skip-back-line:before{content:"\\f140"}.ri-skip-back-mini-fill:before{content:"\\f141"}.ri-skip-back-mini-line:before{content:"\\f142"}.ri-skip-forward-fill:before{content:"\\f143"}.ri-skip-forward-line:before{content:"\\f144"}.ri-skip-forward-mini-fill:before{content:"\\f145"}.ri-skip-forward-mini-line:before{content:"\\f146"}.ri-skull-2-fill:before{content:"\\f147"}.ri-skull-2-line:before{content:"\\f148"}.ri-skull-fill:before{content:"\\f149"}.ri-skull-line:before{content:"\\f14a"}.ri-skype-fill:before{content:"\\f14b"}.ri-skype-line:before{content:"\\f14c"}.ri-slack-fill:before{content:"\\f14d"}.ri-slack-line:before{content:"\\f14e"}.ri-slice-fill:before{content:"\\f14f"}.ri-slice-line:before{content:"\\f150"}.ri-slideshow-2-fill:before{content:"\\f151"}.ri-slideshow-2-line:before{content:"\\f152"}.ri-slideshow-3-fill:before{content:"\\f153"}.ri-slideshow-3-line:before{content:"\\f154"}.ri-slideshow-4-fill:before{content:"\\f155"}.ri-slideshow-4-line:before{content:"\\f156"}.ri-slideshow-fill:before{content:"\\f157"}.ri-slideshow-line:before{content:"\\f158"}.ri-smartphone-fill:before{content:"\\f159"}.ri-smartphone-line:before{content:"\\f15a"}.ri-snapchat-fill:before{content:"\\f15b"}.ri-snapchat-line:before{content:"\\f15c"}.ri-snowy-fill:before{content:"\\f15d"}.ri-snowy-line:before{content:"\\f15e"}.ri-sort-asc:before{content:"\\f15f"}.ri-sort-desc:before{content:"\\f160"}.ri-sound-module-fill:before{content:"\\f161"}.ri-sound-module-line:before{content:"\\f162"}.ri-soundcloud-fill:before{content:"\\f163"}.ri-soundcloud-line:before{content:"\\f164"}.ri-space-ship-fill:before{content:"\\f165"}.ri-space-ship-line:before{content:"\\f166"}.ri-space:before{content:"\\f167"}.ri-spam-2-fill:before{content:"\\f168"}.ri-spam-2-line:before{content:"\\f169"}.ri-spam-3-fill:before{content:"\\f16a"}.ri-spam-3-line:before{content:"\\f16b"}.ri-spam-fill:before{content:"\\f16c"}.ri-spam-line:before{content:"\\f16d"}.ri-speaker-2-fill:before{content:"\\f16e"}.ri-speaker-2-line:before{content:"\\f16f"}.ri-speaker-3-fill:before{content:"\\f170"}.ri-speaker-3-line:before{content:"\\f171"}.ri-speaker-fill:before{content:"\\f172"}.ri-speaker-line:before{content:"\\f173"}.ri-spectrum-fill:before{content:"\\f174"}.ri-spectrum-line:before{content:"\\f175"}.ri-speed-fill:before{content:"\\f176"}.ri-speed-line:before{content:"\\f177"}.ri-speed-mini-fill:before{content:"\\f178"}.ri-speed-mini-line:before{content:"\\f179"}.ri-split-cells-horizontal:before{content:"\\f17a"}.ri-split-cells-vertical:before{content:"\\f17b"}.ri-spotify-fill:before{content:"\\f17c"}.ri-spotify-line:before{content:"\\f17d"}.ri-spy-fill:before{content:"\\f17e"}.ri-spy-line:before{content:"\\f17f"}.ri-stack-fill:before{content:"\\f180"}.ri-stack-line:before{content:"\\f181"}.ri-stack-overflow-fill:before{content:"\\f182"}.ri-stack-overflow-line:before{content:"\\f183"}.ri-stackshare-fill:before{content:"\\f184"}.ri-stackshare-line:before{content:"\\f185"}.ri-star-fill:before{content:"\\f186"}.ri-star-half-fill:before{content:"\\f187"}.ri-star-half-line:before{content:"\\f188"}.ri-star-half-s-fill:before{content:"\\f189"}.ri-star-half-s-line:before{content:"\\f18a"}.ri-star-line:before{content:"\\f18b"}.ri-star-s-fill:before{content:"\\f18c"}.ri-star-s-line:before{content:"\\f18d"}.ri-star-smile-fill:before{content:"\\f18e"}.ri-star-smile-line:before{content:"\\f18f"}.ri-steam-fill:before{content:"\\f190"}.ri-steam-line:before{content:"\\f191"}.ri-steering-2-fill:before{content:"\\f192"}.ri-steering-2-line:before{content:"\\f193"}.ri-steering-fill:before{content:"\\f194"}.ri-steering-line:before{content:"\\f195"}.ri-stethoscope-fill:before{content:"\\f196"}.ri-stethoscope-line:before{content:"\\f197"}.ri-sticky-note-2-fill:before{content:"\\f198"}.ri-sticky-note-2-line:before{content:"\\f199"}.ri-sticky-note-fill:before{content:"\\f19a"}.ri-sticky-note-line:before{content:"\\f19b"}.ri-stock-fill:before{content:"\\f19c"}.ri-stock-line:before{content:"\\f19d"}.ri-stop-circle-fill:before{content:"\\f19e"}.ri-stop-circle-line:before{content:"\\f19f"}.ri-stop-fill:before{content:"\\f1a0"}.ri-stop-line:before{content:"\\f1a1"}.ri-stop-mini-fill:before{content:"\\f1a2"}.ri-stop-mini-line:before{content:"\\f1a3"}.ri-store-2-fill:before{content:"\\f1a4"}.ri-store-2-line:before{content:"\\f1a5"}.ri-store-3-fill:before{content:"\\f1a6"}.ri-store-3-line:before{content:"\\f1a7"}.ri-store-fill:before{content:"\\f1a8"}.ri-store-line:before{content:"\\f1a9"}.ri-strikethrough-2:before{content:"\\f1aa"}.ri-strikethrough:before{content:"\\f1ab"}.ri-subscript-2:before{content:"\\f1ac"}.ri-subscript:before{content:"\\f1ad"}.ri-subtract-fill:before{content:"\\f1ae"}.ri-subtract-line:before{content:"\\f1af"}.ri-subway-fill:before{content:"\\f1b0"}.ri-subway-line:before{content:"\\f1b1"}.ri-subway-wifi-fill:before{content:"\\f1b2"}.ri-subway-wifi-line:before{content:"\\f1b3"}.ri-suitcase-2-fill:before{content:"\\f1b4"}.ri-suitcase-2-line:before{content:"\\f1b5"}.ri-suitcase-3-fill:before{content:"\\f1b6"}.ri-suitcase-3-line:before{content:"\\f1b7"}.ri-suitcase-fill:before{content:"\\f1b8"}.ri-suitcase-line:before{content:"\\f1b9"}.ri-sun-cloudy-fill:before{content:"\\f1ba"}.ri-sun-cloudy-line:before{content:"\\f1bb"}.ri-sun-fill:before{content:"\\f1bc"}.ri-sun-foggy-fill:before{content:"\\f1bd"}.ri-sun-foggy-line:before{content:"\\f1be"}.ri-sun-line:before{content:"\\f1bf"}.ri-superscript-2:before{content:"\\f1c0"}.ri-superscript:before{content:"\\f1c1"}.ri-surgical-mask-fill:before{content:"\\f1c2"}.ri-surgical-mask-line:before{content:"\\f1c3"}.ri-surround-sound-fill:before{content:"\\f1c4"}.ri-surround-sound-line:before{content:"\\f1c5"}.ri-survey-fill:before{content:"\\f1c6"}.ri-survey-line:before{content:"\\f1c7"}.ri-swap-box-fill:before{content:"\\f1c8"}.ri-swap-box-line:before{content:"\\f1c9"}.ri-swap-fill:before{content:"\\f1ca"}.ri-swap-line:before{content:"\\f1cb"}.ri-switch-fill:before{content:"\\f1cc"}.ri-switch-line:before{content:"\\f1cd"}.ri-sword-fill:before{content:"\\f1ce"}.ri-sword-line:before{content:"\\f1cf"}.ri-syringe-fill:before{content:"\\f1d0"}.ri-syringe-line:before{content:"\\f1d1"}.ri-t-box-fill:before{content:"\\f1d2"}.ri-t-box-line:before{content:"\\f1d3"}.ri-t-shirt-2-fill:before{content:"\\f1d4"}.ri-t-shirt-2-line:before{content:"\\f1d5"}.ri-t-shirt-air-fill:before{content:"\\f1d6"}.ri-t-shirt-air-line:before{content:"\\f1d7"}.ri-t-shirt-fill:before{content:"\\f1d8"}.ri-t-shirt-line:before{content:"\\f1d9"}.ri-table-2:before{content:"\\f1da"}.ri-table-alt-fill:before{content:"\\f1db"}.ri-table-alt-line:before{content:"\\f1dc"}.ri-table-fill:before{content:"\\f1dd"}.ri-table-line:before{content:"\\f1de"}.ri-tablet-fill:before{content:"\\f1df"}.ri-tablet-line:before{content:"\\f1e0"}.ri-takeaway-fill:before{content:"\\f1e1"}.ri-takeaway-line:before{content:"\\f1e2"}.ri-taobao-fill:before{content:"\\f1e3"}.ri-taobao-line:before{content:"\\f1e4"}.ri-tape-fill:before{content:"\\f1e5"}.ri-tape-line:before{content:"\\f1e6"}.ri-task-fill:before{content:"\\f1e7"}.ri-task-line:before{content:"\\f1e8"}.ri-taxi-fill:before{content:"\\f1e9"}.ri-taxi-line:before{content:"\\f1ea"}.ri-taxi-wifi-fill:before{content:"\\f1eb"}.ri-taxi-wifi-line:before{content:"\\f1ec"}.ri-team-fill:before{content:"\\f1ed"}.ri-team-line:before{content:"\\f1ee"}.ri-telegram-fill:before{content:"\\f1ef"}.ri-telegram-line:before{content:"\\f1f0"}.ri-temp-cold-fill:before{content:"\\f1f1"}.ri-temp-cold-line:before{content:"\\f1f2"}.ri-temp-hot-fill:before{content:"\\f1f3"}.ri-temp-hot-line:before{content:"\\f1f4"}.ri-terminal-box-fill:before{content:"\\f1f5"}.ri-terminal-box-line:before{content:"\\f1f6"}.ri-terminal-fill:before{content:"\\f1f7"}.ri-terminal-line:before{content:"\\f1f8"}.ri-terminal-window-fill:before{content:"\\f1f9"}.ri-terminal-window-line:before{content:"\\f1fa"}.ri-test-tube-fill:before{content:"\\f1fb"}.ri-test-tube-line:before{content:"\\f1fc"}.ri-text-direction-l:before{content:"\\f1fd"}.ri-text-direction-r:before{content:"\\f1fe"}.ri-text-spacing:before{content:"\\f1ff"}.ri-text-wrap:before{content:"\\f200"}.ri-text:before{content:"\\f201"}.ri-thermometer-fill:before{content:"\\f202"}.ri-thermometer-line:before{content:"\\f203"}.ri-thumb-down-fill:before{content:"\\f204"}.ri-thumb-down-line:before{content:"\\f205"}.ri-thumb-up-fill:before{content:"\\f206"}.ri-thumb-up-line:before{content:"\\f207"}.ri-thunderstorms-fill:before{content:"\\f208"}.ri-thunderstorms-line:before{content:"\\f209"}.ri-ticket-2-fill:before{content:"\\f20a"}.ri-ticket-2-line:before{content:"\\f20b"}.ri-ticket-fill:before{content:"\\f20c"}.ri-ticket-line:before{content:"\\f20d"}.ri-time-fill:before{content:"\\f20e"}.ri-time-line:before{content:"\\f20f"}.ri-timer-2-fill:before{content:"\\f210"}.ri-timer-2-line:before{content:"\\f211"}.ri-timer-fill:before{content:"\\f212"}.ri-timer-flash-fill:before{content:"\\f213"}.ri-timer-flash-line:before{content:"\\f214"}.ri-timer-line:before{content:"\\f215"}.ri-todo-fill:before{content:"\\f216"}.ri-todo-line:before{content:"\\f217"}.ri-toggle-fill:before{content:"\\f218"}.ri-toggle-line:before{content:"\\f219"}.ri-tools-fill:before{content:"\\f21a"}.ri-tools-line:before{content:"\\f21b"}.ri-tornado-fill:before{content:"\\f21c"}.ri-tornado-line:before{content:"\\f21d"}.ri-trademark-fill:before{content:"\\f21e"}.ri-trademark-line:before{content:"\\f21f"}.ri-traffic-light-fill:before{content:"\\f220"}.ri-traffic-light-line:before{content:"\\f221"}.ri-train-fill:before{content:"\\f222"}.ri-train-line:before{content:"\\f223"}.ri-train-wifi-fill:before{content:"\\f224"}.ri-train-wifi-line:before{content:"\\f225"}.ri-translate-2:before{content:"\\f226"}.ri-translate:before{content:"\\f227"}.ri-travesti-fill:before{content:"\\f228"}.ri-travesti-line:before{content:"\\f229"}.ri-treasure-map-fill:before{content:"\\f22a"}.ri-treasure-map-line:before{content:"\\f22b"}.ri-trello-fill:before{content:"\\f22c"}.ri-trello-line:before{content:"\\f22d"}.ri-trophy-fill:before{content:"\\f22e"}.ri-trophy-line:before{content:"\\f22f"}.ri-truck-fill:before{content:"\\f230"}.ri-truck-line:before{content:"\\f231"}.ri-tumblr-fill:before{content:"\\f232"}.ri-tumblr-line:before{content:"\\f233"}.ri-tv-2-fill:before{content:"\\f234"}.ri-tv-2-line:before{content:"\\f235"}.ri-tv-fill:before{content:"\\f236"}.ri-tv-line:before{content:"\\f237"}.ri-twitch-fill:before{content:"\\f238"}.ri-twitch-line:before{content:"\\f239"}.ri-twitter-fill:before{content:"\\f23a"}.ri-twitter-line:before{content:"\\f23b"}.ri-typhoon-fill:before{content:"\\f23c"}.ri-typhoon-line:before{content:"\\f23d"}.ri-u-disk-fill:before{content:"\\f23e"}.ri-u-disk-line:before{content:"\\f23f"}.ri-ubuntu-fill:before{content:"\\f240"}.ri-ubuntu-line:before{content:"\\f241"}.ri-umbrella-fill:before{content:"\\f242"}.ri-umbrella-line:before{content:"\\f243"}.ri-underline:before{content:"\\f244"}.ri-uninstall-fill:before{content:"\\f245"}.ri-uninstall-line:before{content:"\\f246"}.ri-unsplash-fill:before{content:"\\f247"}.ri-unsplash-line:before{content:"\\f248"}.ri-upload-2-fill:before{content:"\\f249"}.ri-upload-2-line:before{content:"\\f24a"}.ri-upload-cloud-2-fill:before{content:"\\f24b"}.ri-upload-cloud-2-line:before{content:"\\f24c"}.ri-upload-cloud-fill:before{content:"\\f24d"}.ri-upload-cloud-line:before{content:"\\f24e"}.ri-upload-fill:before{content:"\\f24f"}.ri-upload-line:before{content:"\\f250"}.ri-usb-fill:before{content:"\\f251"}.ri-usb-line:before{content:"\\f252"}.ri-user-2-fill:before{content:"\\f253"}.ri-user-2-line:before{content:"\\f254"}.ri-user-3-fill:before{content:"\\f255"}.ri-user-3-line:before{content:"\\f256"}.ri-user-4-fill:before{content:"\\f257"}.ri-user-4-line:before{content:"\\f258"}.ri-user-5-fill:before{content:"\\f259"}.ri-user-5-line:before{content:"\\f25a"}.ri-user-6-fill:before{content:"\\f25b"}.ri-user-6-line:before{content:"\\f25c"}.ri-user-add-fill:before{content:"\\f25d"}.ri-user-add-line:before{content:"\\f25e"}.ri-user-fill:before{content:"\\f25f"}.ri-user-follow-fill:before{content:"\\f260"}.ri-user-follow-line:before{content:"\\f261"}.ri-user-heart-fill:before{content:"\\f262"}.ri-user-heart-line:before{content:"\\f263"}.ri-user-line:before{content:"\\f264"}.ri-user-location-fill:before{content:"\\f265"}.ri-user-location-line:before{content:"\\f266"}.ri-user-received-2-fill:before{content:"\\f267"}.ri-user-received-2-line:before{content:"\\f268"}.ri-user-received-fill:before{content:"\\f269"}.ri-user-received-line:before{content:"\\f26a"}.ri-user-search-fill:before{content:"\\f26b"}.ri-user-search-line:before{content:"\\f26c"}.ri-user-settings-fill:before{content:"\\f26d"}.ri-user-settings-line:before{content:"\\f26e"}.ri-user-shared-2-fill:before{content:"\\f26f"}.ri-user-shared-2-line:before{content:"\\f270"}.ri-user-shared-fill:before{content:"\\f271"}.ri-user-shared-line:before{content:"\\f272"}.ri-user-smile-fill:before{content:"\\f273"}.ri-user-smile-line:before{content:"\\f274"}.ri-user-star-fill:before{content:"\\f275"}.ri-user-star-line:before{content:"\\f276"}.ri-user-unfollow-fill:before{content:"\\f277"}.ri-user-unfollow-line:before{content:"\\f278"}.ri-user-voice-fill:before{content:"\\f279"}.ri-user-voice-line:before{content:"\\f27a"}.ri-video-add-fill:before{content:"\\f27b"}.ri-video-add-line:before{content:"\\f27c"}.ri-video-chat-fill:before{content:"\\f27d"}.ri-video-chat-line:before{content:"\\f27e"}.ri-video-download-fill:before{content:"\\f27f"}.ri-video-download-line:before{content:"\\f280"}.ri-video-fill:before{content:"\\f281"}.ri-video-line:before{content:"\\f282"}.ri-video-upload-fill:before{content:"\\f283"}.ri-video-upload-line:before{content:"\\f284"}.ri-vidicon-2-fill:before{content:"\\f285"}.ri-vidicon-2-line:before{content:"\\f286"}.ri-vidicon-fill:before{content:"\\f287"}.ri-vidicon-line:before{content:"\\f288"}.ri-vimeo-fill:before{content:"\\f289"}.ri-vimeo-line:before{content:"\\f28a"}.ri-vip-crown-2-fill:before{content:"\\f28b"}.ri-vip-crown-2-line:before{content:"\\f28c"}.ri-vip-crown-fill:before{content:"\\f28d"}.ri-vip-crown-line:before{content:"\\f28e"}.ri-vip-diamond-fill:before{content:"\\f28f"}.ri-vip-diamond-line:before{content:"\\f290"}.ri-vip-fill:before{content:"\\f291"}.ri-vip-line:before{content:"\\f292"}.ri-virus-fill:before{content:"\\f293"}.ri-virus-line:before{content:"\\f294"}.ri-visa-fill:before{content:"\\f295"}.ri-visa-line:before{content:"\\f296"}.ri-voice-recognition-fill:before{content:"\\f297"}.ri-voice-recognition-line:before{content:"\\f298"}.ri-voiceprint-fill:before{content:"\\f299"}.ri-voiceprint-line:before{content:"\\f29a"}.ri-volume-down-fill:before{content:"\\f29b"}.ri-volume-down-line:before{content:"\\f29c"}.ri-volume-mute-fill:before{content:"\\f29d"}.ri-volume-mute-line:before{content:"\\f29e"}.ri-volume-off-vibrate-fill:before{content:"\\f29f"}.ri-volume-off-vibrate-line:before{content:"\\f2a0"}.ri-volume-up-fill:before{content:"\\f2a1"}.ri-volume-up-line:before{content:"\\f2a2"}.ri-volume-vibrate-fill:before{content:"\\f2a3"}.ri-volume-vibrate-line:before{content:"\\f2a4"}.ri-vuejs-fill:before{content:"\\f2a5"}.ri-vuejs-line:before{content:"\\f2a6"}.ri-walk-fill:before{content:"\\f2a7"}.ri-walk-line:before{content:"\\f2a8"}.ri-wallet-2-fill:before{content:"\\f2a9"}.ri-wallet-2-line:before{content:"\\f2aa"}.ri-wallet-3-fill:before{content:"\\f2ab"}.ri-wallet-3-line:before{content:"\\f2ac"}.ri-wallet-fill:before{content:"\\f2ad"}.ri-wallet-line:before{content:"\\f2ae"}.ri-water-flash-fill:before{content:"\\f2af"}.ri-water-flash-line:before{content:"\\f2b0"}.ri-webcam-fill:before{content:"\\f2b1"}.ri-webcam-line:before{content:"\\f2b2"}.ri-wechat-2-fill:before{content:"\\f2b3"}.ri-wechat-2-line:before{content:"\\f2b4"}.ri-wechat-fill:before{content:"\\f2b5"}.ri-wechat-line:before{content:"\\f2b6"}.ri-wechat-pay-fill:before{content:"\\f2b7"}.ri-wechat-pay-line:before{content:"\\f2b8"}.ri-weibo-fill:before{content:"\\f2b9"}.ri-weibo-line:before{content:"\\f2ba"}.ri-whatsapp-fill:before{content:"\\f2bb"}.ri-whatsapp-line:before{content:"\\f2bc"}.ri-wheelchair-fill:before{content:"\\f2bd"}.ri-wheelchair-line:before{content:"\\f2be"}.ri-wifi-fill:before{content:"\\f2bf"}.ri-wifi-line:before{content:"\\f2c0"}.ri-wifi-off-fill:before{content:"\\f2c1"}.ri-wifi-off-line:before{content:"\\f2c2"}.ri-window-2-fill:before{content:"\\f2c3"}.ri-window-2-line:before{content:"\\f2c4"}.ri-window-fill:before{content:"\\f2c5"}.ri-window-line:before{content:"\\f2c6"}.ri-windows-fill:before{content:"\\f2c7"}.ri-windows-line:before{content:"\\f2c8"}.ri-windy-fill:before{content:"\\f2c9"}.ri-windy-line:before{content:"\\f2ca"}.ri-wireless-charging-fill:before{content:"\\f2cb"}.ri-wireless-charging-line:before{content:"\\f2cc"}.ri-women-fill:before{content:"\\f2cd"}.ri-women-line:before{content:"\\f2ce"}.ri-wubi-input:before{content:"\\f2cf"}.ri-xbox-fill:before{content:"\\f2d0"}.ri-xbox-line:before{content:"\\f2d1"}.ri-xing-fill:before{content:"\\f2d2"}.ri-xing-line:before{content:"\\f2d3"}.ri-youtube-fill:before{content:"\\f2d4"}.ri-youtube-line:before{content:"\\f2d5"}.ri-zcool-fill:before{content:"\\f2d6"}.ri-zcool-line:before{content:"\\f2d7"}.ri-zhihu-fill:before{content:"\\f2d8"}.ri-zhihu-line:before{content:"\\f2d9"}.ri-zoom-in-fill:before{content:"\\f2da"}.ri-zoom-in-line:before{content:"\\f2db"}.ri-zoom-out-fill:before{content:"\\f2dc"}.ri-zoom-out-line:before{content:"\\f2dd"}.ri-zzz-fill:before{content:"\\f2de"}.ri-zzz-line:before{content:"\\f2df"}.ri-arrow-down-double-fill:before{content:"\\f2e0"}.ri-arrow-down-double-line:before{content:"\\f2e1"}.ri-arrow-left-double-fill:before{content:"\\f2e2"}.ri-arrow-left-double-line:before{content:"\\f2e3"}.ri-arrow-right-double-fill:before{content:"\\f2e4"}.ri-arrow-right-double-line:before{content:"\\f2e5"}.ri-arrow-turn-back-fill:before{content:"\\f2e6"}.ri-arrow-turn-back-line:before{content:"\\f2e7"}.ri-arrow-turn-forward-fill:before{content:"\\f2e8"}.ri-arrow-turn-forward-line:before{content:"\\f2e9"}.ri-arrow-up-double-fill:before{content:"\\f2ea"}.ri-arrow-up-double-line:before{content:"\\f2eb"}.ri-bard-fill:before{content:"\\f2ec"}.ri-bard-line:before{content:"\\f2ed"}.ri-bootstrap-fill:before{content:"\\f2ee"}.ri-bootstrap-line:before{content:"\\f2ef"}.ri-box-1-fill:before{content:"\\f2f0"}.ri-box-1-line:before{content:"\\f2f1"}.ri-box-2-fill:before{content:"\\f2f2"}.ri-box-2-line:before{content:"\\f2f3"}.ri-box-3-fill:before{content:"\\f2f4"}.ri-box-3-line:before{content:"\\f2f5"}.ri-brain-fill:before{content:"\\f2f6"}.ri-brain-line:before{content:"\\f2f7"}.ri-candle-fill:before{content:"\\f2f8"}.ri-candle-line:before{content:"\\f2f9"}.ri-cash-fill:before{content:"\\f2fa"}.ri-cash-line:before{content:"\\f2fb"}.ri-contract-left-fill:before{content:"\\f2fc"}.ri-contract-left-line:before{content:"\\f2fd"}.ri-contract-left-right-fill:before{content:"\\f2fe"}.ri-contract-left-right-line:before{content:"\\f2ff"}.ri-contract-right-fill:before{content:"\\f300"}.ri-contract-right-line:before{content:"\\f301"}.ri-contract-up-down-fill:before{content:"\\f302"}.ri-contract-up-down-line:before{content:"\\f303"}.ri-copilot-fill:before{content:"\\f304"}.ri-copilot-line:before{content:"\\f305"}.ri-corner-down-left-fill:before{content:"\\f306"}.ri-corner-down-left-line:before{content:"\\f307"}.ri-corner-down-right-fill:before{content:"\\f308"}.ri-corner-down-right-line:before{content:"\\f309"}.ri-corner-left-down-fill:before{content:"\\f30a"}.ri-corner-left-down-line:before{content:"\\f30b"}.ri-corner-left-up-fill:before{content:"\\f30c"}.ri-corner-left-up-line:before{content:"\\f30d"}.ri-corner-right-down-fill:before{content:"\\f30e"}.ri-corner-right-down-line:before{content:"\\f30f"}.ri-corner-right-up-fill:before{content:"\\f310"}.ri-corner-right-up-line:before{content:"\\f311"}.ri-corner-up-left-double-fill:before{content:"\\f312"}.ri-corner-up-left-double-line:before{content:"\\f313"}.ri-corner-up-left-fill:before{content:"\\f314"}.ri-corner-up-left-line:before{content:"\\f315"}.ri-corner-up-right-double-fill:before{content:"\\f316"}.ri-corner-up-right-double-line:before{content:"\\f317"}.ri-corner-up-right-fill:before{content:"\\f318"}.ri-corner-up-right-line:before{content:"\\f319"}.ri-cross-fill:before{content:"\\f31a"}.ri-cross-line:before{content:"\\f31b"}.ri-edge-new-fill:before{content:"\\f31c"}.ri-edge-new-line:before{content:"\\f31d"}.ri-equal-fill:before{content:"\\f31e"}.ri-equal-line:before{content:"\\f31f"}.ri-expand-left-fill:before{content:"\\f320"}.ri-expand-left-line:before{content:"\\f321"}.ri-expand-left-right-fill:before{content:"\\f322"}.ri-expand-left-right-line:before{content:"\\f323"}.ri-expand-right-fill:before{content:"\\f324"}.ri-expand-right-line:before{content:"\\f325"}.ri-expand-up-down-fill:before{content:"\\f326"}.ri-expand-up-down-line:before{content:"\\f327"}.ri-flickr-fill:before{content:"\\f328"}.ri-flickr-line:before{content:"\\f329"}.ri-forward-10-fill:before{content:"\\f32a"}.ri-forward-10-line:before{content:"\\f32b"}.ri-forward-15-fill:before{content:"\\f32c"}.ri-forward-15-line:before{content:"\\f32d"}.ri-forward-30-fill:before{content:"\\f32e"}.ri-forward-30-line:before{content:"\\f32f"}.ri-forward-5-fill:before{content:"\\f330"}.ri-forward-5-line:before{content:"\\f331"}.ri-graduation-cap-fill:before{content:"\\f332"}.ri-graduation-cap-line:before{content:"\\f333"}.ri-home-office-fill:before{content:"\\f334"}.ri-home-office-line:before{content:"\\f335"}.ri-hourglass-2-fill:before{content:"\\f336"}.ri-hourglass-2-line:before{content:"\\f337"}.ri-hourglass-fill:before{content:"\\f338"}.ri-hourglass-line:before{content:"\\f339"}.ri-javascript-fill:before{content:"\\f33a"}.ri-javascript-line:before{content:"\\f33b"}.ri-loop-left-fill:before{content:"\\f33c"}.ri-loop-left-line:before{content:"\\f33d"}.ri-loop-right-fill:before{content:"\\f33e"}.ri-loop-right-line:before{content:"\\f33f"}.ri-memories-fill:before{content:"\\f340"}.ri-memories-line:before{content:"\\f341"}.ri-meta-fill:before{content:"\\f342"}.ri-meta-line:before{content:"\\f343"}.ri-microsoft-loop-fill:before{content:"\\f344"}.ri-microsoft-loop-line:before{content:"\\f345"}.ri-nft-fill:before{content:"\\f346"}.ri-nft-line:before{content:"\\f347"}.ri-notion-fill:before{content:"\\f348"}.ri-notion-line:before{content:"\\f349"}.ri-openai-fill:before{content:"\\f34a"}.ri-openai-line:before{content:"\\f34b"}.ri-overline:before{content:"\\f34c"}.ri-p2p-fill:before{content:"\\f34d"}.ri-p2p-line:before{content:"\\f34e"}.ri-presentation-fill:before{content:"\\f34f"}.ri-presentation-line:before{content:"\\f350"}.ri-replay-10-fill:before{content:"\\f351"}.ri-replay-10-line:before{content:"\\f352"}.ri-replay-15-fill:before{content:"\\f353"}.ri-replay-15-line:before{content:"\\f354"}.ri-replay-30-fill:before{content:"\\f355"}.ri-replay-30-line:before{content:"\\f356"}.ri-replay-5-fill:before{content:"\\f357"}.ri-replay-5-line:before{content:"\\f358"}.ri-school-fill:before{content:"\\f359"}.ri-school-line:before{content:"\\f35a"}.ri-shining-2-fill:before{content:"\\f35b"}.ri-shining-2-line:before{content:"\\f35c"}.ri-shining-fill:before{content:"\\f35d"}.ri-shining-line:before{content:"\\f35e"}.ri-sketching:before{content:"\\f35f"}.ri-skip-down-fill:before{content:"\\f360"}.ri-skip-down-line:before{content:"\\f361"}.ri-skip-left-fill:before{content:"\\f362"}.ri-skip-left-line:before{content:"\\f363"}.ri-skip-right-fill:before{content:"\\f364"}.ri-skip-right-line:before{content:"\\f365"}.ri-skip-up-fill:before{content:"\\f366"}.ri-skip-up-line:before{content:"\\f367"}.ri-slow-down-fill:before{content:"\\f368"}.ri-slow-down-line:before{content:"\\f369"}.ri-sparkling-2-fill:before{content:"\\f36a"}.ri-sparkling-2-line:before{content:"\\f36b"}.ri-sparkling-fill:before{content:"\\f36c"}.ri-sparkling-line:before{content:"\\f36d"}.ri-speak-fill:before{content:"\\f36e"}.ri-speak-line:before{content:"\\f36f"}.ri-speed-up-fill:before{content:"\\f370"}.ri-speed-up-line:before{content:"\\f371"}.ri-tiktok-fill:before{content:"\\f372"}.ri-tiktok-line:before{content:"\\f373"}.ri-token-swap-fill:before{content:"\\f374"}.ri-token-swap-line:before{content:"\\f375"}.ri-unpin-fill:before{content:"\\f376"}.ri-unpin-line:before{content:"\\f377"}.ri-wechat-channels-fill:before{content:"\\f378"}.ri-wechat-channels-line:before{content:"\\f379"}.ri-wordpress-fill:before{content:"\\f37a"}.ri-wordpress-line:before{content:"\\f37b"}.ri-blender-fill:before{content:"\\f37c"}.ri-blender-line:before{content:"\\f37d"}.ri-emoji-sticker-fill:before{content:"\\f37e"}.ri-emoji-sticker-line:before{content:"\\f37f"}.ri-git-close-pull-request-fill:before{content:"\\f380"}.ri-git-close-pull-request-line:before{content:"\\f381"}.ri-instance-fill:before{content:"\\f382"}.ri-instance-line:before{content:"\\f383"}.ri-megaphone-fill:before{content:"\\f384"}.ri-megaphone-line:before{content:"\\f385"}.ri-pass-expired-fill:before{content:"\\f386"}.ri-pass-expired-line:before{content:"\\f387"}.ri-pass-pending-fill:before{content:"\\f388"}.ri-pass-pending-line:before{content:"\\f389"}.ri-pass-valid-fill:before{content:"\\f38a"}.ri-pass-valid-line:before{content:"\\f38b"}.ri-ai-generate:before{content:"\\f38c"}.ri-calendar-close-fill:before{content:"\\f38d"}.ri-calendar-close-line:before{content:"\\f38e"}.ri-draggable:before{content:"\\f38f"}.ri-font-family:before{content:"\\f390"}.ri-font-mono:before{content:"\\f391"}.ri-font-sans-serif:before{content:"\\f392"}.ri-hard-drive-3-fill:before{content:"\\f393"}.ri-hard-drive-3-line:before{content:"\\f394"}.ri-kick-fill:before{content:"\\f395"}.ri-kick-line:before{content:"\\f396"}.ri-list-check-3:before{content:"\\f397"}.ri-list-indefinite:before{content:"\\f398"}.ri-list-ordered-2:before{content:"\\f399"}.ri-list-radio:before{content:"\\f39a"}.ri-openbase-fill:before{content:"\\f39b"}.ri-openbase-line:before{content:"\\f39c"}.ri-planet-fill:before{content:"\\f39d"}.ri-planet-line:before{content:"\\f39e"}.ri-prohibited-fill:before{content:"\\f39f"}.ri-prohibited-line:before{content:"\\f3a0"}.ri-quote-text:before{content:"\\f3a1"}.ri-seo-fill:before{content:"\\f3a2"}.ri-seo-line:before{content:"\\f3a3"}.ri-slash-commands:before{content:"\\f3a4"}.ri-archive-2-fill:before{content:"\\f3a5"}.ri-archive-2-line:before{content:"\\f3a6"}.ri-inbox-2-fill:before{content:"\\f3a7"}.ri-inbox-2-line:before{content:"\\f3a8"}.ri-shake-hands-fill:before{content:"\\f3a9"}.ri-shake-hands-line:before{content:"\\f3aa"}.ri-supabase-fill:before{content:"\\f3ab"}.ri-supabase-line:before{content:"\\f3ac"}.ri-water-percent-fill:before{content:"\\f3ad"}.ri-water-percent-line:before{content:"\\f3ae"}.ri-yuque-fill:before{content:"\\f3af"}.ri-yuque-line:before{content:"\\f3b0"}.ri-crosshair-2-fill:before{content:"\\f3b1"}.ri-crosshair-2-line:before{content:"\\f3b2"}.ri-crosshair-fill:before{content:"\\f3b3"}.ri-crosshair-line:before{content:"\\f3b4"}.ri-file-close-fill:before{content:"\\f3b5"}.ri-file-close-line:before{content:"\\f3b6"}.ri-infinity-fill:before{content:"\\f3b7"}.ri-infinity-line:before{content:"\\f3b8"}.ri-rfid-fill:before{content:"\\f3b9"}.ri-rfid-line:before{content:"\\f3ba"}.ri-slash-commands-2:before{content:"\\f3bb"}.ri-user-forbid-fill:before{content:"\\f3bc"}.ri-user-forbid-line:before{content:"\\f3bd"}.ri-beer-fill:before{content:"\\f3be"}.ri-beer-line:before{content:"\\f3bf"}.ri-circle-fill:before{content:"\\f3c0"}.ri-circle-line:before{content:"\\f3c1"}.ri-dropdown-list:before{content:"\\f3c2"}.ri-file-image-fill:before{content:"\\f3c3"}.ri-file-image-line:before{content:"\\f3c4"}.ri-file-pdf-2-fill:before{content:"\\f3c5"}.ri-file-pdf-2-line:before{content:"\\f3c6"}.ri-file-video-fill:before{content:"\\f3c7"}.ri-file-video-line:before{content:"\\f3c8"}.ri-folder-image-fill:before{content:"\\f3c9"}.ri-folder-image-line:before{content:"\\f3ca"}.ri-folder-video-fill:before{content:"\\f3cb"}.ri-folder-video-line:before{content:"\\f3cc"}.ri-hexagon-fill:before{content:"\\f3cd"}.ri-hexagon-line:before{content:"\\f3ce"}.ri-menu-search-fill:before{content:"\\f3cf"}.ri-menu-search-line:before{content:"\\f3d0"}.ri-octagon-fill:before{content:"\\f3d1"}.ri-octagon-line:before{content:"\\f3d2"}.ri-pentagon-fill:before{content:"\\f3d3"}.ri-pentagon-line:before{content:"\\f3d4"}.ri-rectangle-fill:before{content:"\\f3d5"}.ri-rectangle-line:before{content:"\\f3d6"}.ri-robot-2-fill:before{content:"\\f3d7"}.ri-robot-2-line:before{content:"\\f3d8"}.ri-shapes-fill:before{content:"\\f3d9"}.ri-shapes-line:before{content:"\\f3da"}.ri-square-fill:before{content:"\\f3db"}.ri-square-line:before{content:"\\f3dc"}.ri-tent-fill:before{content:"\\f3dd"}.ri-tent-line:before{content:"\\f3de"}.ri-threads-fill:before{content:"\\f3df"}.ri-threads-line:before{content:"\\f3e0"}.ri-tree-fill:before{content:"\\f3e1"}.ri-tree-line:before{content:"\\f3e2"}.ri-triangle-fill:before{content:"\\f3e3"}.ri-triangle-line:before{content:"\\f3e4"}.ri-twitter-x-fill:before{content:"\\f3e5"}.ri-twitter-x-line:before{content:"\\f3e6"}.ri-verified-badge-fill:before{content:"\\f3e7"}.ri-verified-badge-line:before{content:"\\f3e8"}.ri-armchair-fill:before{content:"\\f3e9"}.ri-armchair-line:before{content:"\\f3ea"}.ri-bnb-fill:before{content:"\\f3eb"}.ri-bnb-line:before{content:"\\f3ec"}.ri-bread-fill:before{content:"\\f3ed"}.ri-bread-line:before{content:"\\f3ee"}.ri-btc-fill:before{content:"\\f3ef"}.ri-btc-line:before{content:"\\f3f0"}.ri-calendar-schedule-fill:before{content:"\\f3f1"}.ri-calendar-schedule-line:before{content:"\\f3f2"}.ri-dice-1-fill:before{content:"\\f3f3"}.ri-dice-1-line:before{content:"\\f3f4"}.ri-dice-2-fill:before{content:"\\f3f5"}.ri-dice-2-line:before{content:"\\f3f6"}.ri-dice-3-fill:before{content:"\\f3f7"}.ri-dice-3-line:before{content:"\\f3f8"}.ri-dice-4-fill:before{content:"\\f3f9"}.ri-dice-4-line:before{content:"\\f3fa"}.ri-dice-5-fill:before{content:"\\f3fb"}.ri-dice-5-line:before{content:"\\f3fc"}.ri-dice-6-fill:before{content:"\\f3fd"}.ri-dice-6-line:before{content:"\\f3fe"}.ri-dice-fill:before{content:"\\f3ff"}.ri-dice-line:before{content:"\\f400"}.ri-drinks-fill:before{content:"\\f401"}.ri-drinks-line:before{content:"\\f402"}.ri-equalizer-2-fill:before{content:"\\f403"}.ri-equalizer-2-line:before{content:"\\f404"}.ri-equalizer-3-fill:before{content:"\\f405"}.ri-equalizer-3-line:before{content:"\\f406"}.ri-eth-fill:before{content:"\\f407"}.ri-eth-line:before{content:"\\f408"}.ri-flower-fill:before{content:"\\f409"}.ri-flower-line:before{content:"\\f40a"}.ri-glasses-2-fill:before{content:"\\f40b"}.ri-glasses-2-line:before{content:"\\f40c"}.ri-glasses-fill:before{content:"\\f40d"}.ri-glasses-line:before{content:"\\f40e"}.ri-goggles-fill:before{content:"\\f40f"}.ri-goggles-line:before{content:"\\f410"}.ri-image-circle-fill:before{content:"\\f411"}.ri-image-circle-line:before{content:"\\f412"}.ri-info-i:before{content:"\\f413"}.ri-money-rupee-circle-fill:before{content:"\\f414"}.ri-money-rupee-circle-line:before{content:"\\f415"}.ri-news-fill:before{content:"\\f416"}.ri-news-line:before{content:"\\f417"}.ri-robot-3-fill:before{content:"\\f418"}.ri-robot-3-line:before{content:"\\f419"}.ri-share-2-fill:before{content:"\\f41a"}.ri-share-2-line:before{content:"\\f41b"}.ri-sofa-fill:before{content:"\\f41c"}.ri-sofa-line:before{content:"\\f41d"}.ri-svelte-fill:before{content:"\\f41e"}.ri-svelte-line:before{content:"\\f41f"}.ri-vk-fill:before{content:"\\f420"}.ri-vk-line:before{content:"\\f421"}.ri-xrp-fill:before{content:"\\f422"}.ri-xrp-line:before{content:"\\f423"}.ri-xtz-fill:before{content:"\\f424"}.ri-xtz-line:before{content:"\\f425"}.ri-archive-stack-fill:before{content:"\\f426"}.ri-archive-stack-line:before{content:"\\f427"}.ri-bowl-fill:before{content:"\\f428"}.ri-bowl-line:before{content:"\\f429"}.ri-calendar-view:before{content:"\\f42a"}.ri-carousel-view:before{content:"\\f42b"}.ri-code-block:before{content:"\\f42c"}.ri-color-filter-fill:before{content:"\\f42d"}.ri-color-filter-line:before{content:"\\f42e"}.ri-contacts-book-3-fill:before{content:"\\f42f"}.ri-contacts-book-3-line:before{content:"\\f430"}.ri-contract-fill:before{content:"\\f431"}.ri-contract-line:before{content:"\\f432"}.ri-drinks-2-fill:before{content:"\\f433"}.ri-drinks-2-line:before{content:"\\f434"}.ri-export-fill:before{content:"\\f435"}.ri-export-line:before{content:"\\f436"}.ri-file-check-fill:before{content:"\\f437"}.ri-file-check-line:before{content:"\\f438"}.ri-focus-mode:before{content:"\\f439"}.ri-folder-6-fill:before{content:"\\f43a"}.ri-folder-6-line:before{content:"\\f43b"}.ri-folder-check-fill:before{content:"\\f43c"}.ri-folder-check-line:before{content:"\\f43d"}.ri-folder-close-fill:before{content:"\\f43e"}.ri-folder-close-line:before{content:"\\f43f"}.ri-folder-cloud-fill:before{content:"\\f440"}.ri-folder-cloud-line:before{content:"\\f441"}.ri-gallery-view-2:before{content:"\\f442"}.ri-gallery-view:before{content:"\\f443"}.ri-hand:before{content:"\\f444"}.ri-import-fill:before{content:"\\f445"}.ri-import-line:before{content:"\\f446"}.ri-information-2-fill:before{content:"\\f447"}.ri-information-2-line:before{content:"\\f448"}.ri-kanban-view-2:before{content:"\\f449"}.ri-kanban-view:before{content:"\\f44a"}.ri-list-view:before{content:"\\f44b"}.ri-lock-star-fill:before{content:"\\f44c"}.ri-lock-star-line:before{content:"\\f44d"}.ri-puzzle-2-fill:before{content:"\\f44e"}.ri-puzzle-2-line:before{content:"\\f44f"}.ri-puzzle-fill:before{content:"\\f450"}.ri-puzzle-line:before{content:"\\f451"}.ri-ram-2-fill:before{content:"\\f452"}.ri-ram-2-line:before{content:"\\f453"}.ri-ram-fill:before{content:"\\f454"}.ri-ram-line:before{content:"\\f455"}.ri-receipt-fill:before{content:"\\f456"}.ri-receipt-line:before{content:"\\f457"}.ri-shadow-fill:before{content:"\\f458"}.ri-shadow-line:before{content:"\\f459"}.ri-sidebar-fold-fill:before{content:"\\f45a"}.ri-sidebar-fold-line:before{content:"\\f45b"}.ri-sidebar-unfold-fill:before{content:"\\f45c"}.ri-sidebar-unfold-line:before{content:"\\f45d"}.ri-slideshow-view:before{content:"\\f45e"}.ri-sort-alphabet-asc:before{content:"\\f45f"}.ri-sort-alphabet-desc:before{content:"\\f460"}.ri-sort-number-asc:before{content:"\\f461"}.ri-sort-number-desc:before{content:"\\f462"}.ri-stacked-view:before{content:"\\f463"}.ri-sticky-note-add-fill:before{content:"\\f464"}.ri-sticky-note-add-line:before{content:"\\f465"}.ri-swap-2-fill:before{content:"\\f466"}.ri-swap-2-line:before{content:"\\f467"}.ri-swap-3-fill:before{content:"\\f468"}.ri-swap-3-line:before{content:"\\f469"}.ri-table-3:before{content:"\\f46a"}.ri-table-view:before{content:"\\f46b"}.ri-text-block:before{content:"\\f46c"}.ri-text-snippet:before{content:"\\f46d"}.ri-timeline-view:before{content:"\\f46e"}.ri-blogger-fill:before{content:"\\f46f"}.ri-blogger-line:before{content:"\\f470"}.ri-chat-thread-fill:before{content:"\\f471"}.ri-chat-thread-line:before{content:"\\f472"}.ri-discount-percent-fill:before{content:"\\f473"}.ri-discount-percent-line:before{content:"\\f474"}.ri-exchange-2-fill:before{content:"\\f475"}.ri-exchange-2-line:before{content:"\\f476"}.ri-git-fork-fill:before{content:"\\f477"}.ri-git-fork-line:before{content:"\\f478"}.ri-input-field:before{content:"\\f479"}.ri-progress-1-fill:before{content:"\\f47a"}.ri-progress-1-line:before{content:"\\f47b"}.ri-progress-2-fill:before{content:"\\f47c"}.ri-progress-2-line:before{content:"\\f47d"}.ri-progress-3-fill:before{content:"\\f47e"}.ri-progress-3-line:before{content:"\\f47f"}.ri-progress-4-fill:before{content:"\\f480"}.ri-progress-4-line:before{content:"\\f481"}.ri-progress-5-fill:before{content:"\\f482"}.ri-progress-5-line:before{content:"\\f483"}.ri-progress-6-fill:before{content:"\\f484"}.ri-progress-6-line:before{content:"\\f485"}.ri-progress-7-fill:before{content:"\\f486"}.ri-progress-7-line:before{content:"\\f487"}.ri-progress-8-fill:before{content:"\\f488"}.ri-progress-8-line:before{content:"\\f489"}.ri-remix-run-fill:before{content:"\\f48a"}.ri-remix-run-line:before{content:"\\f48b"}.ri-signpost-fill:before{content:"\\f48c"}.ri-signpost-line:before{content:"\\f48d"}.ri-time-zone-fill:before{content:"\\f48e"}.ri-time-zone-line:before{content:"\\f48f"}.ri-arrow-down-wide-fill:before{content:"\\f490"}.ri-arrow-down-wide-line:before{content:"\\f491"}.ri-arrow-left-wide-fill:before{content:"\\f492"}.ri-arrow-left-wide-line:before{content:"\\f493"}.ri-arrow-right-wide-fill:before{content:"\\f494"}.ri-arrow-right-wide-line:before{content:"\\f495"}.ri-arrow-up-wide-fill:before{content:"\\f496"}.ri-arrow-up-wide-line:before{content:"\\f497"}.ri-bluesky-fill:before{content:"\\f498"}.ri-bluesky-line:before{content:"\\f499"}.ri-expand-height-fill:before{content:"\\f49a"}.ri-expand-height-line:before{content:"\\f49b"}.ri-expand-width-fill:before{content:"\\f49c"}.ri-expand-width-line:before{content:"\\f49d"}.ri-forward-end-fill:before{content:"\\f49e"}.ri-forward-end-line:before{content:"\\f49f"}.ri-forward-end-mini-fill:before{content:"\\f4a0"}.ri-forward-end-mini-line:before{content:"\\f4a1"}.ri-friendica-fill:before{content:"\\f4a2"}.ri-friendica-line:before{content:"\\f4a3"}.ri-git-pr-draft-fill:before{content:"\\f4a4"}.ri-git-pr-draft-line:before{content:"\\f4a5"}.ri-play-reverse-fill:before{content:"\\f4a6"}.ri-play-reverse-line:before{content:"\\f4a7"}.ri-play-reverse-mini-fill:before{content:"\\f4a8"}.ri-play-reverse-mini-line:before{content:"\\f4a9"}.ri-rewind-start-fill:before{content:"\\f4aa"}.ri-rewind-start-line:before{content:"\\f4ab"}.ri-rewind-start-mini-fill:before{content:"\\f4ac"}.ri-rewind-start-mini-line:before{content:"\\f4ad"}.ri-scroll-to-bottom-fill:before{content:"\\f4ae"}.ri-scroll-to-bottom-line:before{content:"\\f4af"}.ri-add-large-fill:before{content:"\\f4b0"}.ri-add-large-line:before{content:"\\f4b1"}.ri-aed-electrodes-fill:before{content:"\\f4b2"}.ri-aed-electrodes-line:before{content:"\\f4b3"}.ri-aed-fill:before{content:"\\f4b4"}.ri-aed-line:before{content:"\\f4b5"}.ri-alibaba-cloud-fill:before{content:"\\f4b6"}.ri-alibaba-cloud-line:before{content:"\\f4b7"}.ri-align-item-bottom-fill:before{content:"\\f4b8"}.ri-align-item-bottom-line:before{content:"\\f4b9"}.ri-align-item-horizontal-center-fill:before{content:"\\f4ba"}.ri-align-item-horizontal-center-line:before{content:"\\f4bb"}.ri-align-item-left-fill:before{content:"\\f4bc"}.ri-align-item-left-line:before{content:"\\f4bd"}.ri-align-item-right-fill:before{content:"\\f4be"}.ri-align-item-right-line:before{content:"\\f4bf"}.ri-align-item-top-fill:before{content:"\\f4c0"}.ri-align-item-top-line:before{content:"\\f4c1"}.ri-align-item-vertical-center-fill:before{content:"\\f4c2"}.ri-align-item-vertical-center-line:before{content:"\\f4c3"}.ri-apps-2-add-fill:before{content:"\\f4c4"}.ri-apps-2-add-line:before{content:"\\f4c5"}.ri-close-large-fill:before{content:"\\f4c6"}.ri-close-large-line:before{content:"\\f4c7"}.ri-collapse-diagonal-2-fill:before{content:"\\f4c8"}.ri-collapse-diagonal-2-line:before{content:"\\f4c9"}.ri-collapse-diagonal-fill:before{content:"\\f4ca"}.ri-collapse-diagonal-line:before{content:"\\f4cb"}.ri-dashboard-horizontal-fill:before{content:"\\f4cc"}.ri-dashboard-horizontal-line:before{content:"\\f4cd"}.ri-expand-diagonal-2-fill:before{content:"\\f4ce"}.ri-expand-diagonal-2-line:before{content:"\\f4cf"}.ri-expand-diagonal-fill:before{content:"\\f4d0"}.ri-expand-diagonal-line:before{content:"\\f4d1"}.ri-firebase-fill:before{content:"\\f4d2"}.ri-firebase-line:before{content:"\\f4d3"}.ri-flip-horizontal-2-fill:before{content:"\\f4d4"}.ri-flip-horizontal-2-line:before{content:"\\f4d5"}.ri-flip-horizontal-fill:before{content:"\\f4d6"}.ri-flip-horizontal-line:before{content:"\\f4d7"}.ri-flip-vertical-2-fill:before{content:"\\f4d8"}.ri-flip-vertical-2-line:before{content:"\\f4d9"}.ri-flip-vertical-fill:before{content:"\\f4da"}.ri-flip-vertical-line:before{content:"\\f4db"}.ri-formula:before{content:"\\f4dc"}.ri-function-add-fill:before{content:"\\f4dd"}.ri-function-add-line:before{content:"\\f4de"}.ri-goblet-2-fill:before{content:"\\f4df"}.ri-goblet-2-line:before{content:"\\f4e0"}.ri-golf-ball-fill:before{content:"\\f4e1"}.ri-golf-ball-line:before{content:"\\f4e2"}.ri-group-3-fill:before{content:"\\f4e3"}.ri-group-3-line:before{content:"\\f4e4"}.ri-heart-add-2-fill:before{content:"\\f4e5"}.ri-heart-add-2-line:before{content:"\\f4e6"}.ri-id-card-fill:before{content:"\\f4e7"}.ri-id-card-line:before{content:"\\f4e8"}.ri-information-off-fill:before{content:"\\f4e9"}.ri-information-off-line:before{content:"\\f4ea"}.ri-java-fill:before{content:"\\f4eb"}.ri-java-line:before{content:"\\f4ec"}.ri-layout-grid-2-fill:before{content:"\\f4ed"}.ri-layout-grid-2-line:before{content:"\\f4ee"}.ri-layout-horizontal-fill:before{content:"\\f4ef"}.ri-layout-horizontal-line:before{content:"\\f4f0"}.ri-layout-vertical-fill:before{content:"\\f4f1"}.ri-layout-vertical-line:before{content:"\\f4f2"}.ri-menu-fold-2-fill:before{content:"\\f4f3"}.ri-menu-fold-2-line:before{content:"\\f4f4"}.ri-menu-fold-3-fill:before{content:"\\f4f5"}.ri-menu-fold-3-line:before{content:"\\f4f6"}.ri-menu-fold-4-fill:before{content:"\\f4f7"}.ri-menu-fold-4-line:before{content:"\\f4f8"}.ri-menu-unfold-2-fill:before{content:"\\f4f9"}.ri-menu-unfold-2-line:before{content:"\\f4fa"}.ri-menu-unfold-3-fill:before{content:"\\f4fb"}.ri-menu-unfold-3-line:before{content:"\\f4fc"}.ri-menu-unfold-4-fill:before{content:"\\f4fd"}.ri-menu-unfold-4-line:before{content:"\\f4fe"}.ri-mobile-download-fill:before{content:"\\f4ff"}.ri-mobile-download-line:before{content:"\\f500"}.ri-nextjs-fill:before{content:"\\f501"}.ri-nextjs-line:before{content:"\\f502"}.ri-nodejs-fill:before{content:"\\f503"}.ri-nodejs-line:before{content:"\\f504"}.ri-pause-large-fill:before{content:"\\f505"}.ri-pause-large-line:before{content:"\\f506"}.ri-play-large-fill:before{content:"\\f507"}.ri-play-large-line:before{content:"\\f508"}.ri-play-reverse-large-fill:before{content:"\\f509"}.ri-play-reverse-large-line:before{content:"\\f50a"}.ri-police-badge-fill:before{content:"\\f50b"}.ri-police-badge-line:before{content:"\\f50c"}.ri-prohibited-2-fill:before{content:"\\f50d"}.ri-prohibited-2-line:before{content:"\\f50e"}.ri-shopping-bag-4-fill:before{content:"\\f50f"}.ri-shopping-bag-4-line:before{content:"\\f510"}.ri-snowflake-fill:before{content:"\\f511"}.ri-snowflake-line:before{content:"\\f512"}.ri-square-root:before{content:"\\f513"}.ri-stop-large-fill:before{content:"\\f514"}.ri-stop-large-line:before{content:"\\f515"}.ri-tailwind-css-fill:before{content:"\\f516"}.ri-tailwind-css-line:before{content:"\\f517"}.ri-tooth-fill:before{content:"\\f518"}.ri-tooth-line:before{content:"\\f519"}.ri-video-off-fill:before{content:"\\f51a"}.ri-video-off-line:before{content:"\\f51b"}.ri-video-on-fill:before{content:"\\f51c"}.ri-video-on-line:before{content:"\\f51d"}.ri-webhook-fill:before{content:"\\f51e"}.ri-webhook-line:before{content:"\\f51f"}.ri-weight-fill:before{content:"\\f520"}.ri-weight-line:before{content:"\\f521"}.ri-book-shelf-fill:before{content:"\\f522"}.ri-book-shelf-line:before{content:"\\f523"}.ri-brain-2-fill:before{content:"\\f524"}.ri-brain-2-line:before{content:"\\f525"}.ri-chat-search-fill:before{content:"\\f526"}.ri-chat-search-line:before{content:"\\f527"}.ri-chat-unread-fill:before{content:"\\f528"}.ri-chat-unread-line:before{content:"\\f529"}.ri-collapse-horizontal-fill:before{content:"\\f52a"}.ri-collapse-horizontal-line:before{content:"\\f52b"}.ri-collapse-vertical-fill:before{content:"\\f52c"}.ri-collapse-vertical-line:before{content:"\\f52d"}.ri-dna-fill:before{content:"\\f52e"}.ri-dna-line:before{content:"\\f52f"}.ri-dropper-fill:before{content:"\\f530"}.ri-dropper-line:before{content:"\\f531"}.ri-expand-diagonal-s-2-fill:before{content:"\\f532"}.ri-expand-diagonal-s-2-line:before{content:"\\f533"}.ri-expand-diagonal-s-fill:before{content:"\\f534"}.ri-expand-diagonal-s-line:before{content:"\\f535"}.ri-expand-horizontal-fill:before{content:"\\f536"}.ri-expand-horizontal-line:before{content:"\\f537"}.ri-expand-horizontal-s-fill:before{content:"\\f538"}.ri-expand-horizontal-s-line:before{content:"\\f539"}.ri-expand-vertical-fill:before{content:"\\f53a"}.ri-expand-vertical-line:before{content:"\\f53b"}.ri-expand-vertical-s-fill:before{content:"\\f53c"}.ri-expand-vertical-s-line:before{content:"\\f53d"}.ri-gemini-fill:before{content:"\\f53e"}.ri-gemini-line:before{content:"\\f53f"}.ri-reset-left-fill:before{content:"\\f540"}.ri-reset-left-line:before{content:"\\f541"}.ri-reset-right-fill:before{content:"\\f542"}.ri-reset-right-line:before{content:"\\f543"}.ri-stairs-fill:before{content:"\\f544"}.ri-stairs-line:before{content:"\\f545"}.ri-telegram-2-fill:before{content:"\\f546"}.ri-telegram-2-line:before{content:"\\f547"}.ri-triangular-flag-fill:before{content:"\\f548"}.ri-triangular-flag-line:before{content:"\\f549"}.ri-user-minus-fill:before{content:"\\f54a"}.ri-user-minus-line:before{content:"\\f54b"}.ri-account-box-2-fill:before{content:"\\f54c"}.ri-account-box-2-line:before{content:"\\f54d"}.ri-account-circle-2-fill:before{content:"\\f54e"}.ri-account-circle-2-line:before{content:"\\f54f"}.ri-alarm-snooze-fill:before{content:"\\f550"}.ri-alarm-snooze-line:before{content:"\\f551"}.ri-arrow-down-box-fill:before{content:"\\f552"}.ri-arrow-down-box-line:before{content:"\\f553"}.ri-arrow-left-box-fill:before{content:"\\f554"}.ri-arrow-left-box-line:before{content:"\\f555"}.ri-arrow-left-down-box-fill:before{content:"\\f556"}.ri-arrow-left-down-box-line:before{content:"\\f557"}.ri-arrow-left-up-box-fill:before{content:"\\f558"}.ri-arrow-left-up-box-line:before{content:"\\f559"}.ri-arrow-right-box-fill:before{content:"\\f55a"}.ri-arrow-right-box-line:before{content:"\\f55b"}.ri-arrow-right-down-box-fill:before{content:"\\f55c"}.ri-arrow-right-down-box-line:before{content:"\\f55d"}.ri-arrow-right-up-box-fill:before{content:"\\f55e"}.ri-arrow-right-up-box-line:before{content:"\\f55f"}.ri-arrow-up-box-fill:before{content:"\\f560"}.ri-arrow-up-box-line:before{content:"\\f561"}.ri-bar-chart-box-ai-fill:before{content:"\\f562"}.ri-bar-chart-box-ai-line:before{content:"\\f563"}.ri-brush-ai-fill:before{content:"\\f564"}.ri-brush-ai-line:before{content:"\\f565"}.ri-camera-ai-fill:before{content:"\\f566"}.ri-camera-ai-line:before{content:"\\f567"}.ri-chat-ai-fill:before{content:"\\f568"}.ri-chat-ai-line:before{content:"\\f569"}.ri-chat-smile-ai-fill:before{content:"\\f56a"}.ri-chat-smile-ai-line:before{content:"\\f56b"}.ri-chat-voice-ai-fill:before{content:"\\f56c"}.ri-chat-voice-ai-line:before{content:"\\f56d"}.ri-code-ai-fill:before{content:"\\f56e"}.ri-code-ai-line:before{content:"\\f56f"}.ri-color-filter-ai-fill:before{content:"\\f570"}.ri-color-filter-ai-line:before{content:"\\f571"}.ri-custom-size:before{content:"\\f572"}.ri-fediverse-fill:before{content:"\\f573"}.ri-fediverse-line:before{content:"\\f574"}.ri-flag-off-fill:before{content:"\\f575"}.ri-flag-off-line:before{content:"\\f576"}.ri-home-9-fill:before{content:"\\f577"}.ri-home-9-line:before{content:"\\f578"}.ri-image-ai-fill:before{content:"\\f579"}.ri-image-ai-line:before{content:"\\f57a"}.ri-image-circle-ai-fill:before{content:"\\f57b"}.ri-image-circle-ai-line:before{content:"\\f57c"}.ri-info-card-fill:before{content:"\\f57d"}.ri-info-card-line:before{content:"\\f57e"}.ri-landscape-ai-fill:before{content:"\\f57f"}.ri-landscape-ai-line:before{content:"\\f580"}.ri-letter-spacing-2:before{content:"\\f581"}.ri-line-height-2:before{content:"\\f582"}.ri-mail-ai-fill:before{content:"\\f583"}.ri-mail-ai-line:before{content:"\\f584"}.ri-mic-2-ai-fill:before{content:"\\f585"}.ri-mic-2-ai-line:before{content:"\\f586"}.ri-mic-ai-fill:before{content:"\\f587"}.ri-mic-ai-line:before{content:"\\f588"}.ri-movie-ai-fill:before{content:"\\f589"}.ri-movie-ai-line:before{content:"\\f58a"}.ri-music-ai-fill:before{content:"\\f58b"}.ri-music-ai-line:before{content:"\\f58c"}.ri-notification-snooze-fill:before{content:"\\f58d"}.ri-notification-snooze-line:before{content:"\\f58e"}.ri-php-fill:before{content:"\\f58f"}.ri-php-line:before{content:"\\f590"}.ri-pix-fill:before{content:"\\f591"}.ri-pix-line:before{content:"\\f592"}.ri-pulse-ai-fill:before{content:"\\f593"}.ri-pulse-ai-line:before{content:"\\f594"}.ri-quill-pen-ai-fill:before{content:"\\f595"}.ri-quill-pen-ai-line:before{content:"\\f596"}.ri-speak-ai-fill:before{content:"\\f597"}.ri-speak-ai-line:before{content:"\\f598"}.ri-star-off-fill:before{content:"\\f599"}.ri-star-off-line:before{content:"\\f59a"}.ri-translate-ai-2:before{content:"\\f59b"}.ri-translate-ai:before{content:"\\f59c"}.ri-user-community-fill:before{content:"\\f59d"}.ri-user-community-line:before{content:"\\f59e"}.ri-vercel-fill:before{content:"\\f59f"}.ri-vercel-line:before{content:"\\f5a0"}.ri-video-ai-fill:before{content:"\\f5a1"}.ri-video-ai-line:before{content:"\\f5a2"}.ri-video-on-ai-fill:before{content:"\\f5a3"}.ri-video-on-ai-line:before{content:"\\f5a4"}.ri-voice-ai-fill:before{content:"\\f5a5"}.ri-voice-ai-line:before{content:"\\f5a6"}.ri-ai-generate-2:before{content:"\\f5a7"}.ri-ai-generate-text:before{content:"\\f5a8"}.ri-anthropic-fill:before{content:"\\f5a9"}.ri-anthropic-line:before{content:"\\f5aa"}.ri-apps-2-ai-fill:before{content:"\\f5ab"}.ri-apps-2-ai-line:before{content:"\\f5ac"}.ri-camera-lens-ai-fill:before{content:"\\f5ad"}.ri-camera-lens-ai-line:before{content:"\\f5ae"}.ri-clapperboard-ai-fill:before{content:"\\f5af"}.ri-clapperboard-ai-line:before{content:"\\f5b0"}.ri-claude-fill:before{content:"\\f5b1"}.ri-claude-line:before{content:"\\f5b2"}.ri-closed-captioning-ai-fill:before{content:"\\f5b3"}.ri-closed-captioning-ai-line:before{content:"\\f5b4"}.ri-dvd-ai-fill:before{content:"\\f5b5"}.ri-dvd-ai-line:before{content:"\\f5b6"}.ri-film-ai-fill:before{content:"\\f5b7"}.ri-film-ai-line:before{content:"\\f5b8"}.ri-font-size-ai:before{content:"\\f5b9"}.ri-mixtral-fill:before{content:"\\f5ba"}.ri-mixtral-line:before{content:"\\f5bb"}.ri-movie-2-ai-fill:before{content:"\\f5bc"}.ri-movie-2-ai-line:before{content:"\\f5bd"}.ri-mv-ai-fill:before{content:"\\f5be"}.ri-mv-ai-line:before{content:"\\f5bf"}.ri-perplexity-fill:before{content:"\\f5c0"}.ri-perplexity-line:before{content:"\\f5c1"}.ri-poker-clubs-fill:before{content:"\\f5c2"}.ri-poker-clubs-line:before{content:"\\f5c3"}.ri-poker-diamonds-fill:before{content:"\\f5c4"}.ri-poker-diamonds-line:before{content:"\\f5c5"}.ri-poker-hearts-fill:before{content:"\\f5c6"}.ri-poker-hearts-line:before{content:"\\f5c7"}.ri-poker-spades-fill:before{content:"\\f5c8"}.ri-poker-spades-line:before{content:"\\f5c9"}.ri-safe-3-fill:before{content:"\\f5ca"}.ri-safe-3-line:before{content:"\\f5cb"}.ri-accessibility-fill:before{content:"\\f5cc"}.ri-accessibility-line:before{content:"\\f5cd"}.ri-alarm-add-fill:before{content:"\\f5ce"}.ri-alarm-add-line:before{content:"\\f5cf"}.ri-arrow-down-long-fill:before{content:"\\f5d0"}.ri-arrow-down-long-line:before{content:"\\f5d1"}.ri-arrow-left-down-long-fill:before{content:"\\f5d2"}.ri-arrow-left-down-long-line:before{content:"\\f5d3"}.ri-arrow-left-long-fill:before{content:"\\f5d4"}.ri-arrow-left-long-line:before{content:"\\f5d5"}.ri-arrow-left-up-long-fill:before{content:"\\f5d6"}.ri-arrow-left-up-long-line:before{content:"\\f5d7"}.ri-arrow-right-down-long-fill:before{content:"\\f5d8"}.ri-arrow-right-down-long-line:before{content:"\\f5d9"}.ri-arrow-right-long-fill:before{content:"\\f5da"}.ri-arrow-right-long-line:before{content:"\\f5db"}.ri-arrow-right-up-long-fill:before{content:"\\f5dc"}.ri-arrow-right-up-long-line:before{content:"\\f5dd"}.ri-arrow-up-long-fill:before{content:"\\f5de"}.ri-arrow-up-long-line:before{content:"\\f5df"}.ri-chess-fill:before{content:"\\f5e0"}.ri-chess-line:before{content:"\\f5e1"}.ri-diamond-fill:before{content:"\\f5e2"}.ri-diamond-line:before{content:"\\f5e3"}.ri-diamond-ring-fill:before{content:"\\f5e4"}.ri-diamond-ring-line:before{content:"\\f5e5"}.ri-figma-fill:before{content:"\\f5e6"}.ri-figma-line:before{content:"\\f5e7"}.ri-firefox-browser-fill:before{content:"\\f5e8"}.ri-firefox-browser-line:before{content:"\\f5e9"}.ri-jewelry-fill:before{content:"\\f5ea"}.ri-jewelry-line:before{content:"\\f5eb"}.ri-multi-image-fill:before{content:"\\f5ec"}.ri-multi-image-line:before{content:"\\f5ed"}.ri-no-credit-card-fill:before{content:"\\f5ee"}.ri-no-credit-card-line:before{content:"\\f5ef"}.ri-service-bell-fill:before{content:"\\f5f0"}.ri-service-bell-line:before{content:"\\f5f1"}.ri-ai-agent-fill:before{content:"\\f5f2"}.ri-ai-agent-line:before{content:"\\f5f3"}.ri-ai-generate-2-fill:before{content:"\\f5f4"}.ri-ai-generate-2-line:before{content:"\\f5f5"}.ri-ai-generate-3d-fill:before{content:"\\f5f6"}.ri-ai-generate-3d-line:before{content:"\\f5f7"}.ri-ai:before{content:"\\f5f8"}.ri-apps-ai-fill:before{content:"\\f5f9"}.ri-apps-ai-line:before{content:"\\f5fa"}.ri-atom-fill:before{content:"\\f5fb"}.ri-atom-line:before{content:"\\f5fc"}.ri-book-ai-fill:before{content:"\\f5fd"}.ri-book-ai-line:before{content:"\\f5fe"}.ri-brain-3-fill:before{content:"\\f5ff"}.ri-brain-3-line:before{content:"\\f600"}.ri-brain-ai-3-fill:before{content:"\\f601"}.ri-brain-ai-3-line:before{content:"\\f602"}.ri-brush-ai-3-fill:before{content:"\\f603"}.ri-brush-ai-3-line:before{content:"\\f604"}.ri-camera-4-fill:before{content:"\\f605"}.ri-camera-4-line:before{content:"\\f606"}.ri-camera-ai-2-fill:before{content:"\\f607"}.ri-camera-ai-2-line:before{content:"\\f608"}.ri-chat-ai-2-fill:before{content:"\\f609"}.ri-chat-ai-2-line:before{content:"\\f60a"}.ri-chat-ai-3-fill:before{content:"\\f60b"}.ri-chat-ai-3-line:before{content:"\\f60c"}.ri-chat-ai-4-fill:before{content:"\\f60d"}.ri-chat-ai-4-line:before{content:"\\f60e"}.ri-chat-smile-ai-3-fill:before{content:"\\f60f"}.ri-chat-smile-ai-3-line:before{content:"\\f610"}.ri-deepseek-fill:before{content:"\\f611"}.ri-deepseek-line:before{content:"\\f612"}.ri-file-ai-2-fill:before{content:"\\f613"}.ri-file-ai-2-line:before{content:"\\f614"}.ri-file-ai-fill:before{content:"\\f615"}.ri-file-ai-line:before{content:"\\f616"}.ri-function-ai-fill:before{content:"\\f617"}.ri-function-ai-line:before{content:"\\f618"}.ri-game-2-fill:before{content:"\\f619"}.ri-game-2-line:before{content:"\\f61a"}.ri-goblet-broken-fill:before{content:"\\f61b"}.ri-goblet-broken-line:before{content:"\\f61c"}.ri-lightbulb-ai-fill:before{content:"\\f61d"}.ri-lightbulb-ai-line:before{content:"\\f61e"}.ri-loop-left-ai-fill:before{content:"\\f61f"}.ri-loop-left-ai-line:before{content:"\\f620"}.ri-loop-right-ai-fill:before{content:"\\f621"}.ri-loop-right-ai-line:before{content:"\\f622"}.ri-message-ai-3-fill:before{content:"\\f623"}.ri-message-ai-3-line:before{content:"\\f624"}.ri-painting-ai-fill:before{content:"\\f625"}.ri-painting-ai-line:before{content:"\\f626"}.ri-painting-fill:before{content:"\\f627"}.ri-painting-line:before{content:"\\f628"}.ri-pencil-ai-2-fill:before{content:"\\f629"}.ri-pencil-ai-2-line:before{content:"\\f62a"}.ri-pencil-ai-fill:before{content:"\\f62b"}.ri-pencil-ai-line:before{content:"\\f62c"}.ri-remix-fill:before{content:"\\f62d"}.ri-remix-line:before{content:"\\f62e"}.ri-search-ai-2-fill:before{content:"\\f62f"}.ri-search-ai-2-line:before{content:"\\f630"}.ri-search-ai-3-fill:before{content:"\\f631"}.ri-search-ai-3-line:before{content:"\\f632"}.ri-search-ai-4-fill:before{content:"\\f633"}.ri-search-ai-4-line:before{content:"\\f634"}.ri-search-ai-fill:before{content:"\\f635"}.ri-search-ai-line:before{content:"\\f636"}.ri-speech-to-text-fill:before{content:"\\f637"}.ri-speech-to-text-line:before{content:"\\f638"}.ri-target-fill:before{content:"\\f639"}.ri-target-line:before{content:"\\f63a"}.ri-text-to-speech-fill:before{content:"\\f63b"}.ri-text-to-speech-line:before{content:"\\f63c"}.ri-wrench-fill:before{content:"\\f63d"}.ri-wrench-line:before{content:"\\f63e"}.ri-area-chart-fill:before{content:"\\f63f"}.ri-area-chart-line:before{content:"\\f640"}.ri-baseball-fill:before{content:"\\f641"}.ri-baseball-line:before{content:"\\f642"}.ri-binoculars-fill:before{content:"\\f643"}.ri-binoculars-line:before{content:"\\f644"}.ri-cursor-hand:before{content:"\\f645"}.ri-emotion-add-fill:before{content:"\\f646"}.ri-emotion-add-line:before{content:"\\f647"}.ri-file-scan-fill:before{content:"\\f648"}.ri-file-scan-line:before{content:"\\f649"}.ri-fiverr-fill:before{content:"\\f64a"}.ri-fiverr-line:before{content:"\\f64b"}.ri-font-serif:before{content:"\\f64c"}.ri-ghost-3-fill:before{content:"\\f64d"}.ri-ghost-3-line:before{content:"\\f64e"}.ri-gitee-fill:before{content:"\\f64f"}.ri-gitee-line:before{content:"\\f650"}.ri-global-off-fill:before{content:"\\f651"}.ri-global-off-line:before{content:"\\f652"}.ri-image-download-fill:before{content:"\\f653"}.ri-image-download-line:before{content:"\\f654"}.ri-image-upload-fill:before{content:"\\f655"}.ri-image-upload-line:before{content:"\\f656"}.ri-issues-fill:before{content:"\\f657"}.ri-issues-line:before{content:"\\f658"}.ri-issues-reopen-fill:before{content:"\\f659"}.ri-issues-reopen-line:before{content:"\\f65a"}.ri-network-error-fill:before{content:"\\f65b"}.ri-network-error-line:before{content:"\\f65c"}.ri-network-fill:before{content:"\\f65d"}.ri-network-line:before{content:"\\f65e"}.ri-network-off-fill:before{content:"\\f65f"}.ri-network-off-line:before{content:"\\f660"}.ri-piano-fill:before{content:"\\f661"}.ri-piano-grand-fill:before{content:"\\f662"}.ri-piano-grand-line:before{content:"\\f663"}.ri-piano-line:before{content:"\\f664"}.ri-plug-3-fill:before{content:"\\f665"}.ri-plug-3-line:before{content:"\\f666"}.ri-send-ins-fill:before{content:"\\f667"}.ri-send-ins-line:before{content:"\\f668"}.ri-signal-cellular-1-fill:before{content:"\\f669"}.ri-signal-cellular-1-line:before{content:"\\f66a"}.ri-signal-cellular-2-fill:before{content:"\\f66b"}.ri-signal-cellular-2-line:before{content:"\\f66c"}.ri-signal-cellular-3-fill:before{content:"\\f66d"}.ri-signal-cellular-3-line:before{content:"\\f66e"}.ri-signal-cellular-off-fill:before{content:"\\f66f"}.ri-signal-cellular-off-line:before{content:"\\f670"}.ri-stacked-chart-fill:before{content:"\\f671"}.ri-stacked-chart-line:before{content:"\\f672"}.ri-upwork-fill:before{content:"\\f673"}.ri-upwork-line:before{content:"\\f674"}.ri-brain-4-fill:before{content:"\\f675"}.ri-brain-4-line:before{content:"\\f676"}.ri-certificate-2-fill:before{content:"\\f677"}.ri-certificate-2-line:before{content:"\\f678"}.ri-certificate-fill:before{content:"\\f679"}.ri-certificate-line:before{content:"\\f67a"}.ri-cookie-fill:before{content:"\\f67b"}.ri-cookie-line:before{content:"\\f67c"}.ri-cursor-ai-fill:before{content:"\\f67d"}.ri-cursor-ai-line:before{content:"\\f67e"}.ri-draw-fill:before{content:"\\f67f"}.ri-draw-line:before{content:"\\f680"}.ri-ghost-4-fill:before{content:"\\f681"}.ri-ghost-4-line:before{content:"\\f682"}.ri-gitbook-fill:before{content:"\\f683"}.ri-gitbook-line:before{content:"\\f684"}.ri-grok-ai-fill:before{content:"\\f685"}.ri-grok-ai-line:before{content:"\\f686"}.ri-hand-2:before{content:"\\f687"}.ri-megaphone-2-fill:before{content:"\\f688"}.ri-megaphone-2-line:before{content:"\\f689"}.ri-microsoft-copilot-fill:before{content:"\\f68a"}.ri-microsoft-copilot-line:before{content:"\\f68b"}.ri-mosaic-fill:before{content:"\\f68c"}.ri-mosaic-line:before{content:"\\f68d"}.ri-qr-scan-ai-fill:before{content:"\\f68e"}.ri-qr-scan-ai-line:before{content:"\\f68f"}.ri-qwen-ai-fill:before{content:"\\f690"}.ri-qwen-ai-line:before{content:"\\f691"}.ri-reddit-2-fill:before{content:"\\f692"}.ri-reddit-2-line:before{content:"\\f693"}.ri-sim-card-warning-fill:before{content:"\\f694"}.ri-sim-card-warning-line:before{content:"\\f695"}.ri-space-ship-2-fill:before{content:"\\f696"}.ri-space-ship-2-line:before{content:"\\f697"}.ri-subreddit-fill:before{content:"\\f698"}.ri-subreddit-line:before{content:"\\f699"}.ri-zhipu-ai-fill:before{content:"\\f69a"}.ri-zhipu-ai-line:before{content:"\\f69b"}.ri-connector-fill:before{content:"\\f69c"}.ri-connector-line:before{content:"\\f69d"}html{height:100%}body{height:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:rgb(var(--surface-ground));color:rgb(var(--text-color));overscroll-behavior:none}app-root{display:flex;flex-direction:column;height:100%}body.theme-light{--primary-color: 98 101 241;--secondary-color: 16 185 129;--accent-color: 245 158 11;--surface-card: 255 255 255;--surface-100: 248 250 252;--surface-200: 226 232 240;--border-color: 203 213 225;--text-color: 15 23 42;--text-color-secondary: 100 116 139}body.theme-dark{--primary-color: 139 143 255;--secondary-color: 34 197 94;--accent-color: 251 191 36;--surface-card: 30 41 59;--surface-100: 51 65 85;--surface-200: 71 85 105;--border-color: 100 116 139;--text-color: 226 232 240;--text-color-secondary: 148 163 184}body.theme-ocean{--primary-color: 14 116 144;--secondary-color: 6 182 212;--accent-color: 249 115 22;--surface-card: 248 250 252;--surface-100: 240 249 255;--surface-200: 186 230 253;--border-color: 125 211 252;--text-color: 8 47 73;--text-color-secondary: 14 116 144}:host{font-family:Montserrat,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}::-webkit-scrollbar{width:3px}::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #d3d3d3;border-radius:10px}::-webkit-scrollbar-thumb{background:rgb(var(--primary-color, 98 101 241));border-radius:10px}::-webkit-scrollbar-thumb:hover{background:rgb(var(--primary-color, 98 101 241) / .86)}.panel-scroll-body{max-height:calc(100dvh - 190px);overflow-y:auto;overflow-x:hidden}.panel-body{display:flex;flex-direction:column;gap:.95rem;min-height:0;padding:.35rem .15rem .6rem}.panel-body .child-panel{border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.9rem;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));box-shadow:0 8px 22px #0f172a0f;padding:.9rem}.panel-body .child-panel__label{display:inline-flex;align-items:center;gap:.35rem;font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:rgb(var(--primary-color, 98 101 241));margin-bottom:.65rem}.panel-body .child-accordion{width:100%}.panel-body .child-panel :where(input,select,textarea){background:rgb(var(--surface-card, 255 255 255))}.canvas-content{height:calc(100dvh - 180px)}.p-slider.p-slider-horizontal{height:5px!important}.ri-add-line,.ri-subtract-line{width:25px;height:25px;background:#fff;border-radius:50%;color:#585858;border:1px solid #585858;line-height:1.9}:is(.ri-add-line,.ri-subtract-line):hover{border-color:#6265f1;color:#6265f1}.p-button-text:not(:disabled):hover{background:transparent!important}.slider-scale-box{background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:.75rem;padding:.65rem;box-shadow:0 5px 14px #0f172a0d}@media(max-width:991px){.panel-scroll-body{max-height:unset}.canvas-content{height:auto;min-height:0;flex:1}.editor-main-box{min-height:auto}}@media(max-width:640px){.panel-body{gap:.65rem;padding:.25rem .1rem .5rem}.panel-body .child-panel{padding:.65rem}}@media(max-width:480px){.panel-body{gap:.5rem;padding:.2rem .1rem .4rem}.panel-body .child-panel{padding:.5rem;border-radius:.65rem}}.name-number-overlay-box .p-button,.name-number-overlay-box .p-button-icon,.name-number-overlay-box .p-button-label{color:#333!important;transform:none!important}.name-number-overlay-box .p-fileupload-choose-button,.name-number-overlay-box .p-fileupload-choose-button .p-button-label{color:#fff!important}.panel-body .p-accordion.p-component{width:100%}.p-accordioncontent[data-p-active=false] .p-accordioncontent-content{display:none}.manifest-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}.manifest-loader .message{color:var(--p-text-color, #0f172a);font-weight:500}.manifest-loader .loader{--duration: 3s;--primary: rgb(167, 11, 11);width:200px;height:365px;position:relative;transform-style:preserve-3d}@media(max-width:480px){.manifest-loader .loader{zoom:.44}}.manifest-loader .loader .box{--x: 0;--y: 0;position:absolute;animation:var(--duration) linear forwards infinite;transform:translate(var(--x),var(--y))}.manifest-loader .loader .box div{background-color:var(--primary);width:48px;height:48px;position:relative;transform-style:preserve-3d;animation:var(--duration) ease forwards infinite;transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}.manifest-loader .loader .box div:before,.manifest-loader .loader .box div:after{--rx: 90deg;--ry: 0deg;--z: 24px;--y: -24px;--x: 0;content:"";position:absolute;background-color:inherit;width:inherit;height:inherit;transform:rotateX(var(--rx)) rotateY(var(--ry)) translate(var(--x),var(--y)) translateZ(var(--z));filter:brightness(var(--b, 1.2))}.manifest-loader .loader .box div:after{--rx: 0deg;--ry: 90deg;--x: 24px;--y: 0;--b: 1.4}.manifest-loader .loader .box.box0{--x: -220px;--y: -120px;left:58px;top:108px}.manifest-loader .loader .box.box1{--x: -260px;--y: 120px;left:25px;top:120px}.manifest-loader .loader .box.box2{--x: 120px;--y: -190px;left:58px;top:64px}.manifest-loader .loader .box.box3{--x: 280px;--y: -40px;left:91px;top:120px}.manifest-loader .loader .box.box4{--x: 60px;--y: 200px;left:58px;top:132px}.manifest-loader .loader .box.box5{--x: -220px;--y: -120px;left:25px;top:76px}.manifest-loader .loader .box.box6{--x: -260px;--y: 120px;left:91px;top:76px}.manifest-loader .loader .box.box7{--x: -240px;--y: 200px;left:58px;top:87px}.manifest-loader .loader .box0{animation-name:box-move0}.manifest-loader .loader .box0 div{animation-name:box-scale0}.manifest-loader .loader .box1{animation-name:box-move1}.manifest-loader .loader .box1 div{animation-name:box-scale1}.manifest-loader .loader .box2{animation-name:box-move2}.manifest-loader .loader .box2 div{animation-name:box-scale2}.manifest-loader .loader .box3{animation-name:box-move3}.manifest-loader .loader .box3 div{animation-name:box-scale3}.manifest-loader .loader .box4{animation-name:box-move4}.manifest-loader .loader .box4 div{animation-name:box-scale4}.manifest-loader .loader .box5{animation-name:box-move5}.manifest-loader .loader .box5 div{animation-name:box-scale5}.manifest-loader .loader .box6{animation-name:box-move6}.manifest-loader .loader .box6 div{animation-name:box-scale6}.manifest-loader .loader .box7{animation-name:box-move7}.manifest-loader .loader .box7 div{animation-name:box-scale7}@keyframes box-move0{12%{transform:translate(var(--x),var(--y))}25%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale0{6%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}14%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move1{16%{transform:translate(var(--x),var(--y))}29%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale1{10%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}18%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move2{20%{transform:translate(var(--x),var(--y))}33%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale2{14%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}22%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move3{24%{transform:translate(var(--x),var(--y))}37%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale3{18%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}26%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move4{28%{transform:translate(var(--x),var(--y))}41%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale4{22%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}30%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move5{32%{transform:translate(var(--x),var(--y))}45%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale5{26%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}34%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move6{36%{transform:translate(var(--x),var(--y))}49%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale6{30%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}38%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes box-move7{40%{transform:translate(var(--x),var(--y))}53%,52%{transform:translate(0)}80%{transform:translateY(-32px)}90%,to{transform:translateY(188px)}}@keyframes box-scale7{34%{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(0)}42%,to{transform:rotateY(-47deg) rotateX(-15deg) rotate(15deg) scale(1)}}@keyframes mask{0%,65%{opacity:0}66%,to{opacity:1}}.p-accordion-panel:last-child .p-accordion-header{border:none!important}.viewer-container{width:100%;height:80%;display:block}:host ::ng-deep canvas[data-view]{width:100%!important;height:100%!important}.header{padding:12px 20px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a14}.header-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:10px;margin-bottom:0;flex-wrap:wrap}.logo{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42))}.brand{display:flex;align-items:center;min-height:32px}.brand-logo-img{width:auto;height:32px;max-width:240px;object-fit:contain;display:block}.tabs{display:flex;gap:5px}.tab{padding:8px 20px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.tab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.tab:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .12)}.header-right{display:flex;gap:10px;align-items:center}.btn-export,.btn-save{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost{padding:8px 12px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-ghost:disabled{opacity:.5;cursor:not-allowed}.btn-ghost:not(:disabled):hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save{background:rgb(var(--primary-color, 98 101 241));color:#fff;border:none}.btn-export:hover{background:rgb(var(--surface-100, 248 250 252))}.btn-save:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.btn-export:disabled,.btn-save:disabled{opacity:.6;cursor:not-allowed}.btn-reset{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-reset:hover{background:rgb(var(--surface-100, 248 250 252));border-color:rgb(var(--secondary-color, 16 185 129))}.btn-reset:disabled{opacity:.6;cursor:not-allowed}.btn-exit{padding:8px 16px;border:1px solid rgb(var(--border-color, 203 213 225));background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:14px;cursor:pointer;border-radius:6px;transition:all .2s}.btn-exit:hover{background:rgb(var(--surface-100, 248 250 252));border-color:#ef4444}.btn-exit:disabled{opacity:.6;cursor:not-allowed}.btn-menu{padding:8px 12px;border:none;background:transparent;font-size:20px;cursor:pointer;color:rgb(var(--text-color-secondary, 100 116 139))}.unified-alignment-controls{display:flex;align-items:center;height:auto}.alignment-controls-container{display:flex;align-items:center;width:100%}.controls-group{display:flex;align-items:center;gap:16px;padding:10px 16px;background:linear-gradient(135deg,rgb(var(--surface-50, 248 250 252) / .8),rgb(var(--surface-100, 248 250 252) / .6));border:1px solid rgb(var(--border-color, 203 213 225) / .6);border-radius:8px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.toggle-buttons{display:flex;align-items:center;gap:6px;padding:0;background:rgb(var(--surface-card, 255 255 255));border-radius:6px;border:1px solid rgb(var(--border-color, 203 213 225))}.alignment-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 14px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;font-weight:500;cursor:pointer;border-radius:5px;transition:all .25s cubic-bezier(.4,0,.2,1);position:relative;overflow:hidden}.alignment-btn i{font-size:16px;display:flex;align-items:center}.alignment-btn .btn-label{white-space:nowrap;font-weight:500}.alignment-btn:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .08);color:rgb(var(--text-color, 15 23 42))}.alignment-btn.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4)}.alignment-btn.active:hover{background:rgb(var(--primary-color, 98 101 241) / .92)}.grid-size-section{display:flex;align-items:center}.grid-size-label{display:flex;flex-direction:column;gap:8px;cursor:pointer}.label-header{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:rgb(var(--text-color, 15 23 42));text-transform:uppercase;letter-spacing:.5px}.label-header i{font-size:14px;color:rgb(var(--primary-color, 98 101 241))}.slider-wrapper{display:flex;align-items:center;gap:10px;min-width:280px}.grid-size-slider{flex:1;height:6px;border-radius:3px;background:linear-gradient(to right,rgb(var(--primary-color, 98 101 241) / .2),rgb(var(--primary-color, 98 101 241) / .1));outline:none;-webkit-appearance:none;appearance:none;cursor:pointer}.grid-size-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-webkit-slider-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:rgb(var(--primary-color, 98 101 241));cursor:pointer;border:none;box-shadow:0 2px 6px rgb(var(--primary-color, 98 101 241) / .4);transition:all .2s}.grid-size-slider::-moz-range-thumb:hover{width:20px;height:20px;box-shadow:0 3px 10px rgb(var(--primary-color, 98 101 241) / .6)}.grid-size-slider::-moz-range-track{background:transparent;border:none}.grid-size-slider::-moz-range-progress{background:rgb(var(--primary-color, 98 101 241) / .3);border-radius:3px}.grid-size-value{display:flex;align-items:center;justify-content:center;min-width:56px;padding:4px 8px;font-size:12px;font-weight:500;color:rgb(var(--text-color, 15 23 42));background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:4px;font-family:inherit}@media(max-width:1200px){.controls-group{gap:12px;padding:8px 12px}.slider-wrapper{min-width:220px}}@media(max-width:768px){.unified-alignment-controls{width:100%}.alignment-controls-container{flex-direction:column;gap:10px}.controls-group{flex-direction:column;gap:10px;width:100%}.toggle-buttons{width:100%;justify-content:space-between}.alignment-btn{flex:1;padding:10px 12px}.alignment-btn .btn-label{display:none}.grid-size-section,.grid-size-label{width:100%}.slider-wrapper{width:100%;min-width:unset}.grid-size-value{padding:6px 10px;font-size:11px}}@media(max-width:480px){.controls-group{padding:8px 10px;gap:8px}.toggle-buttons{gap:4px}.alignment-btn{padding:8px 10px;font-size:12px}.alignment-btn i{font-size:15px}.label-header{font-size:11px}.slider-wrapper{gap:8px}}.main-container{display:flex;height:calc(100dvh - 57px);background:rgb(var(--surface-100, 248 250 252))}.canvas-area{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:1px;background:rgb(var(--border-color, 203 213 225));overflow:hidden}.canvas-area.canvas-area-single{grid-template-columns:1fr}.view-section{display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));position:relative;overflow:hidden}.view-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px 16px 0;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--border-color, 203 213 225));box-shadow:0 1px 3px #0f172a0d}.view-header h3{font-size:16px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0}.view-header .view-controls{display:flex;gap:5px;background:rgb(var(--surface-100, 248 250 252));padding:4px;border-radius:6px}.canvas-toolbar{position:absolute;top:70px;left:20px;display:flex;gap:8px;background:rgb(var(--surface-card, 255 255 255));padding:10px;border-radius:8px;box-shadow:0 2px 8px #0f172a1a;z-index:10}.canvas-toolbar-2d{top:70px}.toolbar-btn{width:36px;height:36px;border:none;background:transparent;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.toolbar-btn:hover{background:rgb(var(--surface-100, 248 250 252))}.view-controls{display:flex;gap:5px}.view-btn,.view-btn-2d{padding:6px 16px;border:none;background:transparent;color:rgb(var(--text-color-secondary, 100 116 139));font-size:13px;cursor:pointer;border-radius:4px;transition:all .2s}.view-btn.active,.view-btn-2d.active{background:rgb(var(--primary-color, 98 101 241));color:#fff}.view-btn:hover:not(.active),.view-btn-2d:hover:not(.active){background:rgb(var(--primary-color, 98 101 241) / .15)}.canvas-content{flex:1;display:flex;align-items:center;justify-content:center}.jersey-model,.jersey-2d{display:flex;flex-direction:column;align-items:center;gap:20px}.model-text{text-align:center}.model-text h3{font-size:18px;color:#666;margin-bottom:5px}.model-text p{font-size:13px;color:#999}.canvas-footer{display:flex;justify-content:center;align-items:center;gap:20px;padding:16px;background:#fff;border-radius:0;margin:0;border-top:1px solid #e0e0e0}.zoom-control{display:flex;align-items:center;gap:10px;font-size:13px;color:#666}.zoom-btn{width:32px;height:32px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:18px;border-radius:4px;transition:all .2s}.zoom-btn:hover{background:#f5f5f5}.zoom-value{min-width:50px;text-align:center;font-weight:500;color:#1a1a1a}.view-options{display:flex;gap:10px}.option-btn{display:flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #ddd;background:#fff;cursor:pointer;font-size:14px;border-radius:6px;transition:all .2s}.option-btn:hover{background:#f5f5f5}.right-panel{width:420px;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;box-shadow:inset 1px 0 #fffc}.right-panel>section{display:flex;flex:1;min-height:0}.right-panel-shell,.icon-nav-shell{display:flex;min-height:0;height:100%}.panel-icon-nav{width:90px;height:100%;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255)),rgb(var(--surface-100, 248 250 252)));border-left:1px solid #e0e0e0;display:flex;flex-direction:column;justify-content:space-between}.icon-nav-list{display:flex;flex-direction:column;overflow:auto}.icon-btn{display:flex;flex-direction:column;align-items:center;gap:6px;padding:16px 10px;border:none;background:transparent;color:#666;font-size:11px;cursor:pointer;transition:all .2s;border-left:3px solid transparent}.icon-btn i{font-size:20px}.icon-btn.active{color:rgb(var(--primary-color, 98 101 241));border-left-color:rgb(var(--primary-color, 98 101 241));background:rgb(var(--primary-color, 98 101 241) / .12)}.icon-btn:hover:not(.active){background:#f5f5f5}.icon-nav-bottom{display:flex;justify-content:center;gap:5px;padding:16px 10px;border-top:1px solid #e0e0e0}.icon-btn-small{width:36px;height:36px;padding:6px;border:none;background:transparent;color:#666;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.icon-btn-small:hover{background:#f0f0f0}.toggle-more-btn,.expanded-nav-menu,.mobile-canvas-toggle,.mobile-actions-bar{display:none}.panel-content{width:100%;display:flex;flex:1;flex-direction:column;min-height:0}.panel-content[style*="display: flex"]{display:flex!important}.panel-header{display:flex;justify-content:space-between;align-items:flex-start;padding:24px 18px 16px;border-bottom:1px solid #eef2f7;background:linear-gradient(180deg,rgb(var(--surface-card, 255 255 255) / .98),rgb(var(--surface-100, 248 250 252) / .88));-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.panel-header h2{font-size:20px;font-weight:600;color:rgb(var(--text-color, 15 23 42));margin:0 0 4px;letter-spacing:.01em}.panel-subtitle{font-size:13px;color:#666;margin:0}.help-btn{width:28px;height:28px;border:2px solid #2196f3;background:#fff;color:#2196f3;border-radius:50%;cursor:pointer;font-size:16px;font-weight:700;display:flex;align-items:center;justify-content:center;transition:all .2s}.help-btn:hover{background:#2196f3;color:#fff}.panel-tabs{display:flex;border-bottom:2px solid #f0f0f0;padding:0 24px}.panel-tab{flex:1;padding:12px 16px;border:none;background:transparent;color:#666;font-size:14px;font-weight:500;cursor:pointer;border-bottom:3px solid transparent;margin-bottom:-2px;transition:all .2s}.panel-tab.active{color:#2196f3;border-bottom-color:#2196f3}.panel-tab:hover:not(.active){color:#333}.tab-content{flex:1;overflow-y:auto}.panel-body{flex:1}.color-list{padding:0}.color-item{display:flex;align-items:center;gap:16px;padding:16px 24px;border-bottom:1px solid #f0f0f0;cursor:pointer;transition:background .2s}.color-item:hover{background:#f8f8f8}.color-preview{width:40px;height:40px;border-radius:50%;flex-shrink:0;box-shadow:0 2px 4px #0000001a}.color-label{flex:1;font-size:15px;color:#1a1a1a;font-weight:400}.arrow-btn{width:32px;height:32px;border:none;background:transparent;color:#999;font-size:24px;cursor:pointer;border-radius:4px;transition:all .2s;display:flex;align-items:center;justify-content:center}.arrow-btn:hover{background:#f0f0f0;color:#666}.custom-color-section{padding:24px}.color-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:16px}.color-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative}.color-swatch.white{background:#fff}.color-swatch.black{background:#000}.color-swatch.active{border-color:#1a1a1a;border-width:3px}.color-swatch.active:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.color-swatch.white.active:after{color:#1a1a1a}.color-swatch.add-color{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.color-swatch:hover{border-color:#999}.custom-color{margin-top:15px}.custom-color label{display:block;font-size:12px;color:#666;margin-bottom:8px}.color-input-group{display:flex;gap:10px;align-items:center}.color-input{flex:1;padding:10px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#666}.color-picker{width:50px;height:42px;border:none;border-radius:6px;cursor:pointer;background:#000}.pattern-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:15px}.pattern-swatch{width:100%;aspect-ratio:1;border:2px solid #e0e0e0;border-radius:8px;cursor:pointer;transition:all .2s;position:relative;overflow:hidden}.pattern-swatch.active{border-color:#1a1a1a;border-width:3px}.pattern-swatch.active:first-child:after{content:"\\2713";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#1a1a1a;font-size:18px;font-weight:700}.pattern-swatch:first-child{background:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;color:#666}.pattern-swatch.solid{background:#5a5a5a}.pattern-swatch.diagonal-lines{background:repeating-linear-gradient(45deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.dots{background:radial-gradient(circle,#5a5a5a 1px,transparent 1px);background-size:8px 8px}.pattern-swatch.horizontal-lines{background:repeating-linear-gradient(0deg,#5a5a5a,#5a5a5a 2px,transparent 2px,transparent 6px)}.pattern-swatch.add-pattern{background:#fff;font-size:24px;color:#999;display:flex;align-items:center;justify-content:center}.pattern-swatch:hover{border-color:#999}.slider-control{margin-top:15px}.slider-control label{display:block;font-size:12px;color:#666;margin-bottom:10px}.slider{width:100%;height:6px;border-radius:3px;background:#e0e0e0;outline:none;-webkit-appearance:none;appearance:none}.slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;box-shadow:0 2px 4px #0003}.slider::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#4a7c8e;cursor:pointer;border:none;box-shadow:0 2px 4px #0003}.form-group{margin-bottom:16px}.form-group label{display:block;font-size:12px;color:#666;margin-bottom:8px;font-weight:500}.form-row{display:flex;gap:12px;margin-bottom:16px}.form-group.half{flex:1}.text-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;transition:all .2s}.text-input:focus{outline:none;border-color:#1a1a1a}.text-input::placeholder{color:#999}.number-input{width:100%;padding:10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a}.dropdown{width:100%;padding:10px 32px 10px 12px;border:1px solid #e0e0e0;border-radius:6px;font-size:13px;color:#1a1a1a;background:#fff;cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.dropdown:hover{border-color:#999}.dropdown.small{font-size:13px}.text-formatting{display:flex;gap:8px;margin-bottom:16px}.format-btn{flex:1;padding:10px;border:1px solid #e0e0e0;background:#fff;font-size:14px;font-weight:700;cursor:pointer;border-radius:6px;transition:all .2s}.format-btn.italic{font-style:italic;font-weight:700}.format-btn:hover{background:#f5f5f5;border-color:#999}.format-btn.active{background:#1a1a1a;color:#fff;border-color:#1a1a1a}.upload-area{width:100%;padding:40px 20px;border:2px dashed #d0d0d0;border-radius:8px;text-align:center;cursor:pointer;transition:all .2s;margin-bottom:16px;background:#fafafa}.upload-area:hover{border-color:#999;background:#f5f5f5}.upload-icon{width:48px;height:48px;margin:0 auto 12px;background:#e0e0e0;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:24px;color:#666}.upload-text{font-size:14px;color:#1a1a1a;margin-bottom:4px;font-weight:500}.upload-hint{font-size:12px;color:#999}.add-btn{width:100%;padding:12px;border:none;background:#1a1a1a;color:#fff;font-size:14px;font-weight:600;cursor:pointer;border-radius:6px;transition:all .2s}.add-btn:hover{background:#333}.button-row{display:flex;gap:10px}.action-btn{padding:10px 16px;border:1px solid #e0e0e0;background:#fff;color:#1a1a1a;font-size:13px;font-weight:500;cursor:pointer;border-radius:6px;transition:all .2s}.action-btn.half{flex:1}.action-btn:hover{background:#f5f5f5;border-color:#999}.panel-content::-webkit-scrollbar,.tab-content::-webkit-scrollbar,.panel-body::-webkit-scrollbar{width:6px}.panel-content::-webkit-scrollbar-track,.tab-content::-webkit-scrollbar-track,.panel-body::-webkit-scrollbar-track{background:rgb(var(--surface-100, 248 250 252))}.panel-content::-webkit-scrollbar-thumb,.tab-content::-webkit-scrollbar-thumb,.panel-body::-webkit-scrollbar-thumb{background:rgb(var(--surface-400, 148 163 184));border-radius:3px}.panel-content::-webkit-scrollbar-thumb:hover,.tab-content::-webkit-scrollbar-thumb:hover,.panel-body::-webkit-scrollbar-thumb:hover{background:rgb(var(--surface-500, 100 116 139))}.main-canvas-area{display:grid;grid-template-columns:1fr 1fr;min-height:0;background:rgb(var(--surface-100, 248 250 252));position:relative}.main-canvas-area.single{grid-template-columns:1fr}.view-section{position:relative;display:flex;flex-direction:column;background:rgb(var(--surface-100, 248 250 252));overflow:hidden}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:1px solid rgb(var(--surface-300, 203 213 225))}.view-section.hidden{display:none}.editor-main-box{height:calc(100% - 112px);max-height:calc(100dvh - 112px)!important;align-items:stretch;overflow:hidden}.main-canvas-area.single{padding-right:20px}.main-canvas-area .view-section,.main-canvas-area .view-section>.view-section,.canvas-area,.canvas-area-single,.jersey-model,app-two-d-ui,app-three-d-ui{min-height:0;height:100%}.main-canvas-area.canvas-loading .view-section{pointer-events:none}.canvas-manifest-loader{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;background:rgb(var(--surface-0, 255 255 255));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}@supports (color: color-mix(in lab,red,red)){.canvas-manifest-loader{background:color-mix(in srgb,rgb(var(--surface-0, 255 255 255)) 85%,transparent)}}.canvas-manifest-loader :where(.manifest-loader .loader){--primary: rgb(var(--primary-color, 98 101 241));width:160px;height:220px}.canvas-manifest-loader-subtitle{margin:0;font-size:.8125rem;font-weight:500;color:rgb(var(--text-color-secondary, 100 116 139))}.panel-scroll-body{flex:1;min-height:0;max-height:none;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:.45rem .65rem .85rem}@media(max-width:1199px){.right-panel{width:360px}.panel-icon-nav{width:78px}.main-canvas-area.single{padding-right:12px}.main-canvas-area:not(.single){grid-auto-rows:1fr;grid-template-columns:1fr}}.mobile-panel-toggle{display:none}@media(max-width:991px){:host{display:flex;flex-direction:column;height:100dvh;overflow:hidden}.header{flex-shrink:0}.editor-main-box{flex:1;min-height:0;display:flex;flex-direction:column;height:auto;padding-bottom:100px}.main-canvas-area{flex:1;min-height:0;width:100%;grid-template-columns:1fr;grid-auto-rows:1fr;padding:0;overflow-y:auto}.main-canvas-area:not(.single){grid-auto-rows:minmax(220px,1fr)}.main-canvas-area:not(.single) .view-section:nth-of-type(2){border-left:0;border-top:1px solid rgb(var(--surface-300, 203 213 225))}.right-panel-shell,.icon-nav-shell{flex-shrink:0;width:100%;height:auto}.right-panel,.panel-icon-nav{width:100%;height:auto;border-left:0;border-top:1px solid rgb(var(--surface-200, 226 232 240))}.right-panel{max-height:min(44svh,400px);overflow:hidden;background:rgb(var(--surface-card, 255 255 255))}.panel-content{display:flex;min-height:0}.panel-header{position:sticky;top:0;z-index:2;background:rgb(var(--surface-card, 255 255 255));padding:12px 16px 10px}.panel-header h2{font-size:16px;line-height:1.2}.panel-scroll-body{flex:1;min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 8px 10px}.panel-icon-nav{position:fixed;bottom:0;left:0;width:100%;z-index:30;background:rgb(var(--surface-card, 255 255 255));box-shadow:0 -3px 14px #0f172a14;border-top:1px solid rgb(var(--surface-200, 226 232 240));z-index:9999999}.icon-nav-list{flex-direction:row;overflow-x:auto;gap:6px;padding:6px 8px;scrollbar-width:none;-webkit-overflow-scrolling:touch;justify-content:space-between;z-index:1024}.icon-nav-list::-webkit-scrollbar{display:none}.icon-btn{min-width:80px;min-height:52px;border-radius:10px;padding:8px;gap:4px;border-left:0;border-bottom:3px solid transparent;flex:0 0 auto;font-size:11px}.icon-btn.active{border-bottom-color:rgb(var(--primary-color, 98 101 241));border-left-color:transparent}.icon-nav-bottom{padding:8px;border-top:1px solid rgb(var(--surface-100, 248 250 252))}.icon-btn-small{width:40px;height:40px}.toggle-more-btn{display:flex}.expanded-nav-menu{display:flex;inset:auto 0 100%;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;border-radius:8px 8px 0 0;box-shadow:0 -4px 12px #0f172a1a;border:1px solid rgb(var(--border-color, 203 213 225));border-left:none;border-right:none;border-bottom:none;padding:4px 8px;margin-bottom:-1px;gap:6px;justify-content:space-between}.expanded-nav-menu .icon-btn{min-width:80px;min-height:52px;border-left:0;border-bottom:3px solid transparent;padding:8px;width:auto}.mobile-actions-bar{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:rgb(var(--surface-card, 255 255 255));border-bottom:1px solid rgb(var(--surface-100, 248 250 252))}.mobile-panel-toggle{display:flex;align-items:center;gap:6px;padding:8px 14px;border:none;border-radius:6px;background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241));font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .2s}.mobile-panel-toggle:active{background:rgb(var(--primary-color, 98 101 241) / .2)}.mobile-panel-toggle i{font-size:18px;line-height:1}.main-canvas-area{position:relative}.mobile-panel-hidden .right-panel-shell{max-height:0!important;overflow:hidden!important;border-top:0!important;pointer-events:none}.mobile-panel-hidden .main-canvas-area{flex:1 1 100%}.mobile-canvas-hidden .main-canvas-area{display:none!important}.mobile-canvas-hidden .right-panel{max-height:none;height:100%;flex:1}.mobile-canvas-hidden .panel-scroll-body{max-height:100%!important}.mobile-canvas-toggle{display:flex;align-items:center;justify-content:center;gap:6px;padding:2px 7px;background:transparent;border:1px solid rgb(var(--surface-200, 226 232 240));border-radius:6px;color:rgb(var(--text-color, 15 23 42));font-size:13px;font-weight:600;cursor:pointer;transition:background .2s;margin-left:auto}.mobile-canvas-toggle:active{background:rgb(var(--surface-100, 248 250 252))}.mobile-canvas-toggle i{font-size:16px}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}.brand-logo-img{height:24px}}@media(max-width:640px){.header{padding:8px 12px 0}.header>div{flex-wrap:wrap;gap:6px}.header-right{gap:6px;flex-wrap:wrap}.logo{font-size:17px}.btn-export,.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 10px}.main-canvas-area{grid-auto-rows:1fr}.right-panel{max-height:min(45svh,380px)}.panel-header{padding:10px 12px 8px}.panel-header h2{font-size:15px}.panel-scroll-body{max-height:min(38svh,310px);padding:0 6px 8px}.icon-btn{min-width:68px;min-height:50px;padding:6px 4px;font-size:10px}.icon-btn i{font-size:18px}.icon-nav-list{gap:2px;padding:4px 6px}.icon-nav-bottom{padding:4px 6px}.expanded-nav-menu .icon-btn{min-width:68px;min-height:50px}.mobile-panel-toggle{font-size:12px;padding:7px 14px;bottom:10px}.mobile-panel-toggle i{font-size:16px}}@media(max-width:480px){.header{padding:6px 10px 0}.logo{font-size:16px}.btn-export{display:none}.btn-save,.btn-reset,.btn-exit{font-size:12px;padding:6px 12px}.right-panel{max-height:min(46svh,360px)}.panel-scroll-body{max-height:min(39svh,235px)}.icon-btn{min-width:60px;min-height:48px;gap:3px;font-size:9px}.icon-btn i{font-size:17px}.expanded-nav-menu .icon-btn{min-width:60px;min-height:48px}.mobile-panel-toggle{font-size:11px;padding:6px 12px;gap:4px;bottom:8px}.mobile-panel-toggle i{font-size:15px}}@media(max-width:991px)and (orientation:landscape)and (max-height:500px){.editor-main-box{flex-direction:row;flex-wrap:nowrap}.main-canvas-area{flex:1;min-width:0;grid-template-columns:1fr;grid-auto-rows:100%}.mobile-panel-toggle{bottom:8px;left:auto;right:12px;transform:none;font-size:12px;padding:6px 12px}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{max-height:unset!important;width:0!important;overflow:hidden!important;border:none!important}.right-panel-shell{flex-direction:column;width:auto;height:100%;flex-shrink:0}.right-panel{width:280px;max-height:100%;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240))}.panel-scroll-body{max-height:100%}.icon-nav-shell{width:auto;height:100%;flex-shrink:0}.panel-icon-nav{width:64px;height:100%;border-top:0;border-left:1px solid rgb(var(--surface-200, 226 232 240));box-shadow:none;overflow-y:auto}.icon-nav-list{flex-direction:column;overflow-x:visible;overflow-y:auto;padding:4px}.icon-btn{min-width:unset;min-height:52px;width:100%;border-bottom:0;border-left:3px solid transparent;font-size:9px}.icon-btn.active{border-left-color:rgb(var(--primary-color, 98 101 241));border-bottom-color:transparent}}.manifest-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92))}.save-loader-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:var(--p-surface-0, rgba(255, 255, 255, .92));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.manifest-error-card{width:min(520px,calc(100vw - 2rem));padding:1.25rem;border-radius:12px;background:var(--p-surface-0, #fff);border:1px solid var(--p-surface-200, #e2e8f0);box-shadow:0 10px 30px #02061726}.manifest-error-title{font-size:1rem;font-weight:700;color:var(--p-text-color, #0f172a);margin-bottom:.5rem}.manifest-error-message{color:var(--p-text-muted-color, #475569);margin-bottom:1rem;word-break:break-word}.manifest-retry-btn{appearance:none;border:0;border-radius:10px;padding:.6rem 1rem;font-weight:600;cursor:pointer;background:rgb(var(--primary-color, 98 101 241));color:rgb(var(--primary-contrast-color, 255 255 255))}.manifest-retry-btn:hover{background:rgb(var(--primary-color, 98 101 241) / .88)}.toggle-text{position:absolute;top:50%;transform:translateY(-50%);font-size:14px;font-weight:500;transition:opacity .2s ease;line-height:0}.off-text{left:38px;color:rgb(var(--text-color, 15 23 42))}.on-text{right:38px;color:rgb(var(--primary-contrast-color, 255 255 255));opacity:0}.toggle-input:checked+.toggle-track{background:rgb(var(--primary-color, 98 101 241))}.toggle-input:checked+.toggle-track .off-text{opacity:0}.toggle-input:checked+.toggle-track .on-text{opacity:1}.toggle-input:checked~.toggle-knob{transform:translate(96px)}.child-accordion{width:100%!important}@media(min-width:992px)and (max-width:1350px){.mobile-panel-toggle{display:flex;align-items:center;gap:6px;position:absolute;bottom:20px;right:20px;z-index:20;padding:8px 18px;border:none;border-radius:999px;background:rgb(var(--primary-color, 98 101 241));color:#fff;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 4px 16px #6265f159;white-space:nowrap;transition:background .2s,box-shadow .2s,transform .15s}.mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .88);box-shadow:0 6px 20px #6265f16b}.mobile-panel-toggle:active{transform:scale(.96)}.mobile-panel-hidden .right-panel-shell,.mobile-panel-hidden .icon-nav-shell{display:none!important}.mobile-panel-hidden .mobile-panel-toggle{background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--primary-color, 98 101 241));box-shadow:0 4px 16px #0f172a26;border:1px solid rgb(var(--primary-color, 98 101 241) / .4)}.mobile-panel-hidden .mobile-panel-toggle:hover{background:rgb(var(--primary-color, 98 101 241) / .08)}}.jersey-model{position:relative}.shortcuts-wrap{position:absolute;bottom:12px;right:12px;z-index:20}.shortcuts-fab{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:8px;background:rgb(var(--surface-card, 255 255 255));color:rgb(var(--text-color, 15 23 42));font-size:18px;cursor:pointer;box-shadow:0 2px 8px #0f172a26;transition:all .2s}.shortcuts-fab:hover{background:rgb(var(--primary-color, 98 101 241) / .1);color:rgb(var(--primary-color, 98 101 241))}.shortcuts-fab.active{background:rgb(var(--primary-color, 98 101 241));color:#fff;box-shadow:0 4px 12px rgb(var(--primary-color, 98 101 241) / .4)}.shortcuts-popover{position:absolute;bottom:calc(100% + 10px);right:0;width:300px;height:360px;overflow-y:auto;background:rgb(var(--surface-card, 255 255 255));border:1px solid rgb(var(--border-color, 203 213 225));border-radius:10px;box-shadow:0 8px 24px #0f172a24;padding:.75rem}.shortcuts-popover-header{display:flex;align-items:center;gap:.5rem;font-size:.8rem;font-weight:700;color:rgb(var(--text-color, 15 23 42));padding-bottom:.6rem;margin-bottom:.25rem;border-bottom:1px solid rgb(var(--border-color, 203 213 225))}.shortcuts-popover-header i{font-size:1rem;color:rgb(var(--primary-color, 98 101 241))}.mobile-canvas-hidden .panel-scroll-body{height:100%;max-height:100%}.mobile-canvas-hidden .panel-content,.mobile-canvas-hidden .right-panel,.mobile-canvas-hidden .right-panel-shell{height:100%}@property --tw-rotate-x{syntax: "*"; inherits: false;}@property --tw-rotate-y{syntax: "*"; inherits: false;}@property --tw-rotate-z{syntax: "*"; inherits: false;}@property --tw-skew-x{syntax: "*"; inherits: false;}@property --tw-skew-y{syntax: "*"; inherits: false;}@property --tw-border-style{syntax: "*"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: "*"; inherits: false;}@property --tw-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: "*"; inherits: false;}@property --tw-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: "*"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: "*"; inherits: false;}@property --tw-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: "*"; inherits: false;}@property --tw-inset-ring-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: "*"; inherits: false;}@property --tw-ring-offset-width{syntax: "<length>"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: "*"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: "*"; inherits: false; initial-value: 0 0 #0000;}@property --tw-blur{syntax: "*"; inherits: false;}@property --tw-brightness{syntax: "*"; inherits: false;}@property --tw-contrast{syntax: "*"; inherits: false;}@property --tw-grayscale{syntax: "*"; inherits: false;}@property --tw-hue-rotate{syntax: "*"; inherits: false;}@property --tw-invert{syntax: "*"; inherits: false;}@property --tw-opacity{syntax: "*"; inherits: false;}@property --tw-saturate{syntax: "*"; inherits: false;}@property --tw-sepia{syntax: "*"; inherits: false;}@property --tw-drop-shadow{syntax: "*"; inherits: false;}@property --tw-drop-shadow-color{syntax: "*"; inherits: false;}@property --tw-drop-shadow-alpha{syntax: "<percentage>"; inherits: false; initial-value: 100%;}@property --tw-drop-shadow-size{syntax: "*"; inherits: false;}@property --tw-backdrop-blur{syntax: "*"; inherits: false;}@property --tw-backdrop-brightness{syntax: "*"; inherits: false;}@property --tw-backdrop-contrast{syntax: "*"; inherits: false;}@property --tw-backdrop-grayscale{syntax: "*"; inherits: false;}@property --tw-backdrop-hue-rotate{syntax: "*"; inherits: false;}@property --tw-backdrop-invert{syntax: "*"; inherits: false;}@property --tw-backdrop-opacity{syntax: "*"; inherits: false;}@property --tw-backdrop-saturate{syntax: "*"; inherits: false;}@property --tw-backdrop-sepia{syntax: "*"; inherits: false;}@property --tw-ease{syntax: "*"; inherits: false;}@keyframes spin{to{transform:rotate(360deg)}}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x: initial;--tw-rotate-y: initial;--tw-rotate-z: initial;--tw-skew-x: initial;--tw-skew-y: initial;--tw-border-style: solid;--tw-font-weight: initial;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000;--tw-blur: initial;--tw-brightness: initial;--tw-contrast: initial;--tw-grayscale: initial;--tw-hue-rotate: initial;--tw-invert: initial;--tw-opacity: initial;--tw-saturate: initial;--tw-sepia: initial;--tw-drop-shadow: initial;--tw-drop-shadow-color: initial;--tw-drop-shadow-alpha: 100%;--tw-drop-shadow-size: initial;--tw-backdrop-blur: initial;--tw-backdrop-brightness: initial;--tw-backdrop-contrast: initial;--tw-backdrop-grayscale: initial;--tw-backdrop-hue-rotate: initial;--tw-backdrop-invert: initial;--tw-backdrop-opacity: initial;--tw-backdrop-saturate: initial;--tw-backdrop-sepia: initial;--tw-ease: initial}}}
|
|
4616
4616
|
/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */
|
|
4617
4617
|
`],encapsulation:3,changeDetection:0})};var Tn={MANIFEST_LOADED:"manifest-loaded",SDK_READY:"sdk-ready",SUBMISSION_SUCCESS:"submission:success",SUBMISSION_FAILED:"submission:failed",ERROR:"error",CLOSED:"closed"};var N_=class extends Error{constructor(t,n){super(n);this.code=t}},wD=class extends HTMLElement{bootstrapped=!1;appRef=null;componentRef=null;hostElement=null;connectedCallback(){this.bootstrapped||(this.bootstrapped=!0,this.initialize())}disconnectedCallback(){this.destroyRuntime()}async initialize(){try{let e=this.readConfig();this.hostElement=document.createElement("div"),this.hostElement.style.height="100%",this.appendChild(this.hostElement),this.appRef=await kw({providers:[...hk(),{provide:g_,useValue:{productId:e.productId,apiKey:e.apiKey,predesignId:e.predesignId,submissionNumber:e.submissionNumber,locale:e.locale,readonly:e.readonly,theme:e.theme,onManifestLoaded:t=>{this.emit(Tn.MANIFEST_LOADED,t)},onManifestLoadFailed:t=>{this.emit(Tn.ERROR,t),this.destroyRuntime()},onReady:t=>{this.emit(Tn.SDK_READY,t)},onSubmissionSuccess:t=>{this.emit(Tn.SUBMISSION_SUCCESS,t)},onSubmissionFailed:t=>{this.emit(Tn.SUBMISSION_FAILED,t)},onAssetLoadFailed:t=>{this.emit(Tn.ERROR,t),this.destroyRuntime()},onClose:()=>{this.emit(Tn.CLOSED,void 0)}}}]}),this.componentRef=PR(F_,{environmentInjector:this.appRef.injector,hostElement:this.hostElement}),this.componentRef.setInput("apiKey",e.apiKey),this.componentRef.setInput("productId",e.productId),this.componentRef.setInput("predesignId",e.predesignId),this.componentRef.setInput("submissionNumber",e.submissionNumber),this.appRef.attachView(this.componentRef.hostView)}catch(e){this.emit(Tn.ERROR,{code:this.resolveErrorCode(e),message:this.toMessage(e)}),this.destroyRuntime()}}readConfig(){let e=(this.getAttribute("api-key")??"").trim(),t=(this.getAttribute("product-id")??"").trim();if(!e||!t)throw new N_("INVALID_CONFIG","Missing required attributes: api-key and product-id are required.");return{apiKey:e,productId:t,predesignId:(this.getAttribute("predesign-id")??"")?.trim()??void 0,submissionNumber:(this.getAttribute("submission-number")??"")?.trim()??void 0,locale:(this.getAttribute("locale")??"").trim()||void 0,theme:(this.getAttribute("theme")??"").trim()||void 0,readonly:this.hasAttribute("readonly")}}resolveErrorCode(e){return e instanceof N_?e.code:"RUNTIME_ERROR"}emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}toMessage(e){return e instanceof Error&&e.message?e.message:"Unexpected SDK runtime error."}destroyRuntime(){this.componentRef&&(this.componentRef.destroy(),this.componentRef=null),this.appRef&&(this.appRef.destroy(),this.appRef=null),this.hostElement&&this.hostElement.parentElement===this&&this.removeChild(this.hostElement),this.hostElement=null,this.bootstrapped=!1}};function _4(){customElements.get("pixeasy-customizer")||customElements.define("pixeasy-customizer",wD)}var L_=class{element=null;containerEl=null;handlers=new Map;domUnsubscribers=[];open(e){this.close(!1);let t=this.resolveContainer(e.container),n=document.createElement("pixeasy-customizer");return n.setAttribute("api-key",e.apiKey),n.setAttribute("product-id",e.productId),e.predesignId&&n.setAttribute("predesign-id",e.predesignId),e.submissionNumber&&n.setAttribute("submission-number",e.submissionNumber),e.locale&&n.setAttribute("locale",e.locale),e.theme&&n.setAttribute("theme",e.theme),e.readonly&&n.setAttribute("readonly",""),this.bindDomEvents(n),t.appendChild(n),this.element=n,this.containerEl=t,this}on(e,t){let n=this.handlers.get(e)??new Set;return n.add(t),this.handlers.set(e,n),this}off(e,t){return this.handlers.get(e)?.delete(t),this}close(e=!0){return this.domUnsubscribers.forEach(t=>t()),this.domUnsubscribers=[],this.element&&this.element.parentElement&&this.element.parentElement.removeChild(this.element),this.element=null,this.containerEl=null,e&&this.emit(Tn.CLOSED,void 0),this}bindDomEvents(e){this.bind(e,Tn.MANIFEST_LOADED,t=>{this.emit(Tn.MANIFEST_LOADED,t.detail)}),this.bind(e,Tn.SDK_READY,t=>{this.emit(Tn.SDK_READY,t.detail)}),this.bind(e,Tn.SUBMISSION_SUCCESS,t=>{this.emit(Tn.SUBMISSION_SUCCESS,t.detail)}),this.bind(e,Tn.SUBMISSION_FAILED,t=>{this.emit(Tn.SUBMISSION_FAILED,t.detail)}),this.bind(e,Tn.ERROR,t=>{this.emit(Tn.ERROR,t.detail)}),this.bind(e,Tn.CLOSED,t=>{this.emit(Tn.CLOSED,t.detail)})}bind(e,t,n){e.addEventListener(t,n),this.domUnsubscribers.push(()=>e.removeEventListener(t,n))}emit(e,t){this.handlers.get(e)?.forEach(n=>{try{n(t)}catch(r){console.error("Pixeasy builder event handler failed",r)}})}resolveContainer(e){if(typeof e!="string")return e;let t=document.getElementById(e);if(!t)throw new Error(`Container not found: ${e}`);return t}};function vse(){return new L_}_4();export{L_ as PixeasyBuilder,Tn as SDK_EVENTS,vse as createPixeasyBuilder,_4 as definePixeasyCustomizerElement,v_ as generateThumbnails};
|
|
4618
4618
|
|