codecharta-visualization 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
- import{$ as O,$a as pn,$b as Ip,$c as Si,$d as vu,$e as Hn,$f as df,$g as Df,A as P,Aa as Ne,Ab as vp,Ac as Gp,Ad as Qc,Ae as ed,Af as Yn,Ah as Xf,B as M,Ba as yt,Bb as xp,Bc as Xp,Bd as no,Be as Eu,Bf as Cs,Bg as vf,Bh as Kf,C as q,Ca as f,Cb as wp,Cc as Kp,Cd as Bt,Ce as us,Cf as Qu,D as ae,Da as qe,Db as Sp,Dc as Qa,Dd as mu,De as ku,Df as Ms,E as se,Ea as he,Eb as Fr,Ec as Qp,Ed as hu,Ee as qu,Ef as _s,Eh as Qf,F as Io,Fa as Yi,Fb as ii,Fc as bn,Fd as ts,Fe as Tu,Ff as Es,G as Ar,Ga as Zh,Gb as Ji,Gc as Yp,Gd as Ci,Ge as Iu,Gf as Vt,H as dn,Ha as Na,Hb as ja,Hc as Zp,Hd as Pn,He as Mi,Hf as Yu,I as jh,Ia as Ba,Ib as Ft,Ic as Jp,Id as Nn,Ie as fs,If as Zu,J as be,Ja as Va,Jb as Ha,Jc as eu,Jd as pu,Je as Ru,Jf as Ju,K as Hh,Ka as Jh,Kb as Kc,Kc as tu,Kd as is,Ke as Du,Kf as Zn,Kh as Yf,L as La,La as hn,Lb as Di,Lc as Li,Ld as os,Le as gs,Lf as ef,Lh as Zf,M as Uh,Ma as Zi,Mb as yp,Mc as vn,Md as Bn,Me as td,Mf as tf,Mh as Jf,N as Lt,Na as ep,Nb as Do,Nc as xn,Nd as ns,Ne as bs,Nf as of,O as Gh,Ob as oi,Oc as Pt,Od as Ao,Oe as Au,Of as nf,Og as xf,P as mn,Pa as at,Pb as xw,Pc as Ya,Pd as rs,Pf as rf,Pg as wf,Q as Xh,Qa as fi,Qb as Cp,Qc as iu,Qd as Vn,Qe as vs,Qf as af,Qg as Sf,R as Ro,Ra as gi,Rb as Mp,Rc as ou,Rd as Wn,Re as xs,Rf as sf,Rg as yf,S as m,Sa as Wa,Sb as _p,Sc as nu,Sd as as,Se as Lu,Sf as kt,Sg as Cf,Sh as e0,T as te,Tb as Ep,Tc as ve,Td as uu,Te as Fu,Tf as ft,Tg as Mf,Th as t0,U as _,Ua as tp,Ub as bi,Uc as to,Ud as ss,Ue as Pu,Uf as Wt,Ug as _f,V as Fa,Va as X,Vb as Ua,Vc as xi,Ve as jn,Vf as lf,Vg as Ef,W as Ki,Wa as ip,Wb as kp,Wc as io,Wd as fu,We as Nu,Wf as Jn,Wg as kf,Wh as i0,X as Qi,Xa as Ce,Xb as qp,Xc as Nt,Xd as gu,Xe as ws,Xf as cf,Xg as qf,Xh as o0,Ya as $,Yb as ww,Yc as oo,Yd as bu,Ye as Bu,Yf as Ni,Yg as Tf,Yh as n0,Z as Kh,Za as je,Zb as Sw,Zc as wi,Zd as Fi,Ze as so,Zf as co,Zg as If,_ as rt,_a as op,_b as Tp,_c as wn,_d as Yc,_e as lo,_g as Rf,a as Ee,aa as z,ab as Xc,ac as Rp,ad as Sn,ae as xu,af as Et,ag as mf,ah as Af,b as tt,ba as ti,bb as np,bc as Dp,bd as yn,be as Ge,bf as Pi,bh as Lf,bi as r0,c as Dr,ca as Ae,cb as rp,cc as Ap,cd as yi,ce as Qe,cf as Vu,cg as hf,ch as Ff,d as Je,da as Le,db as ap,dc as Lp,dd as Za,de as Lo,df as Wu,dh as Pf,di as a0,ea as L,eb as sp,ec as Fp,ed as Cn,ee as On,ef as Ou,eg as pf,eh as Nf,ei as s0,f as Da,fa as v,fc as Pp,fd as Mn,fe as wu,ff as Ss,fg as ks,fh as po,fi as Ps,g as Ph,ga as b,gb as Oa,gc as Np,gd as ru,ge as ro,gf as zu,gg as qs,gh as Ot,gi as Ns,h as Nh,ha as F,hb as lp,hc as Bp,hd as _n,he as Fo,hf as Un,hg as er,hh as Bf,hi as l0,i as ke,ia as w,ib as cp,ic as fn,id as Ja,ie as Gt,if as ys,ig as tr,ih as Vf,j as St,ja as y,jb as dp,jc as Ai,jd as En,je as lt,jf as $u,jg as Ts,jh as rd,ji as c0,k as Bh,ka as ue,kb as mp,kc as Vp,kd as kn,ke as ao,kf as Gn,kg as ir,kh as nr,ki as d0,l as Gi,lb as hp,lc as Wp,ld as qn,le as Su,lg as mo,lh as Wf,li as m0,m as Re,ma as xe,mb as pp,mc as gn,md as es,me as ls,mf as ju,mg as ho,mh as Of,mi as ad,n as Vh,na as le,nb as un,nc as Op,nd as Tn,ne as zn,nf as Hu,ng as od,nh as As,ni as h0,o as Jt,oa as W,ob as za,oc as Ga,od as In,oe as cs,of as Xt,og as Is,oh as zf,oi as p0,p as ut,pa as K,pb as $a,pc as zp,pd as Rn,pe as ds,pf as id,pg as Bi,ph as Nr,pi as u0,q as Wh,qa as D,qb as up,qc as $p,qd as Dn,qe as yu,qf as Uu,qg as nd,qh as $f,qi as f0,r as Oh,ra as Qh,rb as fp,rc as Xa,rd as An,re as Cu,rf as Gu,rg as ki,rh as Ls,ri as g0,s as Xi,sa as Yh,sb as gp,sc as Te,sd as Ln,se as Mu,sg as uf,sh as Br,si as b0,t as Aa,ta as Pa,tb as R,tc as jp,td as Fn,te as ms,tf as Xn,tg as or,th as jf,ti as v0,u as hi,ua as pi,ub as me,uc as ni,ud as au,ue as hs,uf as _i,ug as ff,uh as Vr,ui as sd,v as Ut,va as ui,vb as Ie,vc as Hp,vd as Pr,ve as _u,vf as Ei,vg as gf,vh as Fs,vi as x0,w as zh,wa as it,wb as bp,wc as Up,wd as su,we as $n,wf as Kn,wg as Rs,wh as Hf,x as Pe,xa as ot,xb as Fe,xc as Ka,xd as lu,xe as ps,xf as Xu,xg as Ds,xh as Uf,y as $h,ya as Lr,yb as mt,yc as eo,yd as cu,ye as Zc,yf as Ku,yg as qi,yh as rr,z as ei,za as Oe,zb as st,zc as vi,zd as du,ze as Jc,zf as Qn,zg as bf,zh as Gf}from"./chunk-JOW3XFPF.js";var gv=Je((pJ,fv)=>{"use strict";fv.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Mo=Je(nn=>{"use strict";var Zm,I7=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];nn.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17};nn.getSymbolTotalCodewords=function(o){return I7[o]};nn.getBCHDigit=function(e){let o=0;for(;e!==0;)o++,e>>>=1;return o};nn.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');Zm=o};nn.isKanjiModeEnabled=function(){return typeof Zm<"u"};nn.toSJIS=function(o){return Zm(o)}});var Sc=Je(Zt=>{"use strict";Zt.L={bit:1};Zt.M={bit:0};Zt.Q={bit:3};Zt.H={bit:2};function R7(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return Zt.L;case"m":case"medium":return Zt.M;case"q":case"quartile":return Zt.Q;case"h":case"high":return Zt.H;default:throw new Error("Unknown EC Level: "+e)}}Zt.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4};Zt.from=function(o,t){if(Zt.isValid(o))return o;try{return R7(o)}catch{return t}}});var xv=Je((gJ,vv)=>{"use strict";function bv(){this.buffer=[],this.length=0}bv.prototype={get:function(e){let o=Math.floor(e/8);return(this.buffer[o]>>>7-e%8&1)===1},put:function(e,o){for(let t=0;t<o;t++)this.putBit((e>>>o-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){let o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),e&&(this.buffer[o]|=128>>>this.length%8),this.length++}};vv.exports=bv});var Sv=Je((bJ,wv)=>{"use strict";function ba(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}ba.prototype.set=function(e,o,t,i){let n=e*this.size+o;this.data[n]=t,i&&(this.reservedBit[n]=!0)};ba.prototype.get=function(e,o){return this.data[e*this.size+o]};ba.prototype.xor=function(e,o,t){this.data[e*this.size+o]^=t};ba.prototype.isReserved=function(e,o){return this.reservedBit[e*this.size+o]};wv.exports=ba});var yv=Je(yc=>{"use strict";var D7=Mo().getSymbolSize;yc.getRowColCoords=function(o){if(o===1)return[];let t=Math.floor(o/7)+2,i=D7(o),n=i===145?26:Math.ceil((i-13)/(2*t-2))*2,r=[i-7];for(let a=1;a<t-1;a++)r[a]=r[a-1]-n;return r.push(6),r.reverse()};yc.getPositions=function(o){let t=[],i=yc.getRowColCoords(o),n=i.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||t.push([i[r],i[a]]);return t}});var _v=Je(Mv=>{"use strict";var A7=Mo().getSymbolSize,Cv=7;Mv.getPositions=function(o){let t=A7(o);return[[0,0],[t-Cv,0],[0,t-Cv]]}});var Ev=Je(nt=>{"use strict";nt.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var rn={N1:3,N2:3,N3:40,N4:10};nt.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7};nt.from=function(o){return nt.isValid(o)?parseInt(o,10):void 0};nt.getPenaltyN1=function(o){let t=o.size,i=0,n=0,r=0,a=null,s=null;for(let l=0;l<t;l++){n=r=0,a=s=null;for(let d=0;d<t;d++){let c=o.get(l,d);c===a?n++:(n>=5&&(i+=rn.N1+(n-5)),a=c,n=1),c=o.get(d,l),c===s?r++:(r>=5&&(i+=rn.N1+(r-5)),s=c,r=1)}n>=5&&(i+=rn.N1+(n-5)),r>=5&&(i+=rn.N1+(r-5))}return i};nt.getPenaltyN2=function(o){let t=o.size,i=0;for(let n=0;n<t-1;n++)for(let r=0;r<t-1;r++){let a=o.get(n,r)+o.get(n,r+1)+o.get(n+1,r)+o.get(n+1,r+1);(a===4||a===0)&&i++}return i*rn.N2};nt.getPenaltyN3=function(o){let t=o.size,i=0,n=0,r=0;for(let a=0;a<t;a++){n=r=0;for(let s=0;s<t;s++)n=n<<1&2047|o.get(a,s),s>=10&&(n===1488||n===93)&&i++,r=r<<1&2047|o.get(s,a),s>=10&&(r===1488||r===93)&&i++}return i*rn.N3};nt.getPenaltyN4=function(o){let t=0,i=o.data.length;for(let r=0;r<i;r++)t+=o.data[r];return Math.abs(Math.ceil(t*100/i/5)-10)*rn.N4};function L7(e,o,t){switch(e){case nt.Patterns.PATTERN000:return(o+t)%2===0;case nt.Patterns.PATTERN001:return o%2===0;case nt.Patterns.PATTERN010:return t%3===0;case nt.Patterns.PATTERN011:return(o+t)%3===0;case nt.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(t/3))%2===0;case nt.Patterns.PATTERN101:return o*t%2+o*t%3===0;case nt.Patterns.PATTERN110:return(o*t%2+o*t%3)%2===0;case nt.Patterns.PATTERN111:return(o*t%3+(o+t)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}nt.applyMask=function(o,t){let i=t.size;for(let n=0;n<i;n++)for(let r=0;r<i;r++)t.isReserved(r,n)||t.xor(r,n,L7(o,r,n))};nt.getBestMask=function(o,t){let i=Object.keys(nt.Patterns).length,n=0,r=1/0;for(let a=0;a<i;a++){t(a),nt.applyMask(a,o);let s=nt.getPenaltyN1(o)+nt.getPenaltyN2(o)+nt.getPenaltyN3(o)+nt.getPenaltyN4(o);nt.applyMask(a,o),s<r&&(r=s,n=a)}return n}});var eh=Je(Jm=>{"use strict";var _o=Sc(),Cc=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Mc=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Jm.getBlocksCount=function(o,t){switch(t){case _o.L:return Cc[(o-1)*4+0];case _o.M:return Cc[(o-1)*4+1];case _o.Q:return Cc[(o-1)*4+2];case _o.H:return Cc[(o-1)*4+3];default:return}};Jm.getTotalCodewordsCount=function(o,t){switch(t){case _o.L:return Mc[(o-1)*4+0];case _o.M:return Mc[(o-1)*4+1];case _o.Q:return Mc[(o-1)*4+2];case _o.H:return Mc[(o-1)*4+3];default:return}}});var kv=Je(Ec=>{"use strict";var va=new Uint8Array(512),_c=new Uint8Array(256);(function(){let o=1;for(let t=0;t<255;t++)va[t]=o,_c[o]=t,o<<=1,o&256&&(o^=285);for(let t=255;t<512;t++)va[t]=va[t-255]})();Ec.log=function(o){if(o<1)throw new Error("log("+o+")");return _c[o]};Ec.exp=function(o){return va[o]};Ec.mul=function(o,t){return o===0||t===0?0:va[_c[o]+_c[t]]}});var qv=Je(xa=>{"use strict";var th=kv();xa.mul=function(o,t){let i=new Uint8Array(o.length+t.length-1);for(let n=0;n<o.length;n++)for(let r=0;r<t.length;r++)i[n+r]^=th.mul(o[n],t[r]);return i};xa.mod=function(o,t){let i=new Uint8Array(o);for(;i.length-t.length>=0;){let n=i[0];for(let a=0;a<t.length;a++)i[a]^=th.mul(t[a],n);let r=0;for(;r<i.length&&i[r]===0;)r++;i=i.slice(r)}return i};xa.generateECPolynomial=function(o){let t=new Uint8Array([1]);for(let i=0;i<o;i++)t=xa.mul(t,new Uint8Array([1,th.exp(i)]));return t}});var Rv=Je((MJ,Iv)=>{"use strict";var Tv=qv();function ih(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}ih.prototype.initialize=function(o){this.degree=o,this.genPoly=Tv.generateECPolynomial(this.degree)};ih.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");let t=new Uint8Array(o.length+this.degree);t.set(o);let i=Tv.mod(t,this.genPoly),n=this.degree-i.length;if(n>0){let r=new Uint8Array(this.degree);return r.set(i,n),r}return i};Iv.exports=ih});var oh=Je(Dv=>{"use strict";Dv.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}});var nh=Je($i=>{"use strict";var Av="[0-9]+",F7="[A-Z $%*+\\-./:]+",wa="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";wa=wa.replace(/u/g,"\\u");var P7="(?:(?![A-Z0-9 $%*+\\-./:]|"+wa+`)(?:.|[\r
2
- ]))+`;$i.KANJI=new RegExp(wa,"g");$i.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");$i.BYTE=new RegExp(P7,"g");$i.NUMERIC=new RegExp(Av,"g");$i.ALPHANUMERIC=new RegExp(F7,"g");var N7=new RegExp("^"+wa+"$"),B7=new RegExp("^"+Av+"$"),V7=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");$i.testKanji=function(o){return N7.test(o)};$i.testNumeric=function(o){return B7.test(o)};$i.testAlphanumeric=function(o){return V7.test(o)}});var Eo=Je(gt=>{"use strict";var W7=oh(),rh=nh();gt.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};gt.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};gt.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};gt.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};gt.MIXED={bit:-1};gt.getCharCountIndicator=function(o,t){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!W7.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?o.ccBits[0]:t<27?o.ccBits[1]:o.ccBits[2]};gt.getBestModeForData=function(o){return rh.testNumeric(o)?gt.NUMERIC:rh.testAlphanumeric(o)?gt.ALPHANUMERIC:rh.testKanji(o)?gt.KANJI:gt.BYTE};gt.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")};gt.isValid=function(o){return o&&o.bit&&o.ccBits};function O7(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return gt.NUMERIC;case"alphanumeric":return gt.ALPHANUMERIC;case"kanji":return gt.KANJI;case"byte":return gt.BYTE;default:throw new Error("Unknown mode: "+e)}}gt.from=function(o,t){if(gt.isValid(o))return o;try{return O7(o)}catch{return t}}});var Bv=Je(an=>{"use strict";var kc=Mo(),z7=eh(),Lv=Sc(),ko=Eo(),ah=oh(),Pv=7973,Fv=kc.getBCHDigit(Pv);function $7(e,o,t){for(let i=1;i<=40;i++)if(o<=an.getCapacity(i,t,e))return i}function Nv(e,o){return ko.getCharCountIndicator(e,o)+4}function j7(e,o){let t=0;return e.forEach(function(i){let n=Nv(i.mode,o);t+=n+i.getBitsLength()}),t}function H7(e,o){for(let t=1;t<=40;t++)if(j7(e,t)<=an.getCapacity(t,o,ko.MIXED))return t}an.from=function(o,t){return ah.isValid(o)?parseInt(o,10):t};an.getCapacity=function(o,t,i){if(!ah.isValid(o))throw new Error("Invalid QR Code version");typeof i>"u"&&(i=ko.BYTE);let n=kc.getSymbolTotalCodewords(o),r=z7.getTotalCodewordsCount(o,t),a=(n-r)*8;if(i===ko.MIXED)return a;let s=a-Nv(i,o);switch(i){case ko.NUMERIC:return Math.floor(s/10*3);case ko.ALPHANUMERIC:return Math.floor(s/11*2);case ko.KANJI:return Math.floor(s/13);case ko.BYTE:default:return Math.floor(s/8)}};an.getBestVersionForData=function(o,t){let i,n=Lv.from(t,Lv.M);if(Array.isArray(o)){if(o.length>1)return H7(o,n);if(o.length===0)return 1;i=o[0]}else i=o;return $7(i.mode,i.getLength(),n)};an.getEncodedBits=function(o){if(!ah.isValid(o)||o<7)throw new Error("Invalid QR Code version");let t=o<<12;for(;kc.getBCHDigit(t)-Fv>=0;)t^=Pv<<kc.getBCHDigit(t)-Fv;return o<<12|t}});var zv=Je(Ov=>{"use strict";var sh=Mo(),Wv=1335,U7=21522,Vv=sh.getBCHDigit(Wv);Ov.getEncodedBits=function(o,t){let i=o.bit<<3|t,n=i<<10;for(;sh.getBCHDigit(n)-Vv>=0;)n^=Wv<<sh.getBCHDigit(n)-Vv;return(i<<10|n)^U7}});var jv=Je((IJ,$v)=>{"use strict";var G7=Eo();function _r(e){this.mode=G7.NUMERIC,this.data=e.toString()}_r.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)};_r.prototype.getLength=function(){return this.data.length};_r.prototype.getBitsLength=function(){return _r.getBitsLength(this.data.length)};_r.prototype.write=function(o){let t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),o.put(n,10);let r=this.data.length-t;r>0&&(i=this.data.substr(t),n=parseInt(i,10),o.put(n,r*3+1))};$v.exports=_r});var Uv=Je((RJ,Hv)=>{"use strict";var X7=Eo(),lh=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Er(e){this.mode=X7.ALPHANUMERIC,this.data=e}Er.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)};Er.prototype.getLength=function(){return this.data.length};Er.prototype.getBitsLength=function(){return Er.getBitsLength(this.data.length)};Er.prototype.write=function(o){let t;for(t=0;t+2<=this.data.length;t+=2){let i=lh.indexOf(this.data[t])*45;i+=lh.indexOf(this.data[t+1]),o.put(i,11)}this.data.length%2&&o.put(lh.indexOf(this.data[t]),6)};Hv.exports=Er});var Xv=Je((DJ,Gv)=>{"use strict";var K7=Eo();function kr(e){this.mode=K7.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}kr.getBitsLength=function(o){return o*8};kr.prototype.getLength=function(){return this.data.length};kr.prototype.getBitsLength=function(){return kr.getBitsLength(this.data.length)};kr.prototype.write=function(e){for(let o=0,t=this.data.length;o<t;o++)e.put(this.data[o],8)};Gv.exports=kr});var Qv=Je((AJ,Kv)=>{"use strict";var Q7=Eo(),Y7=Mo();function qr(e){this.mode=Q7.KANJI,this.data=e}qr.getBitsLength=function(o){return o*13};qr.prototype.getLength=function(){return this.data.length};qr.prototype.getBitsLength=function(){return qr.getBitsLength(this.data.length)};qr.prototype.write=function(e){let o;for(o=0;o<this.data.length;o++){let t=Y7.toSJIS(this.data[o]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
3
- Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),e.put(t,13)}};Kv.exports=qr});var Yv=Je((LJ,ch)=>{"use strict";var Sa={single_source_shortest_paths:function(e,o,t){var i={},n={};n[o]=0;var r=Sa.PriorityQueue.make();r.push(o,0);for(var a,s,l,d,c,h,p,u,k;!r.empty();){a=r.pop(),s=a.value,d=a.cost,c=e[s]||{};for(l in c)c.hasOwnProperty(l)&&(h=c[l],p=d+h,u=n[l],k=typeof n[l]>"u",(k||u>p)&&(n[l]=p,r.push(l,p),i[l]=s))}if(typeof t<"u"&&typeof n[t]>"u"){var E=["Could not find a path from ",o," to ",t,"."].join("");throw new Error(E)}return i},extract_shortest_path_from_predecessor_list:function(e,o){for(var t=[],i=o,n;i;)t.push(i),n=e[i],i=e[i];return t.reverse(),t},find_path:function(e,o,t){var i=Sa.single_source_shortest_paths(e,o,t);return Sa.extract_shortest_path_from_predecessor_list(i,t)},PriorityQueue:{make:function(e){var o=Sa.PriorityQueue,t={},i;e=e||{};for(i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);return t.queue=[],t.sorter=e.sorter||o.default_sorter,t},default_sorter:function(e,o){return e.cost-o.cost},push:function(e,o){var t={value:e,cost:o};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof ch<"u"&&(ch.exports=Sa)});var rx=Je(Tr=>{"use strict";var Ze=Eo(),ex=jv(),tx=Uv(),ix=Xv(),ox=Qv(),ya=nh(),qc=Mo(),Z7=Yv();function Zv(e){return unescape(encodeURIComponent(e)).length}function Ca(e,o,t){let i=[],n;for(;(n=e.exec(t))!==null;)i.push({data:n[0],index:n.index,mode:o,length:n[0].length});return i}function nx(e){let o=Ca(ya.NUMERIC,Ze.NUMERIC,e),t=Ca(ya.ALPHANUMERIC,Ze.ALPHANUMERIC,e),i,n;return qc.isKanjiModeEnabled()?(i=Ca(ya.BYTE,Ze.BYTE,e),n=Ca(ya.KANJI,Ze.KANJI,e)):(i=Ca(ya.BYTE_KANJI,Ze.BYTE,e),n=[]),o.concat(t,i,n).sort(function(a,s){return a.index-s.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}function dh(e,o){switch(o){case Ze.NUMERIC:return ex.getBitsLength(e);case Ze.ALPHANUMERIC:return tx.getBitsLength(e);case Ze.KANJI:return ox.getBitsLength(e);case Ze.BYTE:return ix.getBitsLength(e)}}function J7(e){return e.reduce(function(o,t){let i=o.length-1>=0?o[o.length-1]:null;return i&&i.mode===t.mode?(o[o.length-1].data+=t.data,o):(o.push(t),o)},[])}function eC(e){let o=[];for(let t=0;t<e.length;t++){let i=e[t];switch(i.mode){case Ze.NUMERIC:o.push([i,{data:i.data,mode:Ze.ALPHANUMERIC,length:i.length},{data:i.data,mode:Ze.BYTE,length:i.length}]);break;case Ze.ALPHANUMERIC:o.push([i,{data:i.data,mode:Ze.BYTE,length:i.length}]);break;case Ze.KANJI:o.push([i,{data:i.data,mode:Ze.BYTE,length:Zv(i.data)}]);break;case Ze.BYTE:o.push([{data:i.data,mode:Ze.BYTE,length:Zv(i.data)}])}}return o}function tC(e,o){let t={},i={start:{}},n=["start"];for(let r=0;r<e.length;r++){let a=e[r],s=[];for(let l=0;l<a.length;l++){let d=a[l],c=""+r+l;s.push(c),t[c]={node:d,lastCount:0},i[c]={};for(let h=0;h<n.length;h++){let p=n[h];t[p]&&t[p].node.mode===d.mode?(i[p][c]=dh(t[p].lastCount+d.length,d.mode)-dh(t[p].lastCount,d.mode),t[p].lastCount+=d.length):(t[p]&&(t[p].lastCount=d.length),i[p][c]=dh(d.length,d.mode)+4+Ze.getCharCountIndicator(d.mode,o))}}n=s}for(let r=0;r<n.length;r++)i[n[r]].end=0;return{map:i,table:t}}function Jv(e,o){let t,i=Ze.getBestModeForData(e);if(t=Ze.from(o,i),t!==Ze.BYTE&&t.bit<i.bit)throw new Error('"'+e+'" cannot be encoded with mode '+Ze.toString(t)+`.
4
- Suggested mode is: `+Ze.toString(i));switch(t===Ze.KANJI&&!qc.isKanjiModeEnabled()&&(t=Ze.BYTE),t){case Ze.NUMERIC:return new ex(e);case Ze.ALPHANUMERIC:return new tx(e);case Ze.KANJI:return new ox(e);case Ze.BYTE:return new ix(e)}}Tr.fromArray=function(o){return o.reduce(function(t,i){return typeof i=="string"?t.push(Jv(i,null)):i.data&&t.push(Jv(i.data,i.mode)),t},[])};Tr.fromString=function(o,t){let i=nx(o,qc.isKanjiModeEnabled()),n=eC(i),r=tC(n,t),a=Z7.find_path(r.map,"start","end"),s=[];for(let l=1;l<a.length-1;l++)s.push(r.table[a[l]].node);return Tr.fromArray(J7(s))};Tr.rawSplit=function(o){return Tr.fromArray(nx(o,qc.isKanjiModeEnabled()))}});var sx=Je(ax=>{"use strict";var Ic=Mo(),mh=Sc(),iC=xv(),oC=Sv(),nC=yv(),rC=_v(),uh=Ev(),fh=eh(),aC=Rv(),Tc=Bv(),sC=zv(),lC=Eo(),hh=rx();function cC(e,o){let t=e.size,i=rC.getPositions(o);for(let n=0;n<i.length;n++){let r=i[n][0],a=i[n][1];for(let s=-1;s<=7;s++)if(!(r+s<=-1||t<=r+s))for(let l=-1;l<=7;l++)a+l<=-1||t<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?e.set(r+s,a+l,!0,!0):e.set(r+s,a+l,!1,!0))}}function dC(e){let o=e.size;for(let t=8;t<o-8;t++){let i=t%2===0;e.set(t,6,i,!0),e.set(6,t,i,!0)}}function mC(e,o){let t=nC.getPositions(o);for(let i=0;i<t.length;i++){let n=t[i][0],r=t[i][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?e.set(n+a,r+s,!0,!0):e.set(n+a,r+s,!1,!0)}}function hC(e,o){let t=e.size,i=Tc.getEncodedBits(o),n,r,a;for(let s=0;s<18;s++)n=Math.floor(s/3),r=s%3+t-8-3,a=(i>>s&1)===1,e.set(n,r,a,!0),e.set(r,n,a,!0)}function ph(e,o,t){let i=e.size,n=sC.getEncodedBits(o,t),r,a;for(r=0;r<15;r++)a=(n>>r&1)===1,r<6?e.set(r,8,a,!0):r<8?e.set(r+1,8,a,!0):e.set(i-15+r,8,a,!0),r<8?e.set(8,i-r-1,a,!0):r<9?e.set(8,15-r-1+1,a,!0):e.set(8,15-r-1,a,!0);e.set(i-8,8,1,!0)}function pC(e,o){let t=e.size,i=-1,n=t-1,r=7,a=0;for(let s=t-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!e.isReserved(n,s-l)){let d=!1;a<o.length&&(d=(o[a]>>>r&1)===1),e.set(n,s-l,d),r--,r===-1&&(a++,r=7)}if(n+=i,n<0||t<=n){n-=i,i=-i;break}}}function uC(e,o,t){let i=new iC;t.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),lC.getCharCountIndicator(l.mode,e)),l.write(i)});let n=Ic.getSymbolTotalCodewords(e),r=fh.getTotalCodewordsCount(e,o),a=(n-r)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);let s=(a-i.getLengthInBits())/8;for(let l=0;l<s;l++)i.put(l%2?17:236,8);return fC(i,e,o)}function fC(e,o,t){let i=Ic.getSymbolTotalCodewords(o),n=fh.getTotalCodewordsCount(o,t),r=i-n,a=fh.getBlocksCount(o,t),s=i%a,l=a-s,d=Math.floor(i/a),c=Math.floor(r/a),h=c+1,p=d-c,u=new aC(p),k=0,E=new Array(a),N=new Array(a),j=0,ee=new Uint8Array(e.buffer);for(let ie=0;ie<a;ie++){let oe=ie<l?c:h;E[ie]=ee.slice(k,k+oe),N[ie]=u.encode(E[ie]),k+=oe,j=Math.max(j,oe)}let B=new Uint8Array(i),H=0,G,Z;for(G=0;G<j;G++)for(Z=0;Z<a;Z++)G<E[Z].length&&(B[H++]=E[Z][G]);for(G=0;G<p;G++)for(Z=0;Z<a;Z++)B[H++]=N[Z][G];return B}function gC(e,o,t,i){let n;if(Array.isArray(e))n=hh.fromArray(e);else if(typeof e=="string"){let d=o;if(!d){let c=hh.rawSplit(e);d=Tc.getBestVersionForData(c,t)}n=hh.fromString(e,d||40)}else throw new Error("Invalid data");let r=Tc.getBestVersionForData(n,t);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!o)o=r;else if(o<r)throw new Error(`
1
+ import{$ as O,$a as pn,$b as Tp,$c as Si,$d as vu,$e as $n,$f as df,$g as Df,A as P,Aa as Ne,Ab as bp,Ac as Up,Ad as Kc,Ae as Jc,Af as Kn,Ah as Xf,B as M,Ba as yt,Bb as vp,Bc as Gp,Bd as oo,Be as Eu,Bf as ys,Bg as vf,Bh as Kf,C as q,Ca as f,Cb as xp,Cc as Xp,Cd as Bt,Ce as ps,Cf as Qu,D as ae,Da as qe,Db as wp,Dc as Xa,Dd as du,De as ku,Df as Cs,E as se,Ea as he,Eb as Ar,Ec as Kp,Ed as mu,Ee as qu,Ef as Ms,Eh as Qf,F as Io,Fa as Qi,Fb as ii,Fc as bn,Fd as hu,Fe as Tu,Ff as _s,G as Rr,Ga as Yh,Gb as Zi,Gc as Qp,Gd as no,Ge as Iu,Gf as Vt,H as dn,Ha as Fa,Hb as za,Hc as Yp,Hd as Ja,He as Ci,Hf as Yu,I as $h,Ia as Pa,Ib as Ft,Ic as Zp,Id as es,Ie as us,If as Zu,J as be,Ja as Na,Jb as $a,Jc as Jp,Jd as pu,Je as Ru,Jf as Ju,K as jh,Ka as Zh,Kb as Xc,Kc as eu,Kd as ts,Ke as Du,Kf as Qn,Kh as Yf,L as Da,La as hn,Lb as Ri,Lc as Ai,Ld as is,Le as fs,Lf as ef,Lh as Zf,M as Hh,Ma as Yi,Mb as Sp,Mc as vn,Md as Pn,Me as ed,Mf as tf,Mh as Jf,N as Lt,Na as Jh,Nb as Do,Nc as xn,Nd as os,Ne as gs,Nf as of,O as Uh,Ob as oi,Oc as Pt,Od as Ao,Oe as Au,Of as nf,Og as xf,P as mn,Pa as at,Pb as xw,Pc as Ka,Pd as ns,Pf as rf,Pg as wf,Q as Gh,Qa as fi,Qb as yp,Qc as tu,Qd as Nn,Qe as bs,Qf as af,Qg as Sf,R as Ro,Ra as gi,Rb as Cp,Rc as iu,Rd as Bn,Re as vs,Rf as sf,Rg as yf,S as m,Sa as Ba,Sb as Mp,Sc as ou,Sd as rs,Se as Lu,Sf as kt,Sg as Cf,Sh as e0,T as te,Tb as _p,Tc as ve,Td as uu,Te as Fu,Tf as ft,Tg as Mf,Th as t0,U as _,Ua as ep,Ub as bi,Uc as eo,Ud as as,Ue as Pu,Uf as Wt,Ug as _f,V as Aa,Va as X,Vb as ja,Vc as xi,Ve as zn,Vf as lf,Vg as Ef,W as Xi,Wa as tp,Wb as Ep,Wc as to,Wd as fu,We as Nu,Wf as Yn,Wg as kf,Wh as i0,X as Ki,Xa as Ce,Xb as kp,Xc as Nt,Xd as gu,Xe as xs,Xf as cf,Xg as qf,Xh as o0,Ya as $,Yb as ww,Yc as io,Yd as bu,Ye as Bu,Yf as Pi,Yg as Tf,Yh as n0,Z as Xh,Za as je,Zb as Sw,Zc as wi,Zd as Li,Ze as so,Zf as co,Zg as If,_ as rt,_a as ip,_b as qp,_c as wn,_d as Qc,_e as lo,_g as Rf,a as Ee,aa as z,ab as Gc,ac as Ip,ad as Sn,ae as xu,af as Et,ag as mf,ah as Af,b as tt,ba as ti,bb as op,bc as Rp,bd as yn,be as Ge,bf as Fi,bh as Lf,bi as r0,c as Ir,ca as Ae,cb as np,cc as Dp,cd as yi,ce as Qe,cf as Vu,cg as hf,ch as Ff,d as Je,da as Le,db as rp,dc as Ap,dd as Qa,de as Lo,df as Wu,dh as Pf,di as a0,ea as L,eb as ap,ec as Lp,ed as Cn,ee as Vn,ef as Ou,eg as pf,eh as Nf,ei as s0,f as Ia,fa as v,fc as Fp,fd as Mn,fe as wu,ff as ws,fg as Es,fh as po,fi as Fs,g as Fh,ga as b,gb as Va,gc as Pp,gd as nu,ge as ro,gf as zu,gg as ks,gh as Ot,gi as Ps,h as Ph,ha as F,hb as sp,hc as Np,hd as _n,he as Fo,hf as jn,hg as Zn,hh as Bf,hi as l0,i as ke,ia as w,ib as lp,ic as fn,id as Ya,ie as Gt,if as Ss,ig as Jn,ih as Vf,j as St,ja as y,jb as cp,jc as Di,jd as En,je as st,jf as $u,jg as qs,jh as nd,ji as c0,k as Nh,ka as ue,kb as dp,kc as Bp,kd as kn,ke as ao,kf as Hn,kg as er,kh as ir,ki as d0,l as Ui,lb as mp,lc as Vp,ld as qn,le as Su,lg as mo,lh as Wf,li as m0,m as Re,ma as xe,mb as hp,mc as gn,md as Za,me as ss,mf as ju,mg as ho,mh as Of,mi as rd,n as Bh,na as le,nb as un,nc as Wp,nd as Tn,ne as Wn,nf as Hu,ng as id,nh as Ds,ni as h0,o as Jt,oa as W,ob as Wa,oc as Ha,od as In,oe as ls,of as Xt,og as Ts,oh as zf,oi as p0,p as ut,pa as K,pb as Oa,pc as Op,pd as Rn,pe as cs,pf as td,pg as Ni,ph as Fr,pi as u0,q as Vh,qa as D,qb as pp,qc as zp,qd as Dn,qe as yu,qf as Uu,qg as od,qh as $f,qi as f0,r as Wh,ra as Kh,rb as up,rc as Ua,rd as An,re as Cu,rf as Gu,rg as Ei,rh as As,ri as g0,s as Gi,sa as Qh,sb as fp,sc as Te,sd as Ln,se as Mu,sg as uf,sh as Pr,si as b0,t as Ra,ta as La,tb as R,tc as $p,td as Fn,te as ds,tf as Un,tg as tr,th as jf,ti as v0,u as hi,ua as pi,ub as me,uc as ni,ud as ru,ue as ms,uf as Mi,ug as ff,uh as Nr,ui as ad,v as Ut,va as ui,vb as Ie,vc as jp,vd as Lr,ve as _u,vf as _i,vg as gf,vh as Ls,vi as x0,w as Oh,wa as it,wb as gp,wc as Hp,wd as au,we as On,wf as Gn,wg as Is,wh as Hf,x as Pe,xa as ot,xb as Fe,xc as Ga,xd as su,xe as hs,xf as Xu,xg as Rs,xh as Uf,y as zh,ya as Dr,yb as mt,yc as Ji,yd as lu,ye as Yc,yf as Ku,yg as ki,yh as or,z as ei,za as Oe,zb as ct,zc as vi,zd as cu,ze as Zc,zf as Xn,zg as bf,zh as Gf}from"./chunk-DHAPNXGE.js";var gv=Je((hJ,fv)=>{"use strict";fv.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Mo=Je(nn=>{"use strict";var Ym,I7=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];nn.getSymbolSize=function(o){if(!o)throw new Error('"version" cannot be null or undefined');if(o<1||o>40)throw new Error('"version" should be in range from 1 to 40');return o*4+17};nn.getSymbolTotalCodewords=function(o){return I7[o]};nn.getBCHDigit=function(e){let o=0;for(;e!==0;)o++,e>>>=1;return o};nn.setToSJISFunction=function(o){if(typeof o!="function")throw new Error('"toSJISFunc" is not a valid function.');Ym=o};nn.isKanjiModeEnabled=function(){return typeof Ym<"u"};nn.toSJIS=function(o){return Ym(o)}});var wc=Je(Zt=>{"use strict";Zt.L={bit:1};Zt.M={bit:0};Zt.Q={bit:3};Zt.H={bit:2};function R7(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return Zt.L;case"m":case"medium":return Zt.M;case"q":case"quartile":return Zt.Q;case"h":case"high":return Zt.H;default:throw new Error("Unknown EC Level: "+e)}}Zt.isValid=function(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4};Zt.from=function(o,t){if(Zt.isValid(o))return o;try{return R7(o)}catch{return t}}});var xv=Je((fJ,vv)=>{"use strict";function bv(){this.buffer=[],this.length=0}bv.prototype={get:function(e){let o=Math.floor(e/8);return(this.buffer[o]>>>7-e%8&1)===1},put:function(e,o){for(let t=0;t<o;t++)this.putBit((e>>>o-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){let o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),e&&(this.buffer[o]|=128>>>this.length%8),this.length++}};vv.exports=bv});var Sv=Je((gJ,wv)=>{"use strict";function fa(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}fa.prototype.set=function(e,o,t,i){let n=e*this.size+o;this.data[n]=t,i&&(this.reservedBit[n]=!0)};fa.prototype.get=function(e,o){return this.data[e*this.size+o]};fa.prototype.xor=function(e,o,t){this.data[e*this.size+o]^=t};fa.prototype.isReserved=function(e,o){return this.reservedBit[e*this.size+o]};wv.exports=fa});var yv=Je(Sc=>{"use strict";var D7=Mo().getSymbolSize;Sc.getRowColCoords=function(o){if(o===1)return[];let t=Math.floor(o/7)+2,i=D7(o),n=i===145?26:Math.ceil((i-13)/(2*t-2))*2,r=[i-7];for(let a=1;a<t-1;a++)r[a]=r[a-1]-n;return r.push(6),r.reverse()};Sc.getPositions=function(o){let t=[],i=Sc.getRowColCoords(o),n=i.length;for(let r=0;r<n;r++)for(let a=0;a<n;a++)r===0&&a===0||r===0&&a===n-1||r===n-1&&a===0||t.push([i[r],i[a]]);return t}});var _v=Je(Mv=>{"use strict";var A7=Mo().getSymbolSize,Cv=7;Mv.getPositions=function(o){let t=A7(o);return[[0,0],[t-Cv,0],[0,t-Cv]]}});var Ev=Je(nt=>{"use strict";nt.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var rn={N1:3,N2:3,N3:40,N4:10};nt.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7};nt.from=function(o){return nt.isValid(o)?parseInt(o,10):void 0};nt.getPenaltyN1=function(o){let t=o.size,i=0,n=0,r=0,a=null,s=null;for(let l=0;l<t;l++){n=r=0,a=s=null;for(let d=0;d<t;d++){let c=o.get(l,d);c===a?n++:(n>=5&&(i+=rn.N1+(n-5)),a=c,n=1),c=o.get(d,l),c===s?r++:(r>=5&&(i+=rn.N1+(r-5)),s=c,r=1)}n>=5&&(i+=rn.N1+(n-5)),r>=5&&(i+=rn.N1+(r-5))}return i};nt.getPenaltyN2=function(o){let t=o.size,i=0;for(let n=0;n<t-1;n++)for(let r=0;r<t-1;r++){let a=o.get(n,r)+o.get(n,r+1)+o.get(n+1,r)+o.get(n+1,r+1);(a===4||a===0)&&i++}return i*rn.N2};nt.getPenaltyN3=function(o){let t=o.size,i=0,n=0,r=0;for(let a=0;a<t;a++){n=r=0;for(let s=0;s<t;s++)n=n<<1&2047|o.get(a,s),s>=10&&(n===1488||n===93)&&i++,r=r<<1&2047|o.get(s,a),s>=10&&(r===1488||r===93)&&i++}return i*rn.N3};nt.getPenaltyN4=function(o){let t=0,i=o.data.length;for(let r=0;r<i;r++)t+=o.data[r];return Math.abs(Math.ceil(t*100/i/5)-10)*rn.N4};function L7(e,o,t){switch(e){case nt.Patterns.PATTERN000:return(o+t)%2===0;case nt.Patterns.PATTERN001:return o%2===0;case nt.Patterns.PATTERN010:return t%3===0;case nt.Patterns.PATTERN011:return(o+t)%3===0;case nt.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(t/3))%2===0;case nt.Patterns.PATTERN101:return o*t%2+o*t%3===0;case nt.Patterns.PATTERN110:return(o*t%2+o*t%3)%2===0;case nt.Patterns.PATTERN111:return(o*t%3+(o+t)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}nt.applyMask=function(o,t){let i=t.size;for(let n=0;n<i;n++)for(let r=0;r<i;r++)t.isReserved(r,n)||t.xor(r,n,L7(o,r,n))};nt.getBestMask=function(o,t){let i=Object.keys(nt.Patterns).length,n=0,r=1/0;for(let a=0;a<i;a++){t(a),nt.applyMask(a,o);let s=nt.getPenaltyN1(o)+nt.getPenaltyN2(o)+nt.getPenaltyN3(o)+nt.getPenaltyN4(o);nt.applyMask(a,o),s<r&&(r=s,n=a)}return n}});var Jm=Je(Zm=>{"use strict";var _o=wc(),yc=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Cc=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];Zm.getBlocksCount=function(o,t){switch(t){case _o.L:return yc[(o-1)*4+0];case _o.M:return yc[(o-1)*4+1];case _o.Q:return yc[(o-1)*4+2];case _o.H:return yc[(o-1)*4+3];default:return}};Zm.getTotalCodewordsCount=function(o,t){switch(t){case _o.L:return Cc[(o-1)*4+0];case _o.M:return Cc[(o-1)*4+1];case _o.Q:return Cc[(o-1)*4+2];case _o.H:return Cc[(o-1)*4+3];default:return}}});var kv=Je(_c=>{"use strict";var ga=new Uint8Array(512),Mc=new Uint8Array(256);(function(){let o=1;for(let t=0;t<255;t++)ga[t]=o,Mc[o]=t,o<<=1,o&256&&(o^=285);for(let t=255;t<512;t++)ga[t]=ga[t-255]})();_c.log=function(o){if(o<1)throw new Error("log("+o+")");return Mc[o]};_c.exp=function(o){return ga[o]};_c.mul=function(o,t){return o===0||t===0?0:ga[Mc[o]+Mc[t]]}});var qv=Je(ba=>{"use strict";var eh=kv();ba.mul=function(o,t){let i=new Uint8Array(o.length+t.length-1);for(let n=0;n<o.length;n++)for(let r=0;r<t.length;r++)i[n+r]^=eh.mul(o[n],t[r]);return i};ba.mod=function(o,t){let i=new Uint8Array(o);for(;i.length-t.length>=0;){let n=i[0];for(let a=0;a<t.length;a++)i[a]^=eh.mul(t[a],n);let r=0;for(;r<i.length&&i[r]===0;)r++;i=i.slice(r)}return i};ba.generateECPolynomial=function(o){let t=new Uint8Array([1]);for(let i=0;i<o;i++)t=ba.mul(t,new Uint8Array([1,eh.exp(i)]));return t}});var Rv=Je((CJ,Iv)=>{"use strict";var Tv=qv();function th(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}th.prototype.initialize=function(o){this.degree=o,this.genPoly=Tv.generateECPolynomial(this.degree)};th.prototype.encode=function(o){if(!this.genPoly)throw new Error("Encoder not initialized");let t=new Uint8Array(o.length+this.degree);t.set(o);let i=Tv.mod(t,this.genPoly),n=this.degree-i.length;if(n>0){let r=new Uint8Array(this.degree);return r.set(i,n),r}return i};Iv.exports=th});var ih=Je(Dv=>{"use strict";Dv.isValid=function(o){return!isNaN(o)&&o>=1&&o<=40}});var oh=Je(zi=>{"use strict";var Av="[0-9]+",F7="[A-Z $%*+\\-./:]+",va="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";va=va.replace(/u/g,"\\u");var P7="(?:(?![A-Z0-9 $%*+\\-./:]|"+va+`)(?:.|[\r
2
+ ]))+`;zi.KANJI=new RegExp(va,"g");zi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");zi.BYTE=new RegExp(P7,"g");zi.NUMERIC=new RegExp(Av,"g");zi.ALPHANUMERIC=new RegExp(F7,"g");var N7=new RegExp("^"+va+"$"),B7=new RegExp("^"+Av+"$"),V7=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");zi.testKanji=function(o){return N7.test(o)};zi.testNumeric=function(o){return B7.test(o)};zi.testAlphanumeric=function(o){return V7.test(o)}});var Eo=Je(gt=>{"use strict";var W7=ih(),nh=oh();gt.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};gt.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};gt.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};gt.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};gt.MIXED={bit:-1};gt.getCharCountIndicator=function(o,t){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!W7.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?o.ccBits[0]:t<27?o.ccBits[1]:o.ccBits[2]};gt.getBestModeForData=function(o){return nh.testNumeric(o)?gt.NUMERIC:nh.testAlphanumeric(o)?gt.ALPHANUMERIC:nh.testKanji(o)?gt.KANJI:gt.BYTE};gt.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")};gt.isValid=function(o){return o&&o.bit&&o.ccBits};function O7(e){if(typeof e!="string")throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return gt.NUMERIC;case"alphanumeric":return gt.ALPHANUMERIC;case"kanji":return gt.KANJI;case"byte":return gt.BYTE;default:throw new Error("Unknown mode: "+e)}}gt.from=function(o,t){if(gt.isValid(o))return o;try{return O7(o)}catch{return t}}});var Bv=Je(an=>{"use strict";var Ec=Mo(),z7=Jm(),Lv=wc(),ko=Eo(),rh=ih(),Pv=7973,Fv=Ec.getBCHDigit(Pv);function $7(e,o,t){for(let i=1;i<=40;i++)if(o<=an.getCapacity(i,t,e))return i}function Nv(e,o){return ko.getCharCountIndicator(e,o)+4}function j7(e,o){let t=0;return e.forEach(function(i){let n=Nv(i.mode,o);t+=n+i.getBitsLength()}),t}function H7(e,o){for(let t=1;t<=40;t++)if(j7(e,t)<=an.getCapacity(t,o,ko.MIXED))return t}an.from=function(o,t){return rh.isValid(o)?parseInt(o,10):t};an.getCapacity=function(o,t,i){if(!rh.isValid(o))throw new Error("Invalid QR Code version");typeof i>"u"&&(i=ko.BYTE);let n=Ec.getSymbolTotalCodewords(o),r=z7.getTotalCodewordsCount(o,t),a=(n-r)*8;if(i===ko.MIXED)return a;let s=a-Nv(i,o);switch(i){case ko.NUMERIC:return Math.floor(s/10*3);case ko.ALPHANUMERIC:return Math.floor(s/11*2);case ko.KANJI:return Math.floor(s/13);case ko.BYTE:default:return Math.floor(s/8)}};an.getBestVersionForData=function(o,t){let i,n=Lv.from(t,Lv.M);if(Array.isArray(o)){if(o.length>1)return H7(o,n);if(o.length===0)return 1;i=o[0]}else i=o;return $7(i.mode,i.getLength(),n)};an.getEncodedBits=function(o){if(!rh.isValid(o)||o<7)throw new Error("Invalid QR Code version");let t=o<<12;for(;Ec.getBCHDigit(t)-Fv>=0;)t^=Pv<<Ec.getBCHDigit(t)-Fv;return o<<12|t}});var zv=Je(Ov=>{"use strict";var ah=Mo(),Wv=1335,U7=21522,Vv=ah.getBCHDigit(Wv);Ov.getEncodedBits=function(o,t){let i=o.bit<<3|t,n=i<<10;for(;ah.getBCHDigit(n)-Vv>=0;)n^=Wv<<ah.getBCHDigit(n)-Vv;return(i<<10|n)^U7}});var jv=Je((TJ,$v)=>{"use strict";var G7=Eo();function Cr(e){this.mode=G7.NUMERIC,this.data=e.toString()}Cr.getBitsLength=function(o){return 10*Math.floor(o/3)+(o%3?o%3*3+1:0)};Cr.prototype.getLength=function(){return this.data.length};Cr.prototype.getBitsLength=function(){return Cr.getBitsLength(this.data.length)};Cr.prototype.write=function(o){let t,i,n;for(t=0;t+3<=this.data.length;t+=3)i=this.data.substr(t,3),n=parseInt(i,10),o.put(n,10);let r=this.data.length-t;r>0&&(i=this.data.substr(t),n=parseInt(i,10),o.put(n,r*3+1))};$v.exports=Cr});var Uv=Je((IJ,Hv)=>{"use strict";var X7=Eo(),sh=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function Mr(e){this.mode=X7.ALPHANUMERIC,this.data=e}Mr.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)};Mr.prototype.getLength=function(){return this.data.length};Mr.prototype.getBitsLength=function(){return Mr.getBitsLength(this.data.length)};Mr.prototype.write=function(o){let t;for(t=0;t+2<=this.data.length;t+=2){let i=sh.indexOf(this.data[t])*45;i+=sh.indexOf(this.data[t+1]),o.put(i,11)}this.data.length%2&&o.put(sh.indexOf(this.data[t]),6)};Hv.exports=Mr});var Xv=Je((RJ,Gv)=>{"use strict";var K7=Eo();function _r(e){this.mode=K7.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}_r.getBitsLength=function(o){return o*8};_r.prototype.getLength=function(){return this.data.length};_r.prototype.getBitsLength=function(){return _r.getBitsLength(this.data.length)};_r.prototype.write=function(e){for(let o=0,t=this.data.length;o<t;o++)e.put(this.data[o],8)};Gv.exports=_r});var Qv=Je((DJ,Kv)=>{"use strict";var Q7=Eo(),Y7=Mo();function Er(e){this.mode=Q7.KANJI,this.data=e}Er.getBitsLength=function(o){return o*13};Er.prototype.getLength=function(){return this.data.length};Er.prototype.getBitsLength=function(){return Er.getBitsLength(this.data.length)};Er.prototype.write=function(e){let o;for(o=0;o<this.data.length;o++){let t=Y7.toSJIS(this.data[o]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
3
+ Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),e.put(t,13)}};Kv.exports=Er});var Yv=Je((AJ,lh)=>{"use strict";var xa={single_source_shortest_paths:function(e,o,t){var i={},n={};n[o]=0;var r=xa.PriorityQueue.make();r.push(o,0);for(var a,s,l,d,c,h,p,u,k;!r.empty();){a=r.pop(),s=a.value,d=a.cost,c=e[s]||{};for(l in c)c.hasOwnProperty(l)&&(h=c[l],p=d+h,u=n[l],k=typeof n[l]>"u",(k||u>p)&&(n[l]=p,r.push(l,p),i[l]=s))}if(typeof t<"u"&&typeof n[t]>"u"){var E=["Could not find a path from ",o," to ",t,"."].join("");throw new Error(E)}return i},extract_shortest_path_from_predecessor_list:function(e,o){for(var t=[],i=o,n;i;)t.push(i),n=e[i],i=e[i];return t.reverse(),t},find_path:function(e,o,t){var i=xa.single_source_shortest_paths(e,o,t);return xa.extract_shortest_path_from_predecessor_list(i,t)},PriorityQueue:{make:function(e){var o=xa.PriorityQueue,t={},i;e=e||{};for(i in o)o.hasOwnProperty(i)&&(t[i]=o[i]);return t.queue=[],t.sorter=e.sorter||o.default_sorter,t},default_sorter:function(e,o){return e.cost-o.cost},push:function(e,o){var t={value:e,cost:o};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof lh<"u"&&(lh.exports=xa)});var rx=Je(kr=>{"use strict";var Ze=Eo(),ex=jv(),tx=Uv(),ix=Xv(),ox=Qv(),wa=oh(),kc=Mo(),Z7=Yv();function Zv(e){return unescape(encodeURIComponent(e)).length}function Sa(e,o,t){let i=[],n;for(;(n=e.exec(t))!==null;)i.push({data:n[0],index:n.index,mode:o,length:n[0].length});return i}function nx(e){let o=Sa(wa.NUMERIC,Ze.NUMERIC,e),t=Sa(wa.ALPHANUMERIC,Ze.ALPHANUMERIC,e),i,n;return kc.isKanjiModeEnabled()?(i=Sa(wa.BYTE,Ze.BYTE,e),n=Sa(wa.KANJI,Ze.KANJI,e)):(i=Sa(wa.BYTE_KANJI,Ze.BYTE,e),n=[]),o.concat(t,i,n).sort(function(a,s){return a.index-s.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}function ch(e,o){switch(o){case Ze.NUMERIC:return ex.getBitsLength(e);case Ze.ALPHANUMERIC:return tx.getBitsLength(e);case Ze.KANJI:return ox.getBitsLength(e);case Ze.BYTE:return ix.getBitsLength(e)}}function J7(e){return e.reduce(function(o,t){let i=o.length-1>=0?o[o.length-1]:null;return i&&i.mode===t.mode?(o[o.length-1].data+=t.data,o):(o.push(t),o)},[])}function eC(e){let o=[];for(let t=0;t<e.length;t++){let i=e[t];switch(i.mode){case Ze.NUMERIC:o.push([i,{data:i.data,mode:Ze.ALPHANUMERIC,length:i.length},{data:i.data,mode:Ze.BYTE,length:i.length}]);break;case Ze.ALPHANUMERIC:o.push([i,{data:i.data,mode:Ze.BYTE,length:i.length}]);break;case Ze.KANJI:o.push([i,{data:i.data,mode:Ze.BYTE,length:Zv(i.data)}]);break;case Ze.BYTE:o.push([{data:i.data,mode:Ze.BYTE,length:Zv(i.data)}])}}return o}function tC(e,o){let t={},i={start:{}},n=["start"];for(let r=0;r<e.length;r++){let a=e[r],s=[];for(let l=0;l<a.length;l++){let d=a[l],c=""+r+l;s.push(c),t[c]={node:d,lastCount:0},i[c]={};for(let h=0;h<n.length;h++){let p=n[h];t[p]&&t[p].node.mode===d.mode?(i[p][c]=ch(t[p].lastCount+d.length,d.mode)-ch(t[p].lastCount,d.mode),t[p].lastCount+=d.length):(t[p]&&(t[p].lastCount=d.length),i[p][c]=ch(d.length,d.mode)+4+Ze.getCharCountIndicator(d.mode,o))}}n=s}for(let r=0;r<n.length;r++)i[n[r]].end=0;return{map:i,table:t}}function Jv(e,o){let t,i=Ze.getBestModeForData(e);if(t=Ze.from(o,i),t!==Ze.BYTE&&t.bit<i.bit)throw new Error('"'+e+'" cannot be encoded with mode '+Ze.toString(t)+`.
4
+ Suggested mode is: `+Ze.toString(i));switch(t===Ze.KANJI&&!kc.isKanjiModeEnabled()&&(t=Ze.BYTE),t){case Ze.NUMERIC:return new ex(e);case Ze.ALPHANUMERIC:return new tx(e);case Ze.KANJI:return new ox(e);case Ze.BYTE:return new ix(e)}}kr.fromArray=function(o){return o.reduce(function(t,i){return typeof i=="string"?t.push(Jv(i,null)):i.data&&t.push(Jv(i.data,i.mode)),t},[])};kr.fromString=function(o,t){let i=nx(o,kc.isKanjiModeEnabled()),n=eC(i),r=tC(n,t),a=Z7.find_path(r.map,"start","end"),s=[];for(let l=1;l<a.length-1;l++)s.push(r.table[a[l]].node);return kr.fromArray(J7(s))};kr.rawSplit=function(o){return kr.fromArray(nx(o,kc.isKanjiModeEnabled()))}});var sx=Je(ax=>{"use strict";var Tc=Mo(),dh=wc(),iC=xv(),oC=Sv(),nC=yv(),rC=_v(),ph=Ev(),uh=Jm(),aC=Rv(),qc=Bv(),sC=zv(),lC=Eo(),mh=rx();function cC(e,o){let t=e.size,i=rC.getPositions(o);for(let n=0;n<i.length;n++){let r=i[n][0],a=i[n][1];for(let s=-1;s<=7;s++)if(!(r+s<=-1||t<=r+s))for(let l=-1;l<=7;l++)a+l<=-1||t<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?e.set(r+s,a+l,!0,!0):e.set(r+s,a+l,!1,!0))}}function dC(e){let o=e.size;for(let t=8;t<o-8;t++){let i=t%2===0;e.set(t,6,i,!0),e.set(6,t,i,!0)}}function mC(e,o){let t=nC.getPositions(o);for(let i=0;i<t.length;i++){let n=t[i][0],r=t[i][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?e.set(n+a,r+s,!0,!0):e.set(n+a,r+s,!1,!0)}}function hC(e,o){let t=e.size,i=qc.getEncodedBits(o),n,r,a;for(let s=0;s<18;s++)n=Math.floor(s/3),r=s%3+t-8-3,a=(i>>s&1)===1,e.set(n,r,a,!0),e.set(r,n,a,!0)}function hh(e,o,t){let i=e.size,n=sC.getEncodedBits(o,t),r,a;for(r=0;r<15;r++)a=(n>>r&1)===1,r<6?e.set(r,8,a,!0):r<8?e.set(r+1,8,a,!0):e.set(i-15+r,8,a,!0),r<8?e.set(8,i-r-1,a,!0):r<9?e.set(8,15-r-1+1,a,!0):e.set(8,15-r-1,a,!0);e.set(i-8,8,1,!0)}function pC(e,o){let t=e.size,i=-1,n=t-1,r=7,a=0;for(let s=t-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!e.isReserved(n,s-l)){let d=!1;a<o.length&&(d=(o[a]>>>r&1)===1),e.set(n,s-l,d),r--,r===-1&&(a++,r=7)}if(n+=i,n<0||t<=n){n-=i,i=-i;break}}}function uC(e,o,t){let i=new iC;t.forEach(function(l){i.put(l.mode.bit,4),i.put(l.getLength(),lC.getCharCountIndicator(l.mode,e)),l.write(i)});let n=Tc.getSymbolTotalCodewords(e),r=uh.getTotalCodewordsCount(e,o),a=(n-r)*8;for(i.getLengthInBits()+4<=a&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);let s=(a-i.getLengthInBits())/8;for(let l=0;l<s;l++)i.put(l%2?17:236,8);return fC(i,e,o)}function fC(e,o,t){let i=Tc.getSymbolTotalCodewords(o),n=uh.getTotalCodewordsCount(o,t),r=i-n,a=uh.getBlocksCount(o,t),s=i%a,l=a-s,d=Math.floor(i/a),c=Math.floor(r/a),h=c+1,p=d-c,u=new aC(p),k=0,E=new Array(a),N=new Array(a),j=0,ee=new Uint8Array(e.buffer);for(let ie=0;ie<a;ie++){let oe=ie<l?c:h;E[ie]=ee.slice(k,k+oe),N[ie]=u.encode(E[ie]),k+=oe,j=Math.max(j,oe)}let B=new Uint8Array(i),H=0,G,Z;for(G=0;G<j;G++)for(Z=0;Z<a;Z++)G<E[Z].length&&(B[H++]=E[Z][G]);for(G=0;G<p;G++)for(Z=0;Z<a;Z++)B[H++]=N[Z][G];return B}function gC(e,o,t,i){let n;if(Array.isArray(e))n=mh.fromArray(e);else if(typeof e=="string"){let d=o;if(!d){let c=mh.rawSplit(e);d=qc.getBestVersionForData(c,t)}n=mh.fromString(e,d||40)}else throw new Error("Invalid data");let r=qc.getBestVersionForData(n,t);if(!r)throw new Error("The amount of data is too big to be stored in a QR Code");if(!o)o=r;else if(o<r)throw new Error(`
5
5
  The chosen QR Code version cannot contain this amount of data.
6
6
  Minimum version required to store current data is: `+r+`.
7
- `);let a=uC(o,t,n),s=Ic.getSymbolSize(o),l=new oC(s);return cC(l,o),dC(l),mC(l,o),ph(l,t,0),o>=7&&hC(l,o),pC(l,a),isNaN(i)&&(i=uh.getBestMask(l,ph.bind(null,l,t))),uh.applyMask(i,l),ph(l,t,i),{modules:l,version:o,errorCorrectionLevel:t,maskPattern:i,segments:n}}ax.create=function(o,t){if(typeof o>"u"||o==="")throw new Error("No input text");let i=mh.M,n,r;return typeof t<"u"&&(i=mh.from(t.errorCorrectionLevel,mh.M),n=Tc.from(t.version),r=uh.from(t.maskPattern),t.toSJISFunc&&Ic.setToSJISFunction(t.toSJISFunc)),gC(o,n,i,r)}});var gh=Je(sn=>{"use strict";function lx(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let o=e.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+e);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");let t=parseInt(o.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+o.slice(0,6).join("")}}sn.getOptions=function(o){o||(o={}),o.color||(o.color={});let t=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,n=o.scale||4;return{width:i,scale:i?4:n,margin:t,color:{dark:lx(o.color.dark||"#000000ff"),light:lx(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}};sn.getScale=function(o,t){return t.width&&t.width>=o+t.margin*2?t.width/(o+t.margin*2):t.scale};sn.getImageWidth=function(o,t){let i=sn.getScale(o,t);return Math.floor((o+t.margin*2)*i)};sn.qrToImageData=function(o,t,i){let n=t.modules.size,r=t.modules.data,a=sn.getScale(n,i),s=Math.floor((n+i.margin*2)*a),l=i.margin*a,d=[i.color.light,i.color.dark];for(let c=0;c<s;c++)for(let h=0;h<s;h++){let p=(c*s+h)*4,u=i.color.light;if(c>=l&&h>=l&&c<s-l&&h<s-l){let k=Math.floor((c-l)/a),E=Math.floor((h-l)/a);u=d[r[k*n+E]?1:0]}o[p++]=u.r,o[p++]=u.g,o[p++]=u.b,o[p]=u.a}}});var cx=Je(Rc=>{"use strict";var bh=gh();function bC(e,o,t){e.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=t,o.width=t,o.style.height=t+"px",o.style.width=t+"px"}function vC(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}Rc.render=function(o,t,i){let n=i,r=t;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),t||(r=vC()),n=bh.getOptions(n);let a=bh.getImageWidth(o.modules.size,n),s=r.getContext("2d"),l=s.createImageData(a,a);return bh.qrToImageData(l.data,o,n),bC(s,r,a),s.putImageData(l,0,0),r};Rc.renderToDataURL=function(o,t,i){let n=i;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),n||(n={});let r=Rc.render(o,t,n),a=n.type||"image/png",s=n.rendererOpts||{};return r.toDataURL(a,s.quality)}});var hx=Je(mx=>{"use strict";var xC=gh();function dx(e,o){let t=e.a/255,i=o+'="'+e.hex+'"';return t<1?i+" "+o+'-opacity="'+t.toFixed(2).slice(1)+'"':i}function vh(e,o,t){let i=e+o;return typeof t<"u"&&(i+=" "+t),i}function wC(e,o,t){let i="",n=0,r=!1,a=0;for(let s=0;s<e.length;s++){let l=Math.floor(s%o),d=Math.floor(s/o);!l&&!r&&(r=!0),e[s]?(a++,s>0&&l>0&&e[s-1]||(i+=r?vh("M",l+t,.5+d+t):vh("m",n,0),n=0,r=!1),l+1<o&&e[s+1]||(i+=vh("h",a),a=0)):n++}return i}mx.render=function(o,t,i){let n=xC.getOptions(t),r=o.modules.size,a=o.modules.data,s=r+n.margin*2,l=n.color.light.a?"<path "+dx(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",d="<path "+dx(n.color.dark,"stroke")+' d="'+wC(a,r,n.margin)+'"/>',c='viewBox="0 0 '+s+" "+s+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+c+' shape-rendering="crispEdges">'+l+d+`</svg>
8
- `;return typeof i=="function"&&i(null,p),p}});var ux=Je(Ma=>{"use strict";var SC=gv(),xh=sx(),px=cx(),yC=hx();function wh(e,o,t,i,n){let r=[].slice.call(arguments,1),a=r.length,s=typeof r[a-1]=="function";if(!s&&!SC())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(n=t,t=o,o=i=void 0):a===3&&(o.getContext&&typeof n>"u"?(n=i,i=void 0):(n=i,i=t,t=o,o=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=o,o=i=void 0):a===2&&!o.getContext&&(i=t,t=o,o=void 0),new Promise(function(l,d){try{let c=xh.create(t,i);l(e(c,o,i))}catch(c){d(c)}})}try{let l=xh.create(t,i);n(null,e(l,o,i))}catch(l){n(l)}}Ma.create=xh.create;Ma.toCanvas=wh.bind(null,px.render);Ma.toDataURL=wh.bind(null,px.renderToDataURL);Ma.toString=wh.bind(null,function(e,o,t){return yC.render(e,t)})});var w0="codeChartaVersion",S0=(()=>{class e{constructor(){this.localStorageRepo=q(wp)}readSavedVersion(){return this.localStorageRepo.read(w0)}writeSavedVersion(t){this.localStorageRepo.write(w0,t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var y0=(()=>{class e{constructor(){this.versionRepo=q(S0),this.currentVersion=xp.version,this.previousVersion=be(null),this.shouldShowChangelog=be(!1)}getSavedVersion(){return this.versionRepo.readSavedVersion()}saveCurrentVersion(){this.versionRepo.writeSavedVersion(this.currentVersion)}setPreviousVersion(t){this.previousVersion.set(t)}setShouldShowChangelog(t){this.shouldShowChangelog.set(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Bs=(()=>{class e{constructor(t){this.versionStore=t}get currentVersion(){return this.versionStore.currentVersion}get previousVersion(){return this.versionStore.previousVersion}get shouldShowChangelog(){return this.versionStore.shouldShowChangelog}synchronizeVersion(){let t=this.versionStore.getSavedVersion();if(t===null){this.versionStore.saveCurrentVersion();return}this.compareVersion(t,this.currentVersion)<0&&(this.versionStore.setPreviousVersion(t),this.versionStore.setShouldShowChangelog(!0),this.versionStore.saveCurrentVersion())}acknowledgeChangelog(){this.versionStore.setShouldShowChangelog(!1)}compareVersion(t,i){let n=this.parseSemver(t),r=this.parseSemver(i);return n.major!==r.major?n.major>r.major?1:-1:n.minor!==r.minor?n.minor>r.minor?1:-1:n.patch!==r.patch?n.patch>r.patch?1:-1:0}parseSemver(t){let i=t.split(".");return{major:Number.parseInt(i[0])||0,minor:Number.parseInt(i[1])||0,patch:Number.parseInt(i[2])||0}}static{this.\u0275fac=function(i){return new(i||e)(M(y0))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function md(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Bo=md();function I0(e){Bo=e}var Po={exec:()=>null};function ze(e,o=""){let t=typeof e=="string"?e:e.source,i={replace:(n,r)=>{let a=typeof r=="string"?r:r.source;return a=a.replace(Dt.caret,"$1"),t=t.replace(n,a),i},getRegex:()=>new RegExp(t,o)};return i}var Cw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Dt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Mw=/^(?:[ \t]*(?:\n|$))+/,_w=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ew=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$r=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hd=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,R0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,D0=ze(R0).replace(/bull/g,hd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),qw=ze(R0).replace(/bull/g,hd).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),pd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Tw=/^[^\n]+/,ud=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Iw=ze(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ud).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rw=ze(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hd).getRegex(),$s="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fd=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dw=ze("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",fd).replace("tag",$s).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),A0=ze(pd).replace("hr",$r).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$s).getRegex(),Aw=ze(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A0).getRegex(),gd={blockquote:Aw,code:_w,def:Iw,fences:Ew,heading:kw,hr:$r,html:Dw,lheading:D0,list:Rw,newline:Mw,paragraph:A0,table:Po,text:Tw},M0=ze("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$r).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$s).getRegex(),Lw=tt(Ee({},gd),{lheading:qw,table:M0,paragraph:ze(pd).replace("hr",$r).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",M0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$s).getRegex()}),Fw=tt(Ee({},gd),{html:ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fd).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Po,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ze(pd).replace("hr",$r).replace("heading",` *#{1,6} *[^
9
- ]`).replace("lheading",D0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Pw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Nw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,L0=/^( {2,}|\\)\n(?!\s*$)/,Bw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ar=/[\p{P}\p{S}]/u,js=/[\s\p{P}\p{S}]/u,bd=/[^\s\p{P}\p{S}]/u,Vw=ze(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,js).getRegex(),F0=/(?!~)[\p{P}\p{S}]/u,Ww=/(?!~)[\s\p{P}\p{S}]/u,Ow=/(?:[^\s\p{P}\p{S}]|~)/u,zw=ze(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Cw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),P0=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,$w=ze(P0,"u").replace(/punct/g,ar).getRegex(),jw=ze(P0,"u").replace(/punct/g,F0).getRegex(),N0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Hw=ze(N0,"gu").replace(/notPunctSpace/g,bd).replace(/punctSpace/g,js).replace(/punct/g,ar).getRegex(),Uw=ze(N0,"gu").replace(/notPunctSpace/g,Ow).replace(/punctSpace/g,Ww).replace(/punct/g,F0).getRegex(),Gw=ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,bd).replace(/punctSpace/g,js).replace(/punct/g,ar).getRegex(),Xw=ze(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ar).getRegex(),Kw="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Qw=ze(Kw,"gu").replace(/notPunctSpace/g,bd).replace(/punctSpace/g,js).replace(/punct/g,ar).getRegex(),Yw=ze(/\\(punct)/,"gu").replace(/punct/g,ar).getRegex(),Zw=ze(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Jw=ze(fd).replace("(?:-->|$)","-->").getRegex(),e4=ze("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Jw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ws=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,t4=ze(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ws).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B0=ze(/^!?\[(label)\]\[(ref)\]/).replace("label",Ws).replace("ref",ud).getRegex(),V0=ze(/^!?\[(ref)\](?:\[\])?/).replace("ref",ud).getRegex(),i4=ze("reflink|nolink(?!\\()","g").replace("reflink",B0).replace("nolink",V0).getRegex(),_0=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,vd={_backpedal:Po,anyPunctuation:Yw,autolink:Zw,blockSkip:zw,br:L0,code:Nw,del:Po,delLDelim:Po,delRDelim:Po,emStrongLDelim:$w,emStrongRDelimAst:Hw,emStrongRDelimUnd:Gw,escape:Pw,link:t4,nolink:V0,punctuation:Vw,reflink:B0,reflinkSearch:i4,tag:e4,text:Bw,url:Po},o4=tt(Ee({},vd),{link:ze(/^!?\[(label)\]\((.*?)\)/).replace("label",Ws).getRegex(),reflink:ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ws).getRegex()}),ld=tt(Ee({},vd),{emStrongRDelimAst:Uw,emStrongLDelim:jw,delLDelim:Xw,delRDelim:Qw,url:ze(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_0).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ze(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",_0).getRegex()}),n4=tt(Ee({},ld),{br:ze(L0).replace("{2,}","*").getRegex(),text:ze(ld.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Vs={normal:gd,gfm:Lw,pedantic:Fw},Wr={normal:vd,gfm:ld,breaks:n4,pedantic:o4},r4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},E0=e=>r4[e];function Ti(e,o){if(o){if(Dt.escapeTest.test(e))return e.replace(Dt.escapeReplace,E0)}else if(Dt.escapeTestNoEncode.test(e))return e.replace(Dt.escapeReplaceNoEncode,E0);return e}function k0(e){try{e=encodeURI(e).replace(Dt.percentDecode,"%")}catch{return null}return e}function q0(e,o){let t=e.replace(Dt.findPipe,(r,a,s)=>{let l=!1,d=a;for(;--d>=0&&s[d]==="\\";)l=!l;return l?"|":" |"}),i=t.split(Dt.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),o)if(i.length>o)i.splice(o);else for(;i.length<o;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Dt.slashPipe,"|");return i}function Or(e,o,t){let i=e.length;if(i===0)return"";let n=0;for(;n<i;){let r=e.charAt(i-n-1);if(r===o&&!t)n++;else if(r!==o&&t)n++;else break}return e.slice(0,i-n)}function a4(e,o){if(e.indexOf(o[1])===-1)return-1;let t=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===o[0])t++;else if(e[i]===o[1]&&(t--,t<0))return i;return t>0?-2:-1}function s4(e,o=0){let t=o,i="";for(let n of e)if(n===" "){let r=4-t%4;i+=" ".repeat(r),t+=r}else i+=n,t++;return i}function T0(e,o,t,i,n){let r=o.href,a=o.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function l4(e,o,t){let i=e.match(t.other.indentCodeCompensation);if(i===null)return o;let n=i[1];return o.split(`
7
+ `);let a=uC(o,t,n),s=Tc.getSymbolSize(o),l=new oC(s);return cC(l,o),dC(l),mC(l,o),hh(l,t,0),o>=7&&hC(l,o),pC(l,a),isNaN(i)&&(i=ph.getBestMask(l,hh.bind(null,l,t))),ph.applyMask(i,l),hh(l,t,i),{modules:l,version:o,errorCorrectionLevel:t,maskPattern:i,segments:n}}ax.create=function(o,t){if(typeof o>"u"||o==="")throw new Error("No input text");let i=dh.M,n,r;return typeof t<"u"&&(i=dh.from(t.errorCorrectionLevel,dh.M),n=qc.from(t.version),r=ph.from(t.maskPattern),t.toSJISFunc&&Tc.setToSJISFunction(t.toSJISFunc)),gC(o,n,i,r)}});var fh=Je(sn=>{"use strict";function lx(e){if(typeof e=="number"&&(e=e.toString()),typeof e!="string")throw new Error("Color should be defined as hex string");let o=e.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+e);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(i){return[i,i]}))),o.length===6&&o.push("F","F");let t=parseInt(o.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+o.slice(0,6).join("")}}sn.getOptions=function(o){o||(o={}),o.color||(o.color={});let t=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,i=o.width&&o.width>=21?o.width:void 0,n=o.scale||4;return{width:i,scale:i?4:n,margin:t,color:{dark:lx(o.color.dark||"#000000ff"),light:lx(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}};sn.getScale=function(o,t){return t.width&&t.width>=o+t.margin*2?t.width/(o+t.margin*2):t.scale};sn.getImageWidth=function(o,t){let i=sn.getScale(o,t);return Math.floor((o+t.margin*2)*i)};sn.qrToImageData=function(o,t,i){let n=t.modules.size,r=t.modules.data,a=sn.getScale(n,i),s=Math.floor((n+i.margin*2)*a),l=i.margin*a,d=[i.color.light,i.color.dark];for(let c=0;c<s;c++)for(let h=0;h<s;h++){let p=(c*s+h)*4,u=i.color.light;if(c>=l&&h>=l&&c<s-l&&h<s-l){let k=Math.floor((c-l)/a),E=Math.floor((h-l)/a);u=d[r[k*n+E]?1:0]}o[p++]=u.r,o[p++]=u.g,o[p++]=u.b,o[p]=u.a}}});var cx=Je(Ic=>{"use strict";var gh=fh();function bC(e,o,t){e.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=t,o.width=t,o.style.height=t+"px",o.style.width=t+"px"}function vC(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}Ic.render=function(o,t,i){let n=i,r=t;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),t||(r=vC()),n=gh.getOptions(n);let a=gh.getImageWidth(o.modules.size,n),s=r.getContext("2d"),l=s.createImageData(a,a);return gh.qrToImageData(l.data,o,n),bC(s,r,a),s.putImageData(l,0,0),r};Ic.renderToDataURL=function(o,t,i){let n=i;typeof n>"u"&&(!t||!t.getContext)&&(n=t,t=void 0),n||(n={});let r=Ic.render(o,t,n),a=n.type||"image/png",s=n.rendererOpts||{};return r.toDataURL(a,s.quality)}});var hx=Je(mx=>{"use strict";var xC=fh();function dx(e,o){let t=e.a/255,i=o+'="'+e.hex+'"';return t<1?i+" "+o+'-opacity="'+t.toFixed(2).slice(1)+'"':i}function bh(e,o,t){let i=e+o;return typeof t<"u"&&(i+=" "+t),i}function wC(e,o,t){let i="",n=0,r=!1,a=0;for(let s=0;s<e.length;s++){let l=Math.floor(s%o),d=Math.floor(s/o);!l&&!r&&(r=!0),e[s]?(a++,s>0&&l>0&&e[s-1]||(i+=r?bh("M",l+t,.5+d+t):bh("m",n,0),n=0,r=!1),l+1<o&&e[s+1]||(i+=bh("h",a),a=0)):n++}return i}mx.render=function(o,t,i){let n=xC.getOptions(t),r=o.modules.size,a=o.modules.data,s=r+n.margin*2,l=n.color.light.a?"<path "+dx(n.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",d="<path "+dx(n.color.dark,"stroke")+' d="'+wC(a,r,n.margin)+'"/>',c='viewBox="0 0 '+s+" "+s+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+c+' shape-rendering="crispEdges">'+l+d+`</svg>
8
+ `;return typeof i=="function"&&i(null,p),p}});var ux=Je(ya=>{"use strict";var SC=gv(),vh=sx(),px=cx(),yC=hx();function xh(e,o,t,i,n){let r=[].slice.call(arguments,1),a=r.length,s=typeof r[a-1]=="function";if(!s&&!SC())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(n=t,t=o,o=i=void 0):a===3&&(o.getContext&&typeof n>"u"?(n=i,i=void 0):(n=i,i=t,t=o,o=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(t=o,o=i=void 0):a===2&&!o.getContext&&(i=t,t=o,o=void 0),new Promise(function(l,d){try{let c=vh.create(t,i);l(e(c,o,i))}catch(c){d(c)}})}try{let l=vh.create(t,i);n(null,e(l,o,i))}catch(l){n(l)}}ya.create=vh.create;ya.toCanvas=xh.bind(null,px.render);ya.toDataURL=xh.bind(null,px.renderToDataURL);ya.toString=xh.bind(null,function(e,o,t){return yC.render(e,t)})});var w0="codeChartaVersion",S0=(()=>{class e{constructor(){this.localStorageRepo=q(xp)}readSavedVersion(){return this.localStorageRepo.read(w0)}writeSavedVersion(t){this.localStorageRepo.write(w0,t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var y0=(()=>{class e{constructor(){this.versionRepo=q(S0),this.currentVersion=vp.version,this.previousVersion=be(null),this.shouldShowChangelog=be(!1)}getSavedVersion(){return this.versionRepo.readSavedVersion()}saveCurrentVersion(){this.versionRepo.writeSavedVersion(this.currentVersion)}setPreviousVersion(t){this.previousVersion.set(t)}setShouldShowChangelog(t){this.shouldShowChangelog.set(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ns=(()=>{class e{constructor(t){this.versionStore=t}get currentVersion(){return this.versionStore.currentVersion}get previousVersion(){return this.versionStore.previousVersion}get shouldShowChangelog(){return this.versionStore.shouldShowChangelog}synchronizeVersion(){let t=this.versionStore.getSavedVersion();if(t===null){this.versionStore.saveCurrentVersion();return}this.compareVersion(t,this.currentVersion)<0&&(this.versionStore.setPreviousVersion(t),this.versionStore.setShouldShowChangelog(!0),this.versionStore.saveCurrentVersion())}acknowledgeChangelog(){this.versionStore.setShouldShowChangelog(!1)}compareVersion(t,i){let n=this.parseSemver(t),r=this.parseSemver(i);return n.major!==r.major?n.major>r.major?1:-1:n.minor!==r.minor?n.minor>r.minor?1:-1:n.patch!==r.patch?n.patch>r.patch?1:-1:0}parseSemver(t){let i=t.split(".");return{major:Number.parseInt(i[0])||0,minor:Number.parseInt(i[1])||0,patch:Number.parseInt(i[2])||0}}static{this.\u0275fac=function(i){return new(i||e)(M(y0))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function dd(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Bo=dd();function I0(e){Bo=e}var Po={exec:()=>null};function ze(e,o=""){let t=typeof e=="string"?e:e.source,i={replace:(n,r)=>{let a=typeof r=="string"?r:r.source;return a=a.replace(Dt.caret,"$1"),t=t.replace(n,a),i},getRegex:()=>new RegExp(t,o)};return i}var Cw=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Dt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Mw=/^(?:[ \t]*(?:\n|$))+/,_w=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ew=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Or=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,kw=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,md=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,R0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,D0=ze(R0).replace(/bull/g,md).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),qw=ze(R0).replace(/bull/g,md).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),hd=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Tw=/^[^\n]+/,pd=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Iw=ze(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",pd).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Rw=ze(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,md).getRegex(),zs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ud=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dw=ze("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ud).replace("tag",zs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),A0=ze(hd).replace("hr",Or).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zs).getRegex(),Aw=ze(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A0).getRegex(),fd={blockquote:Aw,code:_w,def:Iw,fences:Ew,heading:kw,hr:Or,html:Dw,lheading:D0,list:Rw,newline:Mw,paragraph:A0,table:Po,text:Tw},M0=ze("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Or).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zs).getRegex(),Lw=tt(Ee({},fd),{lheading:qw,table:M0,paragraph:ze(hd).replace("hr",Or).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",M0).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",zs).getRegex()}),Fw=tt(Ee({},fd),{html:ze(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ud).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Po,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ze(hd).replace("hr",Or).replace("heading",` *#{1,6} *[^
9
+ ]`).replace("lheading",D0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),Pw=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Nw=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,L0=/^( {2,}|\\)\n(?!\s*$)/,Bw=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,nr=/[\p{P}\p{S}]/u,$s=/[\s\p{P}\p{S}]/u,gd=/[^\s\p{P}\p{S}]/u,Vw=ze(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,$s).getRegex(),F0=/(?!~)[\p{P}\p{S}]/u,Ww=/(?!~)[\s\p{P}\p{S}]/u,Ow=/(?:[^\s\p{P}\p{S}]|~)/u,zw=ze(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Cw?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),P0=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,$w=ze(P0,"u").replace(/punct/g,nr).getRegex(),jw=ze(P0,"u").replace(/punct/g,F0).getRegex(),N0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Hw=ze(N0,"gu").replace(/notPunctSpace/g,gd).replace(/punctSpace/g,$s).replace(/punct/g,nr).getRegex(),Uw=ze(N0,"gu").replace(/notPunctSpace/g,Ow).replace(/punctSpace/g,Ww).replace(/punct/g,F0).getRegex(),Gw=ze("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gd).replace(/punctSpace/g,$s).replace(/punct/g,nr).getRegex(),Xw=ze(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,nr).getRegex(),Kw="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Qw=ze(Kw,"gu").replace(/notPunctSpace/g,gd).replace(/punctSpace/g,$s).replace(/punct/g,nr).getRegex(),Yw=ze(/\\(punct)/,"gu").replace(/punct/g,nr).getRegex(),Zw=ze(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Jw=ze(ud).replace("(?:-->|$)","-->").getRegex(),e4=ze("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Jw).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,t4=ze(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Vs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),B0=ze(/^!?\[(label)\]\[(ref)\]/).replace("label",Vs).replace("ref",pd).getRegex(),V0=ze(/^!?\[(ref)\](?:\[\])?/).replace("ref",pd).getRegex(),i4=ze("reflink|nolink(?!\\()","g").replace("reflink",B0).replace("nolink",V0).getRegex(),_0=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,bd={_backpedal:Po,anyPunctuation:Yw,autolink:Zw,blockSkip:zw,br:L0,code:Nw,del:Po,delLDelim:Po,delRDelim:Po,emStrongLDelim:$w,emStrongRDelimAst:Hw,emStrongRDelimUnd:Gw,escape:Pw,link:t4,nolink:V0,punctuation:Vw,reflink:B0,reflinkSearch:i4,tag:e4,text:Bw,url:Po},o4=tt(Ee({},bd),{link:ze(/^!?\[(label)\]\((.*?)\)/).replace("label",Vs).getRegex(),reflink:ze(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Vs).getRegex()}),sd=tt(Ee({},bd),{emStrongRDelimAst:Uw,emStrongLDelim:jw,delLDelim:Xw,delRDelim:Qw,url:ze(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_0).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ze(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",_0).getRegex()}),n4=tt(Ee({},sd),{br:ze(L0).replace("{2,}","*").getRegex(),text:ze(sd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Bs={normal:fd,gfm:Lw,pedantic:Fw},Br={normal:bd,gfm:sd,breaks:n4,pedantic:o4},r4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},E0=e=>r4[e];function qi(e,o){if(o){if(Dt.escapeTest.test(e))return e.replace(Dt.escapeReplace,E0)}else if(Dt.escapeTestNoEncode.test(e))return e.replace(Dt.escapeReplaceNoEncode,E0);return e}function k0(e){try{e=encodeURI(e).replace(Dt.percentDecode,"%")}catch{return null}return e}function q0(e,o){let t=e.replace(Dt.findPipe,(r,a,s)=>{let l=!1,d=a;for(;--d>=0&&s[d]==="\\";)l=!l;return l?"|":" |"}),i=t.split(Dt.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),o)if(i.length>o)i.splice(o);else for(;i.length<o;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Dt.slashPipe,"|");return i}function Vr(e,o,t){let i=e.length;if(i===0)return"";let n=0;for(;n<i;){let r=e.charAt(i-n-1);if(r===o&&!t)n++;else if(r!==o&&t)n++;else break}return e.slice(0,i-n)}function a4(e,o){if(e.indexOf(o[1])===-1)return-1;let t=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===o[0])t++;else if(e[i]===o[1]&&(t--,t<0))return i;return t>0?-2:-1}function s4(e,o=0){let t=o,i="";for(let n of e)if(n===" "){let r=4-t%4;i+=" ".repeat(r),t+=r}else i+=n,t++;return i}function T0(e,o,t,i,n){let r=o.href,a=o.title||null,s=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:t,href:r,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}function l4(e,o,t){let i=e.match(t.other.indentCodeCompensation);if(i===null)return o;let n=i[1];return o.split(`
10
10
  `).map(r=>{let a=r.match(t.other.beginningSpace);if(a===null)return r;let[s]=a;return s.length>=n.length?r.slice(n.length):r}).join(`
11
- `)}var Os=class{options;rules;lexer;constructor(e){this.options=e||Bo}space(e){let o=this.rules.block.newline.exec(e);if(o&&o[0].length>0)return{type:"space",raw:o[0]}}code(e){let o=this.rules.block.code.exec(e);if(o){let t=o[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Or(t,`
12
- `)}}}fences(e){let o=this.rules.block.fences.exec(e);if(o){let t=o[0],i=l4(t,o[3]||"",this.rules);return{type:"code",raw:t,lang:o[2]?o[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):o[2],text:i}}}heading(e){let o=this.rules.block.heading.exec(e);if(o){let t=o[2].trim();if(this.rules.other.endingHash.test(t)){let i=Or(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:o[0],depth:o[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(e){let o=this.rules.block.hr.exec(e);if(o)return{type:"hr",raw:Or(o[0],`
13
- `)}}blockquote(e){let o=this.rules.block.blockquote.exec(e);if(o){let t=Or(o[0],`
11
+ `)}var Ws=class{options;rules;lexer;constructor(e){this.options=e||Bo}space(e){let o=this.rules.block.newline.exec(e);if(o&&o[0].length>0)return{type:"space",raw:o[0]}}code(e){let o=this.rules.block.code.exec(e);if(o){let t=o[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Vr(t,`
12
+ `)}}}fences(e){let o=this.rules.block.fences.exec(e);if(o){let t=o[0],i=l4(t,o[3]||"",this.rules);return{type:"code",raw:t,lang:o[2]?o[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):o[2],text:i}}}heading(e){let o=this.rules.block.heading.exec(e);if(o){let t=o[2].trim();if(this.rules.other.endingHash.test(t)){let i=Vr(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(t=i.trim())}return{type:"heading",raw:o[0],depth:o[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(e){let o=this.rules.block.hr.exec(e);if(o)return{type:"hr",raw:Vr(o[0],`
13
+ `)}}blockquote(e){let o=this.rules.block.blockquote.exec(e);if(o){let t=Vr(o[0],`
14
14
  `).split(`
15
15
  `),i="",n="",r=[];for(;t.length>0;){let a=!1,s=[],l;for(l=0;l<t.length;l++)if(this.rules.other.blockquoteStart.test(t[l]))s.push(t[l]),a=!0;else if(!a)s.push(t[l]);else break;t=t.slice(l);let d=s.join(`
16
16
  `),c=d.replace(this.rules.other.blockquoteSetextReplace,`
@@ -30,7 +30,7 @@ ${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
30
30
  `+p}u=!p.trim(),d+=G+`
31
31
  `,e=e.substring(G.length+1),h=Z.slice(k)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(a=!0)),n.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),n.raw+=d}let s=n.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l of n.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let c={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=c.checked,n.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=c.raw+l.tokens[0].raw,l.tokens[0].text=c.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(c)):l.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):l.tokens.unshift(c)}}if(!n.loose){let d=l.tokens.filter(h=>h.type==="space"),c=d.length>0&&d.some(h=>this.rules.other.anyLine.test(h.raw));n.loose=c}}if(n.loose)for(let l of n.items){l.loose=!0;for(let d of l.tokens)d.type==="text"&&(d.type="paragraph")}return n}}html(e){let o=this.rules.block.html.exec(e);if(o)return{type:"html",block:!0,raw:o[0],pre:o[1]==="pre"||o[1]==="script"||o[1]==="style",text:o[0]}}def(e){let o=this.rules.block.def.exec(e);if(o){let t=o[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=o[2]?o[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=o[3]?o[3].substring(1,o[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):o[3];return{type:"def",tag:t,raw:o[0],href:i,title:n}}}table(e){let o=this.rules.block.table.exec(e);if(!o||!this.rules.other.tableDelimiter.test(o[2]))return;let t=q0(o[1]),i=o[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=o[3]?.trim()?o[3].replace(this.rules.other.tableRowBlankLine,"").split(`
32
32
  `):[],r={type:"table",raw:o[0],header:[],align:[],rows:[]};if(t.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?r.align.push("right"):this.rules.other.tableAlignCenter.test(a)?r.align.push("center"):this.rules.other.tableAlignLeft.test(a)?r.align.push("left"):r.align.push(null);for(let a=0;a<t.length;a++)r.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:r.align[a]});for(let a of n)r.rows.push(q0(a,r.header.length).map((s,l)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:r.align[l]})));return r}}lheading(e){let o=this.rules.block.lheading.exec(e);if(o){let t=o[1].trim();return{type:"heading",raw:o[0],depth:o[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(e){let o=this.rules.block.paragraph.exec(e);if(o){let t=o[1].charAt(o[1].length-1)===`
33
- `?o[1].slice(0,-1):o[1];return{type:"paragraph",raw:o[0],text:t,tokens:this.lexer.inline(t)}}}text(e){let o=this.rules.block.text.exec(e);if(o)return{type:"text",raw:o[0],text:o[0],tokens:this.lexer.inline(o[0])}}escape(e){let o=this.rules.inline.escape.exec(e);if(o)return{type:"escape",raw:o[0],text:o[1]}}tag(e){let o=this.rules.inline.tag.exec(e);if(o)return!this.lexer.state.inLink&&this.rules.other.startATag.test(o[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(o[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(o[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(o[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:o[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:o[0]}}link(e){let o=this.rules.inline.link.exec(e);if(o){let t=o[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let r=Or(t.slice(0,-1),"\\");if((t.length-r.length)%2===0)return}else{let r=a4(o[2],"()");if(r===-2)return;if(r>-1){let a=(o[0].indexOf("!")===0?5:4)+o[1].length+r;o[2]=o[2].substring(0,r),o[0]=o[0].substring(0,a).trim(),o[3]=""}}let i=o[2],n="";if(this.options.pedantic){let r=this.rules.other.pedanticHrefTitle.exec(i);r&&(i=r[1],n=r[3])}else n=o[3]?o[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i=i.slice(1):i=i.slice(1,-1)),T0(o,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},o[0],this.lexer,this.rules)}}reflink(e,o){let t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){let i=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=o[i.toLowerCase()];if(!n){let r=t[0].charAt(0);return{type:"text",raw:r,text:r}}return T0(t,n,t[0],this.lexer,this.rules)}}emStrong(e,o,t=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,o=o.slice(-1*e.length+n);(i=d.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(a=[...r].length,i[3]||i[4]){s+=a;continue}else if((i[5]||i[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+l);let c=[...i[0]][0].length,h=e.slice(0,n+i.index+c+a);if(Math.min(n,a)%2){let u=h.slice(1,-1);return{type:"em",raw:h,text:u,tokens:this.lexer.inlineTokens(u)}}let p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let o=this.rules.inline.code.exec(e);if(o){let t=o[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:o[0],text:t}}}br(e){let o=this.rules.inline.br.exec(e);if(o)return{type:"br",raw:o[0]}}del(e,o,t=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=this.rules.inline.delRDelim;for(l.lastIndex=0,o=o.slice(-1*e.length+n);(i=l.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r||(a=[...r].length,a!==n))continue;if(i[3]||i[4]){s+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s);let d=[...i[0]][0].length,c=e.slice(0,n+i.index+d+a),h=c.slice(n,-n);return{type:"del",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let o=this.rules.inline.autolink.exec(e);if(o){let t,i;return o[2]==="@"?(t=o[1],i="mailto:"+t):(t=o[1],i=t),{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(e){let o;if(o=this.rules.inline.url.exec(e)){let t,i;if(o[2]==="@")t=o[0],i="mailto:"+t;else{let n;do n=o[0],o[0]=this.rules.inline._backpedal.exec(o[0])?.[0]??"";while(n!==o[0]);t=o[0],o[1]==="www."?i="http://"+o[0]:i=o[0]}return{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(e){let o=this.rules.inline.text.exec(e);if(o){let t=this.lexer.state.inRawBlock;return{type:"text",raw:o[0],text:o[0],escaped:t}}}},ri=class cd{tokens;options;state;inlineQueue;tokenizer;constructor(o){this.tokens=[],this.tokens.links=Object.create(null),this.options=o||Bo,this.options.tokenizer=this.options.tokenizer||new Os,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Dt,block:Vs.normal,inline:Wr.normal};this.options.pedantic?(t.block=Vs.pedantic,t.inline=Wr.pedantic):this.options.gfm&&(t.block=Vs.gfm,this.options.breaks?t.inline=Wr.breaks:t.inline=Wr.gfm),this.tokenizer.rules=t}static get rules(){return{block:Vs,inline:Wr}}static lex(o,t){return new cd(t).lex(o)}static lexInline(o,t){return new cd(t).inlineTokens(o)}lex(o){o=o.replace(Dt.carriageReturn,`
33
+ `?o[1].slice(0,-1):o[1];return{type:"paragraph",raw:o[0],text:t,tokens:this.lexer.inline(t)}}}text(e){let o=this.rules.block.text.exec(e);if(o)return{type:"text",raw:o[0],text:o[0],tokens:this.lexer.inline(o[0])}}escape(e){let o=this.rules.inline.escape.exec(e);if(o)return{type:"escape",raw:o[0],text:o[1]}}tag(e){let o=this.rules.inline.tag.exec(e);if(o)return!this.lexer.state.inLink&&this.rules.other.startATag.test(o[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(o[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(o[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(o[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:o[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:o[0]}}link(e){let o=this.rules.inline.link.exec(e);if(o){let t=o[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let r=Vr(t.slice(0,-1),"\\");if((t.length-r.length)%2===0)return}else{let r=a4(o[2],"()");if(r===-2)return;if(r>-1){let a=(o[0].indexOf("!")===0?5:4)+o[1].length+r;o[2]=o[2].substring(0,r),o[0]=o[0].substring(0,a).trim(),o[3]=""}}let i=o[2],n="";if(this.options.pedantic){let r=this.rules.other.pedanticHrefTitle.exec(i);r&&(i=r[1],n=r[3])}else n=o[3]?o[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?i=i.slice(1):i=i.slice(1,-1)),T0(o,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},o[0],this.lexer,this.rules)}}reflink(e,o){let t;if((t=this.rules.inline.reflink.exec(e))||(t=this.rules.inline.nolink.exec(e))){let i=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=o[i.toLowerCase()];if(!n){let r=t[0].charAt(0);return{type:"text",raw:r,text:r}}return T0(t,n,t[0],this.lexer,this.rules)}}emStrong(e,o,t=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=0,d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,o=o.slice(-1*e.length+n);(i=d.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(a=[...r].length,i[3]||i[4]){s+=a;continue}else if((i[5]||i[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+l);let c=[...i[0]][0].length,h=e.slice(0,n+i.index+c+a);if(Math.min(n,a)%2){let u=h.slice(1,-1);return{type:"em",raw:h,text:u,tokens:this.lexer.inlineTokens(u)}}let p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let o=this.rules.inline.code.exec(e);if(o){let t=o[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:o[0],text:t}}}br(e){let o=this.rules.inline.br.exec(e);if(o)return{type:"br",raw:o[0]}}del(e,o,t=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,r,a,s=n,l=this.rules.inline.delRDelim;for(l.lastIndex=0,o=o.slice(-1*e.length+n);(i=l.exec(o))!==null;){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r||(a=[...r].length,a!==n))continue;if(i[3]||i[4]){s+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s);let d=[...i[0]][0].length,c=e.slice(0,n+i.index+d+a),h=c.slice(n,-n);return{type:"del",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(e){let o=this.rules.inline.autolink.exec(e);if(o){let t,i;return o[2]==="@"?(t=o[1],i="mailto:"+t):(t=o[1],i=t),{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}url(e){let o;if(o=this.rules.inline.url.exec(e)){let t,i;if(o[2]==="@")t=o[0],i="mailto:"+t;else{let n;do n=o[0],o[0]=this.rules.inline._backpedal.exec(o[0])?.[0]??"";while(n!==o[0]);t=o[0],o[1]==="www."?i="http://"+o[0]:i=o[0]}return{type:"link",raw:o[0],text:t,href:i,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(e){let o=this.rules.inline.text.exec(e);if(o){let t=this.lexer.state.inRawBlock;return{type:"text",raw:o[0],text:o[0],escaped:t}}}},ri=class ld{tokens;options;state;inlineQueue;tokenizer;constructor(o){this.tokens=[],this.tokens.links=Object.create(null),this.options=o||Bo,this.options.tokenizer=this.options.tokenizer||new Ws,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Dt,block:Bs.normal,inline:Br.normal};this.options.pedantic?(t.block=Bs.pedantic,t.inline=Br.pedantic):this.options.gfm&&(t.block=Bs.gfm,this.options.breaks?t.inline=Br.breaks:t.inline=Br.gfm),this.tokenizer.rules=t}static get rules(){return{block:Bs,inline:Br}}static lex(o,t){return new ld(t).lex(o)}static lexInline(o,t){return new ld(t).inlineTokens(o)}lex(o){o=o.replace(Dt.carriageReturn,`
34
34
  `),this.blockTokens(o,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(o,t=[],i=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(o=o.replace(Dt.tabCharGlobal," ").replace(Dt.spaceLine,""));o;){let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},o,t))?(o=o.substring(n.raw.length),t.push(n),!0):!1))continue;if(n=this.tokenizer.space(o)){o=o.substring(n.raw.length);let a=t.at(-1);n.raw.length===1&&a!==void 0?a.raw+=`
35
35
  `:t.push(n);continue}if(n=this.tokenizer.code(o)){o=o.substring(n.raw.length);let a=t.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
36
36
  `)?"":`
@@ -44,9 +44,9 @@ ${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
44
44
  `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n),i=r.length!==o.length,o=o.substring(n.raw.length);continue}if(n=this.tokenizer.text(o)){o=o.substring(n.raw.length);let a=t.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
45
45
  `)?"":`
46
46
  `)+n.raw,a.text+=`
47
- `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(o){let a="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(o,t=[]){return this.inlineQueue.push({src:o,tokens:t}),t}inlineTokens(o,t=[]){this.tokenizer.lexer=this;let i=o,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let r;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;o;){a||(s=""),a=!1;let l;if(this.options.extensions?.inline?.some(c=>(l=c.call({lexer:this},o,t))?(o=o.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(o,this.tokens.links)){o=o.substring(l.raw.length);let c=t.at(-1);l.type==="text"&&c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(o)){o=o.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(o))){o=o.substring(l.raw.length),t.push(l);continue}let d=o;if(this.options.extensions?.startInline){let c=1/0,h=o.slice(1),p;this.options.extensions.startInline.forEach(u=>{p=u.call({lexer:this},h),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(d=o.substring(0,c+1))}if(l=this.tokenizer.inlineText(d)){o=o.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),a=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(o){let c="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},zs=class{options;parser;constructor(e){this.options=e||Bo}space(e){return""}code({text:e,lang:o,escaped:t}){let i=(o||"").match(Dt.notSpaceStart)?.[0],n=e.replace(Dt.endingNewline,"")+`
48
- `;return i?'<pre><code class="language-'+Ti(i)+'">'+(t?n:Ti(n,!0))+`</code></pre>
49
- `:"<pre><code>"+(t?n:Ti(n,!0))+`</code></pre>
47
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(n);continue}if(o){let a="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,t}inline(o,t=[]){return this.inlineQueue.push({src:o,tokens:t}),t}inlineTokens(o,t=[]){this.tokenizer.lexer=this;let i=o,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let r;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;o;){a||(s=""),a=!1;let l;if(this.options.extensions?.inline?.some(c=>(l=c.call({lexer:this},o,t))?(o=o.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(o,this.tokens.links)){o=o.substring(l.raw.length);let c=t.at(-1);l.type==="text"&&c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(o)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(o,i,s)){o=o.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(o)){o=o.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(o))){o=o.substring(l.raw.length),t.push(l);continue}let d=o;if(this.options.extensions?.startInline){let c=1/0,h=o.slice(1),p;this.options.extensions.startInline.forEach(u=>{p=u.call({lexer:this},h),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(d=o.substring(0,c+1))}if(l=this.tokenizer.inlineText(d)){o=o.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),a=!0;let c=t.at(-1);c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):t.push(l);continue}if(o){let c="Infinite loop on byte: "+o.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return t}},Os=class{options;parser;constructor(e){this.options=e||Bo}space(e){return""}code({text:e,lang:o,escaped:t}){let i=(o||"").match(Dt.notSpaceStart)?.[0],n=e.replace(Dt.endingNewline,"")+`
48
+ `;return i?'<pre><code class="language-'+qi(i)+'">'+(t?n:qi(n,!0))+`</code></pre>
49
+ `:"<pre><code>"+(t?n:qi(n,!0))+`</code></pre>
50
50
  `}blockquote({tokens:e}){return`<blockquote>
51
51
  ${this.parser.parse(e)}</blockquote>
52
52
  `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:o}){return`<h${o}>${this.parser.parseInline(e)}</h${o}>
@@ -62,8 +62,8 @@ ${this.parser.parse(e)}</blockquote>
62
62
  `}tablerow({text:e}){return`<tr>
63
63
  ${e}</tr>
64
64
  `}tablecell(e){let o=this.parser.parseInline(e.tokens),t=e.header?"th":"td";return(e.align?`<${t} align="${e.align}">`:`<${t}>`)+o+`</${t}>
65
- `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Ti(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:o,tokens:t}){let i=this.parser.parseInline(t),n=k0(e);if(n===null)return i;e=n;let r='<a href="'+e+'"';return o&&(r+=' title="'+Ti(o)+'"'),r+=">"+i+"</a>",r}image({href:e,title:o,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let n=k0(e);if(n===null)return Ti(t);e=n;let r=`<img src="${e}" alt="${Ti(t)}"`;return o&&(r+=` title="${Ti(o)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ti(e.text)}},xd=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},ai=class dd{options;renderer;textRenderer;constructor(o){this.options=o||Bo,this.options.renderer=this.options.renderer||new zs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new xd}static parse(o,t){return new dd(t).parse(o)}static parseInline(o,t){return new dd(t).parseInline(o)}parse(o){this.renderer.parser=this;let t="";for(let i=0;i<o.length;i++){let n=o[i];if(this.options.extensions?.renderers?.[n.type]){let a=n,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){t+=s||"";continue}}let r=n;switch(r.type){case"space":{t+=this.renderer.space(r);break}case"hr":{t+=this.renderer.hr(r);break}case"heading":{t+=this.renderer.heading(r);break}case"code":{t+=this.renderer.code(r);break}case"table":{t+=this.renderer.table(r);break}case"blockquote":{t+=this.renderer.blockquote(r);break}case"list":{t+=this.renderer.list(r);break}case"checkbox":{t+=this.renderer.checkbox(r);break}case"html":{t+=this.renderer.html(r);break}case"def":{t+=this.renderer.def(r);break}case"paragraph":{t+=this.renderer.paragraph(r);break}case"text":{t+=this.renderer.text(r);break}default:{let a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(o,t=this.renderer){this.renderer.parser=this;let i="";for(let n=0;n<o.length;n++){let r=o[n];if(this.options.extensions?.renderers?.[r.type]){let s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=s||"";continue}}let a=r;switch(a.type){case"escape":{i+=t.text(a);break}case"html":{i+=t.html(a);break}case"link":{i+=t.link(a);break}case"image":{i+=t.image(a);break}case"checkbox":{i+=t.checkbox(a);break}case"strong":{i+=t.strong(a);break}case"em":{i+=t.em(a);break}case"codespan":{i+=t.codespan(a);break}case"br":{i+=t.br(a);break}case"del":{i+=t.del(a);break}case"text":{i+=t.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},zr=class{options;block;constructor(e){this.options=e||Bo}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ri.lex:ri.lexInline}provideParser(e=this.block){return e?ai.parse:ai.parseInline}},c4=class{defaults=md();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ai;Renderer=zs;TextRenderer=xd;Lexer=ri;Tokenizer=Os;Hooks=zr;constructor(...e){this.use(...e)}walkTokens(e,o){let t=[];for(let i of e)switch(t=t.concat(o.call(this,i)),i.type){case"table":{let n=i;for(let r of n.header)t=t.concat(this.walkTokens(r.tokens,o));for(let r of n.rows)for(let a of r)t=t.concat(this.walkTokens(a.tokens,o));break}case"list":{let n=i;t=t.concat(this.walkTokens(n.items,o));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(r=>{let a=n[r].flat(1/0);t=t.concat(this.walkTokens(a,o))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,o)))}}return t}use(...e){let o=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(t=>{let i=Ee({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=o.renderers[n.name];r?o.renderers[n.name]=function(...a){let s=n.renderer.apply(this,a);return s===!1&&(s=r.apply(this,a)),s}:o.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=o[n.level];r?r.unshift(n.tokenizer):o[n.level]=[n.tokenizer],n.start&&(n.level==="block"?o.startBlock?o.startBlock.push(n.start):o.startBlock=[n.start]:n.level==="inline"&&(o.startInline?o.startInline.push(n.start):o.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(o.childTokens[n.name]=n.childTokens)}),i.extensions=o),t.renderer){let n=this.defaults.renderer||new zs(this.defaults);for(let r in t.renderer){if(!(r in n))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let a=r,s=t.renderer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c||""}}i.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Os(this.defaults);for(let r in t.tokenizer){if(!(r in n))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let a=r,s=t.tokenizer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new zr;for(let r in t.hooks){if(!(r in n))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let a=r,s=t.hooks[a],l=n[a];zr.passThroughHooks.has(r)?n[a]=d=>{if(this.defaults.async&&zr.passThroughHooksRespectAsync.has(r))return(async()=>{let h=await s.call(n,d);return l.call(n,h)})();let c=s.call(n,d);return l.call(n,c)}:n[a]=(...d)=>{if(this.defaults.async)return(async()=>{let h=await s.apply(n,d);return h===!1&&(h=await l.apply(n,d)),h})();let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,r=t.walkTokens;i.walkTokens=function(a){let s=[];return s.push(r.call(this,a)),n&&(s=s.concat(n.call(this,a))),s}}this.defaults=Ee(Ee({},this.defaults),i)}),this}setOptions(e){return this.defaults=Ee(Ee({},this.defaults),e),this}lexer(e,o){return ri.lex(e,o??this.defaults)}parser(e,o){return ai.parse(e,o??this.defaults)}parseMarkdown(e){return(o,t)=>{let i=Ee({},t),n=Ee(Ee({},this.defaults),i),r=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(o):o,s=await(n.hooks?await n.hooks.provideLexer(e):e?ri.lex:ri.lexInline)(a,n),l=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let d=await(n.hooks?await n.hooks.provideParser(e):e?ai.parse:ai.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(d):d})().catch(r);try{n.hooks&&(o=n.hooks.preprocess(o));let a=(n.hooks?n.hooks.provideLexer(e):e?ri.lex:ri.lexInline)(o,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(e):e?ai.parse:ai.parseInline)(a,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(a){return r(a)}}}onError(e,o){return t=>{if(t.message+=`
66
- Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Ti(t.message+"",!0)+"</pre>";return o?Promise.resolve(i):i}if(o)return Promise.reject(t);throw t}}},No=new c4;function Xe(e,o){return No.parse(e,o)}Xe.options=Xe.setOptions=function(e){return No.setOptions(e),Xe.defaults=No.defaults,I0(Xe.defaults),Xe};Xe.getDefaults=md;Xe.defaults=Bo;Xe.use=function(...e){return No.use(...e),Xe.defaults=No.defaults,I0(Xe.defaults),Xe};Xe.walkTokens=function(e,o){return No.walkTokens(e,o)};Xe.parseInline=No.parseInline;Xe.Parser=ai;Xe.parser=ai.parse;Xe.Renderer=zs;Xe.TextRenderer=xd;Xe.Lexer=ri;Xe.lexer=ri.lex;Xe.Tokenizer=Os;Xe.Hooks=zr;Xe.parse=Xe;var KM=Xe.options,QM=Xe.setOptions,YM=Xe.use,ZM=Xe.walkTokens,JM=Xe.parseInline;var e9=ai.parse,t9=ri.lex;function W0(){return{mangle:!1,walkTokens(e){if(e.type!=="link"||!e.href.startsWith("mailto:"))return;let o=e.href.substring(7),t=d4(o);e.href=`mailto:${t}`,!(e.tokens.length!==1||e.tokens[0].type!=="text"||e.tokens[0].text!==o)&&(e.text=t,e.tokens[0].text=t)}}}function d4(e){let o="",t,i,n=e.length;for(t=0;t<n;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),o+="&#"+i+";";return o}var O0=`# Change Log - Visualization
65
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${qi(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:o,tokens:t}){let i=this.parser.parseInline(t),n=k0(e);if(n===null)return i;e=n;let r='<a href="'+e+'"';return o&&(r+=' title="'+qi(o)+'"'),r+=">"+i+"</a>",r}image({href:e,title:o,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let n=k0(e);if(n===null)return qi(t);e=n;let r=`<img src="${e}" alt="${qi(t)}"`;return o&&(r+=` title="${qi(o)}"`),r+=">",r}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:qi(e.text)}},vd=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},ai=class cd{options;renderer;textRenderer;constructor(o){this.options=o||Bo,this.options.renderer=this.options.renderer||new Os,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new vd}static parse(o,t){return new cd(t).parse(o)}static parseInline(o,t){return new cd(t).parseInline(o)}parse(o){this.renderer.parser=this;let t="";for(let i=0;i<o.length;i++){let n=o[i];if(this.options.extensions?.renderers?.[n.type]){let a=n,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){t+=s||"";continue}}let r=n;switch(r.type){case"space":{t+=this.renderer.space(r);break}case"hr":{t+=this.renderer.hr(r);break}case"heading":{t+=this.renderer.heading(r);break}case"code":{t+=this.renderer.code(r);break}case"table":{t+=this.renderer.table(r);break}case"blockquote":{t+=this.renderer.blockquote(r);break}case"list":{t+=this.renderer.list(r);break}case"checkbox":{t+=this.renderer.checkbox(r);break}case"html":{t+=this.renderer.html(r);break}case"def":{t+=this.renderer.def(r);break}case"paragraph":{t+=this.renderer.paragraph(r);break}case"text":{t+=this.renderer.text(r);break}default:{let a='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(o,t=this.renderer){this.renderer.parser=this;let i="";for(let n=0;n<o.length;n++){let r=o[n];if(this.options.extensions?.renderers?.[r.type]){let s=this.options.extensions.renderers[r.type].call({parser:this},r);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)){i+=s||"";continue}}let a=r;switch(a.type){case"escape":{i+=t.text(a);break}case"html":{i+=t.html(a);break}case"link":{i+=t.link(a);break}case"image":{i+=t.image(a);break}case"checkbox":{i+=t.checkbox(a);break}case"strong":{i+=t.strong(a);break}case"em":{i+=t.em(a);break}case"codespan":{i+=t.codespan(a);break}case"br":{i+=t.br(a);break}case"del":{i+=t.del(a);break}case"text":{i+=t.text(a);break}default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return i}},Wr=class{options;block;constructor(e){this.options=e||Bo}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ri.lex:ri.lexInline}provideParser(e=this.block){return e?ai.parse:ai.parseInline}},c4=class{defaults=dd();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ai;Renderer=Os;TextRenderer=vd;Lexer=ri;Tokenizer=Ws;Hooks=Wr;constructor(...e){this.use(...e)}walkTokens(e,o){let t=[];for(let i of e)switch(t=t.concat(o.call(this,i)),i.type){case"table":{let n=i;for(let r of n.header)t=t.concat(this.walkTokens(r.tokens,o));for(let r of n.rows)for(let a of r)t=t.concat(this.walkTokens(a.tokens,o));break}case"list":{let n=i;t=t.concat(this.walkTokens(n.items,o));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(r=>{let a=n[r].flat(1/0);t=t.concat(this.walkTokens(a,o))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,o)))}}return t}use(...e){let o=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(t=>{let i=Ee({},t);if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=o.renderers[n.name];r?o.renderers[n.name]=function(...a){let s=n.renderer.apply(this,a);return s===!1&&(s=r.apply(this,a)),s}:o.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let r=o[n.level];r?r.unshift(n.tokenizer):o[n.level]=[n.tokenizer],n.start&&(n.level==="block"?o.startBlock?o.startBlock.push(n.start):o.startBlock=[n.start]:n.level==="inline"&&(o.startInline?o.startInline.push(n.start):o.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(o.childTokens[n.name]=n.childTokens)}),i.extensions=o),t.renderer){let n=this.defaults.renderer||new Os(this.defaults);for(let r in t.renderer){if(!(r in n))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let a=r,s=t.renderer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c||""}}i.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Ws(this.defaults);for(let r in t.tokenizer){if(!(r in n))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let a=r,s=t.tokenizer[a],l=n[a];n[a]=(...d)=>{let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Wr;for(let r in t.hooks){if(!(r in n))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let a=r,s=t.hooks[a],l=n[a];Wr.passThroughHooks.has(r)?n[a]=d=>{if(this.defaults.async&&Wr.passThroughHooksRespectAsync.has(r))return(async()=>{let h=await s.call(n,d);return l.call(n,h)})();let c=s.call(n,d);return l.call(n,c)}:n[a]=(...d)=>{if(this.defaults.async)return(async()=>{let h=await s.apply(n,d);return h===!1&&(h=await l.apply(n,d)),h})();let c=s.apply(n,d);return c===!1&&(c=l.apply(n,d)),c}}i.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,r=t.walkTokens;i.walkTokens=function(a){let s=[];return s.push(r.call(this,a)),n&&(s=s.concat(n.call(this,a))),s}}this.defaults=Ee(Ee({},this.defaults),i)}),this}setOptions(e){return this.defaults=Ee(Ee({},this.defaults),e),this}lexer(e,o){return ri.lex(e,o??this.defaults)}parser(e,o){return ai.parse(e,o??this.defaults)}parseMarkdown(e){return(o,t)=>{let i=Ee({},t),n=Ee(Ee({},this.defaults),i),r=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return r(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(o):o,s=await(n.hooks?await n.hooks.provideLexer(e):e?ri.lex:ri.lexInline)(a,n),l=n.hooks?await n.hooks.processAllTokens(s):s;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let d=await(n.hooks?await n.hooks.provideParser(e):e?ai.parse:ai.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(d):d})().catch(r);try{n.hooks&&(o=n.hooks.preprocess(o));let a=(n.hooks?n.hooks.provideLexer(e):e?ri.lex:ri.lexInline)(o,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let s=(n.hooks?n.hooks.provideParser(e):e?ai.parse:ai.parseInline)(a,n);return n.hooks&&(s=n.hooks.postprocess(s)),s}catch(a){return r(a)}}}onError(e,o){return t=>{if(t.message+=`
66
+ Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+qi(t.message+"",!0)+"</pre>";return o?Promise.resolve(i):i}if(o)return Promise.reject(t);throw t}}},No=new c4;function Xe(e,o){return No.parse(e,o)}Xe.options=Xe.setOptions=function(e){return No.setOptions(e),Xe.defaults=No.defaults,I0(Xe.defaults),Xe};Xe.getDefaults=dd;Xe.defaults=Bo;Xe.use=function(...e){return No.use(...e),Xe.defaults=No.defaults,I0(Xe.defaults),Xe};Xe.walkTokens=function(e,o){return No.walkTokens(e,o)};Xe.parseInline=No.parseInline;Xe.Parser=ai;Xe.parser=ai.parse;Xe.Renderer=Os;Xe.TextRenderer=vd;Xe.Lexer=ri;Xe.lexer=ri.lex;Xe.Tokenizer=Ws;Xe.Hooks=Wr;Xe.parse=Xe;var KM=Xe.options,QM=Xe.setOptions,YM=Xe.use,ZM=Xe.walkTokens,JM=Xe.parseInline;var e9=ai.parse,t9=ri.lex;function W0(){return{mangle:!1,walkTokens(e){if(e.type!=="link"||!e.href.startsWith("mailto:"))return;let o=e.href.substring(7),t=d4(o);e.href=`mailto:${t}`,!(e.tokens.length!==1||e.tokens[0].type!=="text"||e.tokens[0].text!==o)&&(e.text=t,e.tokens[0].text=t)}}}function d4(e){let o="",t,i,n=e.length;for(t=0;t<n;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),o+="&#"+i+";";return o}var O0=`# Change Log - Visualization
67
67
 
68
68
  All notable changes to this project will be documented in this file.
69
69
 
@@ -72,6 +72,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/)
72
72
 
73
73
  ## [unreleased] (Added \u{1F680} | Changed | Removed | Fixed \u{1F41E} | Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB})
74
74
 
75
+ ## [2.3.2] - 2026-09-11
76
+
77
+ ### Fixed \u{1F41E}
78
+
79
+ - **Flattened buildings stay flat**: a flattened building always has the lowest building height, whatever the height metric and whether height is inverted.
80
+ - **Flattening keeps the map in place**: flattening or unflattening buildings changes only their height and colour, and every building stays where it was.
81
+ - **No loading flash on quick changes**: the loading overlay only appears when a change takes a moment, so adding or removing a rule, or flattening or excluding a single building or file extension, no longer makes the map blink.
82
+
75
83
  ## [2.3.1] - 2026-09-11
76
84
 
77
85
  ### Changed
@@ -3418,9 +3426,9 @@ Fixed release issues
3418
3426
 
3419
3427
  - SonarImporter for importing projects from SonarQube.
3420
3428
  - ValidationTool for validating an existing json file.
3421
- `;var h4=["Added \u{1F680}","Fixed \u{1F41E}","Changed","Removed \u{1F5D1}","Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB}"],Hs=(()=>{class e{parseChangesBetweenVersions(t,i){Xe.use(W0());let r=Xe.parse(O0).split(`
3429
+ `;var h4=["Added \u{1F680}","Fixed \u{1F41E}","Changed","Removed \u{1F5D1}","Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB}"],js=(()=>{class e{parseChangesBetweenVersions(t,i){Xe.use(W0());let r=Xe.parse(O0).split(`
3422
3430
  `),a=this.findVersionLine(r,i),s=this.findVersionLine(r,t);if(a===-1||s===-1)return[];let l=r.slice(a,s+1);return this.extractCategories(l)}extractCategories(t){let i=[];for(let n of h4){let r=new RegExp(`<h3>${n}</h3>`),a=this.findAllIndexes(t,r),s=[];for(let l of a){let d=l+2,c=this.findEndOfChanges(t,l);for(let h of t.slice(d,c))s.push(h)}s.length>0&&i.push({title:n,changes:s.join(`
3423
- `)})}return i}findAllIndexes(t,i){return t.reduce((n,r,a)=>(i.test(r)&&n.push(a),n),[])}findVersionLine(t,i){let n=new RegExp(`\\[${i}]`);return t.findIndex(r=>n.test(r))}findEndOfChanges(t,i){return i+t.slice(i+1).findIndex(n=>/<h3>/.test(n)||/<h2>/.test(n))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var p4=["dialog"],u4=(e,o)=>o.title;function f4(e,o){if(e&1&&(v(0,"div",15)(1,"div",24)(2,"span",25),f(3),b(),v(4,"h3",26),f(5),b(),v(6,"span",27),f(7),b()(),F(8,"div",28),b()),e&2){let t=o.$implicit,i=D();m(),L("ngClass",i.getCategoryHeaderClass(t.title)),m(),L("ngClass",i.getCategoryIconClass(t.title)),m(),he(" ",i.getCategoryEmoji(t.title)," "),m(2),he(" ",i.getCategoryLabel(t.title)," "),m(),L("ngClass",i.getCategoryCountClass(t.title)),m(),he(" ",i.getChangeCount(t.changes)," "),m(),L("innerHTML",t.changes,Gh)}}var wd={"Added \u{1F680}":{emoji:"\u{1F680}",label:"Added",type:"added"},"Fixed \u{1F41E}":{emoji:"\u{1F41E}",label:"Fixed",type:"fixed"},Changed:{emoji:"\u2728",label:"Changed",type:"changed"},"Removed \u{1F5D1}":{emoji:"\u{1F5D1}",label:"Removed",type:"removed"},"Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB}":{emoji:"\u{1F527}",label:"Maintenance",type:"chore"}},Sd={added:{header:"bg-success/5",icon:"bg-success/10",count:"bg-success/10 text-success"},fixed:{header:"bg-info/5",icon:"bg-info/10",count:"bg-info/10 text-info"},changed:{header:"bg-warning/5",icon:"bg-warning/10",count:"bg-warning/10 text-warning"},removed:{header:"bg-error/5",icon:"bg-error/10",count:"bg-error/10 text-error"},chore:{header:"bg-neutral/5",icon:"bg-neutral/10",count:"bg-neutral/10 text-neutral"}},yd=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i,this.dialogElement=je.required("dialog"),this.previousVersion=this.versionService.previousVersion,this.currentVersion=this.versionService.currentVersion,this.shouldShowChangelog=this.versionService.shouldShowChangelog,this.changes=X(()=>{let n=this.previousVersion();return n?this.changelogParserService.parseChangesBetweenVersions(n,this.currentVersion):[]}),Hh(()=>{this.shouldShowChangelog()&&this.open()})}open(){this.dialogElement().nativeElement.showModal()}close(){this.versionService.acknowledgeChangelog(),this.dialogElement().nativeElement.close()}getCategoryEmoji(t){return wd[t]?.emoji??"\u{1F4DD}"}getCategoryLabel(t){return wd[t]?.label??t}getCategoryType(t){return wd[t]?.type??"default"}getCategoryHeaderClass(t){let i=this.getCategoryType(t);return Sd[i]?.header??"bg-base-200"}getCategoryIconClass(t){let i=this.getCategoryType(t);return Sd[i]?.icon??"bg-base-300"}getCategoryCountClass(t){let i=this.getCategoryType(t);return Sd[i]?.count??"bg-base-300 text-base-content"}getChangeCount(t){return(t.match(/<li>/gi)||[]).length}static{this.\u0275fac=function(i){return new(i||e)(te(Bs),te(Hs))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-changelog-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,p4,5),i&2&&ot()},decls:33,vars:2,consts:[["dialog",""],[1,"modal","backdrop-blur-sm"],[1,"modal-box","max-w-2xl","p-0","overflow-hidden","bg-gradient-to-b","from-base-100","to-base-200","shadow-2xl"],[1,"relative","px-8","pt-8","pb-6","bg-gradient-to-br","from-primary/5","via-transparent","to-accent/5"],[1,"absolute","top-0","right-0","w-32","h-32","bg-gradient-to-bl","from-primary/10","to-transparent","rounded-bl-full"],[1,"relative"],[1,"inline-block","px-3","py-1","mb-3","text-xs","font-semibold","tracking-wider","uppercase","rounded-full","bg-primary/10","text-primary"],[1,"text-3xl","font-bold","tracking-tight","text-base-content"],[1,"flex","items-center","gap-3","mt-3"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-medium","rounded-lg","bg-base-200","text-base-content/70","border","border-base-300"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-base-content/40"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 7l5 5m0 0l-5 5m5-5H6"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-semibold","rounded-lg","bg-primary/10","text-primary","border","border-primary/20"],[1,"px-8","py-6","max-h-[60vh]","overflow-y-auto"],[1,"flex","flex-col","gap-4"],[1,"rounded-xl","overflow-hidden","bg-base-100","border","border-base-300/50","shadow-sm"],[1,"px-8","py-5","border-t","border-base-300/50","bg-base-200/50"],[1,"flex","items-center","justify-between"],["href","https://codecharta.com/news/","target","_blank","rel","noopener noreferrer",1,"inline-flex","items-center","gap-2","text-sm","font-medium","transition-colors","text-primary","hover:text-primary/80"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"],[1,"btn","btn-primary","btn-sm","px-6",3,"click"],["method","dialog",1,"modal-backdrop","bg-base-content/60"],[3,"click"],[1,"flex","items-center","gap-3","px-4","py-3","border-b","border-base-200",3,"ngClass"],[1,"flex","items-center","justify-center","w-8","h-8","rounded-lg","text-base",3,"ngClass"],[1,"text-base","font-semibold","text-base-content"],[1,"ml-auto","px-2","py-0.5","text-xs","font-semibold","rounded-full",3,"ngClass"],[1,"px-6","py-4","text-sm","text-base-content/80","leading-snug","[&_a]:text-primary","[&_a]:hover:underline",3,"innerHTML"]],template:function(i,n){i&1&&(v(0,"dialog",1,0)(2,"div",2)(3,"div",3),F(4,"div",4),v(5,"div",5)(6,"span",6),f(7," Release Notes "),b(),v(8,"h2",7),f(9," What's new in CodeCharta? "),b(),v(10,"div",8)(11,"span",9),f(12),b(),Io(),v(13,"svg",10),F(14,"path",11),b(),Ar(),v(15,"span",12),f(16),b()()()(),v(17,"div",13)(18,"div",14),Ae(19,f4,9,7,"div",15,u4),b()(),v(21,"div",16)(22,"div",17)(23,"a",18)(24,"span"),f(25,"View full changelog"),b(),Io(),v(26,"svg",19),F(27,"path",20),b()(),Ar(),v(28,"button",21),W("click",function(){return n.close()}),f(29," Got it "),b()()()(),v(30,"form",22)(31,"button",23),W("click",function(){return n.close()}),f(32,"close"),b()()()),i&2&&(m(12),he(" ",n.previousVersion()," "),m(4),he(" ",n.currentVersion," "),m(3),Le(n.changes()))},dependencies:[sp],encapsulation:2,changeDetection:0})}}return e})();var $0=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i}get currentVersion(){return this.versionService.currentVersion}get previousVersion(){return this.versionService.previousVersion}get shouldShowChangelog(){return this.versionService.shouldShowChangelog}synchronizeVersion(){this.versionService.synchronizeVersion()}acknowledgeChangelog(){this.versionService.acknowledgeChangelog()}parseChangesBetweenVersions(t,i){return this.changelogParserService.parseChangesBetweenVersions(t,i)}static{this.\u0275fac=function(i){return new(i||e)(M(Bs),M(Hs))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var j0=[cu,tu,Jp,iu,Yp,vi];var H0=(()=>{class e{constructor(t,i,n,r,a){this.store=t,this.threeSceneService=i,this.threeMapControlsService=n,this.actions$=r,this.globalSettingsFacade=a,this.autoFitRequests$=Gi(this.actions$.pipe(st(ni),ke(s=>({force:s.forceAutoFit}))),this.store.select(gn).pipe(hi(1),ke(()=>({force:!1}))),St(j0.map(s=>this.store.select(s))).pipe(hi(1),ke(()=>({force:!1})))),this.autoFitTo$=Fe(()=>this.autoFitRequests$.pipe(ei(this.globalSettingsFacade.resetCameraIfNewFileIsLoaded$()),Re(([s,l])=>l||s.force),Ut(()=>this.threeSceneService.mapMeshChanged$.pipe(ut(1))),Pe(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(ft),M(Wt),M(mt),M(Uf))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var U0=[io,Li,vn,xn,Ln,An,Ja,Cn,Mn,Za,In,wn,to,Rn,Dn,eo,kn,es,of,oo,Si,wi,Tn,Fi,is,os,Bn,ns,yi,xi,Nt,Fn,rs,Vn,Wn,Sn,yn,qn,En,qi];function X0(e,o,t,i){let n=new Map;for(let r of e){let a=o(r),s=n.get(a);s?s.push(r):n.set(a,[r])}return[...n.values()].flatMap(r=>Cd(r,t,i))}function Cd(e,o,t){let i=Math.floor(t);if(Number.isNaN(i)||i<=0)return[];let n=r=>g4(o(r));return e.length<=i?[...e].sort((r,a)=>n(a)-n(r)):b4(e,n,i)}function g4(e){return Number.isNaN(e)?Number.NEGATIVE_INFINITY:e}function b4(e,o,t){let i=[],n=Number.POSITIVE_INFINITY;for(let r of e){let a=o(r);if(i.length<t)G0(i,r,a,o);else if(a>n)i.pop(),G0(i,r,a,o);else continue;i.length===t&&(n=o(i[t-1]))}return i}function G0(e,o,t,i){let n=e.length;for(;n>0&&i(e[n-1])<t;)n--;e.splice(n,0,o)}var K0=Ie(zu,bn,Ka,(e,o,t)=>new Set(v4(e,o,t))),v4=(e,o,t)=>{let i=[],n=Math.floor(t);if(Number.isNaN(n)||n<=0)return i;let r=e.get(o);if(r===void 0)return i;for(let a of r.keys())if(i.push(a),i.length>=n)break;return i};var Q0=(e,o,t,i,n)=>{for(let r of o)if(r.visible=oi.none,r.attributes[t]!==void 0){let a=e.has(r.fromNodeName),s=e.has(r.toNodeName),l=i&&s,d=n&&a;d&&l?r.visible=oi.both:d?r.visible=oi.from:l&&(r.visible=oi.to)}};var Y0=Ie(K0,gs,bn,ou,nu,(e,o,t,i,n)=>{let r=Sp(o);return Q0(e,r,t,i,n),r});var lr=(()=>{class e{constructor(t,i,n,r){this.store=t,this.ccStateSnapshot=i,this.mapStateReadWindow=n,this.sharedViewReadWindow=r}getState(){return this.ccStateSnapshot.get()}getMapState(){return this.mapStateReadWindow.getMapState()}getEdges(){return gs(this.ccStateSnapshot.get())}getEdgeVisibility(){return Y0(this.ccStateSnapshot.get())}getHoveredNodeId(){return this.sharedViewReadWindow.getHoveredNodeId()}getIdToNode(){return Vu(this.ccStateSnapshot.get())}setHoveredNodeId(t){this.store.dispatch(Ao({value:t}))}setRightClickedNodeData(t){this.store.dispatch(bu({value:t}))}setColorLabels(t){this.store.dispatch(io({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Vt),M(ve),M(Bt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Gs=class e{constructor(o,t,i){this.badge=null,this.labelSize=i;let n=document.createElement("div");if(this.content=document.createElement("div"),this.content.style.cssText=e.buildContentStyles(i),o){let r=document.createElement("span");r.style.cssText="display: block; font-weight: 500;",r.textContent=o,this.content.appendChild(r)}if(t){let r=document.createElement("span");r.style.cssText=`display: block; font-size: ${10*i}px; color: #666; margin-top: 1px;`,r.textContent=t,this.content.appendChild(r)}n.appendChild(this.content),this.cssObject=new sf(n),this.cssObject.center.set(.5,1)}getContentRect(){return this.content.getBoundingClientRect()}getContentElement(){return this.content}setOpacity(o){this.content.style.opacity=o}setTransform(o){this.content.style.transform=`translateY(${-20+o}px)`}setTransition(o){this.content.style.transition=o}setBadge(o){this.clearBadge(),this.badge=document.createElement("div"),this.badge.textContent=`+${o} more`,this.badge.style.cssText=`
3431
+ `)})}return i}findAllIndexes(t,i){return t.reduce((n,r,a)=>(i.test(r)&&n.push(a),n),[])}findVersionLine(t,i){let n=new RegExp(`\\[${i}]`);return t.findIndex(r=>n.test(r))}findEndOfChanges(t,i){return i+t.slice(i+1).findIndex(n=>/<h3>/.test(n)||/<h2>/.test(n))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var p4=["dialog"],u4=(e,o)=>o.title;function f4(e,o){if(e&1&&(v(0,"div",15)(1,"div",24)(2,"span",25),f(3),b(),v(4,"h3",26),f(5),b(),v(6,"span",27),f(7),b()(),F(8,"div",28),b()),e&2){let t=o.$implicit,i=D();m(),L("ngClass",i.getCategoryHeaderClass(t.title)),m(),L("ngClass",i.getCategoryIconClass(t.title)),m(),he(" ",i.getCategoryEmoji(t.title)," "),m(2),he(" ",i.getCategoryLabel(t.title)," "),m(),L("ngClass",i.getCategoryCountClass(t.title)),m(),he(" ",i.getChangeCount(t.changes)," "),m(),L("innerHTML",t.changes,Uh)}}var xd={"Added \u{1F680}":{emoji:"\u{1F680}",label:"Added",type:"added"},"Fixed \u{1F41E}":{emoji:"\u{1F41E}",label:"Fixed",type:"fixed"},Changed:{emoji:"\u2728",label:"Changed",type:"changed"},"Removed \u{1F5D1}":{emoji:"\u{1F5D1}",label:"Removed",type:"removed"},"Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB}":{emoji:"\u{1F527}",label:"Maintenance",type:"chore"}},wd={added:{header:"bg-success/5",icon:"bg-success/10",count:"bg-success/10 text-success"},fixed:{header:"bg-info/5",icon:"bg-info/10",count:"bg-info/10 text-info"},changed:{header:"bg-warning/5",icon:"bg-warning/10",count:"bg-warning/10 text-warning"},removed:{header:"bg-error/5",icon:"bg-error/10",count:"bg-error/10 text-error"},chore:{header:"bg-neutral/5",icon:"bg-neutral/10",count:"bg-neutral/10 text-neutral"}},Sd=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i,this.dialogElement=je.required("dialog"),this.previousVersion=this.versionService.previousVersion,this.currentVersion=this.versionService.currentVersion,this.shouldShowChangelog=this.versionService.shouldShowChangelog,this.changes=X(()=>{let n=this.previousVersion();return n?this.changelogParserService.parseChangesBetweenVersions(n,this.currentVersion):[]}),jh(()=>{this.shouldShowChangelog()&&this.open()})}open(){this.dialogElement().nativeElement.showModal()}close(){this.versionService.acknowledgeChangelog(),this.dialogElement().nativeElement.close()}getCategoryEmoji(t){return xd[t]?.emoji??"\u{1F4DD}"}getCategoryLabel(t){return xd[t]?.label??t}getCategoryType(t){return xd[t]?.type??"default"}getCategoryHeaderClass(t){let i=this.getCategoryType(t);return wd[i]?.header??"bg-base-200"}getCategoryIconClass(t){let i=this.getCategoryType(t);return wd[i]?.icon??"bg-base-300"}getCategoryCountClass(t){let i=this.getCategoryType(t);return wd[i]?.count??"bg-base-300 text-base-content"}getChangeCount(t){return(t.match(/<li>/gi)||[]).length}static{this.\u0275fac=function(i){return new(i||e)(te(Ns),te(js))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-changelog-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,p4,5),i&2&&ot()},decls:33,vars:2,consts:[["dialog",""],[1,"modal","backdrop-blur-sm"],[1,"modal-box","max-w-2xl","p-0","overflow-hidden","bg-gradient-to-b","from-base-100","to-base-200","shadow-2xl"],[1,"relative","px-8","pt-8","pb-6","bg-gradient-to-br","from-primary/5","via-transparent","to-accent/5"],[1,"absolute","top-0","right-0","w-32","h-32","bg-gradient-to-bl","from-primary/10","to-transparent","rounded-bl-full"],[1,"relative"],[1,"inline-block","px-3","py-1","mb-3","text-xs","font-semibold","tracking-wider","uppercase","rounded-full","bg-primary/10","text-primary"],[1,"text-3xl","font-bold","tracking-tight","text-base-content"],[1,"flex","items-center","gap-3","mt-3"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-medium","rounded-lg","bg-base-200","text-base-content/70","border","border-base-300"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-5","h-5","text-base-content/40"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M13 7l5 5m0 0l-5 5m5-5H6"],[1,"inline-flex","items-center","px-3","py-1.5","text-sm","font-mono","font-semibold","rounded-lg","bg-primary/10","text-primary","border","border-primary/20"],[1,"px-8","py-6","max-h-[60vh]","overflow-y-auto"],[1,"flex","flex-col","gap-4"],[1,"rounded-xl","overflow-hidden","bg-base-100","border","border-base-300/50","shadow-sm"],[1,"px-8","py-5","border-t","border-base-300/50","bg-base-200/50"],[1,"flex","items-center","justify-between"],["href","https://codecharta.com/news/","target","_blank","rel","noopener noreferrer",1,"inline-flex","items-center","gap-2","text-sm","font-medium","transition-colors","text-primary","hover:text-primary/80"],["fill","none","stroke","currentColor","viewBox","0 0 24 24",1,"w-4","h-4"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"],[1,"btn","btn-primary","btn-sm","px-6",3,"click"],["method","dialog",1,"modal-backdrop","bg-base-content/60"],[3,"click"],[1,"flex","items-center","gap-3","px-4","py-3","border-b","border-base-200",3,"ngClass"],[1,"flex","items-center","justify-center","w-8","h-8","rounded-lg","text-base",3,"ngClass"],[1,"text-base","font-semibold","text-base-content"],[1,"ml-auto","px-2","py-0.5","text-xs","font-semibold","rounded-full",3,"ngClass"],[1,"px-6","py-4","text-sm","text-base-content/80","leading-snug","[&_a]:text-primary","[&_a]:hover:underline",3,"innerHTML"]],template:function(i,n){i&1&&(v(0,"dialog",1,0)(2,"div",2)(3,"div",3),F(4,"div",4),v(5,"div",5)(6,"span",6),f(7," Release Notes "),b(),v(8,"h2",7),f(9," What's new in CodeCharta? "),b(),v(10,"div",8)(11,"span",9),f(12),b(),Io(),v(13,"svg",10),F(14,"path",11),b(),Rr(),v(15,"span",12),f(16),b()()()(),v(17,"div",13)(18,"div",14),Ae(19,f4,9,7,"div",15,u4),b()(),v(21,"div",16)(22,"div",17)(23,"a",18)(24,"span"),f(25,"View full changelog"),b(),Io(),v(26,"svg",19),F(27,"path",20),b()(),Rr(),v(28,"button",21),W("click",function(){return n.close()}),f(29," Got it "),b()()()(),v(30,"form",22)(31,"button",23),W("click",function(){return n.close()}),f(32,"close"),b()()()),i&2&&(m(12),he(" ",n.previousVersion()," "),m(4),he(" ",n.currentVersion," "),m(3),Le(n.changes()))},dependencies:[ap],encapsulation:2,changeDetection:0})}}return e})();var $0=(()=>{class e{constructor(t,i){this.versionService=t,this.changelogParserService=i}get currentVersion(){return this.versionService.currentVersion}get previousVersion(){return this.versionService.previousVersion}get shouldShowChangelog(){return this.versionService.shouldShowChangelog}synchronizeVersion(){this.versionService.synchronizeVersion()}acknowledgeChangelog(){this.versionService.acknowledgeChangelog()}parseChangesBetweenVersions(t,i){return this.changelogParserService.parseChangesBetweenVersions(t,i)}static{this.\u0275fac=function(i){return new(i||e)(M(Ns),M(js))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var j0=[lu,eu,Zp,tu,Qp,vi];var H0=(()=>{class e{constructor(t,i,n,r,a){this.store=t,this.threeSceneService=i,this.threeMapControlsService=n,this.actions$=r,this.globalSettingsFacade=a,this.autoFitRequests$=Ui(this.actions$.pipe(ct(ni),ke(s=>({force:s.forceAutoFit}))),this.store.select(gn).pipe(hi(1),ke(()=>({force:!1}))),St(j0.map(s=>this.store.select(s))).pipe(hi(1),ke(()=>({force:!1})))),this.autoFitTo$=Fe(()=>this.autoFitRequests$.pipe(ei(this.globalSettingsFacade.resetCameraIfNewFileIsLoaded$()),Re(([s,l])=>l||s.force),Ut(()=>this.threeSceneService.mapMeshChanged$.pipe(ut(1))),Pe(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(ft),M(Wt),M(mt),M(Uf))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var U0=[to,Ai,vn,xn,Ln,An,Ya,Cn,Mn,Qa,In,wn,eo,Rn,Dn,Ji,kn,Za,of,io,Si,wi,Tn,Li,ts,is,Pn,os,yi,xi,Nt,Fn,ns,Nn,Bn,Sn,yn,qn,En,ki];function X0(e,o,t,i){let n=new Map;for(let r of e){let a=o(r),s=n.get(a);s?s.push(r):n.set(a,[r])}return[...n.values()].flatMap(r=>yd(r,t,i))}function yd(e,o,t){let i=Math.floor(t);if(Number.isNaN(i)||i<=0)return[];let n=r=>g4(o(r));return e.length<=i?[...e].sort((r,a)=>n(a)-n(r)):b4(e,n,i)}function g4(e){return Number.isNaN(e)?Number.NEGATIVE_INFINITY:e}function b4(e,o,t){let i=[],n=Number.POSITIVE_INFINITY;for(let r of e){let a=o(r);if(i.length<t)G0(i,r,a,o);else if(a>n)i.pop(),G0(i,r,a,o);else continue;i.length===t&&(n=o(i[t-1]))}return i}function G0(e,o,t,i){let n=e.length;for(;n>0&&i(e[n-1])<t;)n--;e.splice(n,0,o)}var K0=Ie(zu,bn,Ga,(e,o,t)=>new Set(v4(e,o,t))),v4=(e,o,t)=>{let i=[],n=Math.floor(t);if(Number.isNaN(n)||n<=0)return i;let r=e.get(o);if(r===void 0)return i;for(let a of r.keys())if(i.push(a),i.length>=n)break;return i};var Q0=(e,o,t,i,n)=>{for(let r of o)if(r.visible=oi.none,r.attributes[t]!==void 0){let a=e.has(r.fromNodeName),s=e.has(r.toNodeName),l=i&&s,d=n&&a;d&&l?r.visible=oi.both:d?r.visible=oi.from:l&&(r.visible=oi.to)}};var Y0=Ie(K0,fs,bn,iu,ou,(e,o,t,i,n)=>{let r=wp(o);return Q0(e,r,t,i,n),r});var ar=(()=>{class e{constructor(t,i,n,r){this.store=t,this.ccStateSnapshot=i,this.mapStateReadWindow=n,this.sharedViewReadWindow=r}getState(){return this.ccStateSnapshot.get()}getMapState(){return this.mapStateReadWindow.getMapState()}getEdges(){return fs(this.ccStateSnapshot.get())}getEdgeVisibility(){return Y0(this.ccStateSnapshot.get())}getHoveredNodeId(){return this.sharedViewReadWindow.getHoveredNodeId()}getIdToNode(){return Vu(this.ccStateSnapshot.get())}setHoveredNodeId(t){this.store.dispatch(Ao({value:t}))}setRightClickedNodeData(t){this.store.dispatch(bu({value:t}))}setColorLabels(t){this.store.dispatch(to({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Vt),M(ve),M(Bt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Us=class e{constructor(o,t,i){this.badge=null,this.labelSize=i;let n=document.createElement("div");if(this.content=document.createElement("div"),this.content.style.cssText=e.buildContentStyles(i),o){let r=document.createElement("span");r.style.cssText="display: block; font-weight: 500;",r.textContent=o,this.content.appendChild(r)}if(t){let r=document.createElement("span");r.style.cssText=`display: block; font-size: ${10*i}px; color: #666; margin-top: 1px;`,r.textContent=t,this.content.appendChild(r)}n.appendChild(this.content),this.cssObject=new sf(n),this.cssObject.center.set(.5,1)}getContentRect(){return this.content.getBoundingClientRect()}getContentElement(){return this.content}setOpacity(o){this.content.style.opacity=o}setTransform(o){this.content.style.transform=`translateY(${-20+o}px)`}setTransition(o){this.content.style.transition=o}setBadge(o){this.clearBadge(),this.badge=document.createElement("div"),this.badge.textContent=`+${o} more`,this.badge.style.cssText=`
3424
3432
  font-size: ${10*this.labelSize}px;
3425
3433
  color: #888;
3426
3434
  margin-top: 2px;
@@ -3443,30 +3451,30 @@ Fixed release issues
3443
3451
  transform: translateY(${-20}px);
3444
3452
  opacity: 0;
3445
3453
  transition: opacity 0.2s ease-out;
3446
- `}};var Xs=(()=>{class e{constructor(t){this.ccStateSnapshot=t}getValue(){return this.ccStateSnapshot.get()}isLabelsPerMapActive(){return ys(this.ccStateSnapshot.get())}static{this.\u0275fac=function(i){return new(i||e)(M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ks=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.labels=[],this.suppressedLabel=null}getLabels(){return this.labels}getSuppressedLabel(){return this.suppressedLabel}addLeafLabel(t,i,n=!1){let{mapState:r}=this.stateAccessStore.getValue(),{scaling:a,showMetricLabelNodeName:s,showMetricLabelNameValue:l,labelMode:d,labelSize:c}=r,{heightMetric:h,colorMetric:p}=r,u=new Qe(a.x,a.y,a.z),k="";if(s||n&&!l)k=t.name;else if(!l)return;let E="";if(l){let ie=d===Di.Color?p:h;E=`${t.attributes[ie]} ${ie}`}let N=new Gs(k,E,c),j=N.cssObject;j.userData={node:t};let ee=t.height+Math.abs(t.heightDelta??0),B=Math.max(ee,i),H=(t.x0-id+t.width/2)*u.x,G=(t.y0-id+t.length/2)*u.z;j.position.set(H,(t.z0+B)*u.y,G);let Z=new Qe(H,(t.z0+ee)*u.y,G);this.threeSceneService.labels.add(j),this.labels.push({labelElement:N,node:t,buildingTop:Z,appliedOffset:0})}clearLabels(){this.threeSceneService.labels.clear(),this.labels=[],this.suppressedLabel=null}clearTemporaryLabel(t){let i=this.labels.findIndex(({node:n})=>n===t);if(i>-1){let n=this.labels[i];n===this.suppressedLabel&&(this.suppressedLabel=null),this.threeSceneService.labels.remove(n.labelElement.cssObject),this.labels.splice(i,1)}}hasLabelForNode(t){return this.labels.some(i=>i.node===t)}suppressLabelForNode(t){this.restoreSuppressedLabel();let i=this.labels.find(n=>n.node===t);i&&(this.suppressedLabel=i,i.labelElement.setTransition("opacity 0.2s ease-out"),i.labelElement.setOpacity("0"))}restoreSuppressedLabel(){this.suppressedLabel&&(this.suppressedLabel.labelElement.setOpacity("1"),this.suppressedLabel=null)}static{this.\u0275fac=function(i){return new(i||e)(M(Xs),M(ft))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Qs=(()=>{class e{constructor(t,i){this.threeRendererService=t,this.threeSceneService=i,this.connectorSegments=null,this.connectorPositions=null,this.connectorsDirty=!0,this.lastDrawnVertexCount=0,this.projectionVec=new Qe}drawConnectors(t,i){this.connectorSegments||this.initConnectors();let n=this.threeRendererService.camera;if(!n)return;let r=this.threeRendererService.labelRenderer?.domElement,a=r?r.clientHeight:window.innerHeight;if(a===0)return;let s=this.connectorPositions,l=0;for(let d of t){if(d.hidden||d.offset>100||d.label===i)continue;let c=d.label.buildingTop,h=d.label.labelElement.cssObject.position;if(h.y-c.y<.5)continue;if(l>=400)break;this.projectionVec.copy(h).project(n);let u=-20+d.offset;this.projectionVec.y-=u*2/a,this.projectionVec.unproject(n);let k=l*3;s[k]=c.x,s[k+1]=c.y,s[k+2]=c.z,l++;let E=l*3;s[E]=this.projectionVec.x,s[E+1]=this.projectionVec.y,s[E+2]=this.projectionVec.z,l++}this.connectorSegments.geometry.setDrawRange(0,l),this.connectorSegments.geometry.attributes.position.needsUpdate=!0,l!==this.lastDrawnVertexCount&&(this.connectorsDirty=!0),this.lastDrawnVertexCount=l}clearConnectors(){this.connectorSegments&&this.connectorSegments.geometry.setDrawRange(0,0),this.connectorsDirty=!0,this.lastDrawnVertexCount=0}isDirty(){return this.connectorsDirty}markClean(){this.connectorsDirty=!1}destroy(){this.connectorSegments&&(this.connectorSegments.geometry.dispose(),this.connectorSegments.material.dispose(),this.threeSceneService.scene.remove(this.connectorSegments),this.connectorSegments=null,this.connectorPositions=null)}initConnectors(){let t=400;this.connectorPositions=new Float32Array(t*3);let i=new Gt;i.setAttribute("position",new ro(this.connectorPositions,3)),i.setDrawRange(0,0);let n=new ds({color:11842740,transparent:!0,opacity:.9,depthTest:!0});this.connectorSegments=new Cu(i,n),this.connectorSegments.frustumCulled=!1,this.threeSceneService.scene.add(this.connectorSegments)}static{this.\u0275fac=function(i){return new(i||e)(M(kt),M(ft))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ig=(()=>{class e{constructor(t,i,n,r,a){this.threeRendererService=t,this.tooltipService=i,this.labelCreationService=n,this.stateAccessStore=r,this.connectorDrawingService=a,this._suppressLayout=!1,this.threeRendererService.afterRender$.subscribe(()=>this.updateLabelLayout())}setSuppressLayout(t){this._suppressLayout=t}updateLabelLayout(){let t=this.labelCreationService.getLabels();if(this._suppressLayout||t.length===0){this.connectorDrawingService.clearConnectors(),this.clearBadges(t);return}this.clearBadges(t);let i=this.collectLabelInfos(t),n=this.tooltipService.getRect();this.resolveCollisions(i),this.resolveTooltipCollisions(i,n),this.applyCollisionOffsets(i);let r=this.labelCreationService.getSuppressedLabel();this.connectorDrawingService.drawConnectors(i,r),this.connectorDrawingService.isDirty()&&(this.connectorDrawingService.markClean(),this.threeRendererService.render())}destroy(){this.clearBadges(this.labelCreationService.getLabels()),this.labelCreationService.clearLabels(),this.connectorDrawingService.destroy()}clearBadges(t){for(let i of t)i.labelElement.clearBadge()}collectLabelInfos(t){let i=[];for(let n of t){let r=n.labelElement.getContentRect(),a={top:r.top-n.appliedOffset,bottom:r.bottom-n.appliedOffset,left:r.left,right:r.right,width:r.width,height:r.height,x:r.x,y:r.y-n.appliedOffset};i.push({label:n,rect:a,offset:0,hidden:!1})}return i}resolveCollisions(t){let{mapState:i}=this.stateAccessStore.getValue();if(!i.groupLabelCollisions)return;let n=this.labelCreationService.getSuppressedLabel(),r=t.filter(l=>l.label!==n);if(r.length===0)return;let a=this.buildCollisionGroups(r,this.stateAccessStore.isLabelsPerMapActive()),s=i.labelMode===Di.Color?i.colorMetric:i.heightMetric;for(let l of a){if(l.length<=1)continue;let d=this.pickGroupWinner(l,s);for(let c of l)c!==d&&(c.hidden=!0);d.label.labelElement.setBadge(l.length-1)}}buildCollisionGroups(t,i){let n=t.length,r=Array.from({length:n},(c,h)=>h),a=i?t.map(c=>ss(c.label.node.path)):void 0,s=c=>{for(;r[c]!==c;)r[c]=r[r[c]],c=r[c];return c},l=(c,h)=>{let p=s(c),u=s(h);p!==u&&(r[p]=u)};for(let c=0;c<n;c++)for(let h=c+1;h<n;h++)a!==void 0&&a[c]!==a[h]||this.rectsOverlap(t[c].rect,t[h].rect)&&l(c,h);let d=new Map;for(let c=0;c<n;c++){let h=s(c);d.has(h)||d.set(h,[]),d.get(h).push(t[c])}return[...d.values()]}rectsOverlap(t,i){return t.right>i.left&&t.left<i.right&&t.bottom>i.top&&t.top<i.bottom}pickGroupWinner(t,i){let n=t[0],r=n.label.node.attributes[i]??0;for(let a=1;a<t.length;a++){let s=t[a].label.node.attributes[i]??0;(s>r||s===r&&t[a].label.node.path<n.label.node.path)&&(r=s,n=t[a])}return n}resolveTooltipCollisions(t,i){if(!i)return;let n=12,r=i.left-n,a=i.right+n,s=i.top-n,l=i.bottom+n,d=this.labelCreationService.getSuppressedLabel();for(let c of t){if(c.hidden||c.label===d)continue;let h=c.rect.top+c.offset,p=c.rect.bottom+c.offset,u=c.rect.right>r&&c.rect.left<a,k=p>s&&h<l;if(u&&k){let E=l+4-h;E>0&&(c.offset+=E)}}}applyCollisionOffsets(t){let i=this.labelCreationService.getSuppressedLabel();for(let n of t){let r=n.label.labelElement,a=n.label===i;n.hidden||n.offset>100?(r.setOpacity("0"),r.setTransform(0),n.label.appliedOffset=0):(r.setOpacity(a?"0":"1"),r.setTransform(n.offset),n.label.appliedOffset=n.offset)}}static{this.\u0275fac=function(i){return new(i||e)(M(kt),M(Xn),M(Ks),M(Xs),M(Qs))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var og=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}setLabelMode(t){this.store.dispatch(En({value:t}))}setAmountOfTopLabels(t){this.store.dispatch(eo({value:t}))}setLabelSize(t){this.store.dispatch(kn({value:t}))}setLabelsPerMap(t){this.store.dispatch(qn({value:t}))}setShowMetricLabelNodeName(t){this.store.dispatch(Ln({value:t}))}setShowMetricLabelNameValue(t){this.store.dispatch(An({value:t}))}setColorLabels(t){this.store.dispatch(io({value:t}))}setGroupLabelCollisions(t){this.store.dispatch(yn({value:t}))}resetSettings(t){let i=Nf(t,this.ccStateSnapshot.get());i.mapState?.amountOfTopLabels!==void 0&&(i.mapState.amountOfTopLabels=10),this.store.dispatch(qi({value:i}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function k4(e,o){if(e&1){let t=xe();w(0,"div",5)(1,"input",17),K("change",function(){ae(t);let n=D();return se(n.setLabelsPerMap(!1))}),y(),w(2,"input",18),K("change",function(){ae(t);let n=D();return se(n.setLabelsPerMap(!0))}),y()()}if(e&2){let t=D();m(),le("checked",!t.labelsPerMap()),m(),le("checked",t.labelsPerMap())}}function q4(e,o){if(e&1){let t=xe();w(0,"div",14)(1,"span",19),f(2,"By Color Metric"),y(),w(3,"label",12)(4,"input",20),K("change",function(n){ae(t);let r=D();return se(r.setColorLabel(n,"positive"))}),y(),ue(5,"span",21),w(6,"span",22),f(7),y()(),w(8,"label",12)(9,"input",23),K("change",function(n){ae(t);let r=D();return se(r.setColorLabel(n,"neutral"))}),y(),ue(10,"span",21),w(11,"span",22),f(12),y()(),w(13,"label",12)(14,"input",24),K("change",function(n){ae(t);let r=D();return se(r.setColorLabel(n,"negative"))}),y(),ue(15,"span",21),w(16,"span",22),f(17),y()()()}if(e&2){let t=D();m(4),le("checked",t.colorLabels().positive)("disabled",t.colorCategoryCounts().positive===0),m(),Oe("background-color",t.mapColors().positive),m(2),he("(",t.colorCategoryCounts().positive,")"),m(2),le("checked",t.colorLabels().neutral)("disabled",t.colorCategoryCounts().neutral===0),m(),Oe("background-color",t.mapColors().neutral),m(2),he("(",t.colorCategoryCounts().neutral,")"),m(2),le("checked",t.colorLabels().negative)("disabled",t.colorCategoryCounts().negative===0),m(),Oe("background-color",t.mapColors().negative),m(2),he("(",t.colorCategoryCounts().negative,")")}}var qd=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.fileStoreReadWindow=q(Te),this.labelSettingsWriteStore=q(og),this.colorCategoryCountsStore=q(Qn),this.LabelMode=Di,this.MIN_LABEL_SIZE=.75,this.MAX_LABEL_SIZE=2.5,this.LABEL_SIZE_STEP=.25,this.resetSettingsKeys=["mapState.amountOfTopLabels","mapState.labelSize","mapState.showMetricLabelNodeName","mapState.showMetricLabelNameValue","mapState.colorLabels","mapState.labelMode","mapState.groupLabelCollisions","mapState.labelsPerMap"],this.amountOfTopLabels=R(this.mapStateReadWindow.amountOfTopLabels$,{requireSync:!0}),this.labelSize=R(this.mapStateReadWindow.labelSize$,{requireSync:!0}),this.showMetricLabelNodeName=R(this.mapStateReadWindow.showMetricLabelNodeName$,{requireSync:!0}),this.showMetricLabelNodeValue=R(this.mapStateReadWindow.showMetricLabelNameValue$,{requireSync:!0}),this.colorLabels=R(this.mapStateReadWindow.colorLabels$,{requireSync:!0}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.labelMode=R(this.mapStateReadWindow.labelMode$,{requireSync:!0}),this.colorCategoryCounts=R(this.colorCategoryCountsStore.colorCategoryCounts$,{requireSync:!0}),this.groupLabelCollisions=R(this.mapStateReadWindow.groupLabelCollisions$,{requireSync:!0}),this.labelsPerMap=R(this.mapStateReadWindow.labelsPerMap$,{requireSync:!0}),this.areMultipleMapsVisible=R(this.fileStoreReadWindow.areMultipleMapsVisible$,{requireSync:!0}),this.showColorLabels=X(()=>this.labelMode()===Di.Color&&!this.isDeltaState()),this.topLabelsTitle=X(()=>{let t=`Display the labels of the ${this.amountOfTopLabels()} highest buildings`;return this.labelsPerMap()&&this.areMultipleMapsVisible()?`${t} per map`:t}),this.applyDebouncedTopLabels=Ni(t=>{this.labelSettingsWriteStore.setAmountOfTopLabels(t)},e.DEBOUNCE_TIME),this.applyDebouncedLabelSize=Ni(t=>{this.labelSettingsWriteStore.setLabelSize(t)},e.DEBOUNCE_TIME)}static{this.DEBOUNCE_TIME=400}handleTopLabelsInput(t){let i=Bf(t,0,50,{round:!0});if(!Number.isNaN(i)){if(i===this.amountOfTopLabels()){this.applyDebouncedTopLabels.cancel();return}this.applyDebouncedTopLabels(i)}}handleLabelSizeInput(t){let i=Number.parseFloat(t.target.value);if(Number.isNaN(i))return;let n=Math.min(2.5,Math.max(.75,i)),r=Math.round(n/.25)*.25,a=Math.round(r*100)/100;if(a===this.labelSize()){this.applyDebouncedLabelSize.cancel();return}this.applyDebouncedLabelSize(a)}setShowMetricLabelNodeName(t){this.labelSettingsWriteStore.setShowMetricLabelNodeName(t.target.checked)}setShowMetricLabelNameValue(t){this.labelSettingsWriteStore.setShowMetricLabelNameValue(t.target.checked)}setColorLabel(t,i){this.labelSettingsWriteStore.setColorLabels({[i]:t.target.checked})}setLabelMode(t){this.labelSettingsWriteStore.setLabelMode(t)}setGroupLabelCollisions(t){this.labelSettingsWriteStore.setGroupLabelCollisions(t.target.checked)}setLabelsPerMap(t){this.labelSettingsWriteStore.setLabelsPerMap(t)}resetSettings(){this.labelSettingsWriteStore.resetSettings(this.resetSettingsKeys)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-label-settings-panel"]],hostAttrs:[1,"contents"],decls:33,vars:18,consts:[[3,"title"],[1,"text-sm"],[1,"flex","items-center","gap-2"],["type","range","min","0","max","50",1,"range","range-primary","range-sm","flex-1",3,"input","value"],["type","number","min","0","max","50",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value"],["aria-label","Top labels scope","title","Pick the top labels across all maps combined or separately for each map",1,"join","w-full"],["title","Scale floating label font size"],["type","range",1,"range","range-primary","range-sm","flex-1",3,"input","min","max","step","value"],["type","number",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","min","max","step","value"],["aria-label","Label mode",1,"join","w-full"],["type","radio","name","labelMode","aria-label","Height",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelMode","aria-label","Color",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],[1,"flex","flex-col","gap-1"],["title","Reset label settings to their defaults",1,"btn","btn-outline","btn-error","gap-2",3,"click"],[1,"fa","fa-undo"],["type","radio","name","labelsPerMap","aria-label","All maps",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelsPerMap","aria-label","Per map",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"text-xs","opacity-60","mb-0.5"],["type","checkbox","aria-label","positive color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],[1,"inline-block","w-4","h-4","rounded-sm"],[1,"text-xs","opacity-60"],["type","checkbox","aria-label","neutral color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["type","checkbox","aria-label","negative color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"span",1),f(2,"Top Labels"),y(),w(3,"div",2)(4,"input",3),K("input",function(a){return n.handleTopLabelsInput(a)}),y(),w(5,"input",4),K("input",function(a){return n.handleTopLabelsInput(a)}),y()()(),O(6,k4,3,2,"div",5),w(7,"div",6)(8,"span",1),f(9,"Label Size"),y(),w(10,"div",2)(11,"input",7),K("input",function(a){return n.handleLabelSizeInput(a)}),y(),w(12,"input",8),K("input",function(a){return n.handleLabelSizeInput(a)}),y()()(),w(13,"div",9)(14,"input",10),K("change",function(){return n.setLabelMode(n.LabelMode.Height)}),y(),w(15,"input",11),K("change",function(){return n.setLabelMode(n.LabelMode.Color)}),y()(),w(16,"label",12)(17,"input",13),K("change",function(a){return n.setShowMetricLabelNodeName(a)}),y(),w(18,"span"),f(19,"Show node names"),y()(),w(20,"label",12)(21,"input",13),K("change",function(a){return n.setShowMetricLabelNameValue(a)}),y(),w(22,"span"),f(23,"Show metric values"),y()(),w(24,"label",12)(25,"input",13),K("change",function(a){return n.setGroupLabelCollisions(a)}),y(),w(26,"span"),f(27,"Group overlapping labels"),y()(),O(28,q4,18,15,"div",14),w(29,"button",15),K("click",function(){return n.resetSettings()}),ue(30,"i",16),w(31,"span"),f(32,"Reset label settings"),y()()),i&2&&(le("title",n.topLabelsTitle()),m(4),le("value",n.amountOfTopLabels()),m(),le("value",n.amountOfTopLabels()),m(),z(n.areMultipleMapsVisible()?6:-1),m(5),le("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),m(),le("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),m(2),le("checked",n.labelMode()===n.LabelMode.Height),m(),le("checked",n.labelMode()===n.LabelMode.Color),m(2),le("checked",n.showMetricLabelNodeName()),m(4),le("checked",n.showMetricLabelNodeValue()),m(4),le("checked",n.groupLabelCollisions()),m(3),z(n.showColorLabels()?28:-1))},encapsulation:2,changeDetection:0})}}return e})();var Ys=(()=>{class e{constructor(t,i,n){this.labelCreationService=t,this.labelCollisionService=i,this.connectorDrawingService=n}addLeafLabel(t,i,n=!1){this.labelCreationService.addLeafLabel(t,i,n)}clearLabels(){this.labelCreationService.clearLabels(),this.connectorDrawingService.clearConnectors()}clearTemporaryLabel(t){this.labelCreationService.clearTemporaryLabel(t)}hasLabelForNode(t){return this.labelCreationService.hasLabelForNode(t)}suppressLabelForNode(t){this.labelCreationService.suppressLabelForNode(t)}restoreSuppressedLabel(){this.labelCreationService.restoreSuppressedLabel()}setSuppressLayout(t){this.labelCollisionService.setSuppressLayout(t)}destroy(){this.labelCollisionService.destroy(),this.connectorDrawingService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(M(Ks),M(ig),M(Qs))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var sg=(()=>{class e{constructor(t,i,n){this.codeMapStore=t,this.sharedViewReadWindow=i,this.threeSceneService=n,this.VERTICES_PER_LINE=5,this.arrows=new Array,this.HIGHLIGHT_BUILDING_DELAY=1,this.debounceCalculation=Ni(r=>this.resetEdgesOfBuildings(r),this.HIGHLIGHT_BUILDING_DELAY),this.hoveredNodeSubscription=this.sharedViewReadWindow.hoveredNodeId$.pipe(Pe(r=>{if(r!==null){let a=this.threeSceneService.getMapMesh()?.getMeshDescription().getBuildingByPath(r);this.onBuildingHovered(a)}else this.onBuildingUnhovered()})).subscribe(),this.resetEdgesOfBuildings=r=>{if(!this.codeMapStore.getMapState().isEdgeMetricVisible){this.scale();return}this.clearArrows(),this.showEdgesOfBuildings(this.isEdgeApplicableForBuilding(r)?r:void 0),this.scale()},this.onBuildingSelected=r=>{this.isEdgeApplicableForBuilding(r.building)&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()},this.onBuildingDeselected=()=>{this.debounceCalculation.cancel(),this.clearArrows(),this.addEdgePreview()},this.threeSceneService.subscribe("onBuildingSelected",this.onBuildingSelected),this.threeSceneService.subscribe("onBuildingDeselected",this.onBuildingDeselected)}ngOnDestroy(){this.hoveredNodeSubscription.unsubscribe()}onBuildingHovered(t){this.debounceCalculation(t)}onBuildingUnhovered(){this.debounceCalculation.cancel();let{isEdgeMetricVisible:t}=this.codeMapStore.getMapState();t&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()}clearArrows(){for(let t of this.arrows)t.traverse(i=>{i.geometry&&i.geometry.dispose(),i.material&&i.material.dispose()});this.arrows=[],this.threeSceneService.edgeArrows.children.length=0}addArrow(t,i,n){let r=this.codeMapStore.getMapState(),a=100*r.edgeHeight,s=this.createCurve(t,i,a),l=td.getNumber(r.mapColors[n?"outgoingEdge":"incomingEdge"]);this.highlightBuilding(n?i:t),this.setCurveColor(s,l)}addEdgePreview(){let t=this.codeMapStore.getEdgeVisibility();for(let i of t){let n=this.map.get(i.fromNodeName),r=this.map.get(i.toNodeName);if(n&&r&&i.visible!==oi.none&&i.visible){let a=100*this.codeMapStore.getMapState().edgeHeight,s=this.createCurve(n,r,a);this.previewMode(s,i.visible)}}}addEdgeMapBasedOnNodes(t){this.map=this.getNodesAsMap(t)}scale(){let{scaling:t}=this.codeMapStore.getMapState();for(let i of this.arrows)i.scale.x=t.x,i.scale.y=t.y,i.scale.z=t.z}isEdgeApplicableForBuilding(t){return this.codeMapStore.getMapState().isEdgeMetricVisible&&t&&!t.node.flat}showEdgesOfBuildings(t){let i=new Map,n=this.threeSceneService.getSelectedBuilding();if(n){let{node:r}=n;i.set(r.path,r)}if(t){let{node:r}=t;i.set(r.path,r)}i.size>0?this.buildPairingEdges(i):this.addEdgePreview()}buildPairingEdges(t){let{showIncomingEdges:i,showOutgoingEdges:n,edgeMetric:r}=this.codeMapStore.getMapState();if(!i&&!n)return;let a=this.codeMapStore.getEdges();for(let s of a){if(s.attributes[r]===void 0)continue;let l=this.map.get(s.fromNodeName);if(l===void 0)continue;let d=this.map.get(s.toNodeName);d!==void 0&&(n&&t.has(l.path)?(this.addArrow(l,d,!0),this.threeSceneService.applyHighlights()):i&&t.has(d.path)&&(this.addArrow(l,d,!1),this.threeSceneService.applyHighlights()))}}createCurve(t,i,n){let r=t.outgoingEdgePoint.clone(),a=i.incomingEdgePoint.clone(),s=Math.max(r.y+i.height,a.y+1)+n;return r.setY(s),a.setY(s),new Mu(t.outgoingEdgePoint,r,a,i.incomingEdgePoint)}highlightBuilding(t){let i=this.threeSceneService.getMapMesh().getMeshDescription().getBuildingByPath(t.path);this.threeSceneService.addBuildingsToHighlightingList(i)}setCurveColor(t,i,n=50){let r=t.getPoints(n),a=this.buildLine(r,i);a.add(this.buildArrow(r)),this.threeSceneService.edgeArrows.add(a),this.arrows.push(a)}previewMode(t,i){if(i===oi.both||i===oi.from){let n=this.makeArrowFromBezier(t,!1);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}if(i===oi.both||i===oi.to){let n=this.makeArrowFromBezier(t,!0);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}}getNodesAsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}makeArrowFromBezier(t,i,n=50){let r=t.getPoints(n),{incomingEdge:a,outgoingEdge:s}=this.codeMapStore.getMapState().mapColors,l=i?a:s,d=i?r.slice(n+1-this.VERTICES_PER_LINE):r.slice(0,r.length-(n+1-this.VERTICES_PER_LINE));return this.buildEdge(d,td.getNumber(l))}buildEdge(t,i){let n=this.buildLine(t,i);return n.add(this.buildArrow(t)),n}buildLine(t,i=0){let n=new Gt;n.setFromPoints(t);let r=new ds({color:i,linewidth:1});return new yu(n,r)}buildArrow(t,i=0,n=10,r=10){let a=t.at(-1).clone().sub(t.at(-2).clone()).normalize(),s=t.at(-1).clone();return a.y<0&&(s.y+=n+1),new Tu(a,s,n+1,i,n,r)}static{this.\u0275fac=function(i){return new(i||e)(M(lr),M(Bt),M(ft))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var lg=(()=>{class e{constructor(){this.mapControls=q(Wt)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-toolbox-center-map-button"]],decls:2,vars:0,consts:[["type","button","title","Center map","aria-label","Center map",1,"join-item","btn","btn-sm","btn-square",3,"click"],[1,"fa","fa-compass"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.mapControls.autoFitTo()}),ue(1,"i",1),y())},encapsulation:2,changeDetection:0})}}return e})();var cg=(()=>{class e{constructor(t){this.store=t}setPresentationMode(t){this.store.dispatch(tf({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var dg=(()=>{class e{constructor(){this.preferencesReadWindow=q(Zn),this.viewCubeToolboxWriteStore=q(cg),this.isPresentationMode=R(this.preferencesReadWindow.isPresentationMode$,{requireSync:!0}),this.tooltip=X(()=>this.isPresentationMode()?"Disable flashlight hover effect":"Enable flashlight hover effect")}handleToggle(){this.viewCubeToolboxWriteStore.setPresentationMode(!this.isPresentationMode())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-toolbox-presentation-mode-button"]],decls:2,vars:3,consts:[["type","button","aria-label","Presentation mode",1,"join-item","btn","btn-sm","btn-square",3,"click","title"],[1,"fa","fa-lightbulb-o"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.handleToggle()}),ue(1,"i",1),y()),i&2&&(Ne("btn-active",n.isPresentationMode()),le("title",n.tooltip()))},encapsulation:2,changeDetection:0})}}return e})();var Td=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-view-cube-toolbox"]],features:[Zi([{provide:Gf,useExisting:Kf}])],decls:4,vars:0,consts:[[1,"join","shadow-md","absolute","top-0","left-1/2","-translate-x-1/2","bg-base-100","rounded"],["view","metrics"]],template:function(i,n){i&1&&(v(0,"div",0),F(1,"cc-toolbox-center-map-button")(2,"cc-toolbox-screenshot-button",1)(3,"cc-toolbox-presentation-mode-button"),b())},dependencies:[lg,Xf,dg],encapsulation:2,changeDetection:0})}}return e})();var fo=()=>new ps({color:16580095}),Vo=()=>new ps({color:16580095}),jr=()=>new ps({color:16580095});var Zs=class e{static buildCube(o){let t=1/o,i=(1-t)/2,n=new ao(t,i,i),r=new ao(i,t+i,i),a=new ao(i,i,i),s=new ao(t,t,i),l=new ao(t,t+i,i);return e.newBuildCubeGroup(n,r,a,s,l)}static newBuildCubeGroup(o,t,i,n,r){let a=new zn,{group:s,frontLeft:l,frontCenter:d,frontRight:c,middleLeft:h,middleCenter:p,middleRight:u,backLeft:k,backCenter:E,backRight:N}=e.buildCubeTopFace(o,i,n);a.add(s);let{group:j,frontLeftEdge:ee,frontCenterFace:B,frontRightEdge:H,middleLeftFace:G,middleRightFace:Z,backLeftEdge:ie,backCenterFace:oe,backRightEdge:ne}=e.buildCubeSides(t,r);return a.add(j),{group:a,top:{front:{left:l,center:d,right:c},middle:{left:h,center:p,right:u},back:{left:k,center:E,right:N}},sides:{front:{left:ee,center:B,right:H},middle:{left:G,right:Z},back:{left:ie,center:oe,right:ne}}}}static buildCubeTopFace(o,t,i){let n=new lt(t,jr()),r=new lt(o,fo()),a=new lt(t,jr()),s=new lt(o,fo()),l=new lt(i,Vo()),d=new lt(o,Vo()),c=new lt(t,jr()),h=new lt(o,fo()),p=new lt(t,jr()),u=i.parameters.height/2+t.parameters.height/2;n.position.x-=u,n.position.y-=u,r.position.y-=u,a.position.x+=u,a.position.y-=u,s.position.x-=u,s.rotation.z=Math.PI/2,d.position.x+=u,d.rotation.z=Math.PI/2,c.position.x-=u,c.position.y+=u,h.position.y+=u,p.position.x+=u,p.position.y+=u;let k=new zn;return k.rotation.x=Math.PI/2,k.position.y+=u,k.add(n),k.add(r),k.add(a),k.add(s),k.add(l),k.add(d),k.add(c),k.add(h),k.add(p),{group:k,frontLeft:n,frontCenter:r,frontRight:a,middleLeft:s,middleCenter:l,middleRight:d,backLeft:c,backCenter:h,backRight:p}}static buildCubeSides(o,t){let i=new lt(o,fo()),n=new lt(t,Vo()),r=new lt(o,fo()),a=new lt(t,Vo()),s=new lt(t,Vo()),l=new lt(o,fo()),d=new lt(t,Vo()),c=new lt(o,fo()),h=t.parameters.width/2+o.parameters.width/2,p=o.parameters.width/2;i.position.x-=h,i.position.z+=h,n.position.z+=h,r.position.x+=h,r.position.z+=h,a.position.x-=h,a.rotation.y=Math.PI/2,s.position.x+=h,s.rotation.y=Math.PI/2,l.position.x-=h,l.position.z-=h,d.position.z-=h,c.position.x+=h,c.position.z-=h;let u=new zn;return u.position.y-=p,u.add(i),u.add(n),u.add(r),u.add(a),u.add(s),u.add(l),u.add(d),u.add(c),{group:u,frontLeftEdge:i,frontCenterFace:n,frontRightEdge:r,middleLeftFace:a,middleRightFace:s,backLeftEdge:l,backCenterFace:d,backRightEdge:c}}};var mg=(()=>{class e{constructor(t,i){this.threeMapControlsService=t,this.cdr=i}ngOnInit(){this.maxZoom=this.threeMapControlsService.MAX_ZOOM,this.minZoom=this.threeMapControlsService.MIN_ZOOM,this.threeMapControlsService.zoomPercentage$.subscribe(t=>{this.zoomPercentage=t,this.cdr.detectChanges()})}onInput(t){let i=t.target,n=Number.parseFloat(i.value);this.threeMapControlsService.setZoomPercentage(n)}zoomIn(){this.threeMapControlsService.setZoomPercentage(Math.min(this.zoomPercentage+10,this.maxZoom))}zoomOut(){this.threeMapControlsService.setZoomPercentage(Math.max(this.zoomPercentage-10,this.minZoom))}static{this.\u0275fac=function(i){return new(i||e)(te(Wt),te(pn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-zoom-slider"]],decls:8,vars:4,consts:[[1,"absolute","right-[5px]","top-[10px]","m-2.5","flex","h-[150px]","flex-col","items-center","gap-2.5"],["data-testid","zoomIn",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["type","range","id","zoomRange","data-testid","zoomRange","aria-label","Zoom level",1,"h-[100px]","w-[3px]","appearance-none","bg-neutral-500","text-neutral-500","opacity-70","outline-none","transition-opacity","duration-200","[-webkit-appearance:none]","[direction:rtl]","[writing-mode:vertical-lr]","[&::-moz-range-thumb]:h-[3px]","[&::-moz-range-thumb]:w-[10px]","[&::-moz-range-thumb]:cursor-pointer","[&::-moz-range-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:h-[3px]","[&::-webkit-slider-thumb]:w-[10px]","[&::-webkit-slider-thumb]:cursor-pointer","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:[-webkit-appearance:none]",3,"input","min","max","value"],["data-testid","zoomOut",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["id","zoomValue",1,"w-[30px]","text-center","text-[10px]","text-neutral-500"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.zoomIn()}),f(2," + "),y(),w(3,"input",2),K("input",function(a){return n.onInput(a)}),y(),w(4,"button",3),K("click",function(){return n.zoomOut()}),f(5," - "),y(),w(6,"span",4),f(7),y()()),i&2&&(m(3),le("min",n.minZoom)("max",n.maxZoom)("value",n.zoomPercentage),m(4),he("",n.zoomPercentage==null?null:n.zoomPercentage.toFixed(0),"%"))},encapsulation:2,changeDetection:0})}}return e})();var Hr=(()=>{class e{constructor(t){this.threeMapControlsService=t,this.eventEmitter=new Qu,this.currentlyHovered=null,this.isDragging=!1}init(t,i,n){this.cubeGroup=t,this.camera=i,this.renderer=n,this.initOrbitalControl(i,n),this.initRendererEventListeners(n)}resetIsDragging(){this.isDragging=!1}initOrbitalControl(t,i){this.controls=new Cs(t,i.domElement),this.controls.maxPolarAngle=Math.PI/2,this.controls.enableZoom=!1,this.controls.enablePan=!1,this.controls.rotateSpeed=1}initRendererEventListeners(t){t.domElement.addEventListener("mousemove",i=>this.onDocumentMouseMove(i)),t.domElement.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.domElement.addEventListener("mousedown",i=>this.onDocumentMouseClick(i,"mousedown")),t.domElement.addEventListener("dblclick",i=>this.onDocumentMouseClick(i,"dblclick")),t.domElement.addEventListener("mouseleave",i=>this.onWindowMouseLeave(i)),t.domElement.addEventListener("mouseenter",()=>this.onDocumentMouseEnter())}onDocumentMouseClick(t,i){this.isDragging=!0,this.checkMouseIntersection(t,i)}onWindowMouseLeave(t){(t.relatedTarget==null||!(t.relatedTarget instanceof HTMLCanvasElement))&&this.enableRotation(!1)}onDocumentMouseEnter(){this.enableRotation(!0)}enableRotation(t){this.controls.enableRotate=t}checkMouseIntersection(t,i){this.getCubeIntersectedByMouse(t)||this.eventEmitter.emit("viewCubeEventPropagation",{type:i,event:t})}getCubeIntersectedByMouse(t){let i=this.transformIntoCanvasVector(t),n=new us;n.setFromCamera(i,this.camera);let r=[];for(let s of Ji(this.cubeGroup))bi(s)&&r.push(s.data);let[a]=n.intersectObjects(r);return a?a.object:null}transformIntoCanvasVector(t){let{domElement:i}=this.renderer,n=this.renderer.getPixelRatio(),r=i.getBoundingClientRect(),a=(t.clientX-r.left)/i.width*n*2-1,s=-((t.clientY-r.top)/i.height*n)*2+1;return new Ge(a,s)}propagateMovement(){if(this.isDragging){let t=this.camera.position;this.threeMapControlsService.rotateCameraInVectorDirection(-t.x,-t.y,-t.z)}return this.isDragging}onDocumentMouseMove(t){if(this.propagateMovement())return;let i=this.getCubeIntersectedByMouse(t);i?this.currentlyHovered&&i.uuid!==this.currentlyHovered.uuid?this.triggerViewCubeUnhoverEvent():this.currentlyHovered||this.triggerViewCubeHoverEvent(i):(this.currentlyHovered&&this.triggerViewCubeUnhoverEvent(),this.eventEmitter.emit("viewCubeEventPropagation",{type:"mousemove",event:t}))}onDocumentMouseUp(t){this.isDragging=!1;let i=this.getCubeIntersectedByMouse(t);i?this.eventEmitter.emit("viewCubeClicked",{cube:i}):this.eventEmitter.emit("viewCubeEventPropagation",{type:"mouseup",event:t})}triggerViewCubeHoverEvent(t){this.currentlyHovered=t,Ei(_i.Pointer),this.eventEmitter.emit("viewCubeHoveredEvent",{cube:t})}triggerViewCubeUnhoverEvent(){this.currentlyHovered=null,Ei(_i.Default),this.eventEmitter.emit("viewCubeUnHoveredEvent")}subscribe(t,i){this.eventEmitter.on(t,n=>{i(n)})}static{this.\u0275fac=function(i){return new(i||e)(M(Wt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Id=(()=>{class e{constructor(t,i,n){this.elementReference=t,this.threeMapControlsService=i,this.viewCubeMouseEvents=n,this.WIDTH=200,this.HEIGHT=200,this.LENGTH_VIEWCUBE=1,this.hoverInfo={cube:null,originalMaterial:null},this.cubeDefinition={top:null,sides:null},this.onCameraChanged=r=>{let a=this.calculateCameraPosition(r.camera);this.setCameraPosition(a),this.renderer.render(this.scene,this.camera)},this.onCubeHovered=r=>{this.hoverInfo={cube:r.cube,originalMaterial:r.cube.material},this.hoverInfo.cube.material.emissive=new On(16777215),this.renderer.render(this.scene,this.camera)},this.onCubeUnhovered=()=>{this.hoverInfo.cube.material.emissive=new On(0),this.hoverInfo.cube=null,this.renderer.render(this.scene,this.camera)},this.onCubeClicked=r=>{switch(r.cube){case this.cubeDefinition.top.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,1);break;case this.cubeDefinition.top.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,1);break;case this.cubeDefinition.top.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,1);break;case this.cubeDefinition.top.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,0);break;case this.cubeDefinition.top.middle.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,0);break;case this.cubeDefinition.top.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,0);break;case this.cubeDefinition.top.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,-1);break;case this.cubeDefinition.top.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,-1);break;case this.cubeDefinition.top.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,-1);break;case this.cubeDefinition.sides.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,-1);break;case this.cubeDefinition.sides.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,0);break;case this.cubeDefinition.sides.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,-1);break;case this.cubeDefinition.sides.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,0);break;case this.cubeDefinition.sides.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,0);break;case this.cubeDefinition.sides.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,1);break;case this.cubeDefinition.sides.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,1);break;case this.cubeDefinition.sides.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,1);break}}}ngOnInit(){this.initScene(),this.initLights(),this.initRenderer(this.elementReference.nativeElement),this.initCube(),this.initAxesHelper(),this.initCamera(),this.viewCubeMouseEvents.init(this.cubeGroup,this.camera,this.renderer),this.threeMapControlsService.subscribe("onCameraChanged",this.onCameraChanged),this.viewCubeMouseEvents.subscribe("viewCubeHoveredEvent",this.onCubeHovered),this.viewCubeMouseEvents.subscribe("viewCubeUnHoveredEvent",this.onCubeUnhovered),this.viewCubeMouseEvents.subscribe("viewCubeClicked",this.onCubeClicked)}initAxesHelper(){let t=new Iu(1.3),i=-(this.LENGTH_VIEWCUBE/2)+.01;t.position.x+=i,t.position.y+=i,t.position.z+=i,this.scene.add(t)}initCube(){let{group:t,top:i,sides:n}=Zs.buildCube(1.9);this.cubeGroup=t,this.cubeDefinition.top=i,this.cubeDefinition.sides=n;let r=new qu(this.cubeGroup,new On(0));this.scene.add(this.cubeGroup),this.scene.add(r)}setCameraPosition(t){this.camera.position.set(t.x,t.y,t.z),this.camera.lookAt(0,0,0),this.camera.updateProjectionMatrix()}calculateCameraPosition(t){let i=this.threeMapControlsService.controls.target.clone();return t.position.clone().sub(i).normalize().multiplyScalar(3)}initScene(){this.scene=new cs}initRenderer(t){this.renderer=new fs({alpha:!0,antialias:!0}),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.renderer.setPixelRatio(window.devicePixelRatio),t.appendChild(this.renderer.domElement)}initCamera(){this.camera=new ls(45,this.WIDTH/this.HEIGHT,.1,1e3),this.camera.position.z=4}initLights(){this.lights=new zn;let t=new Eu(7368816,2.8),i=new ed(14737632,1.8);i.position.set(50,10,8).normalize();let n=new ed(14737632,1.8);n.position.set(-50,10,-8).normalize(),this.lights.add(t),this.lights.add(i),this.lights.add(n),this.scene.add(this.lights)}static{this.\u0275fac=function(i){return new(i||e)(te(Lt),te(Wt),te(Hr))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-view-cube"]],hostAttrs:[1,"absolute","right-0","top-[10px]","z-[11]","[transition:right_0.3s_ease]","[&.sideBarVisible]:right-[var(--cc-inspector-width)]"],decls:2,vars:0,template:function(i,n){i&1&&F(0,"cc-view-cube-toolbox")(1,"cc-zoom-slider")},dependencies:[Td,mg],encapsulation:2,changeDetection:0})}}return e})();var Js=(function(e){return e[e.LeftClick=0]="LeftClick",e[e.RightClick=2]="RightClick",e})(Js||{}),Wo=(()=>{class e{constructor(t,i,n,r,a,s,l,d,c,h,p){this.threeCameraService=t,this.threeRendererService=i,this.threeSceneService=n,this.codeMapStore=r,this.fileStoreReadWindow=a,this.sharedViewReadWindow=s,this.labelSettingsFacade=l,this.tooltipService=d,this.viewCubeMouseEvents=c,this.threeViewerService=h,this.idToBuilding=p,this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING=3,this.mouse={x:0,y:0},this.oldMouse={x:0,y:0},this.mouseOnLastClick={x:0,y:0},this.isGrabbing=!1,this.isMoving=!1,this.raycaster=new us,this.labelSelectedBuilding=null,this.subscriptions=[this.fileStoreReadWindow.visibleFileStates$.pipe(Pe(()=>this.onFilesSelectionChanged())).subscribe(),this.sharedViewReadWindow.blacklist$.pipe(Pe(u=>this.onBlacklistChanged(u))).subscribe(),this.sharedViewReadWindow.hoveredNodeId$.pipe(Pe(u=>{u!==null?this.hoverNode(u):this.unhoverNode(!1)})).subscribe()],this.onViewCubeEventPropagation=u=>{switch(u.type){case"mousemove":this.onDocumentMouseMove(u.event);break;case"mouseup":this.onDocumentMouseUp(u.event);break;case"mousedown":this.onDocumentMouseDown(u.event);break;case"dblclick":this.onDocumentDoubleClick();break}},this.onDocumentMouseMove=u=>{this.mouse.x=u.clientX,this.mouse.y=u.clientY,this.updateHovering(),this.viewCubeMouseEvents.propagateMovement()}}ngOnDestroy(){for(let t of this.subscriptions)t.unsubscribe()}start(){this.registerEventListeners(),this.viewCubeMouseEvents.subscribe("viewCubeEventPropagation",this.onViewCubeEventPropagation)}registerEventListeners(){let t=this.threeRendererService.renderer.domElement;t.addEventListener("mousemove",this.onDocumentMouseMove),t.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.addEventListener("mousedown",i=>this.onDocumentMouseDown(i)),t.addEventListener("dblclick",()=>this.onDocumentDoubleClick()),t.addEventListener("mouseleave",i=>this.onDocumentMouseLeave(i)),t.addEventListener("mouseenter",()=>this.onDocumentMouseEnter()),t.addEventListener("wheel",Ni(()=>this.threeRendererService.render()))}hoverNode(t){if(this.isGrabbingOrMoving())return;let{buildings:i}=this.threeSceneService.getMapMesh().getMeshDescription();for(let n of i)if(n.node.path===t){this.hoverBuilding(n,!1);break}this.threeRendererService.render()}unhoverNode(t=!0){this.unhoverBuilding(t),this.threeRendererService.render()}onFilesSelectionChanged(){this.threeSceneService.clearSelection(),this.threeSceneService.clearConstantHighlight(),this.tooltipService.hide()}onBlacklistChanged(t){let i=this.threeSceneService.getSelectedBuilding();this.tooltipService.hide(),i&&Ep(i.node.path,t)&&this.threeSceneService.clearSelection(),this.unhoverBuilding()}updateHovering(){if(this.hasMouseMoved(this.oldMouse)){if(this.isGrabbingOrMoving()){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.threeRendererService.render();return}this.oldMouse.x=this.mouse.x,this.oldMouse.y=this.mouse.y;let t=this.threeSceneService.getMapMesh();if(t){this.threeCameraService.camera.updateMatrixWorld(!1);let i=this.transformHTMLToSceneCoordinates(),n=this.threeCameraService.camera;n.isPerspectiveCamera&&this.raycaster.setFromCamera(i,n),this.intersectedBuilding=t.checkMouseRayMeshIntersection(i,n);let r=this.threeSceneService.getHighlightedBuilding(),a=this.intersectedBuilding;r?.id!==a?.id?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),r&&a&&!this.isGrabbingOrMoving()?(this.threeSceneService.prepareHighlightTransition(),this.showTooltipForBuilding(a),this.hoverBuilding(a)):(this.unhoverBuilding(),a&&!this.isGrabbingOrMoving()&&(this.showTooltipForBuilding(a),this.hoverBuilding(a)))):!a&&this.codeMapStore.getHoveredNodeId()!==null?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding()):a&&this.tooltipService.isVisible()&&this.tooltipService.updatePosition(this.mouse.x,this.mouse.y)}}}drawLabelSelectedBuilding(t){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.labelSelectedBuilding!==null&&this.labelSettingsFacade.clearTemporaryLabel(this.labelSelectedBuilding),t?.node?.isLeaf&&(this.labelSettingsFacade.hasLabelForNode(t.node)||this.labelSettingsFacade.addLeafLabel(t.node,0,!0),this.labelSelectedBuilding=t.node)}showTooltipForBuilding(t){this.labelSettingsFacade.hasLabelForNode(t.node)&&this.labelSettingsFacade.suppressLabelForNode(t.node),this.tooltipService.show(t.node,this.mouse.x,this.mouse.y)}clearLabelSelectedBuilding(){this.labelSelectedBuilding!==null&&(this.labelSettingsFacade.clearTemporaryLabel(this.labelSelectedBuilding),this.labelSelectedBuilding=null)}enableOrbitalsRotation(t){this.threeViewerService.enableRotation(t),this.viewCubeMouseEvents.enableRotation(t)}onDocumentMouseEnter(){this.enableOrbitalsRotation(!0)}onDocumentMouseLeave(t){this.labelSettingsFacade.setSuppressLayout(!1),this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding(),t.relatedTarget instanceof HTMLCanvasElement||this.enableOrbitalsRotation(!1)}onDocumentDoubleClick(){let t=this.threeSceneService.getHighlightedBuilding(),i=this.threeSceneService.getSelectedBuilding(),n=t?.node.link;if(n&&!this.hasMouseMoved(this.mouseOnLastClick)&&window.open(n,"_blank"),i?.node.isLeaf){let r=i.node.link;if(r){window.open(r,"_blank");return}}}onDocumentMouseDown(t){t.button===Js.RightClick&&(this.isMoving=!0,Ei(_i.Moving)),t.button===Js.LeftClick&&(this.isGrabbing=!0,Ei(_i.Grabbing)),this.labelSettingsFacade.setSuppressLayout(!0),this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.mouseOnLastClick={x:t.clientX,y:t.clientY},document.activeElement.blur()}onDocumentMouseUp(t){this.labelSettingsFacade.setSuppressLayout(!1),this.viewCubeMouseEvents.resetIsDragging(),t.button===Js.LeftClick?this.onLeftClick():this.onRightClick(),this.intersectedBuilding!==void 0?Ei(_i.Pointer):Ei(_i.Default)}onRightClick(){this.isMoving=!1,this.intersectedBuilding&&!this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)&&this.codeMapStore.setRightClickedNodeData({nodeId:this.intersectedBuilding.node.path,xPositionOfRightClickEvent:this.mouse.x,yPositionOfRightClickEvent:this.mouse.y,origin:"codeMap"}),this.threeRendererService.render()}onLeftClick(){this.isGrabbing=!1,this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)||(this.intersectedBuilding?(this.threeSceneService.selectBuilding(this.intersectedBuilding),this.drawLabelSelectedBuilding(this.intersectedBuilding)):(this.threeSceneService.clearSelection(),this.clearLabelSelectedBuilding()),this.threeSceneService.clearConstantHighlight()),this.threeRendererService.render()}hasMouseMovedBeyondThreshold({x:t,y:i}){return Math.abs(this.mouse.x-t)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING||Math.abs(this.mouse.y-i)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING}hasMouseMoved({x:t,y:i}){return this.mouse.x!==t||this.mouse.y!==i}isGrabbingOrMoving(){return this.isGrabbing||this.isMoving}hoverBuilding(t,i=!0){Ei(_i.Pointer);let r=this.codeMapStore.getIdToNode().get(t.node.id);for(let{data:a}of Ji(r)){let s=this.idToBuilding.get(a.id);s&&this.threeSceneService.addBuildingsToHighlightingList(s)}this.threeSceneService.applyHighlights(),i&&this.codeMapStore.setHoveredNodeId(t.node.path)}transformHTMLToSceneCoordinates(){let{renderer:t,renderer:{domElement:i}}=this.threeRendererService,n=t.getPixelRatio(),r=i.getBoundingClientRect(),a=this.mouse.x/i.width*n*2-1,s=-((this.mouse.y-r.top)/i.height*n)*2+1;return{x:a,y:s}}unhoverBuilding(t=!0){this.isGrabbingOrMoving()||Ei(_i.Default),this.threeSceneService.getConstantHighlight().size>0?this.threeSceneService.clearHoverHighlight():this.threeSceneService.clearHighlight(),t&&this.codeMapStore.setHoveredNodeId(null)}static{this.\u0275fac=function(i){return new(i||e)(M(Yn),M(kt),M(ft),M(lr),M(Te),M(Bt),M(Ys),M(Xn),M(Hr),M(Jn),M(Kn))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var D4=2,Ur=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.codeMapStore=t,this.fileStoreReadWindow=i,this.threeSceneService=n,this.labelSettingsFacade=r,this.codeMapArrowService=a,this.threeStatsService=s,this.codeMapMouseEventService=l,this.colorCategoryCountsStore=d,this.nodesByColor={positive:[],neutral:[],negative:[]},this.onIsLoadingFileChanged=c=>{c?this.threeSceneService?.dispose():this.threeStatsService?.resetPanels()},this.subscription=this.fileStoreReadWindow.isLoadingFile$.pipe(Pe(this.onIsLoadingFileChanged)).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}load(t){this.render(t),this.scaleMap()}render(t){let i=this.getNodes(t),n=this.sortVisibleNodesByHeightDescending(i);this.unflattenedNodes=n.filter(({flat:r})=>!r),this.setNewMapMesh(i,n),this.getNodesMatchingColorSelector(this.unflattenedNodes),this.setLabels(this.unflattenedNodes),this.setArrows(n)}setNewMapMesh(t,i){let n=this.codeMapStore.getState(),r=new Ku(i,n,Ai(n.files));this.threeSceneService.setMapMesh(t,r)}scaleMap(){this.codeMapMouseEventService.unhoverNode(),this.codeMapArrowService.scale(),this.threeSceneService.scaleHeight(),this.labelSettingsFacade.clearLabels(),this.setLabels(this.unflattenedNodes)}getNodes(t){let i=this.codeMapStore.getState(),n=so(i),{mapState:{layoutAlgorithm:r},files:a}=i,s=Ai(a);switch(r){case ja.StreetMap:case ja.TreeMapStreet:return Uu.createStreetLayoutNodes(t,i,n,lu(i),s);case ja.SquarifiedTreeMap:return Gu(t,i,n,s);default:return[]}}sortVisibleNodesByHeightDescending(t){return this.codeMapStore.getState().preferences.experimentalFeaturesEnabled?(this.setMinBuildingLength(t),t.filter(n=>n.visible&&n.width>0).sort((n,r)=>r.height-n.height)):t.filter(n=>n.visible&&n.length>0&&n.width>0).sort((n,r)=>r.height-n.height)}setMinBuildingLength(t){for(let i of t)i.length<=0&&(i.length=D4)}getNodesMatchingColorSelector(t){let i=this.codeMapStore.getState(),n=i.mapState.colorRange;this.nodesByColor={positive:[],negative:[],neutral:[]};for(let r of t)if(r.isLeaf){let a=r.attributes[i.mapState.colorMetric];i.mapState.colorMetric==="unary"?this.nodesByColor.positive.push(r):a!==null&&(a<n.from?this.nodesByColor.positive.push(r):a<n.to?this.nodesByColor.neutral.push(r):this.nodesByColor.negative.push(r))}this.colorCategoryCountsStore.setColorCategoryCounts({positive:this.nodesByColor.positive.length,neutral:this.nodesByColor.neutral.length,negative:this.nodesByColor.negative.length}),this.uncheckEmptyColorLabels()}uncheckEmptyColorLabels(){let t=this.codeMapStore.getState().mapState.colorLabels,i={};for(let n of Kc)t[n]&&this.nodesByColor[n].length===0&&(i[n]=!1);Object.keys(i).length>0&&this.codeMapStore.setColorLabels(i)}setBuildingLabel(t,i){for(let n of t)this.labelSettingsFacade.addLeafLabel(n,i)}setLabels(t){if(this.labelSettingsFacade.clearLabels(),t===void 0||t.length===0)return;let i=this.codeMapStore.getState(),{showMetricLabelNodeName:n,showMetricLabelNameValue:r,colorLabels:a,amountOfTopLabels:s,labelMode:l}=i.mapState;if(n||r){let d=t[0].height,c=this.getTopNodeSelector(i,s);if(l===Di.Color){let{colorMetric:h}=i.mapState,p=c(Kc.filter(u=>a[u]).flatMap(u=>this.nodesByColor[u]).filter(u=>Number.isFinite(u.attributes[h])),u=>u.attributes[h]);this.setBuildingLabel(p,d)}else{let h=c(t.filter(p=>p.isLeaf),p=>p.height??0);this.setBuildingLabel(h,d)}}}getTopNodeSelector(t,i){return ys(t)?(n,r)=>X0(n,a=>ss(a.path),r,i):(n,r)=>Cd(n,r,i)}setArrows(t){this.codeMapArrowService.clearArrows(),this.codeMapArrowService.addEdgeMapBasedOnNodes(t),this.codeMapArrowService.addEdgePreview()}static{this.\u0275fac=function(i){return new(i||e)(M(lr),M(Te),M(ft),M(Ys),M(sg),M(lf),M(Wo),M(Qn))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var F4=1e3/60,el=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.store=t,this.actions$=i,this.threeRendererService=n,this.codeMapRenderService=r,this.threeViewerService=a,this.activeViewStore=s,this.viewReadinessStore=l,this.errorHandler=d,this.actionsRequiringRender$=this.actions$.pipe(st(...U0)),this.mapDataChange$=St([this.store.select(Et),this.actionsRequiringRender$]).pipe(ke(([c])=>c)),this.dataChangedWhileMetricsViewIsShown$=this.mapDataChange$.pipe(ei(this.activeViewStore.activeView$),Re(([,c])=>c==="metrics"),ke(([c])=>c)),this.switchedToStaleMetricsView$=this.activeViewStore.activeView$.pipe(Re(c=>c==="metrics"&&this.viewReadinessStore.isStale("metrics")),Ut(()=>this.threeViewerService.isMapCanvasMounted$.pipe(Re(Boolean),ut(1))),ei(this.store.select(Et)),ke(([,c])=>c)),this.renderCodeMap$=Fe(()=>Gi(this.dataChangedWhileMetricsViewIsShown$,this.switchedToStaleMetricsView$).pipe(Re(c=>!!c.unifiedMapNode),$h(F4,Nh,{leading:!1,trailing:!0}),Pe(c=>this.renderMap(c)),Xi()),{dispatch:!1})}renderMap(t){try{this.codeMapRenderService.load(t.unifiedMapNode),this.threeRendererService.render()}catch(i){this.errorHandler.handleError(i)}finally{Is()}}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(mt),M(kt),M(Ur),M(Jn),M(rr),M(or),M(jh))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var N4=350,pg=(()=>{class e{constructor(t,i,n,r){this.store=t,this.actions$=i,this.renderCodeMapEffect=n,this.viewReadinessStore=r,this.hideLoadingFileOnCommit$=Fe(()=>this.actions$.pipe(st(ni),ke(()=>Hp({value:!1})))),this.markViewsStaleOnDataChange$=Fe(()=>Gi(this.store.select(gn).pipe(hi(1)),this.actions$.pipe(st(ni)),this.actions$.pipe(st(ts,Ci,Pn,Nn))).pipe(Pe(()=>{this.viewReadinessStore.markAllStale()})),{dispatch:!1}),this.markMetricsReadyOnRender$=Fe(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(Jt(N4),Re(()=>this.viewReadinessStore.isStale("metrics")),Pe(()=>{this.viewReadinessStore.markReady("metrics")})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(mt),M(el),M(or))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var ug=[el,H0,pg];var cr=e=>(e=e.trim(),e.startsWith("*")||e.endsWith("*")||e.startsWith("/")||e.startsWith("./")?e:!e.startsWith('"')&&!e.endsWith('"')?e.startsWith("!")?e:`*${e}*`:e);var tl=(e,o)=>{let t=[],i=o.split(",");if(i[0].startsWith("!")){i[0]=i[0].slice(1);for(let n of i)n.length>0&&t.push({path:`!${cr(n)}`,type:e})}else for(let n of i)if(n.length>0){if(n.startsWith("!"))break;n=cr(n),t.push({path:n,type:e})}return t};var fg="BlacklistExtensionAction",Rd=(e,...o)=>({type:fg,action:{type:e},extensions:o}),gg=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.searchPattern2BlacklistItems$=this.actions$.pipe(st(fg),ke(n=>({blackListType:n.action.type,extensionToBlacklist:tl(n.action.type,n.extensions.join(","))})),Xi()),this.blackListExtensions$=Fe(()=>this.searchPattern2BlacklistItems$.pipe(Re(n=>n.blackListType==="flatten"||n.blackListType==="exclude"),Pe(n=>{this.store.dispatch(Ci({items:n.extensionToBlacklist}))})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var bg=[gg];var vg=[];var xg=(()=>{class e{constructor(t){this.store=t,this.updateAmountOfEdgePreviews$=Fe(()=>St([this.store.select(Ss),this.store.select(Ka)]).pipe(hi(1),Re(([i,n])=>n>i),ke(([i])=>to({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var B4=Ie(Zp,Yu,(e,o)=>({heightMetric:e,isLinked:o})),wg=(()=>{class e{constructor(t){this.store=t,this.linkHeightAndColorMetric$=Fe(()=>this.store.select(B4).pipe(Re(({isLinked:i})=>i),ke(({heightMetric:i})=>Nt({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var dr=e=>{let o=e.maxValue-e.minValue,t=Math.round(o/3),i=t+e.minValue,n=t*2+e.minValue;return{from:i,to:n}};var Sg=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.resetColorRangeOnColorMetricChange$=Fe(()=>this.actions$.pipe(st(Nt),Ut(()=>this.store.select(lo).pipe(ut(1))),ke(n=>wi({value:dr(n)}))))}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var yg=(()=>{class e{constructor(t){this.store=t,this.resetIsEdgeMetricVisible$=Fe(()=>this.store.select(bn).pipe(ei(this.store.select(eu)),Re(([,i])=>!i),ke(()=>_n())))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Cg=(()=>{class e{constructor(t,i,n){this.store=t,this.mapStateReadWindow=i,this.metricsLensSourceReadWindow=n,this.updateMapColors$=Fe(()=>this.store.select(Gp).pipe(ke(r=>{let a=this.metricsLensSourceReadWindow.getAttributeDescriptors(),s=this.mapStateReadWindow.getMapColors();if(a[r]?.direction===1){let l=JSON.parse(zf(s)),d=l.negative;return l.negative=l.positive,l.positive=d,Li({value:l})}return Li({value:s??Pt})})))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(ve),M(xs))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Mg=[Sg,Cg,wg,yg,xg];var mr=(()=>{class e{constructor(t){this.store=t}setStandard(t){this.store.dispatch(Ap({files:t}))}removeFiles(t){this.store.dispatch(Dp({fileNames:t}))}setDelta(t,i){this.store.dispatch(Np({referenceFile:t,comparisonFile:i}))}setDeltaReference(t){this.store.dispatch(Pp({file:t}))}setDeltaComparison(t){this.store.dispatch(Fp({file:t}))}switchReferenceAndComparison(){this.store.dispatch(Lp())}setFiles(t){this.store.dispatch(Rp({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var il=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.filesRepo=i,this.navBarWriteStore=n,this.lastSetFilesOfPreviousMode=[],this.subscription=this.fileStoreReadWindow.files$.pipe(Oh(),Re(([r,a])=>Ai(r)!==Ai(a)||a.length===0),Pe(([r,a])=>{this.lastSetFilesOfPreviousMode=a.length===0?a:r})).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}toggle(){let t=this.filesRepo.getFiles();if(!Ai(t)){this.lastSetFilesOfPreviousMode=this.filterNoneExisting(t,this.lastSetFilesOfPreviousMode);let n=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===ii.Reference)??t.find(a=>a.selectedAs===ii.Partial);if(n===void 0)return;let r=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===ii.Comparison);this.navBarWriteStore.setDelta(n.file,r?.file);return}if(this.lastSetFilesOfPreviousMode.length>0){this.navBarWriteStore.setFiles(this.lastSetFilesOfPreviousMode);return}let i=t.find(n=>n.selectedAs===ii.Reference)?.file;i!==void 0&&this.navBarWriteStore.setStandard([i])}filterNoneExisting(t,i){return i.filter(n=>t.find(r=>Wp(r.file,n.file)))}static{this.\u0275fac=function(i){return new(i||e)(M(Te),M(Op),M(mr))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var O4="This file has no domain-language data \u2014 switched to the map view.",z4="Left compare mode \u2014 the domain view shows a single word cloud.",$4=0,_g=(()=>{class e{constructor(){this.store=q(me),this.router=q(un),this.toastService=q(Wf),this.fileSelectionModeService=q(il),this.unreachableReason$=St([this.store.select(Yf),this.store.select(Xa)]).pipe(ke(([t,i])=>({reason:this.toUnreachableReason(t,i),wasOnDomainRoute:this.isOnDomainRoute()})),Jt($4),Aa({bufferSize:1,refCount:!0})),this.navigated$=this.router.events.pipe(Re(t=>t instanceof mp)),this.redirectAwayFromUnreachableDomainView$=Fe(()=>this.unreachableReason$.pipe(Re(({reason:t,wasOnDomainRoute:i})=>t!==null&&i&&this.isOnDomainRoute()),Pe(({reason:t})=>this.redirectToMetricsView(t))),{dispatch:!1}),this.handleTheDomainViewBeingOpenedWhileUnreachable$=Fe(()=>this.navigated$.pipe(Ut(()=>this.unreachableReason$.pipe(ut(1))),Re(({reason:t})=>t!==null&&this.isOnDomainRoute()),Pe(({reason:t})=>this.makeTheDomainViewReachable(t))),{dispatch:!1})}makeTheDomainViewReachable(t){if(t==="delta"){this.leaveCompareMode();return}this.redirectToMetricsView(t)}leaveCompareMode(){this.fileSelectionModeService.toggle(),this.toastService.show(z4)}toUnreachableReason(t,i){return t?"missing-domain-data":i?"delta":null}redirectToMetricsView(t){this.router.navigateByUrl(ki.metrics,{replaceUrl:!0}),t==="missing-domain-data"&&this.toastService.show(O4)}isOnDomainRoute(){return uf(this.router.url)==="domain"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Eg=[_g];var kg=(()=>{class e{constructor(t,i){this.guard=t,this.errorDialogService=i,this.showErrorDialogIfBlacklistItemsResultInEmptyMap$=Fe(()=>this.guard.doBlacklistItemsResultInEmptyMap$.pipe(Re(n=>n.resultsInEmptyMap),Pe(()=>{Is(),this.errorDialogService.open({title:"Blacklist Error",message:"Excluding all buildings is not possible."})})),{dispatch:!1}),this.addBlacklistItems$=Fe(()=>this.guard.doBlacklistItemsResultInEmptyMap$.pipe(Re(n=>!n.resultsInEmptyMap),ke(n=>Ci({items:n.items}))))}static{this.\u0275fac=function(i){return new(i||e)(M(As),M(Ga))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var qg=[kg];var Tg=e=>e.some(o=>o.name==="rloc")?"rloc":"unary";var j4=["rloc","real_lines_of_code","loc","lines_of_code","lines","statements","functions"],Ig=["complexity","mcc","cognitive_complexity","sonar_complexity","sonar_cognitive_complexity","max_nesting_level","indentation_level"];function Rg(e){return e.some(o=>o.maxValue>0)}function Dg(e,o){let t=[],i;for(let n of e)if(n.maxValue&&(t.push(n.name),i=n.name,--o===0))return t;if(!i)throw new Error("there are no metrics available");for(;o-- >0;)t.push(i);return t}function Ag(e){let o=[],t={AreaMetric:j4,HeightMetric:Ig,ColorMetric:Ig},i=new Set(e.map(n=>n.name));for(let n in t)for(let r of t[n])if(i.has(r)){o.push(r);break}return o}function Lg(e,o,t,i,n,r=!1){let a=new Set(t.map(k=>k.name)),s=new Set(i.map(k=>k.name)),l=k=>!!k&&a.has(k),d=k=>!!k&&s.has(k),c=n?e:Nr,h=r?{areaMetric:null,heightMetric:null,colorMetric:null,distributionMetric:null,edgeMetric:null}:o,p=H4(c,h,t,l);if(p===null)return null;let u=h.edgeMetric;return d(c.edgeMetric)?u=c.edgeMetric:d(u)||(u=i[0]?.name),tt(Ee({},p),{edgeMetric:u})}function H4(e,o,t,i){let n=i(e.areaMetric)?e.areaMetric:o.areaMetric,r=i(e.heightMetric)?e.heightMetric:o.heightMetric,a=i(e.colorMetric)?e.colorMetric:o.colorMetric;if(i(n)&&i(r)&&i(a))return{areaMetric:n,heightMetric:r,colorMetric:a,distributionMetric:o.distributionMetric};if(!Rg(t))return null;let[s,l,d]=U4(t);return{areaMetric:i(e.areaMetric)?e.areaMetric:s,heightMetric:i(e.heightMetric)?e.heightMetric:l,colorMetric:i(e.colorMetric)?e.colorMetric:d,distributionMetric:Tg(t)}}function U4(e){let o=Ag(e),[t,i,n]=o;return t&&i&&n?o:Dg(e,3)}function Fg(e){let o={};for(let t of e)for(let i of Object.keys(t))o[i]||(o[i]=t[i]);return o}function Pg(e){let o={},t={};for(let i of e){for(let n of Object.keys(i.nodes))o[n]||(o[n]=i.nodes[n]);for(let n of Object.keys(i.edges))t[n]||(t[n]=i.edges[n])}return{nodes:o,edges:t}}function Ng(e,o){let t=new Map;if(e.length===1)return e[0].settings.fileSettings.blacklist;for(let i of e)if(i.settings.fileSettings.blacklist)for(let n of i.settings.fileSettings.blacklist){let r={path:o?as(i.fileMeta.fileName,n.path):n.path,type:n.type};t.set(`${r.path}|${r.type}`,r)}return[...t.values()]}function Dd(e,o){return Ee({},o)}function Bg(e,o){return tt(Ee({},e),{frequency:e.frequency+o.frequency,tfidf:G4(e.tfidf,o.tfidf)})}function G4(e,o){return e===void 0?o:o===void 0?e:Math.max(e,o)}var ol=class{constructor(){this.wordsByTextPerPath=new Map}add(o,t,i){let n=this.wordsByTextOf(o);for(let r of t){let a=n.get(r.text);n.set(r.text,a?i(a,r):Ee({},r))}}toDomainLensData(){let o={};for(let[t,i]of this.wordsByTextPerPath)o[t]=[...i.values()];return o}wordsByTextOf(o){let t=this.wordsByTextPerPath.get(o);return t||(t=new Map,this.wordsByTextPerPath.set(o,t)),t}};function Vg(e,o){if(e.length===1)return e[0].settings.fileSettings.domainWords;let t=new ol;for(let i of e)for(let[n,r]of Object.entries(i.settings.fileSettings.domainWords)){if(!o){t.add(n,r,Dd);continue}t.add(uu(i.fileMeta.fileName,n),r,Dd),n===Fr.rootPath&&t.add(Fr.rootPath,r,Bg)}return t.toDomainLensData()}function Wg(e,o){if(e.length===1)return e[0].settings.fileSettings.markedPackages;let t=new Map;for(let i of e)if(i.settings.fileSettings.markedPackages)for(let n of i.settings.fileSettings.markedPackages){let r={path:o?as(i.fileMeta.fileName,n.path):n.path,color:n.color};t.set(`${r.path}|${r.color}`,r)}return[...t.values()]}var Og=(()=>{class e{constructor(t,i,n,r,a,s,l){this.actions$=t,this.store=i,this.ccStateSnapshot=n,this.fileStoreReadWindow=r,this.mapStateReadWindow=a,this.queryParamsService=s,this.loadInitialFileStore=l,this.fileSetTriggers$=Gi(this.actions$.pipe(st(ni),ke(d=>({kind:"fileSet",provenance:d}))),this.store.select(gn).pipe(hi(1),ke(()=>({kind:"fileSet",provenance:null})))).pipe(Xi()),this.fileSetChanged$=this.fileSetTriggers$.pipe(Vh(this.fileSetTriggers$.pipe(Jt(0))),Re(d=>d.length>0),ke(d=>({kind:"fileSet",provenance:d.find(c=>c.provenance)?.provenance??null}))),this.reconcileFileSet$=Fe(()=>this.fileSetChanged$.pipe(Pe(d=>{this.reconcile(d)})),{dispatch:!1}),this.reconcileMetricData$=Fe(()=>St([this.store.select(so),this.store.select(ws)]).pipe(hi(1),Jt(0),Pe(()=>{this.reconcile({kind:"metricData"})})),{dispatch:!1})}reconcile(t){t.kind==="fileSet"&&(this.mergeFileSettings(),this.updateFileRoot());let{nodeMetricData:i,edgeMetricData:n}=Hn(this.ccStateSnapshot.get());if(!i)return;let r=this.currentSelection(),a=Lg(t.kind==="fileSet"?t.provenance?.urlMetrics??Nr:Nr,r,i,n,this.queryParamsService.hasFile(),t.kind==="fileSet"&&!!t.provenance?.forceDefaultMetrics);if(!a)return;this.applySelection(a,r);let s=a.colorMetric!==r.colorMetric;if(t.kind==="fileSet"||s){let l=Bu(i,a.colorMetric);this.store.dispatch(wi({value:dr(l)}))}t.kind==="fileSet"&&(this.store.dispatch(Bn()),this.updateVisibleTopLabels(),this.applyRestoredSettings(t.provenance?.restoredSettings??null))}applyRestoredSettings(t){t&&(this.loadInitialFileStore.applyMetricsLensSource(t.metricsLensSource),this.loadInitialFileStore.applyDependencyLensSource(t.dependencyLensSource),this.loadInitialFileStore.applyDomainLensSource(t.domainLensSource),this.loadInitialFileStore.applySharedView(t.sharedView))}mergeFileSettings(){let t=this.fileStoreReadWindow.getFiles(),i=fn(t),n=Vp(t),r=this.fileStoreReadWindow.getVisibleFileStates(),a=r.map(({file:d})=>d.settings.fileSettings.attributeTypes),s=r.map(({file:d})=>d.settings.fileSettings.attributeDescriptors),l=Pg(a);this.store.dispatch(qi({value:{sharedView:{blacklist:Ng(i,n),markedPackages:Wg(i,n)},metricsLensSource:{attributeTypes:l.nodes,attributeDescriptors:Fg(s)},dependencyLensSource:{attributeTypes:l.edges},domainLensSource:{words:Vg(i,n)}}}))}updateFileRoot(){let t=this.fileStoreReadWindow.getReferenceFile();t&&Fr.updateRoot(t.map.name)}currentSelection(){let{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}=this.mapStateReadWindow.getMapState();return{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}}applySelection(t,i){this.dispatchIfChanged(Qa,t.distributionMetric,i.distributionMetric),this.dispatchIfChanged(xi,t.areaMetric,i.areaMetric),this.dispatchIfChanged(yi,t.heightMetric,i.heightMetric),this.dispatchIfChanged(Nt,t.colorMetric,i.colorMetric),this.dispatchIfChanged(Si,t.edgeMetric,i.edgeMetric)}dispatchIfChanged(t,i,n){i!==n&&this.store.dispatch(t({value:i}))}updateVisibleTopLabels(){let t=Pi(this.ccStateSnapshot.get()),i=this.mapStateReadWindow.getAmountOfTopLabels();this.store.dispatch(eo({value:Math.min(i,Pf(t))}))}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me),M(Vt),M(Te),M(ve),M(Ls),M($f))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var K4=[io,Ln,An,Li,vn,xn,Fn,Rn,Dn,ru,_n,Ja,Mn,Cn,Za,In,wn,to,eo,kn,es,Sn,En,yn,qn,oo,Si,wi,Tn,yi,Qa,Nt,xi],Q4=[Fi,is,Bn,os,ns,hu,ts,Ci,Pn,Nn,rs,Vn,Wn],Y4=[Fu,Lu],Z4=[Ru],J4=[Sf,yf,Cf,kf,Tf,Mf,_f,wf,If,Af,xf,qf,Rf,Df,Ef],zg=[[...Y4],[...Z4],[...J4],[...K4],[...Q4],[...cf],[...Bp],qi].flat();var $g=(()=>{class e{constructor(t,i){this.actions$=t,this.ccStateSnapshot=i,this.saveCcState$=Fe(()=>this.actions$.pipe(Re(n=>n.type!==Ao.type),st(...zg),Jt(500),Pe(async()=>{let n=this.ccStateSnapshot.get();await jf(n)})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var jg=[Si,yi,Nt,xi,Ip];var Hg=(()=>{class e{constructor(t,i,n,r,a){this.actions$=t,this.mapStateReadWindow=i,this.fileStoreReadWindow=n,this.queryParamsService=r,this.store=a,this.saveMetricsInQueryParameters$=Fe(()=>this.actions$.pipe(st(...jg),ei(this.store.select(ws)),ke(([,s])=>s&&s.length>0),Jt(100),Pe(s=>{this.updateMetricQueryParameters(s)})),{dispatch:!1})}updateMetricQueryParameters(t){let{edgeMetric:i,heightMetric:n,colorMetric:r,areaMetric:a}=this.mapStateReadWindow.getMapState();this.queryParamsService.write({areaMetric:a,heightMetric:n,colorMetric:r,edgeMetric:i,isEdgeMetricDefined:t,currentFilesAreSampleFiles:this.fileStoreReadWindow.getCurrentFilesAreSampleFiles()})}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(ve),M(Te),M(Ls),M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Ug=[Og,$g,Hg];var nl=class{constructor(){this.detachedHandles=new Map}routeKey(o){return o.routeConfig?.path??null}shouldDetach(o){return this.routeKey(o)!==null}store(o,t){let i=this.routeKey(o);i!==null&&(t?this.detachedHandles.set(i,t):this.detachedHandles.delete(i))}shouldAttach(o){let t=this.routeKey(o);return t!==null&&this.detachedHandles.has(t)}retrieve(o){let t=this.routeKey(o);return t===null?null:this.detachedHandles.get(t)??null}shouldReuseRoute(o,t){return o.routeConfig===t.routeConfig}};var Gg=(()=>{class e extends ap{constructor(){super(q(Xc),q(rp,{optional:!0})??void 0),this.platformLocation=q(Xc)}prepareExternalUrl(t){let i=new URL(this.platformLocation.href);return i.hash=super.prepareExternalUrl(t),i.toString()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Xg={metricsLensSource:Pu,dependencyLensSource:Du,domainLensSource:vf,domainState:Lf,preferences:af,mapState:au,sharedView:vu,files:jp,isLoadingFile:Up,currentFilesAreSampleFiles:$p},Kg=e=>(o,t)=>{let i=bf(t)?Ff(Ee({},o),t.value):o;return e(i,t)};var Qg=(()=>{class e{constructor(){this.actions$=q(mt),this.domainSelectionStore=q(Zf),this.resetDomainSelectionAfterLoad$=Fe(()=>this.actions$.pipe(st(ni),Pe(()=>this.domainSelectionStore.clear())),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Yg=[Qg];var Zg=e=>({type:"BlacklistSearchPatternAction",action:{type:e}}),Jg=(()=>{class e{constructor(t,i,n){this.actions$=t,this.store=i,this.blacklistExclusionGuard=n,this.searchPattern2BlacklistItems$=this.actions$.pipe(st("BlacklistSearchPatternAction"),ei(this.store.select(no)),ke(([r,a])=>({type:r.action.type,blacklistItems:tl(r.action.type,a)})),Xi()),this.flattenSearchPattern$=Fe(()=>this.searchPattern2BlacklistItems$.pipe(Re(r=>r.type==="flatten"),Pe(r=>{this.store.dispatch(Ci({items:r.blacklistItems})),this.store.dispatch(Fi({value:""}))})),{dispatch:!1}),this.excludeSearchPattern$=Fe(()=>this.searchPattern2BlacklistItems$.pipe(Re(r=>r.type==="exclude"),Pe(()=>{this.blacklistExclusionGuard.doBlacklistItemsResultInEmptyMap$.pipe(ut(1),Re(r=>!r.resultsInEmptyMap),Pe(()=>{this.store.dispatch(Fi({value:""}))})).subscribe()}),ke(r=>pu({items:r.blacklistItems}))))}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me),M(As))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var e1=[Jg];var e5=(e,o,t,i,n)=>{let r=[],a=Ad("area",e.areaMetric,o,n);a&&r.push(a);let s=Ad("height",e.heightMetric,o,n);s&&r.push(s);let l=Ad("color",e.colorMetric,o,n);l&&!i&&r.push(tt(Ee({},l),{inverted:t.isColorRangeInverted===!0}));let d=t5(e.edgeMetric,o,n);return d&&r.push(d),r},Ad=(e,o,t,i)=>{if(o)return{kind:e,metricName:o,value:i?.attributes?.[o],descriptor:t?.[o]}},t5=(e,o,t)=>{if(!e)return;let i=t?.edgeAttributes?.[e];if(i)return{kind:"edge",metricName:e,incoming:i.incoming??0,outgoing:i.outgoing??0,descriptor:o?.[e]}},t1=Ie(Gn,vs,Ya,Xa,Xt,e5);var i5=.3333333333333333,o5=2/3,Ld=(e,o,t,i)=>{if(o===void 0||t===void 0||t===o)return{fraction:1,severity:"neutral"};let n=n5((e-o)/(t-o));return{fraction:n,severity:r5(i===1?1-n:n)}},n5=e=>Math.min(1,Math.max(0,e)),r5=e=>e<i5?"success":e<o5?"warning":"error";var Fd=e=>e===void 0||e===0||Number.isNaN(e),Pd=e=>Fd(e.value)&&!e.delta,i1={fraction:0,severity:"neutral"},a5="unary",s5=(e,o,t,i)=>e?.attributes?Object.keys(e.attributes).filter(n=>n!==a5).sort((n,r)=>n.localeCompare(r)).map(n=>l5(n,e,o,t,i)):[],l5=(e,o,t,i,n)=>{let r=n?.[e],a=o.attributes[e];return{name:e,value:a,delta:o.deltas?.[e],mapBar:c5(e,a,t,r),rangeBar:d5(e,a,i,r),descriptor:r}},c5=(e,o,t,i)=>{if(Fd(o))return i1;let n=t?.attributes?.[e];return Ld(o,0,n,i?.direction)},d5=(e,o,t,i)=>{if(Fd(o))return i1;let n=t.nodeMetricData.find(r=>r.name===e);return Ld(o,n?.minValue,n?.maxValue,i?.direction)},o1=Ie(Xt,Et,so,vs,(e,o,t,i)=>s5(e,o.unifiedMapNode,{nodeMetricData:t},i));var go=(()=>{class e{constructor(t){this.store=t,this.selectedNode$=this.store.select(Xt),this.mappingBlocks$=this.store.select(t1),this.metricRows$=this.store.select(o1)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var si=(()=>{class e{constructor(){this.readStore=q(go),this.threeSceneService=q(ft),this.threeRendererService=q(kt),this.selectedNode=R(this.readStore.selectedNode$,{initialValue:void 0}),this.isVisible=X(()=>this.selectedNode()!=null)}close(){this.threeSceneService.clearSelection(),this.threeRendererService.render()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var n1=e=>{if(e)return{all:e.attributes?.unary??0,added:e.fileCount?.added??0,removed:e.fileCount?.removed??0,changed:e.fileCount?.changed??0}};function m5(e,o){if(e&1&&(w(0,"span",2)(1,"span",3),f(2),y(),w(3,"span",4),f(4),y(),w(5,"span",5),f(6),y()()),e&2){let t=D();m(2),he("\u0394",t.added),m(2),he("\u0394",t.removed>0?-t.removed:0),m(2),he("\u0394",t.changed)}}function h5(e,o){if(e&1&&(w(0,"span",1),f(1),y(),O(2,m5,7,3,"span",2)),e&2){let t=o,i=D();m(),Yi(" ",t.all," ",t.all===1?"file":"files"," "),m(),z(i.isDeltaState()?2:-1)}}var r1=(()=>{class e{constructor(){this.isFolder=$.required(),this.fileCount=$(),this.isDeltaState=$.required()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-node-badges"]],hostAttrs:["data-testid","inspector-node-badges",1,"mt-1","flex","flex-wrap","items-center","gap-1"],inputs:{isFolder:[1,"isFolder"],fileCount:[1,"fileCount"],isDeltaState:[1,"isDeltaState"]},decls:3,vars:2,consts:[["data-testid","inspector-node-type",1,"badge","badge-ghost","badge-sm"],["data-testid","inspector-file-count",1,"badge","badge-ghost","badge-sm"],[1,"text-xs","opacity-60"],["title","Number of added files",1,"text-success"],["title","Number of removed files",1,"text-error"],["title","Number of files with metric changes"]],template:function(i,n){if(i&1&&(w(0,"span",0),f(1),y(),O(2,h5,3,3)),i&2){let r;m(),qe(n.isFolder()?"folder":"file"),m(),z((r=n.isFolder()&&n.fileCount())?2:-1,r)}},encapsulation:2,changeDetection:0})}}return e})();function p5(e,o){if(e&1&&(w(0,"p",0),f(1),y()),e&2){let t=D();m(),qe(t.parentPath())}}function u5(e,o){if(e&1&&(w(0,"a",2),ue(1,"i",3),y()),e&2){let t=o;le("href",t,mn)("title",t)}}var a1=(()=>{class e{constructor(){this.parentPath=$.required(),this.nodeName=$.required(),this.link=$()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-node-path"]],hostAttrs:[1,"block"],inputs:{parentPath:[1,"parentPath"],nodeName:[1,"nodeName"],link:[1,"link"]},decls:4,vars:3,consts:[["data-testid","inspector-parent-path",1,"break-all","text-sm","leading-snug","opacity-60"],["data-testid","inspector-node-name",1,"break-all","text-lg","font-semibold","leading-snug","text-primary"],["target","_blank","rel","noopener noreferrer","data-testid","inspector-node-link",1,"text-sm",3,"href","title"],[1,"fa","fa-external-link"]],template:function(i,n){if(i&1&&(O(0,p5,2,1,"p",0),w(1,"p",1),f(2),O(3,u5,2,2,"a",2),y()),i&2){let r;z(n.parentPath()?0:-1),m(2),he(" ",n.nodeName()," "),m(),z((r=n.link())?3:-1,r)}},encapsulation:2,changeDetection:0})}}return e})();function f5(e,o){if(e&1){let t=xe();v(0,"div",4)(1,"div",5),F(2,"cc-inspector-node-path",6)(3,"cc-inspector-node-badges",7),b(),v(4,"button",8),W("click",function(){ae(t);let n=D();return se(n.copyPath())}),F(5,"i",9),b()()}if(e&2){let t=D();m(2),L("parentPath",t.parentPath())("nodeName",t.nodeName())("link",t.nodeLink()),m(),L("isFolder",t.isFolder())("fileCount",t.fileCount())("isDeltaState",t.isDeltaState()),m(),L("title",t.copied()?"Copied!":"Copy path"),m(),Ne("fa-copy",!t.copied())("fa-check",t.copied())}}var s1=(()=>{class e{static{this.COPY_FEEDBACK_MS=1500}constructor(){this.readStore=q(go),this.fileStoreReadWindow=q(Te),this.visibilityService=q(si),this.selectedNode=R(this.readStore.selectedNode$,{requireSync:!0}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.copied=be(!1),this.nodeName=X(()=>this.selectedNode()?.name??""),this.nodeLink=X(()=>this.selectedNode()?.link),this.parentPath=X(()=>{let t=this.selectedNode();return t?.path?t.path.slice(0,t.path.length-t.name.length):""}),this.isFolder=X(()=>this.selectedNode()?.type===Ft.FOLDER),this.fileCount=X(()=>n1(this.selectedNode())),q(dn).onDestroy(()=>clearTimeout(this.copyFeedbackTimeout))}close(){this.visibilityService.close()}async copyPath(){let t=this.selectedNode()?.path;t&&(await navigator.clipboard.writeText(t),this.copied.set(!0),clearTimeout(this.copyFeedbackTimeout),this.copyFeedbackTimeout=setTimeout(()=>this.copied.set(!1),e.COPY_FEEDBACK_MS))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-header"]],hostAttrs:[1,"block","shrink-0","px-3","py-2"],decls:6,vars:1,consts:[[1,"flex","items-center","justify-between"],[1,"text-xs","uppercase","tracking-widest","opacity-60"],["type","button","title","Close inspector","data-testid","inspector-close-button",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-times"],[1,"mt-1","flex","items-start","justify-between","gap-2"],[1,"min-w-0"],[3,"parentPath","nodeName","link"],[3,"isFolder","fileCount","isDeltaState"],["type","button","data-testid","inspector-copy-path-button",1,"btn","btn-ghost","btn-sm","btn-square","shrink-0",3,"click","title"],[1,"fa"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Inspector"),b(),v(3,"button",2),W("click",function(){return n.close()}),F(4,"i",3),b()(),O(5,f5,6,11,"div",4)),i&2&&(m(5),z(n.selectedNode()?5:-1))},dependencies:[a1,r1],encapsulation:2,changeDetection:0})}}return e})();var hr=new Map([["loc","Lines of Code"],["rloc","Real Lines of Code"],["comment_lines","Number of Code Lines with Comments"],["complexity","Cyclomatic Complexity"],["sonar_complexity","Cyclomatic Complexity"],["mcc","McCabe Complexity"],["avgCommits","Average Number of Commits from this file"],["functions","Number of Functions"],["pairingRate","Pairing Rate of selected building"],["unary","-"],["line_coverage","Number of Code Lines covered by tests"],["sonar_code_smells","Number of Smells Sonar has identified"],["avg_code_churn","Average Number of Lines added or removed from this file"],["number_of_authors","Number of Authors that have edited this file"],["statements","Number of Statements"]]);var bo=(()=>{class e{transform(t,i){if(t==null)return hr.get(i)??"";let n=t.title?`${t.title} (${i})`:`${i}`,r=t.description?`
3454
+ `}};var Gs=(()=>{class e{constructor(t){this.ccStateSnapshot=t}getValue(){return this.ccStateSnapshot.get()}isLabelsPerMapActive(){return Ss(this.ccStateSnapshot.get())}static{this.\u0275fac=function(i){return new(i||e)(M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Xs=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.labels=[],this.suppressedLabel=null}getLabels(){return this.labels}getSuppressedLabel(){return this.suppressedLabel}addLeafLabel(t,i,n=!1){let{mapState:r}=this.stateAccessStore.getValue(),{scaling:a,showMetricLabelNodeName:s,showMetricLabelNameValue:l,labelMode:d,labelSize:c}=r,{heightMetric:h,colorMetric:p}=r,u=new Qe(a.x,a.y,a.z),k="";if(s||n&&!l)k=t.name;else if(!l)return;let E="";if(l){let ie=d===Ri.Color?p:h;E=`${t.attributes[ie]} ${ie}`}let N=new Us(k,E,c),j=N.cssObject;j.userData={node:t};let ee=t.height+Math.abs(t.heightDelta??0),B=Math.max(ee,i),H=(t.x0-td+t.width/2)*u.x,G=(t.y0-td+t.length/2)*u.z;j.position.set(H,(t.z0+B)*u.y,G);let Z=new Qe(H,(t.z0+ee)*u.y,G);this.threeSceneService.labels.add(j),this.labels.push({labelElement:N,node:t,buildingTop:Z,appliedOffset:0})}clearLabels(){this.threeSceneService.labels.clear(),this.labels=[],this.suppressedLabel=null}clearTemporaryLabel(t){let i=this.labels.findIndex(({node:n})=>n===t);if(i>-1){let n=this.labels[i];n===this.suppressedLabel&&(this.suppressedLabel=null),this.threeSceneService.labels.remove(n.labelElement.cssObject),this.labels.splice(i,1)}}hasLabelForNode(t){return this.labels.some(i=>i.node===t)}suppressLabelForNode(t){this.restoreSuppressedLabel();let i=this.labels.find(n=>n.node===t);i&&(this.suppressedLabel=i,i.labelElement.setTransition("opacity 0.2s ease-out"),i.labelElement.setOpacity("0"))}restoreSuppressedLabel(){this.suppressedLabel&&(this.suppressedLabel.labelElement.setOpacity("1"),this.suppressedLabel=null)}static{this.\u0275fac=function(i){return new(i||e)(M(Gs),M(ft))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ks=(()=>{class e{constructor(t,i){this.threeRendererService=t,this.threeSceneService=i,this.connectorSegments=null,this.connectorPositions=null,this.connectorsDirty=!0,this.lastDrawnVertexCount=0,this.projectionVec=new Qe}drawConnectors(t,i){this.connectorSegments||this.initConnectors();let n=this.threeRendererService.camera;if(!n)return;let r=this.threeRendererService.labelRenderer?.domElement,a=r?r.clientHeight:window.innerHeight;if(a===0)return;let s=this.connectorPositions,l=0;for(let d of t){if(d.hidden||d.offset>100||d.label===i)continue;let c=d.label.buildingTop,h=d.label.labelElement.cssObject.position;if(h.y-c.y<.5)continue;if(l>=400)break;this.projectionVec.copy(h).project(n);let u=-20+d.offset;this.projectionVec.y-=u*2/a,this.projectionVec.unproject(n);let k=l*3;s[k]=c.x,s[k+1]=c.y,s[k+2]=c.z,l++;let E=l*3;s[E]=this.projectionVec.x,s[E+1]=this.projectionVec.y,s[E+2]=this.projectionVec.z,l++}this.connectorSegments.geometry.setDrawRange(0,l),this.connectorSegments.geometry.attributes.position.needsUpdate=!0,l!==this.lastDrawnVertexCount&&(this.connectorsDirty=!0),this.lastDrawnVertexCount=l}clearConnectors(){this.connectorSegments&&this.connectorSegments.geometry.setDrawRange(0,0),this.connectorsDirty=!0,this.lastDrawnVertexCount=0}isDirty(){return this.connectorsDirty}markClean(){this.connectorsDirty=!1}destroy(){this.connectorSegments&&(this.connectorSegments.geometry.dispose(),this.connectorSegments.material.dispose(),this.threeSceneService.scene.remove(this.connectorSegments),this.connectorSegments=null,this.connectorPositions=null)}initConnectors(){let t=400;this.connectorPositions=new Float32Array(t*3);let i=new Gt;i.setAttribute("position",new ro(this.connectorPositions,3)),i.setDrawRange(0,0);let n=new cs({color:11842740,transparent:!0,opacity:.9,depthTest:!0});this.connectorSegments=new Cu(i,n),this.connectorSegments.frustumCulled=!1,this.threeSceneService.scene.add(this.connectorSegments)}static{this.\u0275fac=function(i){return new(i||e)(M(kt),M(ft))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ig=(()=>{class e{constructor(t,i,n,r,a){this.threeRendererService=t,this.tooltipService=i,this.labelCreationService=n,this.stateAccessStore=r,this.connectorDrawingService=a,this._suppressLayout=!1,this.threeRendererService.afterRender$.subscribe(()=>this.updateLabelLayout())}setSuppressLayout(t){this._suppressLayout=t}updateLabelLayout(){let t=this.labelCreationService.getLabels();if(this._suppressLayout||t.length===0){this.connectorDrawingService.clearConnectors(),this.clearBadges(t);return}this.clearBadges(t);let i=this.collectLabelInfos(t),n=this.tooltipService.getRect();this.resolveCollisions(i),this.resolveTooltipCollisions(i,n),this.applyCollisionOffsets(i);let r=this.labelCreationService.getSuppressedLabel();this.connectorDrawingService.drawConnectors(i,r),this.connectorDrawingService.isDirty()&&(this.connectorDrawingService.markClean(),this.threeRendererService.render())}destroy(){this.clearBadges(this.labelCreationService.getLabels()),this.labelCreationService.clearLabels(),this.connectorDrawingService.destroy()}clearBadges(t){for(let i of t)i.labelElement.clearBadge()}collectLabelInfos(t){let i=[];for(let n of t){let r=n.labelElement.getContentRect(),a={top:r.top-n.appliedOffset,bottom:r.bottom-n.appliedOffset,left:r.left,right:r.right,width:r.width,height:r.height,x:r.x,y:r.y-n.appliedOffset};i.push({label:n,rect:a,offset:0,hidden:!1})}return i}resolveCollisions(t){let{mapState:i}=this.stateAccessStore.getValue();if(!i.groupLabelCollisions)return;let n=this.labelCreationService.getSuppressedLabel(),r=t.filter(l=>l.label!==n);if(r.length===0)return;let a=this.buildCollisionGroups(r,this.stateAccessStore.isLabelsPerMapActive()),s=i.labelMode===Ri.Color?i.colorMetric:i.heightMetric;for(let l of a){if(l.length<=1)continue;let d=this.pickGroupWinner(l,s);for(let c of l)c!==d&&(c.hidden=!0);d.label.labelElement.setBadge(l.length-1)}}buildCollisionGroups(t,i){let n=t.length,r=Array.from({length:n},(c,h)=>h),a=i?t.map(c=>as(c.label.node.path)):void 0,s=c=>{for(;r[c]!==c;)r[c]=r[r[c]],c=r[c];return c},l=(c,h)=>{let p=s(c),u=s(h);p!==u&&(r[p]=u)};for(let c=0;c<n;c++)for(let h=c+1;h<n;h++)a!==void 0&&a[c]!==a[h]||this.rectsOverlap(t[c].rect,t[h].rect)&&l(c,h);let d=new Map;for(let c=0;c<n;c++){let h=s(c);d.has(h)||d.set(h,[]),d.get(h).push(t[c])}return[...d.values()]}rectsOverlap(t,i){return t.right>i.left&&t.left<i.right&&t.bottom>i.top&&t.top<i.bottom}pickGroupWinner(t,i){let n=t[0],r=n.label.node.attributes[i]??0;for(let a=1;a<t.length;a++){let s=t[a].label.node.attributes[i]??0;(s>r||s===r&&t[a].label.node.path<n.label.node.path)&&(r=s,n=t[a])}return n}resolveTooltipCollisions(t,i){if(!i)return;let n=12,r=i.left-n,a=i.right+n,s=i.top-n,l=i.bottom+n,d=this.labelCreationService.getSuppressedLabel();for(let c of t){if(c.hidden||c.label===d)continue;let h=c.rect.top+c.offset,p=c.rect.bottom+c.offset,u=c.rect.right>r&&c.rect.left<a,k=p>s&&h<l;if(u&&k){let E=l+4-h;E>0&&(c.offset+=E)}}}applyCollisionOffsets(t){let i=this.labelCreationService.getSuppressedLabel();for(let n of t){let r=n.label.labelElement,a=n.label===i;n.hidden||n.offset>100?(r.setOpacity("0"),r.setTransform(0),n.label.appliedOffset=0):(r.setOpacity(a?"0":"1"),r.setTransform(n.offset),n.label.appliedOffset=n.offset)}}static{this.\u0275fac=function(i){return new(i||e)(M(kt),M(Un),M(Xs),M(Gs),M(Ks))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var og=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}setLabelMode(t){this.store.dispatch(En({value:t}))}setAmountOfTopLabels(t){this.store.dispatch(Ji({value:t}))}setLabelSize(t){this.store.dispatch(kn({value:t}))}setLabelsPerMap(t){this.store.dispatch(qn({value:t}))}setShowMetricLabelNodeName(t){this.store.dispatch(Ln({value:t}))}setShowMetricLabelNameValue(t){this.store.dispatch(An({value:t}))}setColorLabels(t){this.store.dispatch(to({value:t}))}setGroupLabelCollisions(t){this.store.dispatch(yn({value:t}))}resetSettings(t){let i=Nf(t,this.ccStateSnapshot.get());i.mapState?.amountOfTopLabels!==void 0&&(i.mapState.amountOfTopLabels=10),this.store.dispatch(ki({value:i}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function k4(e,o){if(e&1){let t=xe();w(0,"div",5)(1,"input",17),K("change",function(){ae(t);let n=D();return se(n.setLabelsPerMap(!1))}),y(),w(2,"input",18),K("change",function(){ae(t);let n=D();return se(n.setLabelsPerMap(!0))}),y()()}if(e&2){let t=D();m(),le("checked",!t.labelsPerMap()),m(),le("checked",t.labelsPerMap())}}function q4(e,o){if(e&1){let t=xe();w(0,"div",14)(1,"span",19),f(2,"By Color Metric"),y(),w(3,"label",12)(4,"input",20),K("change",function(n){ae(t);let r=D();return se(r.setColorLabel(n,"positive"))}),y(),ue(5,"span",21),w(6,"span",22),f(7),y()(),w(8,"label",12)(9,"input",23),K("change",function(n){ae(t);let r=D();return se(r.setColorLabel(n,"neutral"))}),y(),ue(10,"span",21),w(11,"span",22),f(12),y()(),w(13,"label",12)(14,"input",24),K("change",function(n){ae(t);let r=D();return se(r.setColorLabel(n,"negative"))}),y(),ue(15,"span",21),w(16,"span",22),f(17),y()()()}if(e&2){let t=D();m(4),le("checked",t.colorLabels().positive)("disabled",t.colorCategoryCounts().positive===0),m(),Oe("background-color",t.mapColors().positive),m(2),he("(",t.colorCategoryCounts().positive,")"),m(2),le("checked",t.colorLabels().neutral)("disabled",t.colorCategoryCounts().neutral===0),m(),Oe("background-color",t.mapColors().neutral),m(2),he("(",t.colorCategoryCounts().neutral,")"),m(2),le("checked",t.colorLabels().negative)("disabled",t.colorCategoryCounts().negative===0),m(),Oe("background-color",t.mapColors().negative),m(2),he("(",t.colorCategoryCounts().negative,")")}}var kd=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.fileStoreReadWindow=q(Te),this.labelSettingsWriteStore=q(og),this.colorCategoryCountsStore=q(Xn),this.LabelMode=Ri,this.MIN_LABEL_SIZE=.75,this.MAX_LABEL_SIZE=2.5,this.LABEL_SIZE_STEP=.25,this.resetSettingsKeys=["mapState.amountOfTopLabels","mapState.labelSize","mapState.showMetricLabelNodeName","mapState.showMetricLabelNameValue","mapState.colorLabels","mapState.labelMode","mapState.groupLabelCollisions","mapState.labelsPerMap"],this.amountOfTopLabels=R(this.mapStateReadWindow.amountOfTopLabels$,{requireSync:!0}),this.labelSize=R(this.mapStateReadWindow.labelSize$,{requireSync:!0}),this.showMetricLabelNodeName=R(this.mapStateReadWindow.showMetricLabelNodeName$,{requireSync:!0}),this.showMetricLabelNodeValue=R(this.mapStateReadWindow.showMetricLabelNameValue$,{requireSync:!0}),this.colorLabels=R(this.mapStateReadWindow.colorLabels$,{requireSync:!0}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.labelMode=R(this.mapStateReadWindow.labelMode$,{requireSync:!0}),this.colorCategoryCounts=R(this.colorCategoryCountsStore.colorCategoryCounts$,{requireSync:!0}),this.groupLabelCollisions=R(this.mapStateReadWindow.groupLabelCollisions$,{requireSync:!0}),this.labelsPerMap=R(this.mapStateReadWindow.labelsPerMap$,{requireSync:!0}),this.areMultipleMapsVisible=R(this.fileStoreReadWindow.areMultipleMapsVisible$,{requireSync:!0}),this.showColorLabels=X(()=>this.labelMode()===Ri.Color&&!this.isDeltaState()),this.topLabelsTitle=X(()=>{let t=`Display the labels of the ${this.amountOfTopLabels()} highest buildings`;return this.labelsPerMap()&&this.areMultipleMapsVisible()?`${t} per map`:t}),this.applyDebouncedTopLabels=Pi(t=>{this.labelSettingsWriteStore.setAmountOfTopLabels(t)},e.DEBOUNCE_TIME),this.applyDebouncedLabelSize=Pi(t=>{this.labelSettingsWriteStore.setLabelSize(t)},e.DEBOUNCE_TIME)}static{this.DEBOUNCE_TIME=400}handleTopLabelsInput(t){let i=Bf(t,0,50,{round:!0});if(!Number.isNaN(i)){if(i===this.amountOfTopLabels()){this.applyDebouncedTopLabels.cancel();return}this.applyDebouncedTopLabels(i)}}handleLabelSizeInput(t){let i=Number.parseFloat(t.target.value);if(Number.isNaN(i))return;let n=Math.min(2.5,Math.max(.75,i)),r=Math.round(n/.25)*.25,a=Math.round(r*100)/100;if(a===this.labelSize()){this.applyDebouncedLabelSize.cancel();return}this.applyDebouncedLabelSize(a)}setShowMetricLabelNodeName(t){this.labelSettingsWriteStore.setShowMetricLabelNodeName(t.target.checked)}setShowMetricLabelNameValue(t){this.labelSettingsWriteStore.setShowMetricLabelNameValue(t.target.checked)}setColorLabel(t,i){this.labelSettingsWriteStore.setColorLabels({[i]:t.target.checked})}setLabelMode(t){this.labelSettingsWriteStore.setLabelMode(t)}setGroupLabelCollisions(t){this.labelSettingsWriteStore.setGroupLabelCollisions(t.target.checked)}setLabelsPerMap(t){this.labelSettingsWriteStore.setLabelsPerMap(t)}resetSettings(){this.labelSettingsWriteStore.resetSettings(this.resetSettingsKeys)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-label-settings-panel"]],hostAttrs:[1,"contents"],decls:33,vars:18,consts:[[3,"title"],[1,"text-sm"],[1,"flex","items-center","gap-2"],["type","range","min","0","max","50",1,"range","range-primary","range-sm","flex-1",3,"input","value"],["type","number","min","0","max","50",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value"],["aria-label","Top labels scope","title","Pick the top labels across all maps combined or separately for each map",1,"join","w-full"],["title","Scale floating label font size"],["type","range",1,"range","range-primary","range-sm","flex-1",3,"input","min","max","step","value"],["type","number",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","min","max","step","value"],["aria-label","Label mode",1,"join","w-full"],["type","radio","name","labelMode","aria-label","Height",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelMode","aria-label","Color",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],[1,"flex","flex-col","gap-1"],["title","Reset label settings to their defaults",1,"btn","btn-outline","btn-error","gap-2",3,"click"],[1,"fa","fa-undo"],["type","radio","name","labelsPerMap","aria-label","All maps",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],["type","radio","name","labelsPerMap","aria-label","Per map",1,"join-item","btn","btn-sm","flex-1",3,"change","checked"],[1,"text-xs","opacity-60","mb-0.5"],["type","checkbox","aria-label","positive color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],[1,"inline-block","w-4","h-4","rounded-sm"],[1,"text-xs","opacity-60"],["type","checkbox","aria-label","neutral color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["type","checkbox","aria-label","negative color label",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"span",1),f(2,"Top Labels"),y(),w(3,"div",2)(4,"input",3),K("input",function(a){return n.handleTopLabelsInput(a)}),y(),w(5,"input",4),K("input",function(a){return n.handleTopLabelsInput(a)}),y()()(),O(6,k4,3,2,"div",5),w(7,"div",6)(8,"span",1),f(9,"Label Size"),y(),w(10,"div",2)(11,"input",7),K("input",function(a){return n.handleLabelSizeInput(a)}),y(),w(12,"input",8),K("input",function(a){return n.handleLabelSizeInput(a)}),y()()(),w(13,"div",9)(14,"input",10),K("change",function(){return n.setLabelMode(n.LabelMode.Height)}),y(),w(15,"input",11),K("change",function(){return n.setLabelMode(n.LabelMode.Color)}),y()(),w(16,"label",12)(17,"input",13),K("change",function(a){return n.setShowMetricLabelNodeName(a)}),y(),w(18,"span"),f(19,"Show node names"),y()(),w(20,"label",12)(21,"input",13),K("change",function(a){return n.setShowMetricLabelNameValue(a)}),y(),w(22,"span"),f(23,"Show metric values"),y()(),w(24,"label",12)(25,"input",13),K("change",function(a){return n.setGroupLabelCollisions(a)}),y(),w(26,"span"),f(27,"Group overlapping labels"),y()(),O(28,q4,18,15,"div",14),w(29,"button",15),K("click",function(){return n.resetSettings()}),ue(30,"i",16),w(31,"span"),f(32,"Reset label settings"),y()()),i&2&&(le("title",n.topLabelsTitle()),m(4),le("value",n.amountOfTopLabels()),m(),le("value",n.amountOfTopLabels()),m(),z(n.areMultipleMapsVisible()?6:-1),m(5),le("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),m(),le("min",n.MIN_LABEL_SIZE)("max",n.MAX_LABEL_SIZE)("step",n.LABEL_SIZE_STEP)("value",n.labelSize()),m(2),le("checked",n.labelMode()===n.LabelMode.Height),m(),le("checked",n.labelMode()===n.LabelMode.Color),m(2),le("checked",n.showMetricLabelNodeName()),m(4),le("checked",n.showMetricLabelNodeValue()),m(4),le("checked",n.groupLabelCollisions()),m(3),z(n.showColorLabels()?28:-1))},encapsulation:2,changeDetection:0})}}return e})();var Qs=(()=>{class e{constructor(t,i,n){this.labelCreationService=t,this.labelCollisionService=i,this.connectorDrawingService=n}addLeafLabel(t,i,n=!1){this.labelCreationService.addLeafLabel(t,i,n)}clearLabels(){this.labelCreationService.clearLabels(),this.connectorDrawingService.clearConnectors()}clearTemporaryLabel(t){this.labelCreationService.clearTemporaryLabel(t)}hasLabelForNode(t){return this.labelCreationService.hasLabelForNode(t)}suppressLabelForNode(t){this.labelCreationService.suppressLabelForNode(t)}restoreSuppressedLabel(){this.labelCreationService.restoreSuppressedLabel()}setSuppressLayout(t){this.labelCollisionService.setSuppressLayout(t)}destroy(){this.labelCollisionService.destroy(),this.connectorDrawingService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(M(Xs),M(ig),M(Ks))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var sg=(()=>{class e{constructor(t,i,n){this.codeMapStore=t,this.sharedViewReadWindow=i,this.threeSceneService=n,this.VERTICES_PER_LINE=5,this.arrows=new Array,this.HIGHLIGHT_BUILDING_DELAY=1,this.debounceCalculation=Pi(r=>this.resetEdgesOfBuildings(r),this.HIGHLIGHT_BUILDING_DELAY),this.hoveredNodeSubscription=this.sharedViewReadWindow.hoveredNodeId$.pipe(Pe(r=>{if(r!==null){let a=this.threeSceneService.getMapMesh()?.getMeshDescription().getBuildingByPath(r);this.onBuildingHovered(a)}else this.onBuildingUnhovered()})).subscribe(),this.resetEdgesOfBuildings=r=>{if(!this.codeMapStore.getMapState().isEdgeMetricVisible){this.scale();return}this.clearArrows(),this.showEdgesOfBuildings(this.isEdgeApplicableForBuilding(r)?r:void 0),this.scale()},this.onBuildingSelected=r=>{this.isEdgeApplicableForBuilding(r.building)&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()},this.onBuildingDeselected=()=>{this.debounceCalculation.cancel(),this.clearArrows(),this.addEdgePreview()},this.threeSceneService.subscribe("onBuildingSelected",this.onBuildingSelected),this.threeSceneService.subscribe("onBuildingDeselected",this.onBuildingDeselected)}ngOnDestroy(){this.hoveredNodeSubscription.unsubscribe()}onBuildingHovered(t){this.debounceCalculation(t)}onBuildingUnhovered(){this.debounceCalculation.cancel();let{isEdgeMetricVisible:t}=this.codeMapStore.getMapState();t&&(this.clearArrows(),this.showEdgesOfBuildings()),this.scale()}clearArrows(){for(let t of this.arrows)t.traverse(i=>{i.geometry&&i.geometry.dispose(),i.material&&i.material.dispose()});this.arrows=[],this.threeSceneService.edgeArrows.children.length=0}addArrow(t,i,n){let r=this.codeMapStore.getMapState(),a=100*r.edgeHeight,s=this.createCurve(t,i,a),l=ed.getNumber(r.mapColors[n?"outgoingEdge":"incomingEdge"]);this.highlightBuilding(n?i:t),this.setCurveColor(s,l)}addEdgePreview(){let t=this.codeMapStore.getEdgeVisibility();for(let i of t){let n=this.map.get(i.fromNodeName),r=this.map.get(i.toNodeName);if(n&&r&&i.visible!==oi.none&&i.visible){let a=100*this.codeMapStore.getMapState().edgeHeight,s=this.createCurve(n,r,a);this.previewMode(s,i.visible)}}}addEdgeMapBasedOnNodes(t){this.map=this.getNodesAsMap(t)}scale(){let{scaling:t}=this.codeMapStore.getMapState();for(let i of this.arrows)i.scale.x=t.x,i.scale.y=t.y,i.scale.z=t.z}isEdgeApplicableForBuilding(t){return this.codeMapStore.getMapState().isEdgeMetricVisible&&t&&!t.node.flat}showEdgesOfBuildings(t){let i=new Map,n=this.threeSceneService.getSelectedBuilding();if(n){let{node:r}=n;i.set(r.path,r)}if(t){let{node:r}=t;i.set(r.path,r)}i.size>0?this.buildPairingEdges(i):this.addEdgePreview()}buildPairingEdges(t){let{showIncomingEdges:i,showOutgoingEdges:n,edgeMetric:r}=this.codeMapStore.getMapState();if(!i&&!n)return;let a=this.codeMapStore.getEdges();for(let s of a){if(s.attributes[r]===void 0)continue;let l=this.map.get(s.fromNodeName);if(l===void 0)continue;let d=this.map.get(s.toNodeName);d!==void 0&&(n&&t.has(l.path)?(this.addArrow(l,d,!0),this.threeSceneService.applyHighlights()):i&&t.has(d.path)&&(this.addArrow(l,d,!1),this.threeSceneService.applyHighlights()))}}createCurve(t,i,n){let r=t.outgoingEdgePoint.clone(),a=i.incomingEdgePoint.clone(),s=Math.max(r.y+i.height,a.y+1)+n;return r.setY(s),a.setY(s),new Mu(t.outgoingEdgePoint,r,a,i.incomingEdgePoint)}highlightBuilding(t){let i=this.threeSceneService.getMapMesh().getMeshDescription().getBuildingByPath(t.path);this.threeSceneService.addBuildingsToHighlightingList(i)}setCurveColor(t,i,n=50){let r=t.getPoints(n),a=this.buildLine(r,i);a.add(this.buildArrow(r)),this.threeSceneService.edgeArrows.add(a),this.arrows.push(a)}previewMode(t,i){if(i===oi.both||i===oi.from){let n=this.makeArrowFromBezier(t,!1);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}if(i===oi.both||i===oi.to){let n=this.makeArrowFromBezier(t,!0);this.threeSceneService.edgeArrows.add(n),this.arrows.push(n)}}getNodesAsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}makeArrowFromBezier(t,i,n=50){let r=t.getPoints(n),{incomingEdge:a,outgoingEdge:s}=this.codeMapStore.getMapState().mapColors,l=i?a:s,d=i?r.slice(n+1-this.VERTICES_PER_LINE):r.slice(0,r.length-(n+1-this.VERTICES_PER_LINE));return this.buildEdge(d,ed.getNumber(l))}buildEdge(t,i){let n=this.buildLine(t,i);return n.add(this.buildArrow(t)),n}buildLine(t,i=0){let n=new Gt;n.setFromPoints(t);let r=new cs({color:i,linewidth:1});return new yu(n,r)}buildArrow(t,i=0,n=10,r=10){let a=t.at(-1).clone().sub(t.at(-2).clone()).normalize(),s=t.at(-1).clone();return a.y<0&&(s.y+=n+1),new Tu(a,s,n+1,i,n,r)}static{this.\u0275fac=function(i){return new(i||e)(M(ar),M(Bt),M(ft))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var lg=(()=>{class e{constructor(){this.mapControls=q(Wt)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-toolbox-center-map-button"]],decls:2,vars:0,consts:[["type","button","title","Center map","aria-label","Center map",1,"join-item","btn","btn-sm","btn-square",3,"click"],[1,"fa","fa-compass"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.mapControls.autoFitTo()}),ue(1,"i",1),y())},encapsulation:2,changeDetection:0})}}return e})();var cg=(()=>{class e{constructor(t){this.store=t}setPresentationMode(t){this.store.dispatch(tf({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var dg=(()=>{class e{constructor(){this.preferencesReadWindow=q(Qn),this.viewCubeToolboxWriteStore=q(cg),this.isPresentationMode=R(this.preferencesReadWindow.isPresentationMode$,{requireSync:!0}),this.tooltip=X(()=>this.isPresentationMode()?"Disable flashlight hover effect":"Enable flashlight hover effect")}handleToggle(){this.viewCubeToolboxWriteStore.setPresentationMode(!this.isPresentationMode())}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-toolbox-presentation-mode-button"]],decls:2,vars:3,consts:[["type","button","aria-label","Presentation mode",1,"join-item","btn","btn-sm","btn-square",3,"click","title"],[1,"fa","fa-lightbulb-o"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.handleToggle()}),ue(1,"i",1),y()),i&2&&(Ne("btn-active",n.isPresentationMode()),le("title",n.tooltip()))},encapsulation:2,changeDetection:0})}}return e})();var qd=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-view-cube-toolbox"]],features:[Yi([{provide:Gf,useExisting:Kf}])],decls:4,vars:0,consts:[[1,"join","shadow-md","absolute","top-0","left-1/2","-translate-x-1/2","bg-base-100","rounded"],["view","metrics"]],template:function(i,n){i&1&&(v(0,"div",0),F(1,"cc-toolbox-center-map-button")(2,"cc-toolbox-screenshot-button",1)(3,"cc-toolbox-presentation-mode-button"),b())},dependencies:[lg,Xf,dg],encapsulation:2,changeDetection:0})}}return e})();var fo=()=>new hs({color:16580095}),Vo=()=>new hs({color:16580095}),zr=()=>new hs({color:16580095});var Ys=class e{static buildCube(o){let t=1/o,i=(1-t)/2,n=new ao(t,i,i),r=new ao(i,t+i,i),a=new ao(i,i,i),s=new ao(t,t,i),l=new ao(t,t+i,i);return e.newBuildCubeGroup(n,r,a,s,l)}static newBuildCubeGroup(o,t,i,n,r){let a=new Wn,{group:s,frontLeft:l,frontCenter:d,frontRight:c,middleLeft:h,middleCenter:p,middleRight:u,backLeft:k,backCenter:E,backRight:N}=e.buildCubeTopFace(o,i,n);a.add(s);let{group:j,frontLeftEdge:ee,frontCenterFace:B,frontRightEdge:H,middleLeftFace:G,middleRightFace:Z,backLeftEdge:ie,backCenterFace:oe,backRightEdge:ne}=e.buildCubeSides(t,r);return a.add(j),{group:a,top:{front:{left:l,center:d,right:c},middle:{left:h,center:p,right:u},back:{left:k,center:E,right:N}},sides:{front:{left:ee,center:B,right:H},middle:{left:G,right:Z},back:{left:ie,center:oe,right:ne}}}}static buildCubeTopFace(o,t,i){let n=new st(t,zr()),r=new st(o,fo()),a=new st(t,zr()),s=new st(o,fo()),l=new st(i,Vo()),d=new st(o,Vo()),c=new st(t,zr()),h=new st(o,fo()),p=new st(t,zr()),u=i.parameters.height/2+t.parameters.height/2;n.position.x-=u,n.position.y-=u,r.position.y-=u,a.position.x+=u,a.position.y-=u,s.position.x-=u,s.rotation.z=Math.PI/2,d.position.x+=u,d.rotation.z=Math.PI/2,c.position.x-=u,c.position.y+=u,h.position.y+=u,p.position.x+=u,p.position.y+=u;let k=new Wn;return k.rotation.x=Math.PI/2,k.position.y+=u,k.add(n),k.add(r),k.add(a),k.add(s),k.add(l),k.add(d),k.add(c),k.add(h),k.add(p),{group:k,frontLeft:n,frontCenter:r,frontRight:a,middleLeft:s,middleCenter:l,middleRight:d,backLeft:c,backCenter:h,backRight:p}}static buildCubeSides(o,t){let i=new st(o,fo()),n=new st(t,Vo()),r=new st(o,fo()),a=new st(t,Vo()),s=new st(t,Vo()),l=new st(o,fo()),d=new st(t,Vo()),c=new st(o,fo()),h=t.parameters.width/2+o.parameters.width/2,p=o.parameters.width/2;i.position.x-=h,i.position.z+=h,n.position.z+=h,r.position.x+=h,r.position.z+=h,a.position.x-=h,a.rotation.y=Math.PI/2,s.position.x+=h,s.rotation.y=Math.PI/2,l.position.x-=h,l.position.z-=h,d.position.z-=h,c.position.x+=h,c.position.z-=h;let u=new Wn;return u.position.y-=p,u.add(i),u.add(n),u.add(r),u.add(a),u.add(s),u.add(l),u.add(d),u.add(c),{group:u,frontLeftEdge:i,frontCenterFace:n,frontRightEdge:r,middleLeftFace:a,middleRightFace:s,backLeftEdge:l,backCenterFace:d,backRightEdge:c}}};var mg=(()=>{class e{constructor(t,i){this.threeMapControlsService=t,this.cdr=i}ngOnInit(){this.maxZoom=this.threeMapControlsService.MAX_ZOOM,this.minZoom=this.threeMapControlsService.MIN_ZOOM,this.threeMapControlsService.zoomPercentage$.subscribe(t=>{this.zoomPercentage=t,this.cdr.detectChanges()})}onInput(t){let i=t.target,n=Number.parseFloat(i.value);this.threeMapControlsService.setZoomPercentage(n)}zoomIn(){this.threeMapControlsService.setZoomPercentage(Math.min(this.zoomPercentage+10,this.maxZoom))}zoomOut(){this.threeMapControlsService.setZoomPercentage(Math.max(this.zoomPercentage-10,this.minZoom))}static{this.\u0275fac=function(i){return new(i||e)(te(Wt),te(pn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-zoom-slider"]],decls:8,vars:4,consts:[[1,"absolute","right-[5px]","top-[10px]","m-2.5","flex","h-[150px]","flex-col","items-center","gap-2.5"],["data-testid","zoomIn",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["type","range","id","zoomRange","data-testid","zoomRange","aria-label","Zoom level",1,"h-[100px]","w-[3px]","appearance-none","bg-neutral-500","text-neutral-500","opacity-70","outline-none","transition-opacity","duration-200","[-webkit-appearance:none]","[direction:rtl]","[writing-mode:vertical-lr]","[&::-moz-range-thumb]:h-[3px]","[&::-moz-range-thumb]:w-[10px]","[&::-moz-range-thumb]:cursor-pointer","[&::-moz-range-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:h-[3px]","[&::-webkit-slider-thumb]:w-[10px]","[&::-webkit-slider-thumb]:cursor-pointer","[&::-webkit-slider-thumb]:appearance-none","[&::-webkit-slider-thumb]:bg-neutral-500","[&::-webkit-slider-thumb]:[-webkit-appearance:none]",3,"input","min","max","value"],["data-testid","zoomOut",1,"m-0","cursor-pointer","border-none","bg-transparent","p-0","text-base","text-neutral-500",3,"click"],["id","zoomValue",1,"w-[30px]","text-center","text-[10px]","text-neutral-500"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.zoomIn()}),f(2," + "),y(),w(3,"input",2),K("input",function(a){return n.onInput(a)}),y(),w(4,"button",3),K("click",function(){return n.zoomOut()}),f(5," - "),y(),w(6,"span",4),f(7),y()()),i&2&&(m(3),le("min",n.minZoom)("max",n.maxZoom)("value",n.zoomPercentage),m(4),he("",n.zoomPercentage==null?null:n.zoomPercentage.toFixed(0),"%"))},encapsulation:2,changeDetection:0})}}return e})();var $r=(()=>{class e{constructor(t){this.threeMapControlsService=t,this.eventEmitter=new Qu,this.currentlyHovered=null,this.isDragging=!1}init(t,i,n){this.cubeGroup=t,this.camera=i,this.renderer=n,this.initOrbitalControl(i,n),this.initRendererEventListeners(n)}resetIsDragging(){this.isDragging=!1}initOrbitalControl(t,i){this.controls=new ys(t,i.domElement),this.controls.maxPolarAngle=Math.PI/2,this.controls.enableZoom=!1,this.controls.enablePan=!1,this.controls.rotateSpeed=1}initRendererEventListeners(t){t.domElement.addEventListener("mousemove",i=>this.onDocumentMouseMove(i)),t.domElement.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.domElement.addEventListener("mousedown",i=>this.onDocumentMouseClick(i,"mousedown")),t.domElement.addEventListener("dblclick",i=>this.onDocumentMouseClick(i,"dblclick")),t.domElement.addEventListener("mouseleave",i=>this.onWindowMouseLeave(i)),t.domElement.addEventListener("mouseenter",()=>this.onDocumentMouseEnter())}onDocumentMouseClick(t,i){this.isDragging=!0,this.checkMouseIntersection(t,i)}onWindowMouseLeave(t){(t.relatedTarget==null||!(t.relatedTarget instanceof HTMLCanvasElement))&&this.enableRotation(!1)}onDocumentMouseEnter(){this.enableRotation(!0)}enableRotation(t){this.controls.enableRotate=t}checkMouseIntersection(t,i){this.getCubeIntersectedByMouse(t)||this.eventEmitter.emit("viewCubeEventPropagation",{type:i,event:t})}getCubeIntersectedByMouse(t){let i=this.transformIntoCanvasVector(t),n=new ps;n.setFromCamera(i,this.camera);let r=[];for(let s of Zi(this.cubeGroup))bi(s)&&r.push(s.data);let[a]=n.intersectObjects(r);return a?a.object:null}transformIntoCanvasVector(t){let{domElement:i}=this.renderer,n=this.renderer.getPixelRatio(),r=i.getBoundingClientRect(),a=(t.clientX-r.left)/i.width*n*2-1,s=-((t.clientY-r.top)/i.height*n)*2+1;return new Ge(a,s)}propagateMovement(){if(this.isDragging){let t=this.camera.position;this.threeMapControlsService.rotateCameraInVectorDirection(-t.x,-t.y,-t.z)}return this.isDragging}onDocumentMouseMove(t){if(this.propagateMovement())return;let i=this.getCubeIntersectedByMouse(t);i?this.currentlyHovered&&i.uuid!==this.currentlyHovered.uuid?this.triggerViewCubeUnhoverEvent():this.currentlyHovered||this.triggerViewCubeHoverEvent(i):(this.currentlyHovered&&this.triggerViewCubeUnhoverEvent(),this.eventEmitter.emit("viewCubeEventPropagation",{type:"mousemove",event:t}))}onDocumentMouseUp(t){this.isDragging=!1;let i=this.getCubeIntersectedByMouse(t);i?this.eventEmitter.emit("viewCubeClicked",{cube:i}):this.eventEmitter.emit("viewCubeEventPropagation",{type:"mouseup",event:t})}triggerViewCubeHoverEvent(t){this.currentlyHovered=t,_i(Mi.Pointer),this.eventEmitter.emit("viewCubeHoveredEvent",{cube:t})}triggerViewCubeUnhoverEvent(){this.currentlyHovered=null,_i(Mi.Default),this.eventEmitter.emit("viewCubeUnHoveredEvent")}subscribe(t,i){this.eventEmitter.on(t,n=>{i(n)})}static{this.\u0275fac=function(i){return new(i||e)(M(Wt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Td=(()=>{class e{constructor(t,i,n){this.elementReference=t,this.threeMapControlsService=i,this.viewCubeMouseEvents=n,this.WIDTH=200,this.HEIGHT=200,this.LENGTH_VIEWCUBE=1,this.hoverInfo={cube:null,originalMaterial:null},this.cubeDefinition={top:null,sides:null},this.onCameraChanged=r=>{let a=this.calculateCameraPosition(r.camera);this.setCameraPosition(a),this.renderer.render(this.scene,this.camera)},this.onCubeHovered=r=>{this.hoverInfo={cube:r.cube,originalMaterial:r.cube.material},this.hoverInfo.cube.material.emissive=new Vn(16777215),this.renderer.render(this.scene,this.camera)},this.onCubeUnhovered=()=>{this.hoverInfo.cube.material.emissive=new Vn(0),this.hoverInfo.cube=null,this.renderer.render(this.scene,this.camera)},this.onCubeClicked=r=>{switch(r.cube){case this.cubeDefinition.top.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,1);break;case this.cubeDefinition.top.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,1);break;case this.cubeDefinition.top.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,1);break;case this.cubeDefinition.top.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,0);break;case this.cubeDefinition.top.middle.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,0);break;case this.cubeDefinition.top.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,0);break;case this.cubeDefinition.top.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,-1);break;case this.cubeDefinition.top.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,-1);break;case this.cubeDefinition.top.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,-1);break;case this.cubeDefinition.sides.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,-1);break;case this.cubeDefinition.sides.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,0);break;case this.cubeDefinition.sides.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,-1);break;case this.cubeDefinition.sides.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,0);break;case this.cubeDefinition.sides.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,0);break;case this.cubeDefinition.sides.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,1);break;case this.cubeDefinition.sides.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,1);break;case this.cubeDefinition.sides.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,1);break}}}ngOnInit(){this.initScene(),this.initLights(),this.initRenderer(this.elementReference.nativeElement),this.initCube(),this.initAxesHelper(),this.initCamera(),this.viewCubeMouseEvents.init(this.cubeGroup,this.camera,this.renderer),this.threeMapControlsService.subscribe("onCameraChanged",this.onCameraChanged),this.viewCubeMouseEvents.subscribe("viewCubeHoveredEvent",this.onCubeHovered),this.viewCubeMouseEvents.subscribe("viewCubeUnHoveredEvent",this.onCubeUnhovered),this.viewCubeMouseEvents.subscribe("viewCubeClicked",this.onCubeClicked)}initAxesHelper(){let t=new Iu(1.3),i=-(this.LENGTH_VIEWCUBE/2)+.01;t.position.x+=i,t.position.y+=i,t.position.z+=i,this.scene.add(t)}initCube(){let{group:t,top:i,sides:n}=Ys.buildCube(1.9);this.cubeGroup=t,this.cubeDefinition.top=i,this.cubeDefinition.sides=n;let r=new qu(this.cubeGroup,new Vn(0));this.scene.add(this.cubeGroup),this.scene.add(r)}setCameraPosition(t){this.camera.position.set(t.x,t.y,t.z),this.camera.lookAt(0,0,0),this.camera.updateProjectionMatrix()}calculateCameraPosition(t){let i=this.threeMapControlsService.controls.target.clone();return t.position.clone().sub(i).normalize().multiplyScalar(3)}initScene(){this.scene=new ls}initRenderer(t){this.renderer=new us({alpha:!0,antialias:!0}),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.renderer.setPixelRatio(window.devicePixelRatio),t.appendChild(this.renderer.domElement)}initCamera(){this.camera=new ss(45,this.WIDTH/this.HEIGHT,.1,1e3),this.camera.position.z=4}initLights(){this.lights=new Wn;let t=new Eu(7368816,2.8),i=new Jc(14737632,1.8);i.position.set(50,10,8).normalize();let n=new Jc(14737632,1.8);n.position.set(-50,10,-8).normalize(),this.lights.add(t),this.lights.add(i),this.lights.add(n),this.scene.add(this.lights)}static{this.\u0275fac=function(i){return new(i||e)(te(Lt),te(Wt),te($r))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-view-cube"]],hostAttrs:[1,"absolute","right-0","top-[10px]","z-[11]","[transition:right_0.3s_ease]","[&.sideBarVisible]:right-[var(--cc-inspector-width)]"],decls:2,vars:0,template:function(i,n){i&1&&F(0,"cc-view-cube-toolbox")(1,"cc-zoom-slider")},dependencies:[qd,mg],encapsulation:2,changeDetection:0})}}return e})();var Zs=(function(e){return e[e.LeftClick=0]="LeftClick",e[e.RightClick=2]="RightClick",e})(Zs||{}),Wo=(()=>{class e{constructor(t,i,n,r,a,s,l,d,c,h,p){this.threeCameraService=t,this.threeRendererService=i,this.threeSceneService=n,this.codeMapStore=r,this.fileStoreReadWindow=a,this.sharedViewReadWindow=s,this.labelSettingsFacade=l,this.tooltipService=d,this.viewCubeMouseEvents=c,this.threeViewerService=h,this.idToBuilding=p,this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING=3,this.mouse={x:0,y:0},this.oldMouse={x:0,y:0},this.mouseOnLastClick={x:0,y:0},this.isGrabbing=!1,this.isMoving=!1,this.raycaster=new ps,this.labelSelectedBuilding=null,this.subscriptions=[this.fileStoreReadWindow.visibleFileStates$.pipe(Pe(()=>this.onFilesSelectionChanged())).subscribe(),this.sharedViewReadWindow.blacklist$.pipe(Pe(u=>this.onBlacklistChanged(u))).subscribe(),this.sharedViewReadWindow.hoveredNodeId$.pipe(Pe(u=>{u!==null?this.hoverNode(u):this.unhoverNode(!1)})).subscribe()],this.onViewCubeEventPropagation=u=>{switch(u.type){case"mousemove":this.onDocumentMouseMove(u.event);break;case"mouseup":this.onDocumentMouseUp(u.event);break;case"mousedown":this.onDocumentMouseDown(u.event);break;case"dblclick":this.onDocumentDoubleClick();break}},this.onDocumentMouseMove=u=>{this.mouse.x=u.clientX,this.mouse.y=u.clientY,this.updateHovering(),this.viewCubeMouseEvents.propagateMovement()}}ngOnDestroy(){for(let t of this.subscriptions)t.unsubscribe()}start(){this.registerEventListeners(),this.viewCubeMouseEvents.subscribe("viewCubeEventPropagation",this.onViewCubeEventPropagation)}registerEventListeners(){let t=this.threeRendererService.renderer.domElement;t.addEventListener("mousemove",this.onDocumentMouseMove),t.addEventListener("mouseup",i=>this.onDocumentMouseUp(i)),t.addEventListener("mousedown",i=>this.onDocumentMouseDown(i)),t.addEventListener("dblclick",()=>this.onDocumentDoubleClick()),t.addEventListener("mouseleave",i=>this.onDocumentMouseLeave(i)),t.addEventListener("mouseenter",()=>this.onDocumentMouseEnter()),t.addEventListener("wheel",Pi(()=>this.threeRendererService.render()))}hoverNode(t){if(this.isGrabbingOrMoving())return;let{buildings:i}=this.threeSceneService.getMapMesh().getMeshDescription();for(let n of i)if(n.node.path===t){this.hoverBuilding(n,!1);break}this.threeRendererService.render()}unhoverNode(t=!0){this.unhoverBuilding(t),this.threeRendererService.render()}onFilesSelectionChanged(){this.threeSceneService.clearSelection(),this.threeSceneService.clearConstantHighlight(),this.tooltipService.hide()}onBlacklistChanged(t){let i=this.threeSceneService.getSelectedBuilding();this.tooltipService.hide(),i&&_p(i.node.path,t)&&this.threeSceneService.clearSelection(),this.unhoverBuilding()}updateHovering(){if(this.hasMouseMoved(this.oldMouse)){if(this.isGrabbingOrMoving()){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.threeRendererService.render();return}this.oldMouse.x=this.mouse.x,this.oldMouse.y=this.mouse.y;let t=this.threeSceneService.getMapMesh();if(t){this.threeCameraService.camera.updateMatrixWorld(!1);let i=this.transformHTMLToSceneCoordinates(),n=this.threeCameraService.camera;n.isPerspectiveCamera&&this.raycaster.setFromCamera(i,n),this.intersectedBuilding=t.checkMouseRayMeshIntersection(i,n);let r=this.threeSceneService.getHighlightedBuilding(),a=this.intersectedBuilding;r?.id!==a?.id?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),r&&a&&!this.isGrabbingOrMoving()?(this.threeSceneService.prepareHighlightTransition(),this.showTooltipForBuilding(a),this.hoverBuilding(a)):(this.unhoverBuilding(),a&&!this.isGrabbingOrMoving()&&(this.showTooltipForBuilding(a),this.hoverBuilding(a)))):!a&&this.codeMapStore.getHoveredNodeId()!==null?(this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding()):a&&this.tooltipService.isVisible()&&this.tooltipService.updatePosition(this.mouse.x,this.mouse.y)}}}drawLabelSelectedBuilding(t){this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.labelSelectedBuilding!==null&&this.labelSettingsFacade.clearTemporaryLabel(this.labelSelectedBuilding),t?.node?.isLeaf&&(this.labelSettingsFacade.hasLabelForNode(t.node)||this.labelSettingsFacade.addLeafLabel(t.node,0,!0),this.labelSelectedBuilding=t.node)}showTooltipForBuilding(t){this.labelSettingsFacade.hasLabelForNode(t.node)&&this.labelSettingsFacade.suppressLabelForNode(t.node),this.tooltipService.show(t.node,this.mouse.x,this.mouse.y)}clearLabelSelectedBuilding(){this.labelSelectedBuilding!==null&&(this.labelSettingsFacade.clearTemporaryLabel(this.labelSelectedBuilding),this.labelSelectedBuilding=null)}enableOrbitalsRotation(t){this.threeViewerService.enableRotation(t),this.viewCubeMouseEvents.enableRotation(t)}onDocumentMouseEnter(){this.enableOrbitalsRotation(!0)}onDocumentMouseLeave(t){this.labelSettingsFacade.setSuppressLayout(!1),this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.unhoverBuilding(),t.relatedTarget instanceof HTMLCanvasElement||this.enableOrbitalsRotation(!1)}onDocumentDoubleClick(){let t=this.threeSceneService.getHighlightedBuilding(),i=this.threeSceneService.getSelectedBuilding(),n=t?.node.link;if(n&&!this.hasMouseMoved(this.mouseOnLastClick)&&window.open(n,"_blank"),i?.node.isLeaf){let r=i.node.link;if(r){window.open(r,"_blank");return}}}onDocumentMouseDown(t){t.button===Zs.RightClick&&(this.isMoving=!0,_i(Mi.Moving)),t.button===Zs.LeftClick&&(this.isGrabbing=!0,_i(Mi.Grabbing)),this.labelSettingsFacade.setSuppressLayout(!0),this.tooltipService.hide(),this.labelSettingsFacade.restoreSuppressedLabel(),this.mouseOnLastClick={x:t.clientX,y:t.clientY},document.activeElement.blur()}onDocumentMouseUp(t){this.labelSettingsFacade.setSuppressLayout(!1),this.viewCubeMouseEvents.resetIsDragging(),t.button===Zs.LeftClick?this.onLeftClick():this.onRightClick(),this.intersectedBuilding!==void 0?_i(Mi.Pointer):_i(Mi.Default)}onRightClick(){this.isMoving=!1,this.intersectedBuilding&&!this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)&&this.codeMapStore.setRightClickedNodeData({nodeId:this.intersectedBuilding.node.path,xPositionOfRightClickEvent:this.mouse.x,yPositionOfRightClickEvent:this.mouse.y,origin:"codeMap"}),this.threeRendererService.render()}onLeftClick(){this.isGrabbing=!1,this.hasMouseMovedBeyondThreshold(this.mouseOnLastClick)||(this.intersectedBuilding?(this.threeSceneService.selectBuilding(this.intersectedBuilding),this.drawLabelSelectedBuilding(this.intersectedBuilding)):(this.threeSceneService.clearSelection(),this.clearLabelSelectedBuilding()),this.threeSceneService.clearConstantHighlight()),this.threeRendererService.render()}hasMouseMovedBeyondThreshold({x:t,y:i}){return Math.abs(this.mouse.x-t)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING||Math.abs(this.mouse.y-i)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING}hasMouseMoved({x:t,y:i}){return this.mouse.x!==t||this.mouse.y!==i}isGrabbingOrMoving(){return this.isGrabbing||this.isMoving}hoverBuilding(t,i=!0){_i(Mi.Pointer);let r=this.codeMapStore.getIdToNode().get(t.node.id);for(let{data:a}of Zi(r)){let s=this.idToBuilding.get(a.id);s&&this.threeSceneService.addBuildingsToHighlightingList(s)}this.threeSceneService.applyHighlights(),i&&this.codeMapStore.setHoveredNodeId(t.node.path)}transformHTMLToSceneCoordinates(){let{renderer:t,renderer:{domElement:i}}=this.threeRendererService,n=t.getPixelRatio(),r=i.getBoundingClientRect(),a=this.mouse.x/i.width*n*2-1,s=-((this.mouse.y-r.top)/i.height*n)*2+1;return{x:a,y:s}}unhoverBuilding(t=!0){this.isGrabbingOrMoving()||_i(Mi.Default),this.threeSceneService.getConstantHighlight().size>0?this.threeSceneService.clearHoverHighlight():this.threeSceneService.clearHighlight(),t&&this.codeMapStore.setHoveredNodeId(null)}static{this.\u0275fac=function(i){return new(i||e)(M(Kn),M(kt),M(ft),M(ar),M(Te),M(Bt),M(Qs),M(Un),M($r),M(Yn),M(Gn))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var D4=2,jr=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.codeMapStore=t,this.fileStoreReadWindow=i,this.threeSceneService=n,this.labelSettingsFacade=r,this.codeMapArrowService=a,this.threeStatsService=s,this.codeMapMouseEventService=l,this.colorCategoryCountsStore=d,this.nodesByColor={positive:[],neutral:[],negative:[]},this.onIsLoadingFileChanged=c=>{c?this.threeSceneService?.dispose():this.threeStatsService?.resetPanels()},this.subscription=this.fileStoreReadWindow.isLoadingFile$.pipe(Pe(this.onIsLoadingFileChanged)).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}load(t){this.render(t),this.scaleMap()}render(t){let i=this.getNodes(t),n=this.sortVisibleNodesByHeightDescending(i);this.unflattenedNodes=n.filter(({flat:r})=>!r),this.setNewMapMesh(i,n),this.getNodesMatchingColorSelector(this.unflattenedNodes),this.setLabels(this.unflattenedNodes),this.setArrows(n)}setNewMapMesh(t,i){let n=this.codeMapStore.getState(),r=new Ku(i,n,Di(n.files));this.threeSceneService.setMapMesh(t,r)}scaleMap(){this.codeMapMouseEventService.unhoverNode(),this.codeMapArrowService.scale(),this.threeSceneService.scaleHeight(),this.labelSettingsFacade.clearLabels(),this.setLabels(this.unflattenedNodes)}getNodes(t){let i=this.codeMapStore.getState(),n=so(i),{mapState:{layoutAlgorithm:r},files:a}=i,s=Di(a);switch(r){case za.StreetMap:case za.TreeMapStreet:return Uu.createStreetLayoutNodes(t,i,n,su(i),s);case za.SquarifiedTreeMap:return Gu(t,i,n,s);default:return[]}}sortVisibleNodesByHeightDescending(t){return this.codeMapStore.getState().preferences.experimentalFeaturesEnabled?(this.setMinBuildingLength(t),t.filter(n=>n.visible&&n.width>0).sort((n,r)=>r.height-n.height)):t.filter(n=>n.visible&&n.length>0&&n.width>0).sort((n,r)=>r.height-n.height)}setMinBuildingLength(t){for(let i of t)i.length<=0&&(i.length=D4)}getNodesMatchingColorSelector(t){let i=this.codeMapStore.getState(),n=i.mapState.colorRange;this.nodesByColor={positive:[],negative:[],neutral:[]};for(let r of t)if(r.isLeaf){let a=r.attributes[i.mapState.colorMetric];i.mapState.colorMetric==="unary"?this.nodesByColor.positive.push(r):a!==null&&(a<n.from?this.nodesByColor.positive.push(r):a<n.to?this.nodesByColor.neutral.push(r):this.nodesByColor.negative.push(r))}this.colorCategoryCountsStore.setColorCategoryCounts({positive:this.nodesByColor.positive.length,neutral:this.nodesByColor.neutral.length,negative:this.nodesByColor.negative.length}),this.uncheckEmptyColorLabels()}uncheckEmptyColorLabels(){let t=this.codeMapStore.getState().mapState.colorLabels,i={};for(let n of Xc)t[n]&&this.nodesByColor[n].length===0&&(i[n]=!1);Object.keys(i).length>0&&this.codeMapStore.setColorLabels(i)}setBuildingLabel(t,i){for(let n of t)this.labelSettingsFacade.addLeafLabel(n,i)}setLabels(t){if(this.labelSettingsFacade.clearLabels(),t===void 0||t.length===0)return;let i=this.codeMapStore.getState(),{showMetricLabelNodeName:n,showMetricLabelNameValue:r,colorLabels:a,amountOfTopLabels:s,labelMode:l}=i.mapState;if(n||r){let d=t[0].height,c=this.getTopNodeSelector(i,s);if(l===Ri.Color){let{colorMetric:h}=i.mapState,p=c(Xc.filter(u=>a[u]).flatMap(u=>this.nodesByColor[u]).filter(u=>Number.isFinite(u.attributes[h])),u=>u.attributes[h]);this.setBuildingLabel(p,d)}else{let h=c(t.filter(p=>p.isLeaf),p=>p.height??0);this.setBuildingLabel(h,d)}}}getTopNodeSelector(t,i){return Ss(t)?(n,r)=>X0(n,a=>as(a.path),r,i):(n,r)=>yd(n,r,i)}setArrows(t){this.codeMapArrowService.clearArrows(),this.codeMapArrowService.addEdgeMapBasedOnNodes(t),this.codeMapArrowService.addEdgePreview()}static{this.\u0275fac=function(i){return new(i||e)(M(ar),M(Te),M(ft),M(Qs),M(sg),M(lf),M(Wo),M(Xn))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var F4=1e3/60,Js=(()=>{class e{constructor(t,i,n,r,a,s,l,d){this.store=t,this.actions$=i,this.threeRendererService=n,this.codeMapRenderService=r,this.threeViewerService=a,this.activeViewStore=s,this.viewReadinessStore=l,this.errorHandler=d,this.actionsRequiringRender$=this.actions$.pipe(ct(...U0)),this.mapDataChange$=St([this.store.select(Et),this.actionsRequiringRender$]).pipe(ke(([c])=>c)),this.dataChangedWhileMetricsViewIsShown$=this.mapDataChange$.pipe(ei(this.activeViewStore.activeView$),Re(([,c])=>c==="metrics"),ke(([c])=>c)),this.switchedToStaleMetricsView$=this.activeViewStore.activeView$.pipe(Re(c=>c==="metrics"&&this.viewReadinessStore.isStale("metrics")),Ut(()=>this.threeViewerService.isMapCanvasMounted$.pipe(Re(Boolean),ut(1))),ei(this.store.select(Et)),ke(([,c])=>c)),this.renderCodeMap$=Fe(()=>Ui(this.dataChangedWhileMetricsViewIsShown$,this.switchedToStaleMetricsView$).pipe(Re(c=>!!c.unifiedMapNode),zh(F4,Ph,{leading:!1,trailing:!0}),Pe(c=>this.renderMap(c)),Gi()),{dispatch:!1})}renderMap(t){try{this.codeMapRenderService.load(t.unifiedMapNode),this.threeRendererService.render()}catch(i){this.errorHandler.handleError(i)}finally{Ts()}}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(mt),M(kt),M(jr),M(Yn),M(or),M(tr),M($h))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var N4=350,pg=(()=>{class e{constructor(t,i,n,r){this.store=t,this.actions$=i,this.renderCodeMapEffect=n,this.viewReadinessStore=r,this.hideLoadingFileOnCommit$=Fe(()=>this.actions$.pipe(ct(ni),ke(()=>jp({value:!1})))),this.markViewsStaleOnDataChange$=Fe(()=>Ui(this.store.select(gn).pipe(hi(1)),this.actions$.pipe(ct(ni))).pipe(Pe(()=>{this.viewReadinessStore.markAllStale()})),{dispatch:!1}),this.markMetricsReadyOnRender$=Fe(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(Jt(N4),Re(()=>this.viewReadinessStore.isStale("metrics")),Pe(()=>{this.viewReadinessStore.markReady("metrics")})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(mt),M(Js),M(tr))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var ug=[Js,H0,pg];var sr=e=>(e=e.trim(),e.startsWith("*")||e.endsWith("*")||e.startsWith("/")||e.startsWith("./")?e:!e.startsWith('"')&&!e.endsWith('"')?e.startsWith("!")?e:`*${e}*`:e);var el=(e,o)=>{let t=[],i=o.split(",");if(i[0].startsWith("!")){i[0]=i[0].slice(1);for(let n of i)n.length>0&&t.push({path:`!${sr(n)}`,type:e})}else for(let n of i)if(n.length>0){if(n.startsWith("!"))break;n=sr(n),t.push({path:n,type:e})}return t};var fg="BlacklistExtensionAction",Id=(e,...o)=>({type:fg,action:{type:e},extensions:o}),gg=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.searchPattern2BlacklistItems$=this.actions$.pipe(ct(fg),ke(n=>({blackListType:n.action.type,extensionToBlacklist:el(n.action.type,n.extensions.join(","))})),Gi()),this.blackListExtensions$=Fe(()=>this.searchPattern2BlacklistItems$.pipe(Re(n=>n.blackListType==="flatten"||n.blackListType==="exclude"),Pe(n=>{this.store.dispatch(no({items:n.extensionToBlacklist}))})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var bg=[gg];var vg=[];var xg=(()=>{class e{constructor(t){this.store=t,this.updateAmountOfEdgePreviews$=Fe(()=>St([this.store.select(ws),this.store.select(Ga)]).pipe(hi(1),Re(([i,n])=>n>i),ke(([i])=>eo({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var B4=Ie(Yp,Yu,(e,o)=>({heightMetric:e,isLinked:o})),wg=(()=>{class e{constructor(t){this.store=t,this.linkHeightAndColorMetric$=Fe(()=>this.store.select(B4).pipe(Re(({isLinked:i})=>i),ke(({heightMetric:i})=>Nt({value:i}))))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var lr=e=>{let o=e.maxValue-e.minValue,t=Math.round(o/3),i=t+e.minValue,n=t*2+e.minValue;return{from:i,to:n}};var Sg=(()=>{class e{constructor(t,i){this.actions$=t,this.store=i,this.resetColorRangeOnColorMetricChange$=Fe(()=>this.actions$.pipe(ct(Nt),Ut(()=>this.store.select(lo).pipe(ut(1))),ke(n=>wi({value:lr(n)}))))}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var yg=(()=>{class e{constructor(t){this.store=t,this.resetIsEdgeMetricVisible$=Fe(()=>this.store.select(bn).pipe(ei(this.store.select(Jp)),Re(([,i])=>!i),ke(()=>_n())))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Cg=(()=>{class e{constructor(t,i,n){this.store=t,this.mapStateReadWindow=i,this.metricsLensSourceReadWindow=n,this.updateMapColors$=Fe(()=>this.store.select(Up).pipe(ke(r=>{let a=this.metricsLensSourceReadWindow.getAttributeDescriptors(),s=this.mapStateReadWindow.getMapColors();if(a[r]?.direction===1){let l=JSON.parse(zf(s)),d=l.negative;return l.negative=l.positive,l.positive=d,Ai({value:l})}return Ai({value:s??Pt})})))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(ve),M(vs))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Mg=[Sg,Cg,wg,yg,xg];var cr=(()=>{class e{constructor(t){this.store=t}setStandard(t){this.store.dispatch(Dp({files:t}))}removeFiles(t){this.store.dispatch(Rp({fileNames:t}))}setDelta(t,i){this.store.dispatch(Pp({referenceFile:t,comparisonFile:i}))}setDeltaReference(t){this.store.dispatch(Fp({file:t}))}setDeltaComparison(t){this.store.dispatch(Lp({file:t}))}switchReferenceAndComparison(){this.store.dispatch(Ap())}setFiles(t){this.store.dispatch(Ip({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var tl=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.filesRepo=i,this.navBarWriteStore=n,this.lastSetFilesOfPreviousMode=[],this.subscription=this.fileStoreReadWindow.files$.pipe(Wh(),Re(([r,a])=>Di(r)!==Di(a)||a.length===0),Pe(([r,a])=>{this.lastSetFilesOfPreviousMode=a.length===0?a:r})).subscribe()}ngOnDestroy(){this.subscription.unsubscribe()}toggle(){let t=this.filesRepo.getFiles();if(!Di(t)){this.lastSetFilesOfPreviousMode=this.filterNoneExisting(t,this.lastSetFilesOfPreviousMode);let n=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===ii.Reference)??t.find(a=>a.selectedAs===ii.Partial);if(n===void 0)return;let r=this.lastSetFilesOfPreviousMode.find(a=>a.selectedAs===ii.Comparison);this.navBarWriteStore.setDelta(n.file,r?.file);return}if(this.lastSetFilesOfPreviousMode.length>0){this.navBarWriteStore.setFiles(this.lastSetFilesOfPreviousMode);return}let i=t.find(n=>n.selectedAs===ii.Reference)?.file;i!==void 0&&this.navBarWriteStore.setStandard([i])}filterNoneExisting(t,i){return i.filter(n=>t.find(r=>Vp(r.file,n.file)))}static{this.\u0275fac=function(i){return new(i||e)(M(Te),M(Wp),M(cr))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var O4="This file has no domain-language data \u2014 switched to the map view.",z4="Left compare mode \u2014 the domain view shows a single word cloud.",$4=0,_g=(()=>{class e{constructor(){this.store=q(me),this.router=q(un),this.toastService=q(Wf),this.fileSelectionModeService=q(tl),this.unreachableReason$=St([this.store.select(Yf),this.store.select(Ua)]).pipe(ke(([t,i])=>({reason:this.toUnreachableReason(t,i),wasOnDomainRoute:this.isOnDomainRoute()})),Jt($4),Ra({bufferSize:1,refCount:!0})),this.navigated$=this.router.events.pipe(Re(t=>t instanceof dp)),this.redirectAwayFromUnreachableDomainView$=Fe(()=>this.unreachableReason$.pipe(Re(({reason:t,wasOnDomainRoute:i})=>t!==null&&i&&this.isOnDomainRoute()),Pe(({reason:t})=>this.redirectToMetricsView(t))),{dispatch:!1}),this.handleTheDomainViewBeingOpenedWhileUnreachable$=Fe(()=>this.navigated$.pipe(Ut(()=>this.unreachableReason$.pipe(ut(1))),Re(({reason:t})=>t!==null&&this.isOnDomainRoute()),Pe(({reason:t})=>this.makeTheDomainViewReachable(t))),{dispatch:!1})}makeTheDomainViewReachable(t){if(t==="delta"){this.leaveCompareMode();return}this.redirectToMetricsView(t)}leaveCompareMode(){this.fileSelectionModeService.toggle(),this.toastService.show(z4)}toUnreachableReason(t,i){return t?"missing-domain-data":i?"delta":null}redirectToMetricsView(t){this.router.navigateByUrl(Ei.metrics,{replaceUrl:!0}),t==="missing-domain-data"&&this.toastService.show(O4)}isOnDomainRoute(){return uf(this.router.url)==="domain"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Eg=[_g];var kg=(()=>{class e{constructor(t,i){this.guard=t,this.errorDialogService=i,this.showErrorDialogIfBlacklistItemsResultInEmptyMap$=Fe(()=>this.guard.doBlacklistItemsResultInEmptyMap$.pipe(Re(n=>n.resultsInEmptyMap),Pe(()=>{Ts(),this.errorDialogService.open({title:"Blacklist Error",message:"Excluding all buildings is not possible."})})),{dispatch:!1}),this.addBlacklistItems$=Fe(()=>this.guard.doBlacklistItemsResultInEmptyMap$.pipe(Re(n=>!n.resultsInEmptyMap),ke(n=>no({items:n.items}))))}static{this.\u0275fac=function(i){return new(i||e)(M(Ds),M(Ha))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var qg=[kg];var Tg=e=>e.some(o=>o.name==="rloc")?"rloc":"unary";var j4=["rloc","real_lines_of_code","loc","lines_of_code","lines","statements","functions"],Ig=["complexity","mcc","cognitive_complexity","sonar_complexity","sonar_cognitive_complexity","max_nesting_level","indentation_level"];function Rg(e){return e.some(o=>o.maxValue>0)}function Dg(e,o){let t=[],i;for(let n of e)if(n.maxValue&&(t.push(n.name),i=n.name,--o===0))return t;if(!i)throw new Error("there are no metrics available");for(;o-- >0;)t.push(i);return t}function Ag(e){let o=[],t={AreaMetric:j4,HeightMetric:Ig,ColorMetric:Ig},i=new Set(e.map(n=>n.name));for(let n in t)for(let r of t[n])if(i.has(r)){o.push(r);break}return o}function Lg(e,o,t,i,n,r=!1){let a=new Set(t.map(k=>k.name)),s=new Set(i.map(k=>k.name)),l=k=>!!k&&a.has(k),d=k=>!!k&&s.has(k),c=n?e:Fr,h=r?{areaMetric:null,heightMetric:null,colorMetric:null,distributionMetric:null,edgeMetric:null}:o,p=H4(c,h,t,l);if(p===null)return null;let u=h.edgeMetric;return d(c.edgeMetric)?u=c.edgeMetric:d(u)||(u=i[0]?.name),tt(Ee({},p),{edgeMetric:u})}function H4(e,o,t,i){let n=i(e.areaMetric)?e.areaMetric:o.areaMetric,r=i(e.heightMetric)?e.heightMetric:o.heightMetric,a=i(e.colorMetric)?e.colorMetric:o.colorMetric;if(i(n)&&i(r)&&i(a))return{areaMetric:n,heightMetric:r,colorMetric:a,distributionMetric:o.distributionMetric};if(!Rg(t))return null;let[s,l,d]=U4(t);return{areaMetric:i(e.areaMetric)?e.areaMetric:s,heightMetric:i(e.heightMetric)?e.heightMetric:l,colorMetric:i(e.colorMetric)?e.colorMetric:d,distributionMetric:Tg(t)}}function U4(e){let o=Ag(e),[t,i,n]=o;return t&&i&&n?o:Dg(e,3)}function Fg(e){let o={};for(let t of e)for(let i of Object.keys(t))o[i]||(o[i]=t[i]);return o}function Pg(e){let o={},t={};for(let i of e){for(let n of Object.keys(i.nodes))o[n]||(o[n]=i.nodes[n]);for(let n of Object.keys(i.edges))t[n]||(t[n]=i.edges[n])}return{nodes:o,edges:t}}function Ng(e,o){let t=new Map;if(e.length===1)return e[0].settings.fileSettings.blacklist;for(let i of e)if(i.settings.fileSettings.blacklist)for(let n of i.settings.fileSettings.blacklist){let r={path:o?rs(i.fileMeta.fileName,n.path):n.path,type:n.type};t.set(`${r.path}|${r.type}`,r)}return[...t.values()]}function Rd(e,o){return Ee({},o)}function Bg(e,o){return tt(Ee({},e),{frequency:e.frequency+o.frequency,tfidf:G4(e.tfidf,o.tfidf)})}function G4(e,o){return e===void 0?o:o===void 0?e:Math.max(e,o)}var il=class{constructor(){this.wordsByTextPerPath=new Map}add(o,t,i){let n=this.wordsByTextOf(o);for(let r of t){let a=n.get(r.text);n.set(r.text,a?i(a,r):Ee({},r))}}toDomainLensData(){let o={};for(let[t,i]of this.wordsByTextPerPath)o[t]=[...i.values()];return o}wordsByTextOf(o){let t=this.wordsByTextPerPath.get(o);return t||(t=new Map,this.wordsByTextPerPath.set(o,t)),t}};function Vg(e,o){if(e.length===1)return e[0].settings.fileSettings.domainWords;let t=new il;for(let i of e)for(let[n,r]of Object.entries(i.settings.fileSettings.domainWords)){if(!o){t.add(n,r,Rd);continue}t.add(uu(i.fileMeta.fileName,n),r,Rd),n===Ar.rootPath&&t.add(Ar.rootPath,r,Bg)}return t.toDomainLensData()}function Wg(e,o){if(e.length===1)return e[0].settings.fileSettings.markedPackages;let t=new Map;for(let i of e)if(i.settings.fileSettings.markedPackages)for(let n of i.settings.fileSettings.markedPackages){let r={path:o?rs(i.fileMeta.fileName,n.path):n.path,color:n.color};t.set(`${r.path}|${r.color}`,r)}return[...t.values()]}var Og=(()=>{class e{constructor(t,i,n,r,a,s,l){this.actions$=t,this.store=i,this.ccStateSnapshot=n,this.fileStoreReadWindow=r,this.mapStateReadWindow=a,this.queryParamsService=s,this.loadInitialFileStore=l,this.fileSetTriggers$=Ui(this.actions$.pipe(ct(ni),ke(d=>({kind:"fileSet",provenance:d}))),this.store.select(gn).pipe(hi(1),ke(()=>({kind:"fileSet",provenance:null})))).pipe(Gi()),this.fileSetChanged$=this.fileSetTriggers$.pipe(Bh(this.fileSetTriggers$.pipe(Jt(0))),Re(d=>d.length>0),ke(d=>({kind:"fileSet",provenance:d.find(c=>c.provenance)?.provenance??null}))),this.reconcileFileSet$=Fe(()=>this.fileSetChanged$.pipe(Pe(d=>{this.reconcile(d)})),{dispatch:!1}),this.reconcileMetricData$=Fe(()=>St([this.store.select(so),this.store.select(xs)]).pipe(hi(1),Jt(0),Pe(()=>{this.reconcile({kind:"metricData"})})),{dispatch:!1})}reconcile(t){t.kind==="fileSet"&&(this.mergeFileSettings(),this.updateFileRoot());let{nodeMetricData:i,edgeMetricData:n}=$n(this.ccStateSnapshot.get());if(!i)return;let r=this.currentSelection(),a=Lg(t.kind==="fileSet"?t.provenance?.urlMetrics??Fr:Fr,r,i,n,this.queryParamsService.hasFile(),t.kind==="fileSet"&&!!t.provenance?.forceDefaultMetrics);if(!a)return;this.applySelection(a,r);let s=a.colorMetric!==r.colorMetric;if(t.kind==="fileSet"||s){let l=Bu(i,a.colorMetric);this.store.dispatch(wi({value:lr(l)}))}t.kind==="fileSet"&&(this.store.dispatch(Pn()),this.updateVisibleTopLabels(),this.applyRestoredSettings(t.provenance?.restoredSettings??null))}applyRestoredSettings(t){t&&(this.loadInitialFileStore.applyMetricsLensSource(t.metricsLensSource),this.loadInitialFileStore.applyDependencyLensSource(t.dependencyLensSource),this.loadInitialFileStore.applyDomainLensSource(t.domainLensSource),this.loadInitialFileStore.applySharedView(t.sharedView))}mergeFileSettings(){let t=this.fileStoreReadWindow.getFiles(),i=fn(t),n=Bp(t),r=this.fileStoreReadWindow.getVisibleFileStates(),a=r.map(({file:d})=>d.settings.fileSettings.attributeTypes),s=r.map(({file:d})=>d.settings.fileSettings.attributeDescriptors),l=Pg(a);this.store.dispatch(ki({value:{sharedView:{blacklist:Ng(i,n),markedPackages:Wg(i,n)},metricsLensSource:{attributeTypes:l.nodes,attributeDescriptors:Fg(s)},dependencyLensSource:{attributeTypes:l.edges},domainLensSource:{words:Vg(i,n)}}}))}updateFileRoot(){let t=this.fileStoreReadWindow.getReferenceFile();t&&Ar.updateRoot(t.map.name)}currentSelection(){let{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}=this.mapStateReadWindow.getMapState();return{areaMetric:t,heightMetric:i,colorMetric:n,edgeMetric:r,distributionMetric:a}}applySelection(t,i){this.dispatchIfChanged(Xa,t.distributionMetric,i.distributionMetric),this.dispatchIfChanged(xi,t.areaMetric,i.areaMetric),this.dispatchIfChanged(yi,t.heightMetric,i.heightMetric),this.dispatchIfChanged(Nt,t.colorMetric,i.colorMetric),this.dispatchIfChanged(Si,t.edgeMetric,i.edgeMetric)}dispatchIfChanged(t,i,n){i!==n&&this.store.dispatch(t({value:i}))}updateVisibleTopLabels(){let t=Fi(this.ccStateSnapshot.get()),i=this.mapStateReadWindow.getAmountOfTopLabels();this.store.dispatch(Ji({value:Math.min(i,Pf(t))}))}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me),M(Vt),M(Te),M(ve),M(As),M($f))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var K4=[to,Ln,An,Ai,vn,xn,Fn,Rn,Dn,nu,_n,Ya,Mn,Cn,Qa,In,wn,eo,Ji,kn,Za,Sn,En,yn,qn,io,Si,wi,Tn,yi,Xa,Nt,xi],Q4=[Li,ts,Pn,is,os,mu,hu,no,Ja,es,ns,Nn,Bn],Y4=[Fu,Lu],Z4=[Ru],J4=[Sf,yf,Cf,kf,Tf,Mf,_f,wf,If,Af,xf,qf,Rf,Df,Ef],zg=[[...Y4],[...Z4],[...J4],[...K4],[...Q4],[...cf],[...Np],ki].flat();var $g=(()=>{class e{constructor(t,i){this.actions$=t,this.ccStateSnapshot=i,this.saveCcState$=Fe(()=>this.actions$.pipe(Re(n=>n.type!==Ao.type),ct(...zg),Jt(500),Pe(async()=>{let n=this.ccStateSnapshot.get();await jf(n)})),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var jg=[Si,yi,Nt,xi,Tp];var Hg=(()=>{class e{constructor(t,i,n,r,a){this.actions$=t,this.mapStateReadWindow=i,this.fileStoreReadWindow=n,this.queryParamsService=r,this.store=a,this.saveMetricsInQueryParameters$=Fe(()=>this.actions$.pipe(ct(...jg),ei(this.store.select(xs)),ke(([,s])=>s&&s.length>0),Jt(100),Pe(s=>{this.updateMetricQueryParameters(s)})),{dispatch:!1})}updateMetricQueryParameters(t){let{edgeMetric:i,heightMetric:n,colorMetric:r,areaMetric:a}=this.mapStateReadWindow.getMapState();this.queryParamsService.write({areaMetric:a,heightMetric:n,colorMetric:r,edgeMetric:i,isEdgeMetricDefined:t,currentFilesAreSampleFiles:this.fileStoreReadWindow.getCurrentFilesAreSampleFiles()})}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(ve),M(Te),M(As),M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Ug=[Og,$g,Hg];var ol=class{constructor(){this.detachedHandles=new Map}routeKey(o){return o.routeConfig?.path??null}shouldDetach(o){return this.routeKey(o)!==null}store(o,t){let i=this.routeKey(o);i!==null&&(t?this.detachedHandles.set(i,t):this.detachedHandles.delete(i))}shouldAttach(o){let t=this.routeKey(o);return t!==null&&this.detachedHandles.has(t)}retrieve(o){let t=this.routeKey(o);return t===null?null:this.detachedHandles.get(t)??null}shouldReuseRoute(o,t){return o.routeConfig===t.routeConfig}};var Gg=(()=>{class e extends rp{constructor(){super(q(Gc),q(np,{optional:!0})??void 0),this.platformLocation=q(Gc)}prepareExternalUrl(t){let i=new URL(this.platformLocation.href);return i.hash=super.prepareExternalUrl(t),i.toString()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Xg={metricsLensSource:Pu,dependencyLensSource:Du,domainLensSource:vf,domainState:Lf,preferences:af,mapState:ru,sharedView:vu,files:$p,isLoadingFile:Hp,currentFilesAreSampleFiles:zp},Kg=e=>(o,t)=>{let i=bf(t)?Ff(Ee({},o),t.value):o;return e(i,t)};var Qg=(()=>{class e{constructor(){this.actions$=q(mt),this.domainSelectionStore=q(Zf),this.resetDomainSelectionAfterLoad$=Fe(()=>this.actions$.pipe(ct(ni),Pe(()=>this.domainSelectionStore.clear())),{dispatch:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var Yg=[Qg];var Zg=e=>({type:"BlacklistSearchPatternAction",action:{type:e}}),Jg=(()=>{class e{constructor(t,i,n){this.actions$=t,this.store=i,this.blacklistExclusionGuard=n,this.searchPattern2BlacklistItems$=this.actions$.pipe(ct("BlacklistSearchPatternAction"),ei(this.store.select(oo)),ke(([r,a])=>({type:r.action.type,blacklistItems:el(r.action.type,a)})),Gi()),this.flattenSearchPattern$=Fe(()=>this.searchPattern2BlacklistItems$.pipe(Re(r=>r.type==="flatten"),Pe(r=>{this.store.dispatch(no({items:r.blacklistItems})),this.store.dispatch(Li({value:""}))})),{dispatch:!1}),this.excludeSearchPattern$=Fe(()=>this.searchPattern2BlacklistItems$.pipe(Re(r=>r.type==="exclude"),Pe(()=>{this.blacklistExclusionGuard.doBlacklistItemsResultInEmptyMap$.pipe(ut(1),Re(r=>!r.resultsInEmptyMap),Pe(()=>{this.store.dispatch(Li({value:""}))})).subscribe()}),ke(r=>pu({items:r.blacklistItems}))))}static{this.\u0275fac=function(i){return new(i||e)(M(mt),M(me),M(Ds))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var e1=[Jg];var e5=(e,o,t,i,n)=>{let r=[],a=Dd("area",e.areaMetric,o,n);a&&r.push(a);let s=Dd("height",e.heightMetric,o,n);s&&r.push(s);let l=Dd("color",e.colorMetric,o,n);l&&!i&&r.push(tt(Ee({},l),{inverted:t.isColorRangeInverted===!0}));let d=t5(e.edgeMetric,o,n);return d&&r.push(d),r},Dd=(e,o,t,i)=>{if(o)return{kind:e,metricName:o,value:i?.attributes?.[o],descriptor:t?.[o]}},t5=(e,o,t)=>{if(!e)return;let i=t?.edgeAttributes?.[e];if(i)return{kind:"edge",metricName:e,incoming:i.incoming??0,outgoing:i.outgoing??0,descriptor:o?.[e]}},t1=Ie(Hn,bs,Ka,Ua,Xt,e5);var i5=.3333333333333333,o5=2/3,Ad=(e,o,t,i)=>{if(o===void 0||t===void 0||t===o)return{fraction:1,severity:"neutral"};let n=n5((e-o)/(t-o));return{fraction:n,severity:r5(i===1?1-n:n)}},n5=e=>Math.min(1,Math.max(0,e)),r5=e=>e<i5?"success":e<o5?"warning":"error";var Ld=e=>e===void 0||e===0||Number.isNaN(e),Fd=e=>Ld(e.value)&&!e.delta,i1={fraction:0,severity:"neutral"},a5="unary",s5=(e,o,t,i)=>e?.attributes?Object.keys(e.attributes).filter(n=>n!==a5).sort((n,r)=>n.localeCompare(r)).map(n=>l5(n,e,o,t,i)):[],l5=(e,o,t,i,n)=>{let r=n?.[e],a=o.attributes[e];return{name:e,value:a,delta:o.deltas?.[e],mapBar:c5(e,a,t,r),rangeBar:d5(e,a,i,r),descriptor:r}},c5=(e,o,t,i)=>{if(Ld(o))return i1;let n=t?.attributes?.[e];return Ad(o,0,n,i?.direction)},d5=(e,o,t,i)=>{if(Ld(o))return i1;let n=t.nodeMetricData.find(r=>r.name===e);return Ad(o,n?.minValue,n?.maxValue,i?.direction)},o1=Ie(Xt,Et,so,bs,(e,o,t,i)=>s5(e,o.unifiedMapNode,{nodeMetricData:t},i));var go=(()=>{class e{constructor(t){this.store=t,this.selectedNode$=this.store.select(Xt),this.mappingBlocks$=this.store.select(t1),this.metricRows$=this.store.select(o1)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var si=(()=>{class e{constructor(){this.readStore=q(go),this.threeSceneService=q(ft),this.threeRendererService=q(kt),this.selectedNode=R(this.readStore.selectedNode$,{initialValue:void 0}),this.isVisible=X(()=>this.selectedNode()!=null)}close(){this.threeSceneService.clearSelection(),this.threeRendererService.render()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var n1=e=>{if(e)return{all:e.attributes?.unary??0,added:e.fileCount?.added??0,removed:e.fileCount?.removed??0,changed:e.fileCount?.changed??0}};function m5(e,o){if(e&1&&(w(0,"span",2)(1,"span",3),f(2),y(),w(3,"span",4),f(4),y(),w(5,"span",5),f(6),y()()),e&2){let t=D();m(2),he("\u0394",t.added),m(2),he("\u0394",t.removed>0?-t.removed:0),m(2),he("\u0394",t.changed)}}function h5(e,o){if(e&1&&(w(0,"span",1),f(1),y(),O(2,m5,7,3,"span",2)),e&2){let t=o,i=D();m(),Qi(" ",t.all," ",t.all===1?"file":"files"," "),m(),z(i.isDeltaState()?2:-1)}}var r1=(()=>{class e{constructor(){this.isFolder=$.required(),this.fileCount=$(),this.isDeltaState=$.required()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-node-badges"]],hostAttrs:["data-testid","inspector-node-badges",1,"mt-1","flex","flex-wrap","items-center","gap-1"],inputs:{isFolder:[1,"isFolder"],fileCount:[1,"fileCount"],isDeltaState:[1,"isDeltaState"]},decls:3,vars:2,consts:[["data-testid","inspector-node-type",1,"badge","badge-ghost","badge-sm"],["data-testid","inspector-file-count",1,"badge","badge-ghost","badge-sm"],[1,"text-xs","opacity-60"],["title","Number of added files",1,"text-success"],["title","Number of removed files",1,"text-error"],["title","Number of files with metric changes"]],template:function(i,n){if(i&1&&(w(0,"span",0),f(1),y(),O(2,h5,3,3)),i&2){let r;m(),qe(n.isFolder()?"folder":"file"),m(),z((r=n.isFolder()&&n.fileCount())?2:-1,r)}},encapsulation:2,changeDetection:0})}}return e})();function p5(e,o){if(e&1&&(w(0,"p",0),f(1),y()),e&2){let t=D();m(),qe(t.parentPath())}}function u5(e,o){if(e&1&&(w(0,"a",2),ue(1,"i",3),y()),e&2){let t=o;le("href",t,mn)("title",t)}}var a1=(()=>{class e{constructor(){this.parentPath=$.required(),this.nodeName=$.required(),this.link=$()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-node-path"]],hostAttrs:[1,"block"],inputs:{parentPath:[1,"parentPath"],nodeName:[1,"nodeName"],link:[1,"link"]},decls:4,vars:3,consts:[["data-testid","inspector-parent-path",1,"break-all","text-sm","leading-snug","opacity-60"],["data-testid","inspector-node-name",1,"break-all","text-lg","font-semibold","leading-snug","text-primary"],["target","_blank","rel","noopener noreferrer","data-testid","inspector-node-link",1,"text-sm",3,"href","title"],[1,"fa","fa-external-link"]],template:function(i,n){if(i&1&&(O(0,p5,2,1,"p",0),w(1,"p",1),f(2),O(3,u5,2,2,"a",2),y()),i&2){let r;z(n.parentPath()?0:-1),m(2),he(" ",n.nodeName()," "),m(),z((r=n.link())?3:-1,r)}},encapsulation:2,changeDetection:0})}}return e})();function f5(e,o){if(e&1){let t=xe();v(0,"div",4)(1,"div",5),F(2,"cc-inspector-node-path",6)(3,"cc-inspector-node-badges",7),b(),v(4,"button",8),W("click",function(){ae(t);let n=D();return se(n.copyPath())}),F(5,"i",9),b()()}if(e&2){let t=D();m(2),L("parentPath",t.parentPath())("nodeName",t.nodeName())("link",t.nodeLink()),m(),L("isFolder",t.isFolder())("fileCount",t.fileCount())("isDeltaState",t.isDeltaState()),m(),L("title",t.copied()?"Copied!":"Copy path"),m(),Ne("fa-copy",!t.copied())("fa-check",t.copied())}}var s1=(()=>{class e{static{this.COPY_FEEDBACK_MS=1500}constructor(){this.readStore=q(go),this.fileStoreReadWindow=q(Te),this.visibilityService=q(si),this.selectedNode=R(this.readStore.selectedNode$,{requireSync:!0}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.copied=be(!1),this.nodeName=X(()=>this.selectedNode()?.name??""),this.nodeLink=X(()=>this.selectedNode()?.link),this.parentPath=X(()=>{let t=this.selectedNode();return t?.path?t.path.slice(0,t.path.length-t.name.length):""}),this.isFolder=X(()=>this.selectedNode()?.type===Ft.FOLDER),this.fileCount=X(()=>n1(this.selectedNode())),q(dn).onDestroy(()=>clearTimeout(this.copyFeedbackTimeout))}close(){this.visibilityService.close()}async copyPath(){let t=this.selectedNode()?.path;t&&(await navigator.clipboard.writeText(t),this.copied.set(!0),clearTimeout(this.copyFeedbackTimeout),this.copyFeedbackTimeout=setTimeout(()=>this.copied.set(!1),e.COPY_FEEDBACK_MS))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-header"]],hostAttrs:[1,"block","shrink-0","px-3","py-2"],decls:6,vars:1,consts:[[1,"flex","items-center","justify-between"],[1,"text-xs","uppercase","tracking-widest","opacity-60"],["type","button","title","Close inspector","data-testid","inspector-close-button",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-times"],[1,"mt-1","flex","items-start","justify-between","gap-2"],[1,"min-w-0"],[3,"parentPath","nodeName","link"],[3,"isFolder","fileCount","isDeltaState"],["type","button","data-testid","inspector-copy-path-button",1,"btn","btn-ghost","btn-sm","btn-square","shrink-0",3,"click","title"],[1,"fa"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Inspector"),b(),v(3,"button",2),W("click",function(){return n.close()}),F(4,"i",3),b()(),O(5,f5,6,11,"div",4)),i&2&&(m(5),z(n.selectedNode()?5:-1))},dependencies:[a1,r1],encapsulation:2,changeDetection:0})}}return e})();var dr=new Map([["loc","Lines of Code"],["rloc","Real Lines of Code"],["comment_lines","Number of Code Lines with Comments"],["complexity","Cyclomatic Complexity"],["sonar_complexity","Cyclomatic Complexity"],["mcc","McCabe Complexity"],["avgCommits","Average Number of Commits from this file"],["functions","Number of Functions"],["pairingRate","Pairing Rate of selected building"],["unary","-"],["line_coverage","Number of Code Lines covered by tests"],["sonar_code_smells","Number of Smells Sonar has identified"],["avg_code_churn","Average Number of Lines added or removed from this file"],["number_of_authors","Number of Authors that have edited this file"],["statements","Number of Statements"]]);var bo=(()=>{class e{transform(t,i){if(t==null)return dr.get(i)??"";let n=t.title?`${t.title} (${i})`:`${i}`,r=t.description?`
3447
3455
  ${t.description}`:"";return r+=t.hintHighValue?`
3448
3456
  High Values: ${t.hintHighValue}`:"",r+=t.hintLowValue?`
3449
- Low Values: ${t.hintLowValue}`:"",r.length>0?`${n}:${r}`:n}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=Ki({name:"attributeDescriptorTooltip",type:e,pure:!0})}}return e})();var Oo=e=>e===void 0||Number.isNaN(e)?"-":e.toLocaleString("en-US");function g5(e,o){if(e&1&&(w(0,"a",4),ue(1,"i",7),y()),e&2){let t=D();le("href",o,mn),rt("data-testid","mapping-block-link-"+t.block().kind)}}function b5(e,o){if(e&1&&(f(0),w(1,"span",8),f(2,"(in/out)"),y()),e&2){let t=D();he(" ",t.edgeCountText()," ")}}function v5(e,o){if(e&1&&f(0),e&2){let t=D();he(" ",t.formattedValue()," ")}}function x5(e,o){e&1&&(w(0,"span",6),f(1,"\xB7 inverted"),y())}var l1=(()=>{class e{constructor(){this.block=$.required(),this.iconClasses=X(()=>`${e.ICONS[this.block().kind]} text-xs text-primary`),this.formattedValue=X(()=>Oo(this.block().value)),this.edgeCountText=X(()=>`${Oo(this.block().incoming)}/${Oo(this.block().outgoing)}`)}static{this.ICONS={area:"fa fa-arrows-alt",height:"fa fa-arrows-v",color:"fa fa-paint-brush",edge:"fa fa-exchange"}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-mapping-block"]],hostAttrs:[1,"block","py-2"],inputs:{block:[1,"block"]},decls:12,vars:13,consts:[[1,"flex","items-center","gap-2"],[1,"text-xs","uppercase","tracking-widest","opacity-60"],["aria-hidden","true"],[1,"break-all","leading-snug",3,"title"],["target","_blank","rel","noopener noreferrer",1,"text-sm","opacity-70",3,"href"],[1,"text-base","font-semibold","tabular-nums","leading-snug"],["data-testid","mapping-block-inverted",1,"text-sm","font-normal","opacity-60"],[1,"fa","fa-external-link"],[1,"text-sm","font-normal","opacity-70"]],template:function(i,n){if(i&1&&(w(0,"div",0)(1,"span",1),f(2),y(),ue(3,"i",2),y(),w(4,"p",3),at(5,"attributeDescriptorTooltip"),f(6),O(7,g5,2,2,"a",4),y(),w(8,"p",5),O(9,b5,3,1)(10,v5,1,1),O(11,x5,2,0,"span",6),y()),i&2){let r;m(2),qe(n.block().kind),m(),yt(n.iconClasses()),m(),le("title",gi(5,10,n.block().descriptor,n.block().metricName)),rt("data-testid","mapping-block-name-"+n.block().kind),m(2),he(" ",n.block().metricName," "),m(),z((r=(r=n.block().descriptor)==null?null:r.link)?7:-1,r),m(),rt("data-testid","mapping-block-value-"+n.block().kind),m(),z(n.block().kind==="edge"?9:10),m(2),z(n.block().inverted?11:-1)}},dependencies:[bo],encapsulation:2,changeDetection:0})}}return e})();var w5=(e,o)=>o.kind;function S5(e,o){if(e&1&&F(0,"cc-inspector-mapping-block",2),e&2){let t=o.$implicit;L("block",t)}}var c1=(()=>{class e{constructor(){this.readStore=q(go),this.mappingBlocks=R(this.readStore.mappingBlocks$,{requireSync:!0})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-metric-mapping"]],hostAttrs:[1,"block","shrink-0","border-t","border-base-300","px-3","py-2"],decls:5,vars:0,consts:[[1,"text-xs","uppercase","tracking-widest","opacity-60"],[1,"mt-1","divide-y","divide-base-200"],[3,"block"]],template:function(i,n){i&1&&(v(0,"span",0),f(1,"Metric Mapping"),b(),v(2,"div",1),Ae(3,S5,1,1,"cc-inspector-mapping-block",2,w5),b()),i&2&&(m(3),Le(n.mappingBlocks()))},dependencies:[l1],encapsulation:2,changeDetection:0})}}return e})();var rl=(()=>{class e{constructor(){this.comparisonMode=be("map")}setComparisonMode(t){this.comparisonMode.set(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var d1=(()=>{class e{constructor(){this.comparisonModeService=q(rl),this.comparisonMode=this.comparisonModeService.comparisonMode}setComparisonMode(t){this.comparisonModeService.setComparisonMode(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-comparison-toggle"]],hostAttrs:[1,"contents"],decls:5,vars:4,consts:[["data-testid","inspector-comparison-toggle",1,"join"],["type","button","title","Compare each value against the whole map","data-testid","inspector-comparison-map",1,"btn","btn-xs","join-item",3,"click"],["type","button","title","Compare each value against the min/max range of all files","data-testid","inspector-comparison-range",1,"btn","btn-xs","join-item",3,"click"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.setComparisonMode("map")}),f(2," map "),y(),w(3,"button",2),K("click",function(){return n.setComparisonMode("range")}),f(4," range "),y()()),i&2&&(m(),Ne("btn-active",n.comparisonMode()==="map"),m(2),Ne("btn-active",n.comparisonMode()==="range"))},encapsulation:2,changeDetection:0})}}return e})();function y5(e,o){e&1&&(w(0,"a",2),ue(1,"i",7),y()),e&2&&le("href",o,mn)}function C5(e,o){if(e&1&&(w(0,"span",8),f(1),y()),e&2){let t=D();Oe("color",t.deltaColor()),m(),qe(t.formattedDelta())}}var al=(()=>{class e{constructor(){this.row=$.required(),this.comparisonMode=$.required(),this.positiveDeltaColor=$.required(),this.negativeDeltaColor=$.required(),this.bar=X(()=>this.comparisonMode()==="map"?this.row().mapBar:this.row().rangeBar),this.formattedValue=X(()=>Oo(this.row().value)),this.hasDelta=X(()=>!!this.row().delta),this.formattedDelta=X(()=>`\u0394${Oo(this.row().delta)}`),this.deltaColor=X(()=>(this.row().delta??0)>0?this.positiveDeltaColor():this.negativeDeltaColor()),this.barClasses=X(()=>`h-full rounded ${e.SEVERITY_CLASSES[this.bar().severity]}`),this.barWidthPercentage=X(()=>this.bar().fraction*100)}static{this.SEVERITY_CLASSES={success:"bg-success",warning:"bg-warning",error:"bg-error",neutral:"bg-base-content/30"}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-metric-row"]],hostAttrs:[1,"block"],inputs:{row:[1,"row"],comparisonMode:[1,"comparisonMode"],positiveDeltaColor:[1,"positiveDeltaColor"],negativeDeltaColor:[1,"negativeDeltaColor"]},decls:10,vars:12,consts:[[1,"flex","items-baseline","justify-between","gap-2"],[1,"min-w-0","truncate","text-sm",3,"title"],["target","_blank","rel","noopener noreferrer","data-testid","metric-row-link",1,"opacity-70",3,"href"],[1,"shrink-0","text-sm","tabular-nums"],["data-testid","metric-row-delta",1,"mr-1",3,"color"],[1,"mt-0.5","h-1","overflow-hidden","rounded","bg-base-300"],["data-testid","metric-row-bar"],[1,"fa","fa-external-link"],["data-testid","metric-row-delta",1,"mr-1"]],template:function(i,n){if(i&1&&(w(0,"div",0)(1,"span",1),at(2,"attributeDescriptorTooltip"),f(3),O(4,y5,2,1,"a",2),y(),w(5,"span",3),O(6,C5,2,3,"span",4),f(7),y()(),w(8,"div",5),ue(9,"div",6),y()),i&2){let r;m(),le("title",gi(2,9,n.row().descriptor,n.row().name)),m(2),he(" ",n.row().name," "),m(),z((r=(r=n.row().descriptor)==null?null:r.link)?4:-1,r),m(2),z(n.hasDelta()?6:-1),m(),he(" ",n.formattedValue()," "),m(2),yt(n.barClasses()),Oe("width",n.barWidthPercentage(),"%")}},dependencies:[bo],encapsulation:2,changeDetection:0})}}return e})();var M5=(e,o)=>o.name;function _5(e,o){if(e&1&&F(0,"cc-inspector-metric-row",3),e&2){let t=o.$implicit,i=D(3);L("row",t)("comparisonMode",i.comparisonMode())("positiveDeltaColor",i.positiveDeltaColor())("negativeDeltaColor",i.negativeDeltaColor())}}function E5(e,o){if(e&1&&(v(0,"div",2),Ae(1,_5,1,4,"cc-inspector-metric-row",3,M5),b()),e&2){let t=D(2);m(),Le(t.rows())}}function k5(e,o){if(e&1){let t=xe();v(0,"button",0),W("click",function(){ae(t);let n=D();return se(n.toggleEmptyMetrics())}),F(1,"i",1),f(2),b(),O(3,E5,3,0,"div",2)}if(e&2){let t=D();m(),Ne("fa-chevron-right",!t.showEmptyMetrics())("fa-chevron-down",t.showEmptyMetrics()),m(),he(" Empty metrics (",t.rows().length,") "),m(),z(t.showEmptyMetrics()?3:-1)}}var m1=(()=>{class e{constructor(){this.rows=$.required(),this.comparisonMode=$.required(),this.positiveDeltaColor=$.required(),this.negativeDeltaColor=$.required(),this.showEmptyMetrics=be(!1)}toggleEmptyMetrics(){this.showEmptyMetrics.update(t=>!t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-empty-metrics"]],hostAttrs:[1,"block"],inputs:{rows:[1,"rows"],comparisonMode:[1,"comparisonMode"],positiveDeltaColor:[1,"positiveDeltaColor"],negativeDeltaColor:[1,"negativeDeltaColor"]},decls:1,vars:1,consts:[["type","button","data-testid","inspector-empty-metrics-toggle",1,"mt-3","flex","items-center","gap-1.5","text-xs","uppercase","tracking-widest","opacity-60",3,"click"],[1,"fa","text-[10px]"],["data-testid","inspector-empty-metrics",1,"mt-2","flex","flex-col","gap-2","opacity-60"],[3,"row","comparisonMode","positiveDeltaColor","negativeDeltaColor"]],template:function(i,n){i&1&&O(0,k5,4,6),i&2&&z(n.rows().length>0?0:-1)},dependencies:[al],encapsulation:2,changeDetection:0})}}return e})();var q5=(e,o)=>o.name;function T5(e,o){e&1&&F(0,"cc-inspector-comparison-toggle")}function I5(e,o){e&1&&(v(0,"p",2),f(1,"No metrics available"),b())}function R5(e,o){if(e&1&&F(0,"cc-inspector-metric-row",4),e&2){let t=o.$implicit,i=D(2);L("row",t)("comparisonMode",i.comparisonMode())("positiveDeltaColor",i.mapColors().positiveDelta)("negativeDeltaColor",i.mapColors().negativeDelta)}}function D5(e,o){if(e&1&&(v(0,"div",3),Ae(1,R5,1,4,"cc-inspector-metric-row",4,q5),b(),F(3,"cc-inspector-empty-metrics",5)),e&2){let t=D();m(),Le(t.metricRowsWithValues()),m(2),L("rows",t.emptyMetricRows())("comparisonMode",t.comparisonMode())("positiveDeltaColor",t.mapColors().positiveDelta)("negativeDeltaColor",t.mapColors().negativeDelta)}}var h1=(()=>{class e{constructor(){this.readStore=q(go),this.mapStateReadWindow=q(ve),this.comparisonModeService=q(rl),this.metricRows=R(this.readStore.metricRows$,{requireSync:!0}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.comparisonMode=this.comparisonModeService.comparisonMode,this.metricRowsWithValues=X(()=>this.metricRows().filter(t=>!Pd(t))),this.emptyMetricRows=X(()=>this.metricRows().filter(t=>Pd(t)))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-metrics-list"]],hostAttrs:[1,"block","border-t","border-base-300","px-3","py-2"],decls:6,vars:2,consts:[[1,"flex","items-center","justify-between"],[1,"text-xs","uppercase","tracking-widest","opacity-60"],["data-testid","inspector-metrics-empty",1,"mt-2","text-sm","opacity-60"],[1,"mt-2","flex","flex-col","gap-2"],[3,"row","comparisonMode","positiveDeltaColor","negativeDeltaColor"],[3,"rows","comparisonMode","positiveDeltaColor","negativeDeltaColor"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Metrics"),b(),O(3,T5,1,0,"cc-inspector-comparison-toggle"),b(),O(4,I5,2,0,"p",2)(5,D5,4,4)),i&2&&(m(3),z(n.metricRows().length>0?3:-1),m(),z(n.metricRows().length===0?4:5))},dependencies:[d1,m1,al],encapsulation:2,changeDetection:0})}}return e})();var Nd=(()=>{class e{constructor(){this.visibilityService=q(si),this.isVisible=this.visibilityService.isVisible}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-sidebar-inspector"]],hostAttrs:[1,"fixed","right-0","z-[60]","w-[var(--cc-inspector-width)]","bg-base-100","overflow-hidden","flex","flex-col","shadow-[-2px_0_8px_-2px_rgba(0,0,0,0.15)]","transition-transform","duration-300"],hostVars:9,hostBindings:function(i,n){i&2&&(rt("aria-hidden",!n.isVisible()),Oe("top","var(--cc-bars-height, 49px)")("height","calc(100vh - var(--cc-bars-height, 49px) - var(--cc-file-extension-bar-height, 17px) - var(--cc-bottom-bar-height, 32px))"),Ne("translate-x-full",!n.isVisible())("pointer-events-none",!n.isVisible()))},decls:4,vars:0,consts:[[1,"min-h-0","flex-1","overflow-y-auto"]],template:function(i,n){i&1&&(F(0,"cc-inspector-header")(1,"cc-inspector-metric-mapping"),v(2,"div",0),F(3,"cc-inspector-metrics-list"),b())},dependencies:[s1,c1,h1],encapsulation:2,changeDetection:0})}}return e})();function A5(e,o){e&1&&(v(0,"div",1)(1,"div",2)(2,"span"),f(3," The graphics card stopped rendering the map, usually because it ran out of memory. Reload the page, and try a smaller map or a smaller browser window. "),b()()())}var Bd=(()=>{class e{constructor(t,i,n,r,a){this.inspectorVisibilityService=t,this.fileStoreReadWindow=i,this.threeViewerService=n,this.codeMapMouseEventService=r,this.elementReference=a,this.isLoadingFile$=this.fileStoreReadWindow.isLoadingFile$,this.isContextLost$=this.threeViewerService.isContextLost$}ngAfterViewInit(){this.threeViewerService.init(this.elementReference.nativeElement.querySelector("#codeMap")),this.codeMapMouseEventService.start()}ngOnDestroy(){this.threeViewerService.stopAnimate(),this.threeViewerService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(te(si),te(Te),te(Jn),te(Wo),te(Lt))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-code-map"]],decls:5,vars:9,consts:[["id","codeMap",1,"fixed","left-0","top-[var(--cc-bars-height,49px)]","z-0","h-full","w-full"],[1,"pointer-events-none","fixed","inset-0","z-[1000]","flex","items-center","justify-center","p-4"],["role","alert",1,"alert","alert-error","pointer-events-auto","max-w-md"]],template:function(i,n){i&1&&(v(0,"div",0),at(1,"async"),F(2,"cc-view-cube"),b(),O(3,A5,4,0,"div",1),at(4,"async")),i&2&&(Ne("hidden",fi(1,5,n.isLoadingFile$)),m(2),Ne("sideBarVisible",n.inspectorVisibilityService.isVisible()),m(),z(fi(4,7,n.isContextLost$)?3:-1))},dependencies:[Id,Oa],encapsulation:2,changeDetection:0})}}return e})();var sl=Ie(Et,vi,(e,o)=>Es.getMetricDistribution(e.unifiedMapNode,o));var ll=Ie(Un,Xt,vi,sl,(e,o,t,i)=>{let n=e||o;return!n||n.type===Ft.FILE?i:Es.getMetricDistribution(n,t)});var cl=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(ll),this.metricDistribution$=this.store.select(sl)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var u1=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.areaMetric$=this.mapStateReadWindow.areaMetric$,this.distributionMetric=Qp}static{this.\u0275fac=function(i){return new(i||e)(te(ve))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-distribution-metric"]],hostAttrs:[1,"mx-[5px]","flex","min-w-max","items-center","gap-1.5","text-xs"],decls:3,vars:3,consts:[[1,"fa","fa-pie-chart"]],template:function(i,n){i&1&&(ue(0,"i",0),f(1),at(2,"async")),i&2&&(m(),he(" ",fi(2,1,n.areaMetric$),`
3450
- `))},dependencies:[Oa],encapsulation:2,changeDetection:0})}}return e})();var f1=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(ll),this.hoveredNode$=this.store.select(Un),this.selectedNode$=this.store.select(Xt),this.flattenedItems$=this.store.select(su("flatten"))}dispatchAfterPaint(t){Bi(this.store,t)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function N5(e){return`*.${e}`}function B5(e,o){return e===Ms?o.others.filter(t=>t.fileExtension!==_s).map(t=>t.fileExtension):[e]}function dl(e,o,t){return B5(e,o).map(n=>{let r=N5(n);return t?.type===Ft.FOLDER?`${t.path}/**/${r}`:r})}var g1=(()=>{class e{constructor(t){this.blackListExtensionStore=t,this.operationContext$=St([this.blackListExtensionStore.hoveredNodeMetricDistribution$,this.blackListExtensionStore.hoveredNode$,this.blackListExtensionStore.selectedNode$,this.blackListExtensionStore.flattenedItems$]).pipe(ke(([i,n,r,a])=>({distribution:i,node:n||r,flattenedItems:a})))}show(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=dl(t,i.distribution,i.node),r=this.createFlattenedItemsMap(i.flattenedItems),a=n.map(s=>r.get(s));this.blackListExtensionStore.dispatchAfterPaint(Nn({items:a}))})}exclude(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=dl(t,i.distribution,i.node);this.blackListExtensionStore.dispatchAfterPaint(Rd("exclude",...n))})}flatten(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=dl(t,i.distribution,i.node);this.blackListExtensionStore.dispatchAfterPaint(Rd("flatten",...n))})}getIsFlattenedByFileExtension(t){return this.operationContext$.pipe(ke(i=>dl(t,i.distribution,i.node).every(r=>i.flattenedItems.some(a=>a.path===r))))}createFlattenedItemsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}static{this.\u0275fac=function(i){return new(i||e)(M(f1))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var b1=(()=>{class e{constructor(t,i){this.threeSceneService=t,this.metricDistributionStore=i,this.metricDistribution$=this.metricDistributionStore.metricDistribution$,this.fileExtensionsOfOthers=new Set,this.fileExtensionsOfNone=new Set,this.metricDistribution$.pipe(Wh(),Re(n=>!!n)).subscribe(n=>{this.fileExtensionsOfOthers.clear();for(let r of n.others)this.fileExtensionsOfOthers.add(r.fileExtension);this.fileExtensionsOfNone.clear();for(let r of n.none)this.fileExtensionsOfNone.add(r.fileExtension)})}highlightExtension(t){switch(t){case Ms:this.threeSceneService.highlightBuildingsByExtension(this.fileExtensionsOfOthers);break;case _s:this.threeSceneService.highlightBuildingsWithoutExtensions();break;default:this.threeSceneService.highlightBuildingsByExtension(new Set([t]));break}}clearHighlightingOnFileExtensions(){this.threeSceneService.applyClearHighlights()}static{this.\u0275fac=function(i){return new(i||e)(M(ft),M(cl))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var O5=["menu"];function z5(e,o){if(e&1){let t=xe();w(0,"button",10),K("click",function(){ae(t);let n=D(2);return se(n.show(n.fileExtension()))}),ue(1,"i",11),w(2,"span",9),f(3,"Show"),y()()}}function $5(e,o){if(e&1){let t=xe();w(0,"button",12),K("click",function(){ae(t);let n=D(2);return se(n.flatten(n.fileExtension()))}),ue(1,"i",13),w(2,"span",9),f(3,"Flatten"),y()()}}function j5(e,o){if(e&1){let t=xe();w(0,"div",4,0),K("contextmenu",function(n){return n.preventDefault()}),O(2,z5,4,0,"button",5)(3,$5,4,0,"button",6),w(4,"button",7),K("click",function(){ae(t);let n=D();return se(n.exclude(n.fileExtension()))}),ue(5,"i",8),w(6,"span",9),f(7,"Exclude"),y()()()}if(e&2){let t=o,i=D();Oe("left",t.left,"px")("bottom",t.bottom,"px"),m(2),z(i.isFlattened()?2:3)}}var H5=192,Vd=4,v1=(()=>{class e{constructor(t,i){this.blackListExtensionService=t,this.highlightBuildingsByFileExtensionService=i,this.item=$.required(),this.showAbsoluteValues=$.required(),this.toggleShowAbsoluteValues=Ce(),this.isFlattened=be(!1),this.menuPosition=be(null),this.menuRef=je("menu"),this.fileExtension=X(()=>this.item().fileExtension),this.hasFileExtension=X(()=>this.fileExtension()!=="None"),this.formattedTitle=X(()=>this.formatTitle(this.showAbsoluteValues(),this.item(),this.fileExtension()))}ngOnInit(){this.flattenSubscription=this.blackListExtensionService.getIsFlattenedByFileExtension(this.fileExtension()).subscribe(t=>this.isFlattened.set(t))}ngOnDestroy(){this.flattenSubscription?.unsubscribe()}openContextMenu(t){if(t.preventDefault(),!this.hasFileExtension())return;let i=Math.max(Vd,Math.min(t.clientX,window.innerWidth-H5-Vd)),n=Math.max(Vd,window.innerHeight-t.clientY);this.menuPosition.set({left:i,bottom:n})}closeContextMenu(){this.menuPosition.set(null)}onDocumentPointerDown(t){if(!this.menuPosition())return;let i=this.menuRef()?.nativeElement;i&&t.target instanceof Node&&i.contains(t.target)||this.closeContextMenu()}closeContextMenuOnViewportChange(){this.menuPosition()&&this.closeContextMenu()}flatten(t){this.blackListExtensionService.flatten(t),this.closeContextMenu()}exclude(t){this.blackListExtensionService.exclude(t),this.closeContextMenu()}show(t){this.blackListExtensionService.show(t),this.closeContextMenu()}onHoverFileExtensionBar(t){this.highlightBuildingsByFileExtensionService.highlightExtension(t)}onUnhoverFileExtensionBar(){this.highlightBuildingsByFileExtensionService.clearHighlightingOnFileExtensions()}formatTitle(t,i,n){return t&&i.absoluteMetricValue||!t&&i.relativeMetricValue?t?`${n} ${i.absoluteMetricValue.toLocaleString()}`:`${n} ${i.relativeMetricValue.toFixed(2)}%`:"No data available"}get backgroundColor(){return this.item().color}get flexGrow(){return this.item().relativeMetricValue}get flexBasis(){return"0"}static{this.\u0275fac=function(i){return new(i||e)(te(g1),te(b1))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-file-extension-bar-segment"]],viewQuery:function(i,n){i&1&&it(n.menuRef,O5,5),i&2&&ot()},hostAttrs:[1,"min-w-max","cursor-pointer","overflow-hidden","text-center","text-white"],hostVars:6,hostBindings:function(i,n){i&1&&W("pointerdown",function(a){return n.onDocumentPointerDown(a)},Ro)("wheel",function(){return n.closeContextMenuOnViewportChange()},Ro)("resize",function(){return n.closeContextMenuOnViewportChange()},Xh),i&2&&Oe("background-color",n.backgroundColor)("flex-grow",n.flexGrow)("flex-basis",n.flexBasis)},inputs:{item:[1,"item"],showAbsoluteValues:[1,"showAbsoluteValues"]},outputs:{toggleShowAbsoluteValues:"toggleShowAbsoluteValues"},decls:4,vars:3,consts:[["menu",""],[1,"cc-bar-section",3,"click","contextmenu"],["data-test-id","formattedTitle",1,"cc-bar-section-text","my-0.5","whitespace-nowrap","px-2.5","text-[10px]",3,"mouseover","mouseleave","title"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"left","bottom"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"contextmenu"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","excludeBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-ban"],[1,"truncate"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-eye"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-arrows-down-to-line"]],template:function(i,n){if(i&1&&(w(0,"span",1),K("click",function(){return n.toggleShowAbsoluteValues.emit()})("contextmenu",function(a){return n.openContextMenu(a)}),w(1,"div",2),K("mouseover",function(){return n.onHoverFileExtensionBar(n.fileExtension())})("mouseleave",function(){return n.onUnhoverFileExtensionBar()}),f(2),y()(),O(3,j5,8,5,"div",3)),i&2){let r;m(),le("title",n.formattedTitle()),m(),he(" ",n.formattedTitle()," "),m(),z((r=n.menuPosition())?3:-1,r)}},encapsulation:2,changeDetection:0})}}return e})();var G5=(e,o)=>o.fileExtension;function X5(e,o){if(e&1){let t=xe();v(0,"cc-file-extension-bar-segment",4),W("toggleShowAbsoluteValues",function(){ae(t);let n=D();return se(n.toggleShowAbsoluteValues())}),b()}if(e&2){let t=o.$implicit,i=D();L("item",t)("showAbsoluteValues",i.showAbsoluteValues())}}var Wd=(()=>{class e{constructor(){this.metricDistributionStore=q(cl),this.showAbsoluteValues=be(!1),this.metricDistribution=R(this.metricDistributionStore.hoveredNodeMetricDistribution$,{requireSync:!0})}toggleShowAbsoluteValues(){this.showAbsoluteValues.update(t=>!t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-file-extension-bar"]],hostAttrs:[1,"fixed","left-0","right-0","z-[70]","block","bg-base-100"],hostVars:2,hostBindings:function(i,n){i&2&&Oe("bottom","var(--cc-bottom-bar-height, 32px)")},features:[Zi([{provide:Rs,useValue:"--cc-file-extension-bar-height"}]),Qi([Ds])],decls:5,vars:0,consts:[[1,"flex","h-[17px]","w-full"],["title","Distribution metric"],[1,"flex","w-full","gap-px"],[3,"item","showAbsoluteValues"],[3,"toggleShowAbsoluteValues","item","showAbsoluteValues"]],template:function(i,n){i&1&&(v(0,"div",0),F(1,"cc-distribution-metric",1),v(2,"div",2),Ae(3,X5,1,2,"cc-file-extension-bar-segment",3,G5),b()()),i&2&&(m(3),Le(n.metricDistribution().visible))},dependencies:[u1,v1],encapsulation:2,changeDetection:0})}}return e})();var ml="var(--cc-bottom-bar-height, 32px) + var(--cc-file-extension-bar-height, 17px)";var hl=(()=>{class e{static{this.NO_MATCHING="\u2013 (no matching buildings)"}transform(t,i,n,r){switch(t){case"positive":{let a=r==="unary",s=n.minValue===i.from,l=n.maxValue===i.from;return a?`${n.minValue} - ${n.maxValue}`:s?e.NO_MATCHING:l?`${n.minValue} to ${this.formatNumber(i.from)}`:`${n.minValue} to ${this.formatNumber(i.from-1)}`}case"neutral":{let a=i.from===i.to,s=i.to===n.maxValue;return a?e.NO_MATCHING:s?`${this.formatNumber(i.from)} to ${this.formatNumber(i.to)}`:`${this.formatNumber(i.from)} to ${this.formatNumber(i.to-1)}`}case"negative":return n.maxValue===i.to?e.NO_MATCHING:`${this.formatNumber(i.to)} to ${this.formatNumber(n.maxValue)}`;case"positiveDelta":return"+\u0394 positive delta";case"negativeDelta":return"\u2013\u0394 negative delta";case"selected":return"selected";case"outgoingEdge":return"Outgoing Edge";case"incomingEdge":return"Incoming Edge"}}formatNumber(t){return(t||0).toLocaleString()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=Ki({name:"mapColorLabel",type:e,pure:!0})}}return e})();var x1=(()=>{class e{constructor(t){this.store=t,this.selectedColorMetricData$=this.store.select(lo)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var vo=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.legendMetricRangeStore=i,this.mapColorFor=$.required(),this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=R(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=R(this.legendMetricRangeStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.color=X(()=>this.mapColors()[this.mapColorFor()])}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(x1))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-color-row"]],inputs:{mapColorFor:[1,"mapColorFor"]},decls:7,vars:8,consts:[[1,"flex","items-center","gap-2"],[1,"h-4","w-4","shrink-0","rounded-sm","border","border-base-300"],["width","100%","height","100%"],[1,"min-w-0","flex-1","truncate","text-sm"]],template:function(i,n){if(i&1&&(Jh(0),at(1,"mapColorLabel"),w(2,"div",0),Io(),w(3,"svg",1),ue(4,"rect",2),y(),Ar(),w(5,"span",3),f(6),y()()),i&2){let r=Wa(1,3,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric());m(3),rt("aria-label","Color for "+r),m(),rt("fill",n.color()),m(2),qe(r)}},dependencies:[hl],encapsulation:2,changeDetection:0})}}return e})();var w1=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-color-scale-section"]],hostAttrs:[1,"contents"],decls:6,vars:0,consts:[[1,"border-base-300","flex","flex-col","gap-1","border-t","pt-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","positive"],["mapColorFor","neutral"],["mapColorFor","negative"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Color scale"),b(),F(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3)(5,"cc-legend-color-row",4),b())},dependencies:[vo],encapsulation:2,changeDetection:0})}}return e})();var S1=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-delta-colors-section"]],hostAttrs:[1,"contents"],decls:5,vars:0,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","positiveDelta"],["mapColorFor","negativeDelta"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Delta colors"),b(),F(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3),b())},dependencies:[vo],encapsulation:2,changeDetection:0})}}return e})();function Q5(e,o){e&1&&(v(0,"div",0),F(1,"cc-legend-color-row",1)(2,"cc-legend-color-row",2),b())}var y1=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.edgeMetric=R(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(i){return new(i||e)(te(ve))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-edge-colors-section"]],hostAttrs:[1,"contents"],decls:1,vars:1,consts:[[1,"border-base-300","flex","flex-col","gap-1","border-t","pt-2"],["mapColorFor","outgoingEdge"],["mapColorFor","incomingEdge"]],template:function(i,n){i&1&&O(0,Q5,3,0,"div",0),i&2&&z(n.edgeMetric()?0:-1)},dependencies:[vo],encapsulation:2,changeDetection:0})}}return e})();var C1=(()=>{class e{constructor(t){this.metricsLensFacade=t,this.label=$.required(),this.metricName=$.required(),this.attributeDescriptors=R(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.descriptor=X(()=>this.attributeDescriptors()[this.metricName()]),this.title=X(()=>this.descriptor()?.title||hr.get(this.metricName())||this.metricName())}static{this.\u0275fac=function(i){return new(i||e)(te(jn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-metric-row"]],inputs:{label:[1,"label"],metricName:[1,"metricName"]},decls:6,vars:6,consts:[[1,"flex","items-baseline","gap-3",3,"title"],[1,"w-16","shrink-0","text-xs","uppercase","tracking-wider","opacity-60"],[1,"min-w-0","truncate","text-sm","font-semibold"]],template:function(i,n){i&1&&(w(0,"div",0),at(1,"attributeDescriptorTooltip"),w(2,"span",1),f(3),y(),w(4,"span",2),f(5),y()()),i&2&&(le("title",gi(1,3,n.descriptor(),n.metricName())),m(3),qe(n.label()),m(2),qe(n.title()))},dependencies:[bo],encapsulation:2,changeDetection:0})}}return e})();function Z5(e,o){e&1&&F(0,"cc-legend-metric-row",4),e&2&&L("metricName",o)}var M1=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.areaMetric=R(this.mapStateReadWindow.areaMetric$,{initialValue:""}),this.heightMetric=R(this.mapStateReadWindow.heightMetric$,{initialValue:""}),this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.edgeMetric=R(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(i){return new(i||e)(te(ve))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-metrics-section"]],hostAttrs:[1,"contents"],decls:5,vars:4,consts:[[1,"flex","flex-col","gap-2"],["label","Area",3,"metricName"],["label","Height",3,"metricName"],["label","Color",3,"metricName"],["label","Edge",3,"metricName"]],template:function(i,n){if(i&1&&(v(0,"div",0),F(1,"cc-legend-metric-row",1)(2,"cc-legend-metric-row",2)(3,"cc-legend-metric-row",3),O(4,Z5,1,1,"cc-legend-metric-row",4),b()),i&2){let r;m(),L("metricName",n.areaMetric()??""),m(),L("metricName",n.heightMetric()??""),m(),L("metricName",n.colorMetric()??""),m(),z((r=n.edgeMetric())?4:-1,r)}},dependencies:[C1],encapsulation:2,changeDetection:0})}}return e})();var _1=(()=>{class e{constructor(t){this.inspectorVisibilityService=t,this.isOpen=$.required(),this.togglePanel=Ce(),this.buttonBottom=`calc(${ml} + 32px)`,this.buttonRight=X(()=>this.inspectorVisibilityService.isVisible()?"calc(var(--cc-inspector-width) - 28px)":"-28px")}static{this.\u0275fac=function(i){return new(i||e)(te(si))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-toggle-button"]],hostAttrs:[1,"contents"],inputs:{isOpen:[1,"isOpen"]},outputs:{togglePanel:"togglePanel"},decls:2,vars:6,consts:[["id","legend-panel-button","data-testid","legend-panel-button","aria-controls","legend-panel",1,"btn","btn-primary","btn-sm","fixed","z-[60]","w-[88px]","rotate-90","rounded-t-none","transition-[right]","duration-300",3,"click","title"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.togglePanel.emit()}),f(1,` LEGEND
3451
- `),y()),i&2&&(Oe("right",n.buttonRight())("bottom",n.buttonBottom),le("title",n.isOpen()?"Hide panel":"Show panel"),rt("aria-expanded",n.isOpen()))},encapsulation:2,changeDetection:0})}}return e})();function J5(e,o){e&1&&F(0,"cc-legend-delta-colors-section")}function eS(e,o){e&1&&F(0,"cc-legend-metrics-section")(1,"cc-legend-color-scale-section")}function tS(e,o){if(e&1&&(v(0,"div",2)(1,"div",3),O(2,J5,1,0,"cc-legend-delta-colors-section")(3,eS,2,0),v(4,"div",4),F(5,"cc-legend-color-row",5),b(),F(6,"cc-legend-edge-colors-section"),b()()),e&2){let t=D();Oe("right",t.panelRight())("bottom",t.panelBottom),m(2),z(t.isDeltaState()?2:3)}}var Od=(()=>{class e{constructor(){this.elementReference=q(Lt),this.inspectorVisibilityService=q(si),this.fileStoreReadWindow=q(Te),this.isOpen=be(!1),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.panelBottom=`calc(${ml} + 12px)`,this.panelRight=X(()=>this.inspectorVisibilityService.isVisible()?"calc(var(--cc-inspector-width) + 40px)":"40px"),this.mouseDownListener=t=>this.closeOnOutsideClick(t)}ngOnInit(){document.addEventListener("mousedown",this.mouseDownListener)}ngOnDestroy(){document.removeEventListener("mousedown",this.mouseDownListener)}toggleIsOpen(){this.isOpen.update(t=>!t)}closeOnOutsideClick(t){this.isOpen()&&t.target instanceof Node&&!this.elementReference.nativeElement.contains(t.target)&&this.isOpen.set(!1)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-panel"]],decls:2,vars:2,consts:[["id","legend-panel","data-testid","legend-panel",1,"rounded-box","border-base-300","bg-base-100","fixed","z-[60]","flex","w-72","max-w-[30vw]","flex-col","border","shadow-lg","transition-[right]","duration-300",3,"right","bottom"],[3,"togglePanel","isOpen"],["id","legend-panel","data-testid","legend-panel",1,"rounded-box","border-base-300","bg-base-100","fixed","z-[60]","flex","w-72","max-w-[30vw]","flex-col","border","shadow-lg","transition-[right]","duration-300"],[1,"flex","flex-col","gap-3","p-3"],[1,"border-base-300","border-t","pt-2"],["mapColorFor","selected"]],template:function(i,n){i&1&&(O(0,tS,7,5,"div",0),v(1,"cc-legend-toggle-button",1),W("togglePanel",function(){return n.toggleIsOpen()}),b()),i&2&&(z(n.isOpen()?0:-1),m(),L("isOpen",n.isOpen()))},dependencies:[M1,w1,S1,y1,vo,_1],encapsulation:2,changeDetection:0})}}return e})();var E1=(e,o)=>Ie(Gn,Nu,(t,i)=>{let n=t[o];return i[e][n]==="relative"?"x\u0342":"\u03A3"});var iS=e=>{if(!e)return[];let o=[];for(let{data:t}of Ji(e))t.type===Ft.FOLDER&&!t.isExcluded&&o.push(t.path);return o.sort((t,i)=>t.localeCompare(i))},k1=Ie(Et,e=>iS(e.unifiedMapNode));var oS=(e,o)=>{let t=new Map(e.map(i=>[i.path,0]));for(let i of o){if(!bi(i)||i.isExcluded)continue;let n=nS(t,i.path);n!==void 0&&t.set(n,t.get(n)+1)}return e.map(i=>tt(Ee({},i),{fileCount:t.get(i.path)})).sort((i,n)=>i.path.localeCompare(n.path))};function nS(e,o){let t=o;for(;t;){if(e.has(t))return t;let i=t.lastIndexOf("/");t=i>0?t.slice(0,i):""}}var q1=Ie(du,Pi,oS);var T1=Ie(Ya,e=>({leftColor:e.positive,middleColor:e.neutral,rightColor:e.negative}));var I1=Ie(lo,Kp,(e,o)=>({values:e.values,min:e.minValue,max:e.maxValue,from:o.from,to:o.to}));var ht=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select(Hn),this.primaryMetricNames$=this.store.select(Gn),this.amountOfBuildingsWithSelectedEdgeMetric$=this.store.select(Ss),this.selectedColorMetricData$=this.store.select(lo),this.metricColorRangeColors$=this.store.select(T1),this.metricColorRangeValues$=this.store.select(I1),this.markedPackagesWithCounts$=this.store.select(q1),this.markableFolderPaths$=this.store.select(k1),this.hoveredNode$=this.store.select(Un),this.selectedNode$=this.store.select(Xt),this.accumulatedData$=this.store.select(Et)}attributeTypeLabel$(t,i){return this.store.select(E1(t,i))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ye=(()=>{class e{constructor(t){this.store=t}setAreaMetric(t){this.store.dispatch(xi({value:t}))}setHeightMetric(t){this.store.dispatch(yi({value:t}))}setColorMetric(t){this.store.dispatch(Nt({value:t}))}setEdgeMetric(t){this.store.dispatch(Si({value:t}))}setMargin(t){this.store.dispatch(Tn({value:t}))}setInvertArea(t){this.store.dispatch(Cn({value:t}))}setEnableFloorLabels(t){this.store.dispatch(Sn({value:t}))}setScaling(t){this.store.dispatch(In({value:t}))}setInvertHeight(t){this.store.dispatch(Mn({value:t}))}setColorRange(t){this.store.dispatch(wi({value:t}))}setColorMode(t){this.store.dispatch(oo({value:t}))}setMapColors(t){this.store.dispatch(Li({value:t}))}invertColorRange(){this.store.dispatch(vn())}invertDeltaColors(){this.store.dispatch(xn())}setEdgeHeight(t){this.store.dispatch(wn({value:t}))}setAmountOfEdgePreviews(t){this.store.dispatch(to({value:t}))}toggleEdgeMetricVisible(){this.store.dispatch(_n())}setShowIncomingEdges(t){this.store.dispatch(Rn({value:t}))}setShowOutgoingEdges(t){this.store.dispatch(Dn({value:t}))}setShowOnlyBuildingsWithEdges(t){this.store.dispatch(Fn({value:t}))}toggleIsHeightAndColorMetricLinked(){this.store.dispatch(ef())}markPackage(t){this.store.dispatch(Vn({packages:[t]}))}unmarkPackage(t){this.store.dispatch(Wn({path:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var R1=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.popoverId=$.required(),this.anchorName=$.required(),this.margin=R(this.mapStateReadWindow.margin$,{initialValue:0}),this.enableFloorLabels=R(this.mapStateReadWindow.enableFloorLabels$,{initialValue:!1}),this.isInvertedArea=R(this.mapStateReadWindow.invertArea$,{initialValue:!1}),this.resetKeys=["mapState.margin","mapState.invertArea","mapState.enableFloorLabels"]}setMargin(t){this.metricsBarWriteStore.setMargin(t)}setEnableFloorLabel(t){let i=t.target.checked;this.metricsBarWriteStore.setEnableFloorLabels(i)}toggleInvertingArea(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertArea(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-area-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:14,vars:8,consts:[[3,"popoverId","anchorName"],["title","Amount of space between buildings in percent"],[1,"text-sm"],["ariaLabel","Margin",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["tooltip","Reset area metric settings to their defaults","label","Reset area metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),f(3,"Margin"),b(),v(4,"cc-slider-number-input",3),W("valueChange",function(a){return n.setMargin(a)}),b()(),v(5,"label",4)(6,"input",5),W("change",function(a){return n.setEnableFloorLabel(a)}),b(),v(7,"span"),f(8,"Enable Floor Labels"),b()(),v(9,"label",4)(10,"input",5),W("change",function(a){return n.toggleInvertingArea(a)}),b(),v(11,"span"),f(12,"Invert Area"),b()(),F(13,"cc-reset-settings-button",6),b()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName()),m(4),L("min",1)("max",100)("value",n.margin()),m(2),L("checked",n.enableFloorLabels()),m(4),L("checked",n.isInvertedArea()),m(3),L("settingsKeys",n.resetKeys))},dependencies:[po,Ot,nr],encapsulation:2,changeDetection:0})}}return e})();var ur=(()=>{class e{constructor(t,i,n){this.metricsBarReadStore=t,this.mapStateReadWindow=i,this.codeMapRenderService=n;let r=this.metricsBarReadStore.hoveredNode$,a=this.metricsBarReadStore.selectedNode$,s=this.createTopLevelNodeObservable();this.node$=St([r,a,s]).pipe(ke(([l,d,c])=>l??d??c),Aa({bufferSize:1,refCount:!0}))}createNodeObservable(){return this.node$}createTopLevelNodeObservable(){return St([this.metricsBarReadStore.accumulatedData$,this.mapStateReadWindow.areaMetric$,this.mapStateReadWindow.heightMetric$]).pipe(Re(([t])=>!!t.unifiedMapNode),ke(([t])=>this.findTopLevelNode(t)))}findTopLevelNode(t){let i=this.codeMapRenderService.getNodes(t.unifiedMapNode),n=this.codeMapRenderService.sortVisibleNodesByHeightDescending(i);if(n.length!==0)return n.reduce((r,a)=>r.attributes.unary>a.attributes.unary?r:a,n[0])}static{this.\u0275fac=function(i){return new(i||e)(M(ht),M(ve),M(Ur))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var pl=(()=>{class e{constructor(){this.nodeSelectionService=q(ur),this.metricsBarReadStore=q(ht),this.metricFor=$.required(),this.attributeType=$("nodes"),this.node=R(this.nodeSelectionService.createNodeObservable()),this.isNodeALeaf=X(()=>{let t=this.node();return t?"isLeaf"in t?t.isLeaf:bi(t):!1}),this.selectorInputs=X(()=>({attributeType:this.attributeType(),metricFor:this.metricFor()})),this.attributeTypeLabel=R(gp(this.selectorInputs).pipe(Ut(({attributeType:t,metricFor:i})=>this.metricsBarReadStore.attributeTypeLabel$(t,i))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-chooser-type"]],inputs:{metricFor:[1,"metricFor"],attributeType:[1,"attributeType"]},decls:2,vars:2,consts:[[3,"hidden"]],template:function(i,n){i&1&&(w(0,"span",0),f(1),y()),i&2&&(le("hidden",n.isNodeALeaf()),m(),he(" ",n.attributeTypeLabel(),`
3452
- `))},encapsulation:2,changeDetection:0})}}return e})();function rS(e,o){if(e&1&&(v(0,"span",4),f(1),b()),e&2){let t=o;yt(t.styleClass),m(),he("\u0394",t.label)}}function aS(e,o){if(e&1&&(v(0,"span",2),F(1,"cc-metric-chooser-type",3),b(),v(2,"span",4),f(3),b(),O(4,rS,2,3,"span",5)),e&2){let t,i=o,n=D();m(),L("metricFor",n.metricFor()),m(2),qe(i.value),m(),z((t=i.delta)?4:-1,t)}}function sS(e,o){e&1&&(v(0,"span",1),f(1,"\xA0"),b())}var ul=(()=>{class e{constructor(){this.nodeSelectionService=q(ur),this.metricsBarReadStore=q(ht),this.metricFor=$.required(),this.node=R(this.nodeSelectionService.createNodeObservable()),this.primaryMetricNames=R(this.metricsBarReadStore.primaryMetricNames$),this.metricName=X(()=>this.primaryMetricNames()?.[this.metricFor()]??null),this.display=X(()=>lS(this.node(),this.metricName(),this.metricFor()))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-meta-value"]],inputs:{metricFor:[1,"metricFor"]},decls:3,vars:1,consts:[[1,"flex","items-center","justify-center","gap-1","text-xs","leading-tight","min-h-4"],["aria-hidden","true"],[1,"opacity-60"],[3,"metricFor"],[1,"font-medium"],[1,"font-medium",3,"class"]],template:function(i,n){if(i&1&&(v(0,"div",0),O(1,aS,5,3)(2,sS,2,0,"span",1),b()),i&2){let r;m(),z((r=n.display())?1:2,r)}},dependencies:[pl],encapsulation:2,changeDetection:0})}}return e})();function lS(e,o,t){return!e||!o?null:{value:cS(e,o),delta:dS(e,o,t)}}function cS(e,o){let t=e.attributes?.[o];return typeof t=="number"?t.toLocaleString():"\u2014"}function dS(e,o,t){if(!("deltas"in e)||!e.deltas)return null;let i=e.deltas[o];return typeof i!="number"?null:{label:i.toLocaleString(),styleClass:mS(i,t)}}function mS(e,o){return o==="heightMetric"&&e>0?"text-success":e<0?"text-error":"text-base-content"}var hS=new Map([["complexity",["formerly mcc"]],["sonar_complexity",["formerly mcc"]]]),D1=(()=>{class e{transform(t,i){let n=this.normalizeString(i.trim()),r=this.splitIntoWords(n);return t.filter(a=>{let s=this.normalizeString(this.getDisplayName(a.name));return this.matchesSearch(s,r)})}normalizeString(t){return t.toLocaleLowerCase().replace(/[_\-\s]+/g," ")}splitIntoWords(t){return t.split(" ").filter(i=>i.length>0)}getDisplayName(t){let i=hS.get(t);return i?`${t} ${i.join(" ")}`:t}matchesSearch(t,i){return i.length===0?!0:i.every(n=>t.includes(n))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=Ki({name:"filterMetricDataBySearchTerm",type:e,pure:!0})}}return e})();function pS(e,o){e&1&&(w(0,"span",3),f(1,"(formerly mcc)"),y())}function uS(e,o){e&1&&(w(0,"span",4),f(1),y()),e&2&&(m(),qe(o))}var A1=(()=>{class e{constructor(){this.option=$.required(),this.isActive=$(!1),this.isSelected=$(!1),this.descriptor=$(null),this.selectOption=Ce(),this.hovered=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-select-option"]],hostAttrs:[1,"contents"],inputs:{option:[1,"option"],isActive:[1,"isActive"],isSelected:[1,"isSelected"],descriptor:[1,"descriptor"]},outputs:{selectOption:"selectOption",hovered:"hovered"},decls:9,vars:14,consts:[["type","button",1,"flex","items-center","justify-between","gap-2","w-full","px-2","py-1","rounded","border-0","text-left","cursor-pointer",3,"click","mouseenter","title"],[1,"flex","flex-col","items-start","gap-0.5","min-w-0","flex-1"],[1,"truncate","w-full"],[1,"text-xs","opacity-50"],[1,"text-xs","opacity-60","truncate","w-full"],[1,"text-xs","opacity-60","shrink-0"]],template:function(i,n){if(i&1&&(w(0,"button",0),at(1,"attributeDescriptorTooltip"),K("click",function(){return n.selectOption.emit(n.option().name)})("mouseenter",function(){return n.hovered.emit()}),w(2,"span",1)(3,"span",2),f(4),O(5,pS,2,0,"span",3),y(),O(6,uS,2,1,"span",4),y(),w(7,"span",5),f(8),y()()),i&2){let r;yt(n.isActive()?"bg-base-200":"bg-transparent hover:bg-base-200"),Ne("font-semibold",n.isSelected()),le("title",gi(1,11,n.descriptor(),n.option().name)),rt("data-metric-name",n.option().name)("data-active",n.isActive()?"true":null),m(4),he(" ",n.option().name," "),m(),z(n.option().name==="complexity"||n.option().name==="sonar_complexity"?5:-1),m(),z((r=(r=n.descriptor())==null?null:r.description)?6:-1,r),m(2),he("(",n.option().maxValue,")")}},dependencies:[bo],encapsulation:2,changeDetection:0})}}return e})();var fS=["searchInput"],gS=(e,o)=>o.name;function bS(e,o){if(e&1){let t=xe();v(0,"li",6)(1,"cc-metric-select-option",8),W("selectOption",function(n){ae(t);let r=D(2);return se(r.handleSelect(n))})("hovered",function(){let n=ae(t).$index,r=D(2);return se(r.activeIndex.set(n))}),b()()}if(e&2){let t=o.$implicit,i=o.$index,n=D(2);m(),L("option",t)("isActive",i===n.activeIndex())("isSelected",t.name===n.selected())("descriptor",n.attributeDescriptors()[t.name]??null)}}function vS(e,o){e&1&&(v(0,"li",7),f(1,"No metrics found"),b())}function xS(e,o){if(e&1&&(Ae(0,bS,2,4,"li",6,gS,!1,vS,2,0,"li",7),at(3,"filterMetricDataBySearchTerm")),e&2){let t=D();Le(gi(3,1,t.metricData(),t.searchTerm()))}}var fr=(()=>{class e{constructor(){this.metricsBarReadStore=q(ht),this.metricsLensFacade=q(jn),this.popoverId=$.required(),this.anchorName=$.required(),this.placeholder=$("Search metric"),this.kind=$("node"),this.selected=$(null),this.metricSelected=Ce(),this.shell=je.required(Ot),this.searchInput=je.required("searchInput"),this.searchTerm=be(""),this.activeIndex=be(0),this.isOpen=be(!1),this.metricDataState=R(this.metricsBarReadStore.metricData$,{initialValue:{nodeMetricData:[],edgeMetricData:[],nodeEdgeMetricsMap:new Map}}),this.attributeDescriptors=R(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.metricData=X(()=>{let t=this.metricDataState();return this.kind()==="edge"?t.edgeMetricData:t.nodeMetricData}),this.toggleListener=t=>{let i=t;this.isOpen.set(i.newState==="open"),i.newState==="open"&&(this.searchTerm.set(""),this.activeIndex.set(this.getSelectedMetricIndex()),queueMicrotask(()=>{this.searchInput().nativeElement.focus(),this.scrollActiveIntoView(this.popover().nativeElement)}))}}popover(){return this.shell().popover()}getSelectedMetricIndex(){let t=this.selected();if(!t)return 0;let i=this.metricData().findIndex(n=>n.name===t);return i===-1?0:i}ngAfterViewInit(){this.popover().nativeElement.addEventListener("toggle",this.toggleListener)}ngOnDestroy(){this.popover().nativeElement.removeEventListener("toggle",this.toggleListener)}handleSearchTermChange(t){this.searchTerm.set(t),this.activeIndex.set(0)}handleKeyDown(t){let i=this.popover().nativeElement,n=this.getFilteredItems(i);if(n.length!==0)switch(t.key){case"ArrowDown":t.preventDefault(),this.activeIndex.set(Math.min(n.length-1,this.activeIndex()+1)),this.scrollActiveIntoView(i);break;case"ArrowUp":t.preventDefault(),this.activeIndex.set(Math.max(0,this.activeIndex()-1)),this.scrollActiveIntoView(i);break;case"Enter":{t.preventDefault();let r=n[this.activeIndex()]?.dataset.metricName;r&&this.handleSelect(r);break}case"Escape":this.closePopover();break}}handleSelect(t){this.metricSelected.emit(t),this.closePopover()}closePopover(){let t=this.popover().nativeElement;t.matches(":popover-open")&&t.hidePopover()}getFilteredItems(t){return Array.from(t.querySelectorAll("[data-metric-name]"))}scrollActiveIntoView(t){this.getFilteredItems(t)[this.activeIndex()]?.scrollIntoView?.({block:"nearest"})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-select-popover"]],viewQuery:function(i,n){i&1&&it(n.shell,Ot,5)(n.searchInput,fS,5),i&2&&ot(2)},hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],placeholder:[1,"placeholder"],kind:[1,"kind"],selected:[1,"selected"]},outputs:{metricSelected:"metricSelected"},decls:7,vars:6,consts:[["searchInput",""],["widthClass","w-80","contentClass","gap-2 p-2",3,"popoverId","anchorName","testId"],["aria-label","Search metrics",1,"input","input-sm","input-bordered","flex","items-center","gap-2"],[1,"fa","fa-search","opacity-60"],["type","text","autofocus","",1,"grow",3,"input","keydown","placeholder","value"],[1,"flex","flex-col","max-h-[440px]","overflow-y-auto","m-0","p-0","list-none"],[1,"flex"],[1,"px-2","py-3","text-xs","opacity-60"],[3,"selectOption","hovered","option","isActive","isSelected","descriptor"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",1)(1,"label",2),F(2,"i",3),v(3,"input",4,0),W("input",function(a){return n.handleSearchTermChange(a.target.value)})("keydown",function(a){return n.handleKeyDown(a)}),b()(),v(5,"ul",5),O(6,xS,4,4),b()()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName())("testId","metric-select-popover-"+n.anchorName()),m(3),L("placeholder",n.placeholder())("value",n.searchTerm()),m(3),z(n.isOpen()?6:-1))},dependencies:[mo,Ot,A1,D1],encapsulation:2,changeDetection:0})}}return e})();var wS=["*"],fl=(()=>{class e{constructor(){this.label=$.required(),this.metricName=$(""),this.metricFor=$.required(),this.placeholder=$(""),this.searchPopoverId=$.required(),this.searchAnchorName=$.required(),this.settingsPopoverId=$.required(),this.settingsAnchorName=$.required(),this.testIdPrefix=$.required(),this.metricSelected=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-segment"]],hostAttrs:[1,"contents"],inputs:{label:[1,"label"],metricName:[1,"metricName"],metricFor:[1,"metricFor"],placeholder:[1,"placeholder"],searchPopoverId:[1,"searchPopoverId"],searchAnchorName:[1,"searchAnchorName"],settingsPopoverId:[1,"settingsPopoverId"],settingsAnchorName:[1,"settingsAnchorName"],testIdPrefix:[1,"testIdPrefix"]},outputs:{metricSelected:"metricSelected"},ngContentSelectors:wS,decls:5,vars:14,consts:[[3,"label","metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],[3,"metricFor"],["kind","node",3,"metricSelected","popoverId","anchorName","placeholder","selected"]],template:function(i,n){i&1&&(Qh(),v(0,"cc-axis-card",0)(1,"div",1),F(2,"cc-metric-meta-value",2),b()(),v(3,"cc-metric-select-popover",3),W("metricSelected",function(a){return n.metricSelected.emit(a)}),b(),Yh(4)),i&2&&(L("label",n.label())("metricName",n.metricName())("hasCog",!0)("cogPopoverId",n.settingsPopoverId())("cogAnchorName",n.settingsAnchorName())("searchPopoverId",n.searchPopoverId())("searchAnchorName",n.searchAnchorName())("testId",n.testIdPrefix())("cogTestId",n.testIdPrefix()+"-cog"),m(2),L("metricFor",n.metricFor()),m(),L("popoverId",n.searchPopoverId())("anchorName",n.searchAnchorName())("placeholder",n.placeholder())("selected",n.metricName()))},dependencies:[co,ul,fr],encapsulation:2,changeDetection:0})}}return e})();var L1=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-area",this.searchAnchorName="metric-segment-area",this.settingsPopoverId="metric-settings-popover-area",this.settingsAnchorName="metric-segment-area-cog",this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.areaMetric=R(this.mapStateReadWindow.areaMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setAreaMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-area-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Area","metricFor","areaMetric","placeholder","Area Metric (highest value)","testIdPrefix","metric-segment-area",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(v(0,"cc-metric-segment",0),W("metricSelected",function(a){return n.handleMetricSelected(a)}),F(1,"cc-area-settings-popover",1),b()),i&2&&(L("metricName",n.areaMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),m(),L("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[fl,R1],encapsulation:2,changeDetection:0})}}return e})();function SS(e,o){if(e&1&&(v(0,"span",3),f(1),b()),e&2){let t=D();m(),qe(t.count())}}var F1=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.mapColorFor=$.required(),this.count=$(null),this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=R(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=R(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.color=X(()=>this.mapColors()[this.mapColorFor()])}handleColorChange(t){this.metricsBarWriteStore.setMapColors({[this.mapColorFor()]:t})}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(ht),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-band-row"]],inputs:{mapColorFor:[1,"mapColorFor"],count:[1,"count"]},decls:6,vars:9,consts:[[1,"flex","items-center","gap-2"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"cc-inline-color-picker",1),W("colorChange",function(a){return n.handleColorChange(a)}),b(),v(2,"span",2),f(3),at(4,"mapColorLabel"),b(),O(5,SS,2,1,"span",3),b()),i&2&&(m(),L("hexColor",n.color())("ariaLabel","Recolor "+n.mapColorFor()),m(2),he(" ",Wa(4,4,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric())," "),m(2),z(n.count()!==null?5:-1))},dependencies:[ho,hl],encapsulation:2,changeDetection:0})}}return e})();function yS(e,o){if(e&1&&F(0,"cc-color-band-row",3)(1,"cc-color-band-row",4)(2,"cc-color-band-row",5),e&2){let t=D();L("count",t.colorCategoryCounts().positive),m(),L("count",t.colorCategoryCounts().neutral),m(),L("count",t.colorCategoryCounts().negative)}}function CS(e,o){e&1&&F(0,"cc-color-band-row",6)(1,"cc-color-band-row",7)}var P1=(()=>{class e{constructor(t,i){this.fileStoreReadWindow=t,this.colorCategoryCountsStore=i,this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.colorCategoryCounts=R(this.colorCategoryCountsStore.colorCategoryCounts$,{initialValue:{positive:0,neutral:0,negative:0}})}static{this.\u0275fac=function(i){return new(i||e)(te(Te),te(Qn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-bands-section"]],hostAttrs:[1,"contents"],decls:6,vars:1,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","selected"],["mapColorFor","positive",3,"count"],["mapColorFor","neutral",3,"count"],["mapColorFor","negative",3,"count"],["mapColorFor","positiveDelta"],["mapColorFor","negativeDelta"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Bands"),b(),O(3,yS,3,3)(4,CS,2,0),F(5,"cc-color-band-row",2),b()),i&2&&(m(3),z(n.isDeltaState()?4:3))},dependencies:[F1],encapsulation:2,changeDetection:0})}}return e})();function $o(e,o){return e==null||o==null?NaN:e<o?-1:e>o?1:e>=o?0:NaN}function zd(e,o){return e==null||o==null?NaN:o<e?-1:o>e?1:o>=e?0:NaN}function gl(e){let o,t,i;e.length!==2?(o=$o,t=(s,l)=>$o(e(s),l),i=(s,l)=>e(s)-l):(o=e===$o||e===zd?e:MS,t=e,i=e);function n(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let h=d+c>>>1;t(s[h],l)<0?d=h+1:c=h}while(d<c)}return d}function r(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let h=d+c>>>1;t(s[h],l)<=0?d=h+1:c=h}while(d<c)}return d}function a(s,l,d=0,c=s.length){let h=n(s,l,d,c-1);return h>d&&i(s[h-1],l)>-i(s[h],l)?h-1:h}return{left:n,center:a,right:r}}function MS(){return 0}function $d(e){return e===null?NaN:+e}var N1=gl($o),B1=N1.right,_S=N1.left,ES=gl($d).center,jd=B1;function bl(e,o){let t,i;if(o===void 0)for(let n of e)n!=null&&(t===void 0?n>=n&&(t=i=n):(t>n&&(t=n),i<n&&(i=n)));else{let n=-1;for(let r of e)(r=o(r,++n,e))!=null&&(t===void 0?r>=r&&(t=i=r):(t>r&&(t=r),i<r&&(i=r)))}return[t,i]}var kS=Math.sqrt(50),qS=Math.sqrt(10),TS=Math.sqrt(2);function vl(e,o,t){let i=(o-e)/Math.max(0,t),n=Math.floor(Math.log10(i)),r=i/Math.pow(10,n),a=r>=kS?10:r>=qS?5:r>=TS?2:1,s,l,d;return n<0?(d=Math.pow(10,-n)/a,s=Math.round(e*d),l=Math.round(o*d),s/d<e&&++s,l/d>o&&--l,d=-d):(d=Math.pow(10,n)*a,s=Math.round(e/d),l=Math.round(o/d),s*d<e&&++s,l*d>o&&--l),l<s&&.5<=t&&t<2?vl(e,o,t*2):[s,l,d]}function xl(e,o,t){if(o=+o,e=+e,t=+t,!(t>0))return[];if(e===o)return[e];let i=o<e,[n,r,a]=i?vl(o,e,t):vl(e,o,t);if(!(r>=n))return[];let s=r-n+1,l=new Array(s);if(i)if(a<0)for(let d=0;d<s;++d)l[d]=(r-d)/-a;else for(let d=0;d<s;++d)l[d]=(r-d)*a;else if(a<0)for(let d=0;d<s;++d)l[d]=(n+d)/-a;else for(let d=0;d<s;++d)l[d]=(n+d)*a;return l}function Gr(e,o,t){return o=+o,e=+e,t=+t,vl(e,o,t)[2]}function Hd(e,o,t){o=+o,e=+e,t=+t;let i=o<e,n=i?Gr(o,e,t):Gr(e,o,t);return(i?-1:1)*(n<0?1/-n:n)}function Xr(e,o){let t;if(o===void 0)for(let i of e)i!=null&&(t<i||t===void 0&&i>=i)&&(t=i);else{let i=-1;for(let n of e)(n=o(n,++i,e))!=null&&(t<n||t===void 0&&n>=n)&&(t=n)}return t}function V1(e){return e}var Ud=1,Gd=2,Xd=3,Kr=4,W1=1e-6;function IS(e){return"translate("+e+",0)"}function RS(e){return"translate(0,"+e+")"}function DS(e){return o=>+e(o)}function AS(e,o){return o=Math.max(0,e.bandwidth()-o*2)/2,e.round()&&(o=Math.round(o)),t=>+e(t)+o}function LS(){return!this.__axis}function O1(e,o){var t=[],i=null,n=null,r=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,d=e===Ud||e===Kr?-1:1,c=e===Kr||e===Gd?"x":"y",h=e===Ud||e===Xd?IS:RS;function p(u){var k=i??(o.ticks?o.ticks.apply(o,t):o.domain()),E=n??(o.tickFormat?o.tickFormat.apply(o,t):V1),N=Math.max(r,0)+s,j=o.range(),ee=+j[0]+l,B=+j[j.length-1]+l,H=(o.bandwidth?AS:DS)(o.copy(),l),G=u.selection?u.selection():u,Z=G.selectAll(".domain").data([null]),ie=G.selectAll(".tick").data(k,o).order(),oe=ie.exit(),ne=ie.enter().append("g").attr("class","tick"),Me=ie.select("line"),He=ie.select("text");Z=Z.merge(Z.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),ie=ie.merge(ne),Me=Me.merge(ne.append("line").attr("stroke","currentColor").attr(c+"2",d*r)),He=He.merge(ne.append("text").attr("fill","currentColor").attr(c,d*N).attr("dy",e===Ud?"0em":e===Xd?"0.71em":"0.32em")),u!==G&&(Z=Z.transition(u),ie=ie.transition(u),Me=Me.transition(u),He=He.transition(u),oe=oe.transition(u).attr("opacity",W1).attr("transform",function(U){return isFinite(U=H(U))?h(U+l):this.getAttribute("transform")}),ne.attr("opacity",W1).attr("transform",function(U){var De=this.parentNode.__axis;return h((De&&isFinite(De=De(U))?De:H(U))+l)})),oe.remove(),Z.attr("d",e===Kr||e===Gd?a?"M"+d*a+","+ee+"H"+l+"V"+B+"H"+d*a:"M"+l+","+ee+"V"+B:a?"M"+ee+","+d*a+"V"+l+"H"+B+"V"+d*a:"M"+ee+","+l+"H"+B),ie.attr("opacity",1).attr("transform",function(U){return h(H(U)+l)}),Me.attr(c+"2",d*r),He.attr(c,d*N).text(E),G.filter(LS).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Gd?"start":e===Kr?"end":"middle"),G.each(function(){this.__axis=H})}return p.scale=function(u){return arguments.length?(o=u,p):o},p.ticks=function(){return t=Array.from(arguments),p},p.tickArguments=function(u){return arguments.length?(t=u==null?[]:Array.from(u),p):t.slice()},p.tickValues=function(u){return arguments.length?(i=u==null?null:Array.from(u),p):i&&i.slice()},p.tickFormat=function(u){return arguments.length?(n=u,p):n},p.tickSize=function(u){return arguments.length?(r=a=+u,p):r},p.tickSizeInner=function(u){return arguments.length?(r=+u,p):r},p.tickSizeOuter=function(u){return arguments.length?(a=+u,p):a},p.tickPadding=function(u){return arguments.length?(s=+u,p):s},p.offset=function(u){return arguments.length?(l=+u,p):l},p}function Kd(e){return O1(Xd,e)}function Qd(e){return O1(Kr,e)}var FS={value:()=>{}};function $1(){for(var e=0,o=arguments.length,t={},i;e<o;++e){if(!(i=arguments[e]+"")||i in t||/[\s.]/.test(i))throw new Error("illegal type: "+i);t[i]=[]}return new wl(t)}function wl(e){this._=e}function PS(e,o){return e.trim().split(/^|\s+/).map(function(t){var i="",n=t.indexOf(".");if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t&&!o.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:i}})}wl.prototype=$1.prototype={constructor:wl,on:function(e,o){var t=this._,i=PS(e+"",t),n,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((n=(e=i[r]).type)&&(n=NS(t[n],e.name)))return n;return}if(o!=null&&typeof o!="function")throw new Error("invalid callback: "+o);for(;++r<a;)if(n=(e=i[r]).type)t[n]=z1(t[n],e.name,o);else if(o==null)for(n in t)t[n]=z1(t[n],e.name,null);return this},copy:function(){var e={},o=this._;for(var t in o)e[t]=o[t].slice();return new wl(e)},call:function(e,o){if((n=arguments.length-2)>0)for(var t=new Array(n),i=0,n,r;i<n;++i)t[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,n=r.length;i<n;++i)r[i].value.apply(o,t)},apply:function(e,o,t){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,r=i.length;n<r;++n)i[n].value.apply(o,t)}};function NS(e,o){for(var t=0,i=e.length,n;t<i;++t)if((n=e[t]).name===o)return n.value}function z1(e,o,t){for(var i=0,n=e.length;i<n;++i)if(e[i].name===o){e[i]=FS,e=e.slice(0,i).concat(e.slice(i+1));break}return t!=null&&e.push({name:o,value:t}),e}var Yd=$1;var Sl="http://www.w3.org/1999/xhtml",Zd={svg:"http://www.w3.org/2000/svg",xhtml:Sl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Vi(e){var o=e+="",t=o.indexOf(":");return t>=0&&(o=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),Zd.hasOwnProperty(o)?{space:Zd[o],local:e}:e}function BS(e){return function(){var o=this.ownerDocument,t=this.namespaceURI;return t===Sl&&o.documentElement.namespaceURI===Sl?o.createElement(e):o.createElementNS(t,e)}}function VS(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function yl(e){var o=Vi(e);return(o.local?VS:BS)(o)}function WS(){}function jo(e){return e==null?WS:function(){return this.querySelector(e)}}function j1(e){typeof e!="function"&&(e=jo(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=new Array(a),l,d,c=0;c<a;++c)(l=r[c])&&(d=e.call(l,l.__data__,c,r))&&("__data__"in l&&(d.__data__=l.__data__),s[c]=d);return new pt(i,this._parents)}function Jd(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function OS(){return[]}function Qr(e){return e==null?OS:function(){return this.querySelectorAll(e)}}function zS(e){return function(){return Jd(e.apply(this,arguments))}}function H1(e){typeof e=="function"?e=zS(e):e=Qr(e);for(var o=this._groups,t=o.length,i=[],n=[],r=0;r<t;++r)for(var a=o[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&(i.push(e.call(l,l.__data__,d,a)),n.push(l));return new pt(i,n)}function Yr(e){return function(){return this.matches(e)}}function Cl(e){return function(o){return o.matches(e)}}var $S=Array.prototype.find;function jS(e){return function(){return $S.call(this.children,e)}}function HS(){return this.firstElementChild}function U1(e){return this.select(e==null?HS:jS(typeof e=="function"?e:Cl(e)))}var US=Array.prototype.filter;function GS(){return Array.from(this.children)}function XS(e){return function(){return US.call(this.children,e)}}function G1(e){return this.selectAll(e==null?GS:XS(typeof e=="function"?e:Cl(e)))}function X1(e){typeof e!="function"&&(e=Yr(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new pt(i,this._parents)}function Ml(e){return new Array(e.length)}function K1(){return new pt(this._enter||this._groups.map(Ml),this._parents)}function Zr(e,o){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=o}Zr.prototype={constructor:Zr,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,o){return this._parent.insertBefore(e,o)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Q1(e){return function(){return e}}function KS(e,o,t,i,n,r){for(var a=0,s,l=o.length,d=r.length;a<d;++a)(s=o[a])?(s.__data__=r[a],i[a]=s):t[a]=new Zr(e,r[a]);for(;a<l;++a)(s=o[a])&&(n[a]=s)}function QS(e,o,t,i,n,r,a){var s,l,d=new Map,c=o.length,h=r.length,p=new Array(c),u;for(s=0;s<c;++s)(l=o[s])&&(p[s]=u=a.call(l,l.__data__,s,o)+"",d.has(u)?n[s]=l:d.set(u,l));for(s=0;s<h;++s)u=a.call(e,r[s],s,r)+"",(l=d.get(u))?(i[s]=l,l.__data__=r[s],d.delete(u)):t[s]=new Zr(e,r[s]);for(s=0;s<c;++s)(l=o[s])&&d.get(p[s])===l&&(n[s]=l)}function YS(e){return e.__data__}function Y1(e,o){if(!arguments.length)return Array.from(this,YS);var t=o?QS:KS,i=this._parents,n=this._groups;typeof e!="function"&&(e=Q1(e));for(var r=n.length,a=new Array(r),s=new Array(r),l=new Array(r),d=0;d<r;++d){var c=i[d],h=n[d],p=h.length,u=ZS(e.call(c,c&&c.__data__,d,i)),k=u.length,E=s[d]=new Array(k),N=a[d]=new Array(k),j=l[d]=new Array(p);t(c,h,E,N,j,u,o);for(var ee=0,B=0,H,G;ee<k;++ee)if(H=E[ee]){for(ee>=B&&(B=ee+1);!(G=N[B])&&++B<k;);H._next=G||null}}return a=new pt(a,i),a._enter=s,a._exit=l,a}function ZS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Z1(){return new pt(this._exit||this._groups.map(Ml),this._parents)}function J1(e,o,t){var i=this.enter(),n=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),o!=null&&(n=o(n),n&&(n=n.selection())),t==null?r.remove():t(r),i&&n?i.merge(n).order():n}function e2(e){for(var o=e.selection?e.selection():e,t=this._groups,i=o._groups,n=t.length,r=i.length,a=Math.min(n,r),s=new Array(n),l=0;l<a;++l)for(var d=t[l],c=i[l],h=d.length,p=s[l]=new Array(h),u,k=0;k<h;++k)(u=d[k]||c[k])&&(p[k]=u);for(;l<n;++l)s[l]=t[l];return new pt(s,this._parents)}function t2(){for(var e=this._groups,o=-1,t=e.length;++o<t;)for(var i=e[o],n=i.length-1,r=i[n],a;--n>=0;)(a=i[n])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function i2(e){e||(e=JS);function o(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var t=this._groups,i=t.length,n=new Array(i),r=0;r<i;++r){for(var a=t[r],s=a.length,l=n[r]=new Array(s),d,c=0;c<s;++c)(d=a[c])&&(l[c]=d);l.sort(o)}return new pt(n,this._parents).order()}function JS(e,o){return e<o?-1:e>o?1:e>=o?0:NaN}function o2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function n2(){return Array.from(this)}function r2(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length;n<r;++n){var a=i[n];if(a)return a}return null}function a2(){let e=0;for(let o of this)++e;return e}function s2(){return!this.node()}function l2(e){for(var o=this._groups,t=0,i=o.length;t<i;++t)for(var n=o[t],r=0,a=n.length,s;r<a;++r)(s=n[r])&&e.call(s,s.__data__,r,n);return this}function ey(e){return function(){this.removeAttribute(e)}}function ty(e){return function(){this.removeAttributeNS(e.space,e.local)}}function iy(e,o){return function(){this.setAttribute(e,o)}}function oy(e,o){return function(){this.setAttributeNS(e.space,e.local,o)}}function ny(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttribute(e):this.setAttribute(e,t)}}function ry(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function c2(e,o){var t=Vi(e);if(arguments.length<2){var i=this.node();return t.local?i.getAttributeNS(t.space,t.local):i.getAttribute(t)}return this.each((o==null?t.local?ty:ey:typeof o=="function"?t.local?ry:ny:t.local?oy:iy)(t,o))}function _l(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ay(e){return function(){this.style.removeProperty(e)}}function sy(e,o,t){return function(){this.style.setProperty(e,o,t)}}function ly(e,o,t){return function(){var i=o.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,t)}}function d2(e,o,t){return arguments.length>1?this.each((o==null?ay:typeof o=="function"?ly:sy)(e,o,t??"")):xo(this.node(),e)}function xo(e,o){return e.style.getPropertyValue(o)||_l(e).getComputedStyle(e,null).getPropertyValue(o)}function cy(e){return function(){delete this[e]}}function dy(e,o){return function(){this[e]=o}}function my(e,o){return function(){var t=o.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function m2(e,o){return arguments.length>1?this.each((o==null?cy:typeof o=="function"?my:dy)(e,o)):this.node()[e]}function h2(e){return e.trim().split(/^|\s+/)}function em(e){return e.classList||new p2(e)}function p2(e){this._node=e,this._names=h2(e.getAttribute("class")||"")}p2.prototype={add:function(e){var o=this._names.indexOf(e);o<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var o=this._names.indexOf(e);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function u2(e,o){for(var t=em(e),i=-1,n=o.length;++i<n;)t.add(o[i])}function f2(e,o){for(var t=em(e),i=-1,n=o.length;++i<n;)t.remove(o[i])}function hy(e){return function(){u2(this,e)}}function py(e){return function(){f2(this,e)}}function uy(e,o){return function(){(o.apply(this,arguments)?u2:f2)(this,e)}}function g2(e,o){var t=h2(e+"");if(arguments.length<2){for(var i=em(this.node()),n=-1,r=t.length;++n<r;)if(!i.contains(t[n]))return!1;return!0}return this.each((typeof o=="function"?uy:o?hy:py)(t,o))}function fy(){this.textContent=""}function gy(e){return function(){this.textContent=e}}function by(e){return function(){var o=e.apply(this,arguments);this.textContent=o??""}}function b2(e){return arguments.length?this.each(e==null?fy:(typeof e=="function"?by:gy)(e)):this.node().textContent}function vy(){this.innerHTML=""}function xy(e){return function(){this.innerHTML=e}}function wy(e){return function(){var o=e.apply(this,arguments);this.innerHTML=o??""}}function v2(e){return arguments.length?this.each(e==null?vy:(typeof e=="function"?wy:xy)(e)):this.node().innerHTML}function Sy(){this.nextSibling&&this.parentNode.appendChild(this)}function x2(){return this.each(Sy)}function yy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function w2(){return this.each(yy)}function S2(e){var o=typeof e=="function"?e:yl(e);return this.select(function(){return this.appendChild(o.apply(this,arguments))})}function Cy(){return null}function y2(e,o){var t=typeof e=="function"?e:yl(e),i=o==null?Cy:typeof o=="function"?o:jo(o);return this.select(function(){return this.insertBefore(t.apply(this,arguments),i.apply(this,arguments)||null)})}function My(){var e=this.parentNode;e&&e.removeChild(this)}function C2(){return this.each(My)}function _y(){var e=this.cloneNode(!1),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function Ey(){var e=this.cloneNode(!0),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function M2(e){return this.select(e?Ey:_y)}function _2(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ky(e){return function(o){e.call(this,o,this.__data__)}}function qy(e){return e.trim().split(/^|\s+/).map(function(o){var t="",i=o.indexOf(".");return i>=0&&(t=o.slice(i+1),o=o.slice(0,i)),{type:o,name:t}})}function Ty(e){return function(){var o=this.__on;if(o){for(var t=0,i=-1,n=o.length,r;t<n;++t)r=o[t],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):o[++i]=r;++i?o.length=i:delete this.__on}}}function Iy(e,o,t){return function(){var i=this.__on,n,r=ky(o);if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=r,n.options=t),n.value=o;return}}this.addEventListener(e.type,r,t),n={type:e.type,name:e.name,value:o,listener:r,options:t},i?i.push(n):this.__on=[n]}}function E2(e,o,t){var i=qy(e+""),n,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,d=s.length,c;l<d;++l)for(n=0,c=s[l];n<r;++n)if((a=i[n]).type===c.type&&a.name===c.name)return c.value}return}for(s=o?Iy:Ty,n=0;n<r;++n)this.each(s(i[n],o,t));return this}function k2(e,o,t){var i=_l(e),n=i.CustomEvent;typeof n=="function"?n=new n(o,t):(n=i.document.createEvent("Event"),t?(n.initEvent(o,t.bubbles,t.cancelable),n.detail=t.detail):n.initEvent(o,!1,!1)),e.dispatchEvent(n)}function Ry(e,o){return function(){return k2(this,e,o)}}function Dy(e,o){return function(){return k2(this,e,o.apply(this,arguments))}}function q2(e,o){return this.each((typeof o=="function"?Dy:Ry)(e,o))}function*T2(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length,a;n<r;++n)(a=i[n])&&(yield a)}var tm=[null];function pt(e,o){this._groups=e,this._parents=o}function I2(){return new pt([[document.documentElement]],tm)}function Ay(){return this}pt.prototype=I2.prototype={constructor:pt,select:j1,selectAll:H1,selectChild:U1,selectChildren:G1,filter:X1,data:Y1,enter:K1,exit:Z1,join:J1,merge:e2,selection:Ay,order:t2,sort:i2,call:o2,nodes:n2,node:r2,size:a2,empty:s2,each:l2,attr:c2,style:d2,property:m2,classed:g2,text:b2,html:v2,raise:x2,lower:w2,append:S2,insert:y2,remove:C2,clone:M2,datum:_2,on:E2,dispatch:q2,[Symbol.iterator]:T2};var Wi=I2;function im(e){return typeof e=="string"?new pt([[document.querySelector(e)]],[document.documentElement]):new pt([[e]],tm)}function R2(e){let o;for(;o=e.sourceEvent;)e=o;return e}function om(e,o){if(e=R2(e),o===void 0&&(o=e.currentTarget),o){var t=o.ownerSVGElement||o;if(t.createSVGPoint){var i=t.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(o.getScreenCTM().inverse()),[i.x,i.y]}if(o.getBoundingClientRect){var n=o.getBoundingClientRect();return[e.clientX-n.left-o.clientLeft,e.clientY-n.top-o.clientTop]}}return[e.pageX,e.pageY]}function El(e,o,t){e.prototype=o.prototype=t,t.constructor=e}function nm(e,o){var t=Object.create(e.prototype);for(var i in o)t[i]=o[i];return t}function ta(){}var Jr=.7,Tl=1/Jr,gr="\\s*([+-]?\\d+)\\s*",ea="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ly=/^#([0-9a-f]{3,8})$/,Fy=new RegExp(`^rgb\\(${gr},${gr},${gr}\\)$`),Py=new RegExp(`^rgb\\(${Ii},${Ii},${Ii}\\)$`),Ny=new RegExp(`^rgba\\(${gr},${gr},${gr},${ea}\\)$`),By=new RegExp(`^rgba\\(${Ii},${Ii},${Ii},${ea}\\)$`),Vy=new RegExp(`^hsl\\(${ea},${Ii},${Ii}\\)$`),Wy=new RegExp(`^hsla\\(${ea},${Ii},${Ii},${ea}\\)$`),D2={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};El(ta,ci,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:A2,formatHex:A2,formatHex8:Oy,formatHsl:zy,formatRgb:L2,toString:L2});function A2(){return this.rgb().formatHex()}function Oy(){return this.rgb().formatHex8()}function zy(){return W2(this).formatHsl()}function L2(){return this.rgb().formatRgb()}function ci(e){var o,t;return e=(e+"").trim().toLowerCase(),(o=Ly.exec(e))?(t=o[1].length,o=parseInt(o[1],16),t===6?F2(o):t===3?new zt(o>>8&15|o>>4&240,o>>4&15|o&240,(o&15)<<4|o&15,1):t===8?kl(o>>24&255,o>>16&255,o>>8&255,(o&255)/255):t===4?kl(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|o&240,((o&15)<<4|o&15)/255):null):(o=Fy.exec(e))?new zt(o[1],o[2],o[3],1):(o=Py.exec(e))?new zt(o[1]*255/100,o[2]*255/100,o[3]*255/100,1):(o=Ny.exec(e))?kl(o[1],o[2],o[3],o[4]):(o=By.exec(e))?kl(o[1]*255/100,o[2]*255/100,o[3]*255/100,o[4]):(o=Vy.exec(e))?B2(o[1],o[2]/100,o[3]/100,1):(o=Wy.exec(e))?B2(o[1],o[2]/100,o[3]/100,o[4]):D2.hasOwnProperty(e)?F2(D2[e]):e==="transparent"?new zt(NaN,NaN,NaN,0):null}function F2(e){return new zt(e>>16&255,e>>8&255,e&255,1)}function kl(e,o,t,i){return i<=0&&(e=o=t=NaN),new zt(e,o,t,i)}function $y(e){return e instanceof ta||(e=ci(e)),e?(e=e.rgb(),new zt(e.r,e.g,e.b,e.opacity)):new zt}function br(e,o,t,i){return arguments.length===1?$y(e):new zt(e,o,t,i??1)}function zt(e,o,t,i){this.r=+e,this.g=+o,this.b=+t,this.opacity=+i}El(zt,br,nm(ta,{brighter(e){return e=e==null?Tl:Math.pow(Tl,e),new zt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Jr:Math.pow(Jr,e),new zt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zt(Uo(this.r),Uo(this.g),Uo(this.b),Il(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:P2,formatHex:P2,formatHex8:jy,formatRgb:N2,toString:N2}));function P2(){return`#${Ho(this.r)}${Ho(this.g)}${Ho(this.b)}`}function jy(){return`#${Ho(this.r)}${Ho(this.g)}${Ho(this.b)}${Ho((isNaN(this.opacity)?1:this.opacity)*255)}`}function N2(){let e=Il(this.opacity);return`${e===1?"rgb(":"rgba("}${Uo(this.r)}, ${Uo(this.g)}, ${Uo(this.b)}${e===1?")":`, ${e})`}`}function Il(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Uo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ho(e){return e=Uo(e),(e<16?"0":"")+e.toString(16)}function B2(e,o,t,i){return i<=0?e=o=t=NaN:t<=0||t>=1?e=o=NaN:o<=0&&(e=NaN),new li(e,o,t,i)}function W2(e){if(e instanceof li)return new li(e.h,e.s,e.l,e.opacity);if(e instanceof ta||(e=ci(e)),!e)return new li;if(e instanceof li)return e;e=e.rgb();var o=e.r/255,t=e.g/255,i=e.b/255,n=Math.min(o,t,i),r=Math.max(o,t,i),a=NaN,s=r-n,l=(r+n)/2;return s?(o===r?a=(t-i)/s+(t<i)*6:t===r?a=(i-o)/s+2:a=(o-t)/s+4,s/=l<.5?r+n:2-r-n,a*=60):s=l>0&&l<1?0:a,new li(a,s,l,e.opacity)}function O2(e,o,t,i){return arguments.length===1?W2(e):new li(e,o,t,i??1)}function li(e,o,t,i){this.h=+e,this.s=+o,this.l=+t,this.opacity=+i}El(li,O2,nm(ta,{brighter(e){return e=e==null?Tl:Math.pow(Tl,e),new li(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Jr:Math.pow(Jr,e),new li(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,o=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*o,n=2*t-i;return new zt(rm(e>=240?e-240:e+120,n,i),rm(e,n,i),rm(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new li(V2(this.h),ql(this.s),ql(this.l),Il(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Il(this.opacity);return`${e===1?"hsl(":"hsla("}${V2(this.h)}, ${ql(this.s)*100}%, ${ql(this.l)*100}%${e===1?")":`, ${e})`}`}}));function V2(e){return e=(e||0)%360,e<0?e+360:e}function ql(e){return Math.max(0,Math.min(1,e||0))}function rm(e,o,t){return(e<60?o+(t-o)*e/60:e<180?t:e<240?o+(t-o)*(240-e)/60:o)*255}function am(e,o,t,i,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*o+(4-6*r+3*a)*t+(1+3*e+3*r-3*a)*i+a*n)/6}function z2(e){var o=e.length-1;return function(t){var i=t<=0?t=0:t>=1?(t=1,o-1):Math.floor(t*o),n=e[i],r=e[i+1],a=i>0?e[i-1]:2*n-r,s=i<o-1?e[i+2]:2*r-n;return am((t-i/o)*o,a,n,r,s)}}function $2(e){var o=e.length;return function(t){var i=Math.floor(((t%=1)<0?++t:t)*o),n=e[(i+o-1)%o],r=e[i%o],a=e[(i+1)%o],s=e[(i+2)%o];return am((t-i/o)*o,n,r,a,s)}}var ia=e=>()=>e;function Hy(e,o){return function(t){return e+t*o}}function Uy(e,o,t){return e=Math.pow(e,t),o=Math.pow(o,t)-e,t=1/t,function(i){return Math.pow(e+i*o,t)}}function j2(e){return(e=+e)==1?Rl:function(o,t){return t-o?Uy(o,t,e):ia(isNaN(o)?t:o)}}function Rl(e,o){var t=o-e;return t?Hy(e,t):ia(isNaN(e)?o:e)}var Go=(function e(o){var t=j2(o);function i(n,r){var a=t((n=br(n)).r,(r=br(r)).r),s=t(n.g,r.g),l=t(n.b,r.b),d=Rl(n.opacity,r.opacity);return function(c){return n.r=a(c),n.g=s(c),n.b=l(c),n.opacity=d(c),n+""}}return i.gamma=e,i})(1);function H2(e){return function(o){var t=o.length,i=new Array(t),n=new Array(t),r=new Array(t),a,s;for(a=0;a<t;++a)s=br(o[a]),i[a]=s.r||0,n[a]=s.g||0,r[a]=s.b||0;return i=e(i),n=e(n),r=e(r),s.opacity=1,function(l){return s.r=i(l),s.g=n(l),s.b=r(l),s+""}}}var Gy=H2(z2),Xy=H2($2);function U2(e,o){o||(o=[]);var t=e?Math.min(o.length,e.length):0,i=o.slice(),n;return function(r){for(n=0;n<t;++n)i[n]=e[n]*(1-r)+o[n]*r;return i}}function G2(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function X2(e,o){var t=o?o.length:0,i=e?Math.min(t,e.length):0,n=new Array(i),r=new Array(t),a;for(a=0;a<i;++a)n[a]=Xo(e[a],o[a]);for(;a<t;++a)r[a]=o[a];return function(s){for(a=0;a<i;++a)r[a]=n[a](s);return r}}function K2(e,o){var t=new Date;return e=+e,o=+o,function(i){return t.setTime(e*(1-i)+o*i),t}}function Ct(e,o){return e=+e,o=+o,function(t){return e*(1-t)+o*t}}function Q2(e,o){var t={},i={},n;(e===null||typeof e!="object")&&(e={}),(o===null||typeof o!="object")&&(o={});for(n in o)n in e?t[n]=Xo(e[n],o[n]):i[n]=o[n];return function(r){for(n in t)i[n]=t[n](r);return i}}var lm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sm=new RegExp(lm.source,"g");function Ky(e){return function(){return e}}function Qy(e){return function(o){return e(o)+""}}function oa(e,o){var t=lm.lastIndex=sm.lastIndex=0,i,n,r,a=-1,s=[],l=[];for(e=e+"",o=o+"";(i=lm.exec(e))&&(n=sm.exec(o));)(r=n.index)>t&&(r=o.slice(t,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:Ct(i,n)})),t=sm.lastIndex;return t<o.length&&(r=o.slice(t),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?Qy(l[0].x):Ky(o):(o=l.length,function(d){for(var c=0,h;c<o;++c)s[(h=l[c]).i]=h.x(d);return s.join("")})}function Xo(e,o){var t=typeof o,i;return o==null||t==="boolean"?ia(o):(t==="number"?Ct:t==="string"?(i=ci(o))?(o=i,Go):oa:o instanceof ci?Go:o instanceof Date?K2:G2(o)?U2:Array.isArray(o)?X2:typeof o.valueOf!="function"&&typeof o.toString!="function"||isNaN(o)?Q2:Ct)(e,o)}function cm(e,o){return e=+e,o=+o,function(t){return Math.round(e*(1-t)+o*t)}}var Y2=180/Math.PI,Dl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function dm(e,o,t,i,n,r){var a,s,l;return(a=Math.sqrt(e*e+o*o))&&(e/=a,o/=a),(l=e*t+o*i)&&(t-=e*l,i-=o*l),(s=Math.sqrt(t*t+i*i))&&(t/=s,i/=s,l/=s),e*i<o*t&&(e=-e,o=-o,l=-l,a=-a),{translateX:n,translateY:r,rotate:Math.atan2(o,e)*Y2,skewX:Math.atan(l)*Y2,scaleX:a,scaleY:s}}var Al;function Z2(e){let o=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return o.isIdentity?Dl:dm(o.a,o.b,o.c,o.d,o.e,o.f)}function J2(e){return e==null?Dl:(Al||(Al=document.createElementNS("http://www.w3.org/2000/svg","g")),Al.setAttribute("transform",e),(e=Al.transform.baseVal.consolidate())?(e=e.matrix,dm(e.a,e.b,e.c,e.d,e.e,e.f)):Dl)}function eb(e,o,t,i){function n(d){return d.length?d.pop()+" ":""}function r(d,c,h,p,u,k){if(d!==h||c!==p){var E=u.push("translate(",null,o,null,t);k.push({i:E-4,x:Ct(d,h)},{i:E-2,x:Ct(c,p)})}else(h||p)&&u.push("translate("+h+o+p+t)}function a(d,c,h,p){d!==c?(d-c>180?c+=360:c-d>180&&(d+=360),p.push({i:h.push(n(h)+"rotate(",null,i)-2,x:Ct(d,c)})):c&&h.push(n(h)+"rotate("+c+i)}function s(d,c,h,p){d!==c?p.push({i:h.push(n(h)+"skewX(",null,i)-2,x:Ct(d,c)}):c&&h.push(n(h)+"skewX("+c+i)}function l(d,c,h,p,u,k){if(d!==h||c!==p){var E=u.push(n(u)+"scale(",null,",",null,")");k.push({i:E-4,x:Ct(d,h)},{i:E-2,x:Ct(c,p)})}else(h!==1||p!==1)&&u.push(n(u)+"scale("+h+","+p+")")}return function(d,c){var h=[],p=[];return d=e(d),c=e(c),r(d.translateX,d.translateY,c.translateX,c.translateY,h,p),a(d.rotate,c.rotate,h,p),s(d.skewX,c.skewX,h,p),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,h,p),d=c=null,function(u){for(var k=-1,E=p.length,N;++k<E;)h[(N=p[k]).i]=N.x(u);return h.join("")}}}var mm=eb(Z2,"px, ","px)","deg)"),hm=eb(J2,", ",")",")");var vr=0,ra=0,na=0,ib=1e3,Ll,aa,Fl=0,Ko=0,Pl=0,sa=typeof performance=="object"&&performance.now?performance:Date,ob=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ca(){return Ko||(ob(Yy),Ko=sa.now()+Pl)}function Yy(){Ko=0}function la(){this._call=this._time=this._next=null}la.prototype=Nl.prototype={constructor:la,restart:function(e,o,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?ca():+t)+(o==null?0:+o),!this._next&&aa!==this&&(aa?aa._next=this:Ll=this,aa=this),this._call=e,this._time=t,pm()},stop:function(){this._call&&(this._call=null,this._time=1/0,pm())}};function Nl(e,o,t){var i=new la;return i.restart(e,o,t),i}function nb(){ca(),++vr;for(var e=Ll,o;e;)(o=Ko-e._time)>=0&&e._call.call(void 0,o),e=e._next;--vr}function tb(){Ko=(Fl=sa.now())+Pl,vr=ra=0;try{nb()}finally{vr=0,Jy(),Ko=0}}function Zy(){var e=sa.now(),o=e-Fl;o>ib&&(Pl-=o,Fl=e)}function Jy(){for(var e,o=Ll,t,i=1/0;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(t=o._next,o._next=null,o=e?e._next=t:Ll=t);aa=e,pm(i)}function pm(e){if(!vr){ra&&(ra=clearTimeout(ra));var o=e-Ko;o>24?(e<1/0&&(ra=setTimeout(tb,e-sa.now()-Pl)),na&&(na=clearInterval(na))):(na||(Fl=sa.now(),na=setInterval(Zy,ib)),vr=1,ob(tb))}}function Bl(e,o,t){var i=new la;return o=o==null?0:+o,i.restart(n=>{i.stop(),e(n+o)},o,t),i}var e6=Yd("start","end","cancel","interrupt"),t6=[],sb=0,rb=1,Wl=2,Vl=3,ab=4,Ol=5,da=6;function wo(e,o,t,i,n,r){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;i6(e,t,{name:o,index:i,group:n,on:e6,tween:t6,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:sb})}function ma(e,o){var t=bt(e,o);if(t.state>sb)throw new Error("too late; already scheduled");return t}function Mt(e,o){var t=bt(e,o);if(t.state>Vl)throw new Error("too late; already running");return t}function bt(e,o){var t=e.__transition;if(!t||!(t=t[o]))throw new Error("transition not found");return t}function i6(e,o,t){var i=e.__transition,n;i[o]=t,t.timer=Nl(r,0,t.time);function r(d){t.state=rb,t.timer.restart(a,t.delay,t.time),t.delay<=d&&a(d-t.delay)}function a(d){var c,h,p,u;if(t.state!==rb)return l();for(c in i)if(u=i[c],u.name===t.name){if(u.state===Vl)return Bl(a);u.state===ab?(u.state=da,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[c]):+c<o&&(u.state=da,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[c])}if(Bl(function(){t.state===Vl&&(t.state=ab,t.timer.restart(s,t.delay,t.time),s(d))}),t.state=Wl,t.on.call("start",e,e.__data__,t.index,t.group),t.state===Wl){for(t.state=Vl,n=new Array(p=t.tween.length),c=0,h=-1;c<p;++c)(u=t.tween[c].value.call(e,e.__data__,t.index,t.group))&&(n[++h]=u);n.length=h+1}}function s(d){for(var c=d<t.duration?t.ease.call(null,d/t.duration):(t.timer.restart(l),t.state=Ol,1),h=-1,p=n.length;++h<p;)n[h].call(e,c);t.state===Ol&&(t.on.call("end",e,e.__data__,t.index,t.group),l())}function l(){t.state=da,t.timer.stop(),delete i[o];for(var d in i)return;delete e.__transition}}function zl(e,o){var t=e.__transition,i,n,r=!0,a;if(t){o=o==null?null:o+"";for(a in t){if((i=t[a]).name!==o){r=!1;continue}n=i.state>Wl&&i.state<Ol,i.state=da,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete t[a]}r&&delete e.__transition}}function lb(e){return this.each(function(){zl(this,e)})}function o6(e,o){var t,i;return function(){var n=Mt(this,e),r=n.tween;if(r!==t){i=t=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===o){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function n6(e,o,t){var i,n;if(typeof t!="function")throw new Error;return function(){var r=Mt(this,e),a=r.tween;if(a!==i){n=(i=a).slice();for(var s={name:o,value:t},l=0,d=n.length;l<d;++l)if(n[l].name===o){n[l]=s;break}l===d&&n.push(s)}r.tween=n}}function cb(e,o){var t=this._id;if(e+="",arguments.length<2){for(var i=bt(this.node(),t).tween,n=0,r=i.length,a;n<r;++n)if((a=i[n]).name===e)return a.value;return null}return this.each((o==null?o6:n6)(t,e,o))}function xr(e,o,t){var i=e._id;return e.each(function(){var n=Mt(this,i);(n.value||(n.value={}))[o]=t.apply(this,arguments)}),function(n){return bt(n,i).value[o]}}function $l(e,o){var t;return(typeof o=="number"?Ct:o instanceof ci?Go:(t=ci(o))?(o=t,Go):oa)(e,o)}function r6(e){return function(){this.removeAttribute(e)}}function a6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function s6(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttribute(e);return a===n?null:a===i?r:r=o(i=a,t)}}function l6(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===n?null:a===i?r:r=o(i=a,t)}}function c6(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function d6(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function db(e,o){var t=Vi(e),i=t==="transform"?hm:$l;return this.attrTween(e,typeof o=="function"?(t.local?d6:c6)(t,i,xr(this,"attr."+e,o)):o==null?(t.local?a6:r6)(t):(t.local?l6:s6)(t,i,o))}function m6(e,o){return function(t){this.setAttribute(e,o.call(this,t))}}function h6(e,o){return function(t){this.setAttributeNS(e.space,e.local,o.call(this,t))}}function p6(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&h6(e,r)),t}return n._value=o,n}function u6(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&m6(e,r)),t}return n._value=o,n}function mb(e,o){var t="attr."+e;if(arguments.length<2)return(t=this.tween(t))&&t._value;if(o==null)return this.tween(t,null);if(typeof o!="function")throw new Error;var i=Vi(e);return this.tween(t,(i.local?p6:u6)(i,o))}function f6(e,o){return function(){ma(this,e).delay=+o.apply(this,arguments)}}function g6(e,o){return o=+o,function(){ma(this,e).delay=o}}function hb(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?f6:g6)(o,e)):bt(this.node(),o).delay}function b6(e,o){return function(){Mt(this,e).duration=+o.apply(this,arguments)}}function v6(e,o){return o=+o,function(){Mt(this,e).duration=o}}function pb(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?b6:v6)(o,e)):bt(this.node(),o).duration}function x6(e,o){if(typeof o!="function")throw new Error;return function(){Mt(this,e).ease=o}}function ub(e){var o=this._id;return arguments.length?this.each(x6(o,e)):bt(this.node(),o).ease}function w6(e,o){return function(){var t=o.apply(this,arguments);if(typeof t!="function")throw new Error;Mt(this,e).ease=t}}function fb(e){if(typeof e!="function")throw new Error;return this.each(w6(this._id,e))}function gb(e){typeof e!="function"&&(e=Yr(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new At(i,this._parents,this._name,this._id)}function bb(e){if(e._id!==this._id)throw new Error;for(var o=this._groups,t=e._groups,i=o.length,n=t.length,r=Math.min(i,n),a=new Array(i),s=0;s<r;++s)for(var l=o[s],d=t[s],c=l.length,h=a[s]=new Array(c),p,u=0;u<c;++u)(p=l[u]||d[u])&&(h[u]=p);for(;s<i;++s)a[s]=o[s];return new At(a,this._parents,this._name,this._id)}function S6(e){return(e+"").trim().split(/^|\s+/).every(function(o){var t=o.indexOf(".");return t>=0&&(o=o.slice(0,t)),!o||o==="start"})}function y6(e,o,t){var i,n,r=S6(o)?ma:Mt;return function(){var a=r(this,e),s=a.on;s!==i&&(n=(i=s).copy()).on(o,t),a.on=n}}function vb(e,o){var t=this._id;return arguments.length<2?bt(this.node(),t).on.on(e):this.each(y6(t,e,o))}function C6(e){return function(){var o=this.parentNode;for(var t in this.__transition)if(+t!==e)return;o&&o.removeChild(this)}}function xb(){return this.on("end.remove",C6(this._id))}function wb(e){var o=this._name,t=this._id;typeof e!="function"&&(e=jo(e));for(var i=this._groups,n=i.length,r=new Array(n),a=0;a<n;++a)for(var s=i[a],l=s.length,d=r[a]=new Array(l),c,h,p=0;p<l;++p)(c=s[p])&&(h=e.call(c,c.__data__,p,s))&&("__data__"in c&&(h.__data__=c.__data__),d[p]=h,wo(d[p],o,t,p,d,bt(c,t)));return new At(r,this._parents,o,t)}function Sb(e){var o=this._name,t=this._id;typeof e!="function"&&(e=Qr(e));for(var i=this._groups,n=i.length,r=[],a=[],s=0;s<n;++s)for(var l=i[s],d=l.length,c,h=0;h<d;++h)if(c=l[h]){for(var p=e.call(c,c.__data__,h,l),u,k=bt(c,t),E=0,N=p.length;E<N;++E)(u=p[E])&&wo(u,o,t,E,p,k);r.push(p),a.push(c)}return new At(r,a,o,t)}var M6=Wi.prototype.constructor;function yb(){return new M6(this._groups,this._parents)}function _6(e,o){var t,i,n;return function(){var r=xo(this,e),a=(this.style.removeProperty(e),xo(this,e));return r===a?null:r===t&&a===i?n:n=o(t=r,i=a)}}function Cb(e){return function(){this.style.removeProperty(e)}}function E6(e,o,t){var i,n=t+"",r;return function(){var a=xo(this,e);return a===n?null:a===i?r:r=o(i=a,t)}}function k6(e,o,t){var i,n,r;return function(){var a=xo(this,e),s=t(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),xo(this,e))),a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s))}}function q6(e,o){var t,i,n,r="style."+o,a="end."+r,s;return function(){var l=Mt(this,e),d=l.on,c=l.value[r]==null?s||(s=Cb(o)):void 0;(d!==t||n!==c)&&(i=(t=d).copy()).on(a,n=c),l.on=i}}function Mb(e,o,t){var i=(e+="")=="transform"?mm:$l;return o==null?this.styleTween(e,_6(e,i)).on("end.style."+e,Cb(e)):typeof o=="function"?this.styleTween(e,k6(e,i,xr(this,"style."+e,o))).each(q6(this._id,e)):this.styleTween(e,E6(e,i,o),t).on("end.style."+e,null)}function T6(e,o,t){return function(i){this.style.setProperty(e,o.call(this,i),t)}}function I6(e,o,t){var i,n;function r(){var a=o.apply(this,arguments);return a!==n&&(i=(n=a)&&T6(e,a,t)),i}return r._value=o,r}function _b(e,o,t){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(o==null)return this.tween(i,null);if(typeof o!="function")throw new Error;return this.tween(i,I6(e,o,t??""))}function R6(e){return function(){this.textContent=e}}function D6(e){return function(){var o=e(this);this.textContent=o??""}}function Eb(e){return this.tween("text",typeof e=="function"?D6(xr(this,"text",e)):R6(e==null?"":e+""))}function A6(e){return function(o){this.textContent=e.call(this,o)}}function L6(e){var o,t;function i(){var n=e.apply(this,arguments);return n!==t&&(o=(t=n)&&A6(n)),o}return i._value=e,i}function kb(e){var o="text";if(arguments.length<1)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,L6(e))}function qb(){for(var e=this._name,o=this._id,t=jl(),i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)if(l=a[d]){var c=bt(l,o);wo(l,e,t,d,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new At(i,this._parents,e,t)}function Tb(){var e,o,t=this,i=t._id,n=t.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--n===0&&r()}};t.each(function(){var d=Mt(this,i),c=d.on;c!==e&&(o=(e=c).copy(),o._.cancel.push(s),o._.interrupt.push(s),o._.end.push(l)),d.on=o}),n===0&&r()})}var F6=0;function At(e,o,t,i){this._groups=e,this._parents=o,this._name=t,this._id=i}function Ib(e){return Wi().transition(e)}function jl(){return++F6}var Oi=Wi.prototype;At.prototype=Ib.prototype={constructor:At,select:wb,selectAll:Sb,selectChild:Oi.selectChild,selectChildren:Oi.selectChildren,filter:gb,merge:bb,selection:yb,transition:qb,call:Oi.call,nodes:Oi.nodes,node:Oi.node,size:Oi.size,empty:Oi.empty,each:Oi.each,on:vb,attr:db,attrTween:mb,style:Mb,styleTween:_b,text:Eb,textTween:kb,remove:xb,tween:cb,delay:hb,duration:pb,ease:ub,easeVarying:fb,end:Tb,[Symbol.iterator]:Oi[Symbol.iterator]};function Hl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var P6={time:null,delay:0,duration:250,ease:Hl};function N6(e,o){for(var t;!(t=e.__transition)||!(t=t[o]);)if(!(e=e.parentNode))throw new Error(`transition ${o} not found`);return t}function Rb(e){var o,t;e instanceof At?(o=e._id,e=e._name):(o=jl(),(t=P6).time=ca(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&wo(l,e,o,d,a,t||N6(l,o));return new At(i,this._parents,e,o)}Wi.prototype.interrupt=lb;Wi.prototype.transition=Rb;var{abs:NO,max:BO,min:VO}=Math;function Db(e){return[+e[0],+e[1]]}function B6(e){return[Db(e[0]),Db(e[1])]}var WO={name:"x",handles:["w","e"].map(um),input:function(e,o){return e==null?null:[[+e[0],o[0][1]],[+e[1],o[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},OO={name:"y",handles:["n","s"].map(um),input:function(e,o){return e==null?null:[[o[0][0],+e[0]],[o[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},zO={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(um),input:function(e){return e==null?null:B6(e)},output:function(e){return e}};function um(e){return{type:e}}var fm=Math.PI,gm=2*fm,Qo=1e-6,V6=gm-Qo;function Ab(e){this._+=e[0];for(let o=1,t=e.length;o<t;++o)this._+=arguments[o]+e[o]}function W6(e){let o=Math.floor(e);if(!(o>=0))throw new Error(`invalid digits: ${e}`);if(o>15)return Ab;let t=10**o;return function(i){this._+=i[0];for(let n=1,r=i.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+i[n]}}var Yo=class{constructor(o){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=o==null?Ab:W6(o)}moveTo(o,t){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(o,t){this._append`L${this._x1=+o},${this._y1=+t}`}quadraticCurveTo(o,t,i,n){this._append`Q${+o},${+t},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(o,t,i,n,r,a){this._append`C${+o},${+t},${+i},${+n},${this._x1=+r},${this._y1=+a}`}arcTo(o,t,i,n,r){if(o=+o,t=+t,i=+i,n=+n,r=+r,r<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,l=i-o,d=n-t,c=a-o,h=s-t,p=c*c+h*h;if(this._x1===null)this._append`M${this._x1=o},${this._y1=t}`;else if(p>Qo)if(!(Math.abs(h*l-d*c)>Qo)||!r)this._append`L${this._x1=o},${this._y1=t}`;else{let u=i-a,k=n-s,E=l*l+d*d,N=u*u+k*k,j=Math.sqrt(E),ee=Math.sqrt(p),B=r*Math.tan((fm-Math.acos((E+p-N)/(2*j*ee)))/2),H=B/ee,G=B/j;Math.abs(H-1)>Qo&&this._append`L${o+H*c},${t+H*h}`,this._append`A${r},${r},0,0,${+(h*u>c*k)},${this._x1=o+G*l},${this._y1=t+G*d}`}}arc(o,t,i,n,r,a){if(o=+o,t=+t,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),d=o+s,c=t+l,h=1^a,p=a?n-r:r-n;this._x1===null?this._append`M${d},${c}`:(Math.abs(this._x1-d)>Qo||Math.abs(this._y1-c)>Qo)&&this._append`L${d},${c}`,i&&(p<0&&(p=p%gm+gm),p>V6?this._append`A${i},${i},0,1,${h},${o-s},${t-l}A${i},${i},0,1,${h},${this._x1=d},${this._y1=c}`:p>Qo&&this._append`A${i},${i},0,${+(p>=fm)},${h},${this._x1=o+i*Math.cos(r)},${this._y1=t+i*Math.sin(r)}`)}rect(o,t,i,n){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function Lb(){return new Yo}Lb.prototype=Yo.prototype;function Fb(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Zo(e,o){if(!isFinite(e)||e===0)return null;var t=(e=o?e.toExponential(o-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function Ri(e){return e=Zo(Math.abs(e)),e?e[1]:NaN}function Pb(e,o){return function(t,i){for(var n=t.length,r=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),r.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return r.reverse().join(o)}}function Nb(e){return function(o){return o.replace(/[0-9]/g,function(t){return e[+t]})}}var O6=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function So(e){if(!(o=O6.exec(e)))throw new Error("invalid format: "+e);var o;return new Ul({fill:o[1],align:o[2],sign:o[3],symbol:o[4],zero:o[5],width:o[6],comma:o[7],precision:o[8]&&o[8].slice(1),trim:o[9],type:o[10]})}So.prototype=Ul.prototype;function Ul(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Ul.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Bb(e){e:for(var o=e.length,t=1,i=-1,n;t<o;++t)switch(e[t]){case".":i=n=t;break;case"0":i===0&&(i=t),n=t;break;default:if(!+e[t])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var ha;function Vb(e,o){var t=Zo(e,o);if(!t)return ha=void 0,e.toPrecision(o);var i=t[0],n=t[1],r=n-(ha=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return r===a?i:r>a?i+new Array(r-a+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+Zo(e,Math.max(0,o+r-1))[0]}function bm(e,o){var t=Zo(e,o);if(!t)return e+"";var i=t[0],n=t[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var vm={"%":(e,o)=>(e*100).toFixed(o),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Fb,e:(e,o)=>e.toExponential(o),f:(e,o)=>e.toFixed(o),g:(e,o)=>e.toPrecision(o),o:e=>Math.round(e).toString(8),p:(e,o)=>bm(e*100,o),r:bm,s:Vb,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xm(e){return e}var Wb=Array.prototype.map,Ob=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function zb(e){var o=e.grouping===void 0||e.thousands===void 0?xm:Pb(Wb.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",r=e.numerals===void 0?xm:Nb(Wb.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function d(h,p){h=So(h);var u=h.fill,k=h.align,E=h.sign,N=h.symbol,j=h.zero,ee=h.width,B=h.comma,H=h.precision,G=h.trim,Z=h.type;Z==="n"?(B=!0,Z="g"):vm[Z]||(H===void 0&&(H=12),G=!0,Z="g"),(j||u==="0"&&k==="=")&&(j=!0,u="0",k="=");var ie=(p&&p.prefix!==void 0?p.prefix:"")+(N==="$"?t:N==="#"&&/[boxX]/.test(Z)?"0"+Z.toLowerCase():""),oe=(N==="$"?i:/[%p]/.test(Z)?a:"")+(p&&p.suffix!==void 0?p.suffix:""),ne=vm[Z],Me=/[defgprs%]/.test(Z);H=H===void 0?6:/[gprs]/.test(Z)?Math.max(1,Math.min(21,H)):Math.max(0,Math.min(20,H));function He(U){var De=ie,_e=oe,Ve,We,ge;if(Z==="c")_e=ne(U)+_e,U="";else{U=+U;var J=U<0||1/U<0;if(U=isNaN(U)?l:ne(Math.abs(U),H),G&&(U=Bb(U)),J&&+U==0&&E!=="+"&&(J=!1),De=(J?E==="("?E:s:E==="-"||E==="("?"":E)+De,_e=(Z==="s"&&!isNaN(U)&&ha!==void 0?Ob[8+ha/3]:"")+_e+(J&&E==="("?")":""),Me){for(Ve=-1,We=U.length;++Ve<We;)if(ge=U.charCodeAt(Ve),48>ge||ge>57){_e=(ge===46?n+U.slice(Ve+1):U.slice(Ve))+_e,U=U.slice(0,Ve);break}}}B&&!j&&(U=o(U,1/0));var Ue=De.length+U.length+_e.length,Be=Ue<ee?new Array(ee-Ue+1).join(u):"";switch(B&&j&&(U=o(Be+U,Be.length?ee-_e.length:1/0),Be=""),k){case"<":U=De+U+_e+Be;break;case"=":U=De+Be+U+_e;break;case"^":U=Be.slice(0,Ue=Be.length>>1)+De+U+_e+Be.slice(Ue);break;default:U=Be+De+U+_e;break}return r(U)}return He.toString=function(){return h+""},He}function c(h,p){var u=Math.max(-8,Math.min(8,Math.floor(Ri(p)/3)))*3,k=Math.pow(10,-u),E=d((h=So(h),h.type="f",h),{suffix:Ob[8+u/3]});return function(N){return E(k*N)}}return{format:d,formatPrefix:c}}var Gl,Jo,Xl;wm({thousands:",",grouping:[3],currency:["$",""]});function wm(e){return Gl=zb(e),Jo=Gl.format,Xl=Gl.formatPrefix,Gl}function Sm(e){return Math.max(0,-Ri(Math.abs(e)))}function ym(e,o){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ri(o)/3)))*3-Ri(Math.abs(e)))}function Cm(e,o){return e=Math.abs(e),o=Math.abs(o)-e,Math.max(0,Ri(o)-Ri(e))+1}function $b(e,o){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(o).domain(e);break}return this}function Mm(e){return function(){return e}}function _m(e){return+e}var jb=[0,1];function wr(e){return e}function Em(e,o){return(o-=e=+e)?function(t){return(t-e)/o}:Mm(isNaN(o)?NaN:.5)}function z6(e,o){var t;return e>o&&(t=e,e=o,o=t),function(i){return Math.max(e,Math.min(o,i))}}function $6(e,o,t){var i=e[0],n=e[1],r=o[0],a=o[1];return n<i?(i=Em(n,i),r=t(a,r)):(i=Em(i,n),r=t(r,a)),function(s){return r(i(s))}}function j6(e,o,t){var i=Math.min(e.length,o.length)-1,n=new Array(i),r=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),o=o.slice().reverse());++a<i;)n[a]=Em(e[a],e[a+1]),r[a]=t(o[a],o[a+1]);return function(s){var l=jd(e,s,1,i)-1;return r[l](n[l](s))}}function Hb(e,o){return o.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function H6(){var e=jb,o=jb,t=Xo,i,n,r,a=wr,s,l,d;function c(){var p=Math.min(e.length,o.length);return a!==wr&&(a=z6(e[0],e[p-1])),s=p>2?j6:$6,l=d=null,h}function h(p){return p==null||isNaN(p=+p)?r:(l||(l=s(e.map(i),o,t)))(i(a(p)))}return h.invert=function(p){return a(n((d||(d=s(o,e.map(i),Ct)))(p)))},h.domain=function(p){return arguments.length?(e=Array.from(p,_m),c()):e.slice()},h.range=function(p){return arguments.length?(o=Array.from(p),c()):o.slice()},h.rangeRound=function(p){return o=Array.from(p),t=cm,c()},h.clamp=function(p){return arguments.length?(a=p?!0:wr,c()):a!==wr},h.interpolate=function(p){return arguments.length?(t=p,c()):t},h.unknown=function(p){return arguments.length?(r=p,h):r},function(p,u){return i=p,n=u,c()}}function km(){return H6()(wr,wr)}function qm(e,o,t,i){var n=Hd(e,o,t),r;switch(i=So(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(o));return i.precision==null&&!isNaN(r=ym(n,a))&&(i.precision=r),Xl(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(r=Cm(n,Math.max(Math.abs(e),Math.abs(o))))&&(i.precision=r-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(r=Sm(n))&&(i.precision=r-(i.type==="%")*2);break}}return Jo(i)}function U6(e){var o=e.domain;return e.ticks=function(t){var i=o();return xl(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var n=o();return qm(n[0],n[n.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=o(),n=0,r=i.length-1,a=i[n],s=i[r],l,d,c=10;for(s<a&&(d=a,a=s,s=d,d=n,n=r,r=d);c-- >0;){if(d=Gr(a,s,t),d===l)return i[n]=a,i[r]=s,o(i);if(d>0)a=Math.floor(a/d)*d,s=Math.ceil(s/d)*d;else if(d<0)a=Math.ceil(a*d)/d,s=Math.floor(s*d)/d;else break;l=d}return e},e}function Sr(){var e=km();return e.copy=function(){return Hb(e,Sr())},$b.apply(e,arguments),U6(e)}function en(e){return function(){return e}}function Ub(e){let o=3;return e.digits=function(t){if(!arguments.length)return o;if(t==null)o=null;else{let i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);o=i}return e},()=>new Yo(o)}var a$=Array.prototype.slice;function Gb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Xb(e){this._context=e}Xb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:this._context.lineTo(e,o);break}}};function Kb(e){return new Xb(e)}function Qb(e){return e[0]}function Yb(e){return e[1]}function Tm(e,o){var t=en(!0),i=null,n=Kb,r=null,a=Ub(s);e=typeof e=="function"?e:e===void 0?Qb:en(e),o=typeof o=="function"?o:o===void 0?Yb:en(o);function s(l){var d,c=(l=Gb(l)).length,h,p=!1,u;for(i==null&&(r=n(u=a())),d=0;d<=c;++d)!(d<c&&t(h=l[d],d,l))===p&&((p=!p)?r.lineStart():r.lineEnd()),p&&r.point(+e(h,d,l),+o(h,d,l));if(u)return r=null,u+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:en(+l),s):e},s.y=function(l){return arguments.length?(o=typeof l=="function"?l:en(+l),s):o},s.defined=function(l){return arguments.length?(t=typeof l=="function"?l:en(!!l),s):t},s.curve=function(l){return arguments.length?(n=l,i!=null&&(r=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=r=null:r=n(i=l),s):i},s}function Zb(e,o){this._context=e,this._t=o}Zb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,o),this._context.lineTo(e,o);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,o)}break}}this._x=e,this._y=o}};function Im(e){return new Zb(e,0)}function yo(e,o,t){this.k=e,this.x=o,this.y=t}yo.prototype={constructor:yo,scale:function(e){return e===1?this:new yo(this.k*e,this.x,this.y)},translate:function(e,o){return e===0&o===0?this:new yo(this.k,this.x+this.k*e,this.y+this.k*o)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Rm=new yo(1,0,0);Dm.prototype=yo.prototype;function Dm(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Rm;return e.__zoom}var Jb=(()=>{class e{constructor(){this.elementRef=q(Lt),this.diagramWidth=550,this.diagramHeight=250,this.showAxisLabels=!0,this.ranksAreStale=!0,this.pendingRender=null,this.popoverAncestor=null,this.popoverToggleListener=t=>{t.newState==="open"&&this.pendingRender!==null&&this.render(this.pendingRender==="full")}}ngOnChanges(t){if(this.values.length===0)return;let i=!!(t.values||t.isAttributeDirectionInverted||t.colorMetric||t.diagramWidth||t.diagramHeight||t.showAxisLabels);if(i&&(this.ranksAreStale=!0),this.isHiddenInClosedPopover()){this.pendingRender=this.pendingRender==="full"||i?"full":"areas";return}this.render(i)}ngAfterViewInit(){this.popoverAncestor=this.elementRef.nativeElement.closest("[popover]"),this.popoverAncestor?.addEventListener("toggle",this.popoverToggleListener)}ngOnDestroy(){this.popoverAncestor?.removeEventListener("toggle",this.popoverToggleListener)}render(t){this.ranksAreStale&&(this.percentileRanks=this.isAttributeDirectionInverted?this.calculateReversedPercentileRanks(this.values):this.calculatePercentileRanks(this.values),this.updatePercentileToMetricValueMap(),this.ranksAreStale=!1),(t||!this.hasRenderedDiagram()||!this.updateAreas())&&this.renderDiagram(),this.pendingRender=null}isHiddenInClosedPopover(){let t=this.popoverAncestor??this.elementRef.nativeElement.closest("[popover]");if(!t)return!1;try{return!t.matches(":popover-open")}catch{return!1}}hasRenderedDiagram(){return!this.rangeDiagramContainer().select("svg").empty()}updateAreas(){let t=this.rangeDiagramContainer().select("g");if(t.empty()||t.select(".left-area").empty())return!1;let i=this.createXScale(),n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));return t.select(".left-area").attr("width",n).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor),t.select(".middle-area").attr("x",n+this.framePadding).attr("width",r-n).style("fill",this.middleColor),t.select(".right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor),!0}updatePercentileToMetricValueMap(){this.percentileToMetricValueMap=new Map;let t=0;for(let i=0;i<=100;i++){for(;i>this.percentileRanks[t].x&&t<this.percentileRanks.length-1;)t++;this.percentileToMetricValueMap.set(i,this.percentileRanks[t].y)}}renderDiagram(){this.initializeDiagramDimesions(),this.clearDiagramContainer();let t=this.createSvg(),i=this.createGroup(t),n=this.createXScale(),r=this.createYScale();this.drawAxes(i,n,r),this.drawFrame(i),this.showAxisLabels&&this.drawLabels(i),this.drawAreas(i,n),this.drawLine(i),this.addCrossHair(i,n,r)}initializeDiagramDimesions(){this.svgWidth=this.diagramWidth,this.svgHeight=this.diagramHeight,this.frameMarginTop=10,this.frameMarginBottom=this.showAxisLabels?50:30,this.frameMarginLeft=this.showAxisLabels?50:40,this.frameMarginRight=10,this.framePadding=5,this.frameHeight=this.svgHeight-this.frameMarginTop-this.frameMarginBottom,this.frameWidth=this.svgWidth-this.frameMarginLeft-this.frameMarginRight,this.yLabelXOffset=80,this.xLabelYOffset=20}rangeDiagramContainer(){return im(this.elementRef.nativeElement.querySelector("#cc-range-diagram-container"))}clearDiagramContainer(){this.rangeDiagramContainer().selectAll("*").remove()}createSvg(){return this.rangeDiagramContainer().append("svg").attr("width",this.svgWidth).attr("height",this.svgHeight)}createGroup(t){return t.append("g").attr("transform",`translate(${this.frameMarginLeft}, ${this.frameMarginTop})`).attr("display","flex").attr("justify-content","center")}drawFrame(t){t.append("path").attr("d",`M 0 0
3457
+ Low Values: ${t.hintLowValue}`:"",r.length>0?`${n}:${r}`:n}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=Xi({name:"attributeDescriptorTooltip",type:e,pure:!0})}}return e})();var Oo=e=>e===void 0||Number.isNaN(e)?"-":e.toLocaleString("en-US");function g5(e,o){if(e&1&&(w(0,"a",4),ue(1,"i",7),y()),e&2){let t=D();le("href",o,mn),rt("data-testid","mapping-block-link-"+t.block().kind)}}function b5(e,o){if(e&1&&(f(0),w(1,"span",8),f(2,"(in/out)"),y()),e&2){let t=D();he(" ",t.edgeCountText()," ")}}function v5(e,o){if(e&1&&f(0),e&2){let t=D();he(" ",t.formattedValue()," ")}}function x5(e,o){e&1&&(w(0,"span",6),f(1,"\xB7 inverted"),y())}var l1=(()=>{class e{constructor(){this.block=$.required(),this.iconClasses=X(()=>`${e.ICONS[this.block().kind]} text-xs text-primary`),this.formattedValue=X(()=>Oo(this.block().value)),this.edgeCountText=X(()=>`${Oo(this.block().incoming)}/${Oo(this.block().outgoing)}`)}static{this.ICONS={area:"fa fa-arrows-alt",height:"fa fa-arrows-v",color:"fa fa-paint-brush",edge:"fa fa-exchange"}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-mapping-block"]],hostAttrs:[1,"block","py-2"],inputs:{block:[1,"block"]},decls:12,vars:13,consts:[[1,"flex","items-center","gap-2"],[1,"text-xs","uppercase","tracking-widest","opacity-60"],["aria-hidden","true"],[1,"break-all","leading-snug",3,"title"],["target","_blank","rel","noopener noreferrer",1,"text-sm","opacity-70",3,"href"],[1,"text-base","font-semibold","tabular-nums","leading-snug"],["data-testid","mapping-block-inverted",1,"text-sm","font-normal","opacity-60"],[1,"fa","fa-external-link"],[1,"text-sm","font-normal","opacity-70"]],template:function(i,n){if(i&1&&(w(0,"div",0)(1,"span",1),f(2),y(),ue(3,"i",2),y(),w(4,"p",3),at(5,"attributeDescriptorTooltip"),f(6),O(7,g5,2,2,"a",4),y(),w(8,"p",5),O(9,b5,3,1)(10,v5,1,1),O(11,x5,2,0,"span",6),y()),i&2){let r;m(2),qe(n.block().kind),m(),yt(n.iconClasses()),m(),le("title",gi(5,10,n.block().descriptor,n.block().metricName)),rt("data-testid","mapping-block-name-"+n.block().kind),m(2),he(" ",n.block().metricName," "),m(),z((r=(r=n.block().descriptor)==null?null:r.link)?7:-1,r),m(),rt("data-testid","mapping-block-value-"+n.block().kind),m(),z(n.block().kind==="edge"?9:10),m(2),z(n.block().inverted?11:-1)}},dependencies:[bo],encapsulation:2,changeDetection:0})}}return e})();var w5=(e,o)=>o.kind;function S5(e,o){if(e&1&&F(0,"cc-inspector-mapping-block",2),e&2){let t=o.$implicit;L("block",t)}}var c1=(()=>{class e{constructor(){this.readStore=q(go),this.mappingBlocks=R(this.readStore.mappingBlocks$,{requireSync:!0})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-metric-mapping"]],hostAttrs:[1,"block","shrink-0","border-t","border-base-300","px-3","py-2"],decls:5,vars:0,consts:[[1,"text-xs","uppercase","tracking-widest","opacity-60"],[1,"mt-1","divide-y","divide-base-200"],[3,"block"]],template:function(i,n){i&1&&(v(0,"span",0),f(1,"Metric Mapping"),b(),v(2,"div",1),Ae(3,S5,1,1,"cc-inspector-mapping-block",2,w5),b()),i&2&&(m(3),Le(n.mappingBlocks()))},dependencies:[l1],encapsulation:2,changeDetection:0})}}return e})();var nl=(()=>{class e{constructor(){this.comparisonMode=be("map")}setComparisonMode(t){this.comparisonMode.set(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var d1=(()=>{class e{constructor(){this.comparisonModeService=q(nl),this.comparisonMode=this.comparisonModeService.comparisonMode}setComparisonMode(t){this.comparisonModeService.setComparisonMode(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-comparison-toggle"]],hostAttrs:[1,"contents"],decls:5,vars:4,consts:[["data-testid","inspector-comparison-toggle",1,"join"],["type","button","title","Compare each value against the whole map","data-testid","inspector-comparison-map",1,"btn","btn-xs","join-item",3,"click"],["type","button","title","Compare each value against the min/max range of all files","data-testid","inspector-comparison-range",1,"btn","btn-xs","join-item",3,"click"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.setComparisonMode("map")}),f(2," map "),y(),w(3,"button",2),K("click",function(){return n.setComparisonMode("range")}),f(4," range "),y()()),i&2&&(m(),Ne("btn-active",n.comparisonMode()==="map"),m(2),Ne("btn-active",n.comparisonMode()==="range"))},encapsulation:2,changeDetection:0})}}return e})();function y5(e,o){e&1&&(w(0,"a",2),ue(1,"i",7),y()),e&2&&le("href",o,mn)}function C5(e,o){if(e&1&&(w(0,"span",8),f(1),y()),e&2){let t=D();Oe("color",t.deltaColor()),m(),qe(t.formattedDelta())}}var rl=(()=>{class e{constructor(){this.row=$.required(),this.comparisonMode=$.required(),this.positiveDeltaColor=$.required(),this.negativeDeltaColor=$.required(),this.bar=X(()=>this.comparisonMode()==="map"?this.row().mapBar:this.row().rangeBar),this.formattedValue=X(()=>Oo(this.row().value)),this.hasDelta=X(()=>!!this.row().delta),this.formattedDelta=X(()=>`\u0394${Oo(this.row().delta)}`),this.deltaColor=X(()=>(this.row().delta??0)>0?this.positiveDeltaColor():this.negativeDeltaColor()),this.barClasses=X(()=>`h-full rounded ${e.SEVERITY_CLASSES[this.bar().severity]}`),this.barWidthPercentage=X(()=>this.bar().fraction*100)}static{this.SEVERITY_CLASSES={success:"bg-success",warning:"bg-warning",error:"bg-error",neutral:"bg-base-content/30"}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-metric-row"]],hostAttrs:[1,"block"],inputs:{row:[1,"row"],comparisonMode:[1,"comparisonMode"],positiveDeltaColor:[1,"positiveDeltaColor"],negativeDeltaColor:[1,"negativeDeltaColor"]},decls:10,vars:12,consts:[[1,"flex","items-baseline","justify-between","gap-2"],[1,"min-w-0","truncate","text-sm",3,"title"],["target","_blank","rel","noopener noreferrer","data-testid","metric-row-link",1,"opacity-70",3,"href"],[1,"shrink-0","text-sm","tabular-nums"],["data-testid","metric-row-delta",1,"mr-1",3,"color"],[1,"mt-0.5","h-1","overflow-hidden","rounded","bg-base-300"],["data-testid","metric-row-bar"],[1,"fa","fa-external-link"],["data-testid","metric-row-delta",1,"mr-1"]],template:function(i,n){if(i&1&&(w(0,"div",0)(1,"span",1),at(2,"attributeDescriptorTooltip"),f(3),O(4,y5,2,1,"a",2),y(),w(5,"span",3),O(6,C5,2,3,"span",4),f(7),y()(),w(8,"div",5),ue(9,"div",6),y()),i&2){let r;m(),le("title",gi(2,9,n.row().descriptor,n.row().name)),m(2),he(" ",n.row().name," "),m(),z((r=(r=n.row().descriptor)==null?null:r.link)?4:-1,r),m(2),z(n.hasDelta()?6:-1),m(),he(" ",n.formattedValue()," "),m(2),yt(n.barClasses()),Oe("width",n.barWidthPercentage(),"%")}},dependencies:[bo],encapsulation:2,changeDetection:0})}}return e})();var M5=(e,o)=>o.name;function _5(e,o){if(e&1&&F(0,"cc-inspector-metric-row",3),e&2){let t=o.$implicit,i=D(3);L("row",t)("comparisonMode",i.comparisonMode())("positiveDeltaColor",i.positiveDeltaColor())("negativeDeltaColor",i.negativeDeltaColor())}}function E5(e,o){if(e&1&&(v(0,"div",2),Ae(1,_5,1,4,"cc-inspector-metric-row",3,M5),b()),e&2){let t=D(2);m(),Le(t.rows())}}function k5(e,o){if(e&1){let t=xe();v(0,"button",0),W("click",function(){ae(t);let n=D();return se(n.toggleEmptyMetrics())}),F(1,"i",1),f(2),b(),O(3,E5,3,0,"div",2)}if(e&2){let t=D();m(),Ne("fa-chevron-right",!t.showEmptyMetrics())("fa-chevron-down",t.showEmptyMetrics()),m(),he(" Empty metrics (",t.rows().length,") "),m(),z(t.showEmptyMetrics()?3:-1)}}var m1=(()=>{class e{constructor(){this.rows=$.required(),this.comparisonMode=$.required(),this.positiveDeltaColor=$.required(),this.negativeDeltaColor=$.required(),this.showEmptyMetrics=be(!1)}toggleEmptyMetrics(){this.showEmptyMetrics.update(t=>!t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-empty-metrics"]],hostAttrs:[1,"block"],inputs:{rows:[1,"rows"],comparisonMode:[1,"comparisonMode"],positiveDeltaColor:[1,"positiveDeltaColor"],negativeDeltaColor:[1,"negativeDeltaColor"]},decls:1,vars:1,consts:[["type","button","data-testid","inspector-empty-metrics-toggle",1,"mt-3","flex","items-center","gap-1.5","text-xs","uppercase","tracking-widest","opacity-60",3,"click"],[1,"fa","text-[10px]"],["data-testid","inspector-empty-metrics",1,"mt-2","flex","flex-col","gap-2","opacity-60"],[3,"row","comparisonMode","positiveDeltaColor","negativeDeltaColor"]],template:function(i,n){i&1&&O(0,k5,4,6),i&2&&z(n.rows().length>0?0:-1)},dependencies:[rl],encapsulation:2,changeDetection:0})}}return e})();var q5=(e,o)=>o.name;function T5(e,o){e&1&&F(0,"cc-inspector-comparison-toggle")}function I5(e,o){e&1&&(v(0,"p",2),f(1,"No metrics available"),b())}function R5(e,o){if(e&1&&F(0,"cc-inspector-metric-row",4),e&2){let t=o.$implicit,i=D(2);L("row",t)("comparisonMode",i.comparisonMode())("positiveDeltaColor",i.mapColors().positiveDelta)("negativeDeltaColor",i.mapColors().negativeDelta)}}function D5(e,o){if(e&1&&(v(0,"div",3),Ae(1,R5,1,4,"cc-inspector-metric-row",4,q5),b(),F(3,"cc-inspector-empty-metrics",5)),e&2){let t=D();m(),Le(t.metricRowsWithValues()),m(2),L("rows",t.emptyMetricRows())("comparisonMode",t.comparisonMode())("positiveDeltaColor",t.mapColors().positiveDelta)("negativeDeltaColor",t.mapColors().negativeDelta)}}var h1=(()=>{class e{constructor(){this.readStore=q(go),this.mapStateReadWindow=q(ve),this.comparisonModeService=q(nl),this.metricRows=R(this.readStore.metricRows$,{requireSync:!0}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{requireSync:!0}),this.comparisonMode=this.comparisonModeService.comparisonMode,this.metricRowsWithValues=X(()=>this.metricRows().filter(t=>!Fd(t))),this.emptyMetricRows=X(()=>this.metricRows().filter(t=>Fd(t)))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-inspector-metrics-list"]],hostAttrs:[1,"block","border-t","border-base-300","px-3","py-2"],decls:6,vars:2,consts:[[1,"flex","items-center","justify-between"],[1,"text-xs","uppercase","tracking-widest","opacity-60"],["data-testid","inspector-metrics-empty",1,"mt-2","text-sm","opacity-60"],[1,"mt-2","flex","flex-col","gap-2"],[3,"row","comparisonMode","positiveDeltaColor","negativeDeltaColor"],[3,"rows","comparisonMode","positiveDeltaColor","negativeDeltaColor"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Metrics"),b(),O(3,T5,1,0,"cc-inspector-comparison-toggle"),b(),O(4,I5,2,0,"p",2)(5,D5,4,4)),i&2&&(m(3),z(n.metricRows().length>0?3:-1),m(),z(n.metricRows().length===0?4:5))},dependencies:[d1,m1,rl],encapsulation:2,changeDetection:0})}}return e})();var Pd=(()=>{class e{constructor(){this.visibilityService=q(si),this.isVisible=this.visibilityService.isVisible}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-sidebar-inspector"]],hostAttrs:[1,"fixed","right-0","z-[60]","w-[var(--cc-inspector-width)]","bg-base-100","overflow-hidden","flex","flex-col","shadow-[-2px_0_8px_-2px_rgba(0,0,0,0.15)]","transition-transform","duration-300"],hostVars:9,hostBindings:function(i,n){i&2&&(rt("aria-hidden",!n.isVisible()),Oe("top","var(--cc-bars-height, 49px)")("height","calc(100vh - var(--cc-bars-height, 49px) - var(--cc-file-extension-bar-height, 17px) - var(--cc-bottom-bar-height, 32px))"),Ne("translate-x-full",!n.isVisible())("pointer-events-none",!n.isVisible()))},decls:4,vars:0,consts:[[1,"min-h-0","flex-1","overflow-y-auto"]],template:function(i,n){i&1&&(F(0,"cc-inspector-header")(1,"cc-inspector-metric-mapping"),v(2,"div",0),F(3,"cc-inspector-metrics-list"),b())},dependencies:[s1,c1,h1],encapsulation:2,changeDetection:0})}}return e})();function A5(e,o){e&1&&(v(0,"div",1)(1,"div",2)(2,"span"),f(3," The graphics card stopped rendering the map, usually because it ran out of memory. Reload the page, and try a smaller map or a smaller browser window. "),b()()())}var Nd=(()=>{class e{constructor(t,i,n,r,a){this.inspectorVisibilityService=t,this.fileStoreReadWindow=i,this.threeViewerService=n,this.codeMapMouseEventService=r,this.elementReference=a,this.isLoadingFile$=this.fileStoreReadWindow.isLoadingFile$,this.isContextLost$=this.threeViewerService.isContextLost$}ngAfterViewInit(){this.threeViewerService.init(this.elementReference.nativeElement.querySelector("#codeMap")),this.codeMapMouseEventService.start()}ngOnDestroy(){this.threeViewerService.stopAnimate(),this.threeViewerService.destroy()}static{this.\u0275fac=function(i){return new(i||e)(te(si),te(Te),te(Yn),te(Wo),te(Lt))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-code-map"]],decls:5,vars:9,consts:[["id","codeMap",1,"fixed","left-0","top-[var(--cc-bars-height,49px)]","z-0","h-full","w-full"],[1,"pointer-events-none","fixed","inset-0","z-[1000]","flex","items-center","justify-center","p-4"],["role","alert",1,"alert","alert-error","pointer-events-auto","max-w-md"]],template:function(i,n){i&1&&(v(0,"div",0),at(1,"async"),F(2,"cc-view-cube"),b(),O(3,A5,4,0,"div",1),at(4,"async")),i&2&&(Ne("hidden",fi(1,5,n.isLoadingFile$)),m(2),Ne("sideBarVisible",n.inspectorVisibilityService.isVisible()),m(),z(fi(4,7,n.isContextLost$)?3:-1))},dependencies:[Td,Va],encapsulation:2,changeDetection:0})}}return e})();var al=Ie(Et,vi,(e,o)=>_s.getMetricDistribution(e.unifiedMapNode,o));var sl=Ie(jn,Xt,vi,al,(e,o,t,i)=>{let n=e||o;return!n||n.type===Ft.FILE?i:_s.getMetricDistribution(n,t)});var ll=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(sl),this.metricDistribution$=this.store.select(al)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var u1=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.areaMetric$=this.mapStateReadWindow.areaMetric$,this.distributionMetric=Kp}static{this.\u0275fac=function(i){return new(i||e)(te(ve))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-distribution-metric"]],hostAttrs:[1,"mx-[5px]","flex","min-w-max","items-center","gap-1.5","text-xs"],decls:3,vars:3,consts:[[1,"fa","fa-pie-chart"]],template:function(i,n){i&1&&(ue(0,"i",0),f(1),at(2,"async")),i&2&&(m(),he(" ",fi(2,1,n.areaMetric$),`
3458
+ `))},dependencies:[Va],encapsulation:2,changeDetection:0})}}return e})();var f1=(()=>{class e{constructor(t){this.store=t,this.hoveredNodeMetricDistribution$=this.store.select(sl),this.hoveredNode$=this.store.select(jn),this.selectedNode$=this.store.select(Xt),this.flattenedItems$=this.store.select(au("flatten"))}dispatchAfterPaint(t){Ni(this.store,t)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function N5(e){return`*.${e}`}function B5(e,o){return e===Cs?o.others.filter(t=>t.fileExtension!==Ms).map(t=>t.fileExtension):[e]}function cl(e,o,t){return B5(e,o).map(n=>{let r=N5(n);return t?.type===Ft.FOLDER?`${t.path}/**/${r}`:r})}var g1=(()=>{class e{constructor(t){this.blackListExtensionStore=t,this.operationContext$=St([this.blackListExtensionStore.hoveredNodeMetricDistribution$,this.blackListExtensionStore.hoveredNode$,this.blackListExtensionStore.selectedNode$,this.blackListExtensionStore.flattenedItems$]).pipe(ke(([i,n,r,a])=>({distribution:i,node:n||r,flattenedItems:a})))}show(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=cl(t,i.distribution,i.node),r=this.createFlattenedItemsMap(i.flattenedItems),a=n.map(s=>r.get(s));this.blackListExtensionStore.dispatchAfterPaint(es({items:a}))})}exclude(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=cl(t,i.distribution,i.node);this.blackListExtensionStore.dispatchAfterPaint(Id("exclude",...n))})}flatten(t){this.operationContext$.pipe(ut(1)).subscribe(i=>{let n=cl(t,i.distribution,i.node);this.blackListExtensionStore.dispatchAfterPaint(Id("flatten",...n))})}getIsFlattenedByFileExtension(t){return this.operationContext$.pipe(ke(i=>cl(t,i.distribution,i.node).every(r=>i.flattenedItems.some(a=>a.path===r))))}createFlattenedItemsMap(t){let i=new Map;for(let n of t)i.set(n.path,n);return i}static{this.\u0275fac=function(i){return new(i||e)(M(f1))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var b1=(()=>{class e{constructor(t,i){this.threeSceneService=t,this.metricDistributionStore=i,this.metricDistribution$=this.metricDistributionStore.metricDistribution$,this.fileExtensionsOfOthers=new Set,this.fileExtensionsOfNone=new Set,this.metricDistribution$.pipe(Vh(),Re(n=>!!n)).subscribe(n=>{this.fileExtensionsOfOthers.clear();for(let r of n.others)this.fileExtensionsOfOthers.add(r.fileExtension);this.fileExtensionsOfNone.clear();for(let r of n.none)this.fileExtensionsOfNone.add(r.fileExtension)})}highlightExtension(t){switch(t){case Cs:this.threeSceneService.highlightBuildingsByExtension(this.fileExtensionsOfOthers);break;case Ms:this.threeSceneService.highlightBuildingsWithoutExtensions();break;default:this.threeSceneService.highlightBuildingsByExtension(new Set([t]));break}}clearHighlightingOnFileExtensions(){this.threeSceneService.applyClearHighlights()}static{this.\u0275fac=function(i){return new(i||e)(M(ft),M(ll))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var O5=["menu"];function z5(e,o){if(e&1){let t=xe();w(0,"button",10),K("click",function(){ae(t);let n=D(2);return se(n.show(n.fileExtension()))}),ue(1,"i",11),w(2,"span",9),f(3,"Show"),y()()}}function $5(e,o){if(e&1){let t=xe();w(0,"button",12),K("click",function(){ae(t);let n=D(2);return se(n.flatten(n.fileExtension()))}),ue(1,"i",13),w(2,"span",9),f(3,"Flatten"),y()()}}function j5(e,o){if(e&1){let t=xe();w(0,"div",4,0),K("contextmenu",function(n){return n.preventDefault()}),O(2,z5,4,0,"button",5)(3,$5,4,0,"button",6),w(4,"button",7),K("click",function(){ae(t);let n=D();return se(n.exclude(n.fileExtension()))}),ue(5,"i",8),w(6,"span",9),f(7,"Exclude"),y()()()}if(e&2){let t=o,i=D();Oe("left",t.left,"px")("bottom",t.bottom,"px"),m(2),z(i.isFlattened()?2:3)}}var H5=192,Bd=4,v1=(()=>{class e{constructor(t,i){this.blackListExtensionService=t,this.highlightBuildingsByFileExtensionService=i,this.item=$.required(),this.showAbsoluteValues=$.required(),this.toggleShowAbsoluteValues=Ce(),this.isFlattened=be(!1),this.menuPosition=be(null),this.menuRef=je("menu"),this.fileExtension=X(()=>this.item().fileExtension),this.hasFileExtension=X(()=>this.fileExtension()!=="None"),this.formattedTitle=X(()=>this.formatTitle(this.showAbsoluteValues(),this.item(),this.fileExtension()))}ngOnInit(){this.flattenSubscription=this.blackListExtensionService.getIsFlattenedByFileExtension(this.fileExtension()).subscribe(t=>this.isFlattened.set(t))}ngOnDestroy(){this.flattenSubscription?.unsubscribe()}openContextMenu(t){if(t.preventDefault(),!this.hasFileExtension())return;let i=Math.max(Bd,Math.min(t.clientX,window.innerWidth-H5-Bd)),n=Math.max(Bd,window.innerHeight-t.clientY);this.menuPosition.set({left:i,bottom:n})}closeContextMenu(){this.menuPosition.set(null)}onDocumentPointerDown(t){if(!this.menuPosition())return;let i=this.menuRef()?.nativeElement;i&&t.target instanceof Node&&i.contains(t.target)||this.closeContextMenu()}closeContextMenuOnViewportChange(){this.menuPosition()&&this.closeContextMenu()}flatten(t){this.blackListExtensionService.flatten(t),this.closeContextMenu()}exclude(t){this.blackListExtensionService.exclude(t),this.closeContextMenu()}show(t){this.blackListExtensionService.show(t),this.closeContextMenu()}onHoverFileExtensionBar(t){this.highlightBuildingsByFileExtensionService.highlightExtension(t)}onUnhoverFileExtensionBar(){this.highlightBuildingsByFileExtensionService.clearHighlightingOnFileExtensions()}formatTitle(t,i,n){return t&&i.absoluteMetricValue||!t&&i.relativeMetricValue?t?`${n} ${i.absoluteMetricValue.toLocaleString()}`:`${n} ${i.relativeMetricValue.toFixed(2)}%`:"No data available"}get backgroundColor(){return this.item().color}get flexGrow(){return this.item().relativeMetricValue}get flexBasis(){return"0"}static{this.\u0275fac=function(i){return new(i||e)(te(g1),te(b1))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-file-extension-bar-segment"]],viewQuery:function(i,n){i&1&&it(n.menuRef,O5,5),i&2&&ot()},hostAttrs:[1,"min-w-max","cursor-pointer","overflow-hidden","text-center","text-white"],hostVars:6,hostBindings:function(i,n){i&1&&W("pointerdown",function(a){return n.onDocumentPointerDown(a)},Ro)("wheel",function(){return n.closeContextMenuOnViewportChange()},Ro)("resize",function(){return n.closeContextMenuOnViewportChange()},Gh),i&2&&Oe("background-color",n.backgroundColor)("flex-grow",n.flexGrow)("flex-basis",n.flexBasis)},inputs:{item:[1,"item"],showAbsoluteValues:[1,"showAbsoluteValues"]},outputs:{toggleShowAbsoluteValues:"toggleShowAbsoluteValues"},decls:4,vars:3,consts:[["menu",""],[1,"cc-bar-section",3,"click","contextmenu"],["data-test-id","formattedTitle",1,"cc-bar-section-text","my-0.5","whitespace-nowrap","px-2.5","text-[10px]",3,"mouseover","mouseleave","title"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"left","bottom"],[1,"fixed","z-[100]","w-48","rounded-box","border","border-base-300","bg-base-100","py-1","text-base-content","shadow-lg",3,"contextmenu"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200"],["type","button","data-test-id","excludeBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-ban"],[1,"truncate"],["type","button","data-test-id","showBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-eye"],["type","button","data-test-id","flattenBuilding",1,"flex","w-full","items-center","gap-3","px-4","py-2.5","text-left","text-sm","font-medium","hover:bg-base-200",3,"click"],[1,"w-4","text-center","fa-solid","fa-arrows-down-to-line"]],template:function(i,n){if(i&1&&(w(0,"span",1),K("click",function(){return n.toggleShowAbsoluteValues.emit()})("contextmenu",function(a){return n.openContextMenu(a)}),w(1,"div",2),K("mouseover",function(){return n.onHoverFileExtensionBar(n.fileExtension())})("mouseleave",function(){return n.onUnhoverFileExtensionBar()}),f(2),y()(),O(3,j5,8,5,"div",3)),i&2){let r;m(),le("title",n.formattedTitle()),m(),he(" ",n.formattedTitle()," "),m(),z((r=n.menuPosition())?3:-1,r)}},encapsulation:2,changeDetection:0})}}return e})();var G5=(e,o)=>o.fileExtension;function X5(e,o){if(e&1){let t=xe();v(0,"cc-file-extension-bar-segment",4),W("toggleShowAbsoluteValues",function(){ae(t);let n=D();return se(n.toggleShowAbsoluteValues())}),b()}if(e&2){let t=o.$implicit,i=D();L("item",t)("showAbsoluteValues",i.showAbsoluteValues())}}var Vd=(()=>{class e{constructor(){this.metricDistributionStore=q(ll),this.showAbsoluteValues=be(!1),this.metricDistribution=R(this.metricDistributionStore.hoveredNodeMetricDistribution$,{requireSync:!0})}toggleShowAbsoluteValues(){this.showAbsoluteValues.update(t=>!t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-file-extension-bar"]],hostAttrs:[1,"fixed","left-0","right-0","z-[70]","block","bg-base-100"],hostVars:2,hostBindings:function(i,n){i&2&&Oe("bottom","var(--cc-bottom-bar-height, 32px)")},features:[Yi([{provide:Is,useValue:"--cc-file-extension-bar-height"}]),Ki([Rs])],decls:5,vars:0,consts:[[1,"flex","h-[17px]","w-full"],["title","Distribution metric"],[1,"flex","w-full","gap-px"],[3,"item","showAbsoluteValues"],[3,"toggleShowAbsoluteValues","item","showAbsoluteValues"]],template:function(i,n){i&1&&(v(0,"div",0),F(1,"cc-distribution-metric",1),v(2,"div",2),Ae(3,X5,1,2,"cc-file-extension-bar-segment",3,G5),b()()),i&2&&(m(3),Le(n.metricDistribution().visible))},dependencies:[u1,v1],encapsulation:2,changeDetection:0})}}return e})();var dl="var(--cc-bottom-bar-height, 32px) + var(--cc-file-extension-bar-height, 17px)";var ml=(()=>{class e{static{this.NO_MATCHING="\u2013 (no matching buildings)"}transform(t,i,n,r){switch(t){case"positive":{let a=r==="unary",s=n.minValue===i.from,l=n.maxValue===i.from;return a?`${n.minValue} - ${n.maxValue}`:s?e.NO_MATCHING:l?`${n.minValue} to ${this.formatNumber(i.from)}`:`${n.minValue} to ${this.formatNumber(i.from-1)}`}case"neutral":{let a=i.from===i.to,s=i.to===n.maxValue;return a?e.NO_MATCHING:s?`${this.formatNumber(i.from)} to ${this.formatNumber(i.to)}`:`${this.formatNumber(i.from)} to ${this.formatNumber(i.to-1)}`}case"negative":return n.maxValue===i.to?e.NO_MATCHING:`${this.formatNumber(i.to)} to ${this.formatNumber(n.maxValue)}`;case"positiveDelta":return"+\u0394 positive delta";case"negativeDelta":return"\u2013\u0394 negative delta";case"selected":return"selected";case"outgoingEdge":return"Outgoing Edge";case"incomingEdge":return"Incoming Edge"}}formatNumber(t){return(t||0).toLocaleString()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=Xi({name:"mapColorLabel",type:e,pure:!0})}}return e})();var x1=(()=>{class e{constructor(t){this.store=t,this.selectedColorMetricData$=this.store.select(lo)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var vo=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.legendMetricRangeStore=i,this.mapColorFor=$.required(),this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=R(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=R(this.legendMetricRangeStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.color=X(()=>this.mapColors()[this.mapColorFor()])}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(x1))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-color-row"]],inputs:{mapColorFor:[1,"mapColorFor"]},decls:7,vars:8,consts:[[1,"flex","items-center","gap-2"],[1,"h-4","w-4","shrink-0","rounded-sm","border","border-base-300"],["width","100%","height","100%"],[1,"min-w-0","flex-1","truncate","text-sm"]],template:function(i,n){if(i&1&&(Zh(0),at(1,"mapColorLabel"),w(2,"div",0),Io(),w(3,"svg",1),ue(4,"rect",2),y(),Rr(),w(5,"span",3),f(6),y()()),i&2){let r=Ba(1,3,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric());m(3),rt("aria-label","Color for "+r),m(),rt("fill",n.color()),m(2),qe(r)}},dependencies:[ml],encapsulation:2,changeDetection:0})}}return e})();var w1=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-color-scale-section"]],hostAttrs:[1,"contents"],decls:6,vars:0,consts:[[1,"border-base-300","flex","flex-col","gap-1","border-t","pt-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","positive"],["mapColorFor","neutral"],["mapColorFor","negative"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Color scale"),b(),F(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3)(5,"cc-legend-color-row",4),b())},dependencies:[vo],encapsulation:2,changeDetection:0})}}return e})();var S1=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-delta-colors-section"]],hostAttrs:[1,"contents"],decls:5,vars:0,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","positiveDelta"],["mapColorFor","negativeDelta"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Delta colors"),b(),F(3,"cc-legend-color-row",2)(4,"cc-legend-color-row",3),b())},dependencies:[vo],encapsulation:2,changeDetection:0})}}return e})();function Q5(e,o){e&1&&(v(0,"div",0),F(1,"cc-legend-color-row",1)(2,"cc-legend-color-row",2),b())}var y1=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.edgeMetric=R(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(i){return new(i||e)(te(ve))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-edge-colors-section"]],hostAttrs:[1,"contents"],decls:1,vars:1,consts:[[1,"border-base-300","flex","flex-col","gap-1","border-t","pt-2"],["mapColorFor","outgoingEdge"],["mapColorFor","incomingEdge"]],template:function(i,n){i&1&&O(0,Q5,3,0,"div",0),i&2&&z(n.edgeMetric()?0:-1)},dependencies:[vo],encapsulation:2,changeDetection:0})}}return e})();var C1=(()=>{class e{constructor(t){this.metricsLensFacade=t,this.label=$.required(),this.metricName=$.required(),this.attributeDescriptors=R(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.descriptor=X(()=>this.attributeDescriptors()[this.metricName()]),this.title=X(()=>this.descriptor()?.title||dr.get(this.metricName())||this.metricName())}static{this.\u0275fac=function(i){return new(i||e)(te(zn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-metric-row"]],inputs:{label:[1,"label"],metricName:[1,"metricName"]},decls:6,vars:6,consts:[[1,"flex","items-baseline","gap-3",3,"title"],[1,"w-16","shrink-0","text-xs","uppercase","tracking-wider","opacity-60"],[1,"min-w-0","truncate","text-sm","font-semibold"]],template:function(i,n){i&1&&(w(0,"div",0),at(1,"attributeDescriptorTooltip"),w(2,"span",1),f(3),y(),w(4,"span",2),f(5),y()()),i&2&&(le("title",gi(1,3,n.descriptor(),n.metricName())),m(3),qe(n.label()),m(2),qe(n.title()))},dependencies:[bo],encapsulation:2,changeDetection:0})}}return e})();function Z5(e,o){e&1&&F(0,"cc-legend-metric-row",4),e&2&&L("metricName",o)}var M1=(()=>{class e{constructor(t){this.mapStateReadWindow=t,this.areaMetric=R(this.mapStateReadWindow.areaMetric$,{initialValue:""}),this.heightMetric=R(this.mapStateReadWindow.heightMetric$,{initialValue:""}),this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.edgeMetric=R(this.mapStateReadWindow.edgeMetric$,{initialValue:null})}static{this.\u0275fac=function(i){return new(i||e)(te(ve))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-metrics-section"]],hostAttrs:[1,"contents"],decls:5,vars:4,consts:[[1,"flex","flex-col","gap-2"],["label","Area",3,"metricName"],["label","Height",3,"metricName"],["label","Color",3,"metricName"],["label","Edge",3,"metricName"]],template:function(i,n){if(i&1&&(v(0,"div",0),F(1,"cc-legend-metric-row",1)(2,"cc-legend-metric-row",2)(3,"cc-legend-metric-row",3),O(4,Z5,1,1,"cc-legend-metric-row",4),b()),i&2){let r;m(),L("metricName",n.areaMetric()??""),m(),L("metricName",n.heightMetric()??""),m(),L("metricName",n.colorMetric()??""),m(),z((r=n.edgeMetric())?4:-1,r)}},dependencies:[C1],encapsulation:2,changeDetection:0})}}return e})();var _1=(()=>{class e{constructor(t){this.inspectorVisibilityService=t,this.isOpen=$.required(),this.togglePanel=Ce(),this.buttonBottom=`calc(${dl} + 32px)`,this.buttonRight=X(()=>this.inspectorVisibilityService.isVisible()?"calc(var(--cc-inspector-width) - 28px)":"-28px")}static{this.\u0275fac=function(i){return new(i||e)(te(si))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-toggle-button"]],hostAttrs:[1,"contents"],inputs:{isOpen:[1,"isOpen"]},outputs:{togglePanel:"togglePanel"},decls:2,vars:6,consts:[["id","legend-panel-button","data-testid","legend-panel-button","aria-controls","legend-panel",1,"btn","btn-primary","btn-sm","fixed","z-[60]","w-[88px]","rotate-90","rounded-t-none","transition-[right]","duration-300",3,"click","title"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.togglePanel.emit()}),f(1,` LEGEND
3459
+ `),y()),i&2&&(Oe("right",n.buttonRight())("bottom",n.buttonBottom),le("title",n.isOpen()?"Hide panel":"Show panel"),rt("aria-expanded",n.isOpen()))},encapsulation:2,changeDetection:0})}}return e})();function J5(e,o){e&1&&F(0,"cc-legend-delta-colors-section")}function eS(e,o){e&1&&F(0,"cc-legend-metrics-section")(1,"cc-legend-color-scale-section")}function tS(e,o){if(e&1&&(v(0,"div",2)(1,"div",3),O(2,J5,1,0,"cc-legend-delta-colors-section")(3,eS,2,0),v(4,"div",4),F(5,"cc-legend-color-row",5),b(),F(6,"cc-legend-edge-colors-section"),b()()),e&2){let t=D();Oe("right",t.panelRight())("bottom",t.panelBottom),m(2),z(t.isDeltaState()?2:3)}}var Wd=(()=>{class e{constructor(){this.elementReference=q(Lt),this.inspectorVisibilityService=q(si),this.fileStoreReadWindow=q(Te),this.isOpen=be(!1),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.panelBottom=`calc(${dl} + 12px)`,this.panelRight=X(()=>this.inspectorVisibilityService.isVisible()?"calc(var(--cc-inspector-width) + 40px)":"40px"),this.mouseDownListener=t=>this.closeOnOutsideClick(t)}ngOnInit(){document.addEventListener("mousedown",this.mouseDownListener)}ngOnDestroy(){document.removeEventListener("mousedown",this.mouseDownListener)}toggleIsOpen(){this.isOpen.update(t=>!t)}closeOnOutsideClick(t){this.isOpen()&&t.target instanceof Node&&!this.elementReference.nativeElement.contains(t.target)&&this.isOpen.set(!1)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-legend-panel"]],decls:2,vars:2,consts:[["id","legend-panel","data-testid","legend-panel",1,"rounded-box","border-base-300","bg-base-100","fixed","z-[60]","flex","w-72","max-w-[30vw]","flex-col","border","shadow-lg","transition-[right]","duration-300",3,"right","bottom"],[3,"togglePanel","isOpen"],["id","legend-panel","data-testid","legend-panel",1,"rounded-box","border-base-300","bg-base-100","fixed","z-[60]","flex","w-72","max-w-[30vw]","flex-col","border","shadow-lg","transition-[right]","duration-300"],[1,"flex","flex-col","gap-3","p-3"],[1,"border-base-300","border-t","pt-2"],["mapColorFor","selected"]],template:function(i,n){i&1&&(O(0,tS,7,5,"div",0),v(1,"cc-legend-toggle-button",1),W("togglePanel",function(){return n.toggleIsOpen()}),b()),i&2&&(z(n.isOpen()?0:-1),m(),L("isOpen",n.isOpen()))},dependencies:[M1,w1,S1,y1,vo,_1],encapsulation:2,changeDetection:0})}}return e})();var E1=(e,o)=>Ie(Hn,Nu,(t,i)=>{let n=t[o];return i[e][n]==="relative"?"x\u0342":"\u03A3"});var iS=e=>{if(!e)return[];let o=[];for(let{data:t}of Zi(e))t.type===Ft.FOLDER&&!t.isExcluded&&o.push(t.path);return o.sort((t,i)=>t.localeCompare(i))},k1=Ie(Et,e=>iS(e.unifiedMapNode));var oS=(e,o)=>{let t=new Map(e.map(i=>[i.path,0]));for(let i of o){if(!bi(i)||i.isExcluded)continue;let n=nS(t,i.path);n!==void 0&&t.set(n,t.get(n)+1)}return e.map(i=>tt(Ee({},i),{fileCount:t.get(i.path)})).sort((i,n)=>i.path.localeCompare(n.path))};function nS(e,o){let t=o;for(;t;){if(e.has(t))return t;let i=t.lastIndexOf("/");t=i>0?t.slice(0,i):""}}var q1=Ie(cu,Fi,oS);var T1=Ie(Ka,e=>({leftColor:e.positive,middleColor:e.neutral,rightColor:e.negative}));var I1=Ie(lo,Xp,(e,o)=>({values:e.values,min:e.minValue,max:e.maxValue,from:o.from,to:o.to}));var ht=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select($n),this.primaryMetricNames$=this.store.select(Hn),this.amountOfBuildingsWithSelectedEdgeMetric$=this.store.select(ws),this.selectedColorMetricData$=this.store.select(lo),this.metricColorRangeColors$=this.store.select(T1),this.metricColorRangeValues$=this.store.select(I1),this.markedPackagesWithCounts$=this.store.select(q1),this.markableFolderPaths$=this.store.select(k1),this.hoveredNode$=this.store.select(jn),this.selectedNode$=this.store.select(Xt),this.accumulatedData$=this.store.select(Et)}attributeTypeLabel$(t,i){return this.store.select(E1(t,i))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ye=(()=>{class e{constructor(t){this.store=t}setAreaMetric(t){this.store.dispatch(xi({value:t}))}setHeightMetric(t){this.store.dispatch(yi({value:t}))}setColorMetric(t){this.store.dispatch(Nt({value:t}))}setEdgeMetric(t){this.store.dispatch(Si({value:t}))}setMargin(t){this.store.dispatch(Tn({value:t}))}setInvertArea(t){this.store.dispatch(Cn({value:t}))}setEnableFloorLabels(t){this.store.dispatch(Sn({value:t}))}setScaling(t){this.store.dispatch(In({value:t}))}setInvertHeight(t){this.store.dispatch(Mn({value:t}))}setColorRange(t){this.store.dispatch(wi({value:t}))}setColorMode(t){this.store.dispatch(io({value:t}))}setMapColors(t){this.store.dispatch(Ai({value:t}))}invertColorRange(){this.store.dispatch(vn())}invertDeltaColors(){this.store.dispatch(xn())}setEdgeHeight(t){this.store.dispatch(wn({value:t}))}setAmountOfEdgePreviews(t){this.store.dispatch(eo({value:t}))}toggleEdgeMetricVisible(){this.store.dispatch(_n())}setShowIncomingEdges(t){this.store.dispatch(Rn({value:t}))}setShowOutgoingEdges(t){this.store.dispatch(Dn({value:t}))}setShowOnlyBuildingsWithEdges(t){this.store.dispatch(Fn({value:t}))}toggleIsHeightAndColorMetricLinked(){this.store.dispatch(ef())}markPackage(t){this.store.dispatch(Nn({packages:[t]}))}unmarkPackage(t){this.store.dispatch(Bn({path:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var R1=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.popoverId=$.required(),this.anchorName=$.required(),this.margin=R(this.mapStateReadWindow.margin$,{initialValue:0}),this.enableFloorLabels=R(this.mapStateReadWindow.enableFloorLabels$,{initialValue:!1}),this.isInvertedArea=R(this.mapStateReadWindow.invertArea$,{initialValue:!1}),this.resetKeys=["mapState.margin","mapState.invertArea","mapState.enableFloorLabels"]}setMargin(t){this.metricsBarWriteStore.setMargin(t)}setEnableFloorLabel(t){let i=t.target.checked;this.metricsBarWriteStore.setEnableFloorLabels(i)}toggleInvertingArea(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertArea(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-area-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:14,vars:8,consts:[[3,"popoverId","anchorName"],["title","Amount of space between buildings in percent"],[1,"text-sm"],["ariaLabel","Margin",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["tooltip","Reset area metric settings to their defaults","label","Reset area metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),f(3,"Margin"),b(),v(4,"cc-slider-number-input",3),W("valueChange",function(a){return n.setMargin(a)}),b()(),v(5,"label",4)(6,"input",5),W("change",function(a){return n.setEnableFloorLabel(a)}),b(),v(7,"span"),f(8,"Enable Floor Labels"),b()(),v(9,"label",4)(10,"input",5),W("change",function(a){return n.toggleInvertingArea(a)}),b(),v(11,"span"),f(12,"Invert Area"),b()(),F(13,"cc-reset-settings-button",6),b()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName()),m(4),L("min",1)("max",100)("value",n.margin()),m(2),L("checked",n.enableFloorLabels()),m(4),L("checked",n.isInvertedArea()),m(3),L("settingsKeys",n.resetKeys))},dependencies:[po,Ot,ir],encapsulation:2,changeDetection:0})}}return e})();var hr=(()=>{class e{constructor(t,i,n){this.metricsBarReadStore=t,this.mapStateReadWindow=i,this.codeMapRenderService=n;let r=this.metricsBarReadStore.hoveredNode$,a=this.metricsBarReadStore.selectedNode$,s=this.createTopLevelNodeObservable();this.node$=St([r,a,s]).pipe(ke(([l,d,c])=>l??d??c),Ra({bufferSize:1,refCount:!0}))}createNodeObservable(){return this.node$}createTopLevelNodeObservable(){return St([this.metricsBarReadStore.accumulatedData$,this.mapStateReadWindow.areaMetric$,this.mapStateReadWindow.heightMetric$]).pipe(Re(([t])=>!!t.unifiedMapNode),ke(([t])=>this.findTopLevelNode(t)))}findTopLevelNode(t){let i=this.codeMapRenderService.getNodes(t.unifiedMapNode),n=this.codeMapRenderService.sortVisibleNodesByHeightDescending(i);if(n.length!==0)return n.reduce((r,a)=>r.attributes.unary>a.attributes.unary?r:a,n[0])}static{this.\u0275fac=function(i){return new(i||e)(M(ht),M(ve),M(jr))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var hl=(()=>{class e{constructor(){this.nodeSelectionService=q(hr),this.metricsBarReadStore=q(ht),this.metricFor=$.required(),this.attributeType=$("nodes"),this.node=R(this.nodeSelectionService.createNodeObservable()),this.isNodeALeaf=X(()=>{let t=this.node();return t?"isLeaf"in t?t.isLeaf:bi(t):!1}),this.selectorInputs=X(()=>({attributeType:this.attributeType(),metricFor:this.metricFor()})),this.attributeTypeLabel=R(fp(this.selectorInputs).pipe(Ut(({attributeType:t,metricFor:i})=>this.metricsBarReadStore.attributeTypeLabel$(t,i))))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-chooser-type"]],inputs:{metricFor:[1,"metricFor"],attributeType:[1,"attributeType"]},decls:2,vars:2,consts:[[3,"hidden"]],template:function(i,n){i&1&&(w(0,"span",0),f(1),y()),i&2&&(le("hidden",n.isNodeALeaf()),m(),he(" ",n.attributeTypeLabel(),`
3460
+ `))},encapsulation:2,changeDetection:0})}}return e})();function rS(e,o){if(e&1&&(v(0,"span",4),f(1),b()),e&2){let t=o;yt(t.styleClass),m(),he("\u0394",t.label)}}function aS(e,o){if(e&1&&(v(0,"span",2),F(1,"cc-metric-chooser-type",3),b(),v(2,"span",4),f(3),b(),O(4,rS,2,3,"span",5)),e&2){let t,i=o,n=D();m(),L("metricFor",n.metricFor()),m(2),qe(i.value),m(),z((t=i.delta)?4:-1,t)}}function sS(e,o){e&1&&(v(0,"span",1),f(1,"\xA0"),b())}var pl=(()=>{class e{constructor(){this.nodeSelectionService=q(hr),this.metricsBarReadStore=q(ht),this.metricFor=$.required(),this.node=R(this.nodeSelectionService.createNodeObservable()),this.primaryMetricNames=R(this.metricsBarReadStore.primaryMetricNames$),this.metricName=X(()=>this.primaryMetricNames()?.[this.metricFor()]??null),this.display=X(()=>lS(this.node(),this.metricName(),this.metricFor()))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-meta-value"]],inputs:{metricFor:[1,"metricFor"]},decls:3,vars:1,consts:[[1,"flex","items-center","justify-center","gap-1","text-xs","leading-tight","min-h-4"],["aria-hidden","true"],[1,"opacity-60"],[3,"metricFor"],[1,"font-medium"],[1,"font-medium",3,"class"]],template:function(i,n){if(i&1&&(v(0,"div",0),O(1,aS,5,3)(2,sS,2,0,"span",1),b()),i&2){let r;m(),z((r=n.display())?1:2,r)}},dependencies:[hl],encapsulation:2,changeDetection:0})}}return e})();function lS(e,o,t){return!e||!o?null:{value:cS(e,o),delta:dS(e,o,t)}}function cS(e,o){let t=e.attributes?.[o];return typeof t=="number"?t.toLocaleString():"\u2014"}function dS(e,o,t){if(!("deltas"in e)||!e.deltas)return null;let i=e.deltas[o];return typeof i!="number"?null:{label:i.toLocaleString(),styleClass:mS(i,t)}}function mS(e,o){return o==="heightMetric"&&e>0?"text-success":e<0?"text-error":"text-base-content"}var hS=new Map([["complexity",["formerly mcc"]],["sonar_complexity",["formerly mcc"]]]),D1=(()=>{class e{transform(t,i){let n=this.normalizeString(i.trim()),r=this.splitIntoWords(n);return t.filter(a=>{let s=this.normalizeString(this.getDisplayName(a.name));return this.matchesSearch(s,r)})}normalizeString(t){return t.toLocaleLowerCase().replace(/[_\-\s]+/g," ")}splitIntoWords(t){return t.split(" ").filter(i=>i.length>0)}getDisplayName(t){let i=hS.get(t);return i?`${t} ${i.join(" ")}`:t}matchesSearch(t,i){return i.length===0?!0:i.every(n=>t.includes(n))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=Xi({name:"filterMetricDataBySearchTerm",type:e,pure:!0})}}return e})();function pS(e,o){e&1&&(w(0,"span",3),f(1,"(formerly mcc)"),y())}function uS(e,o){e&1&&(w(0,"span",4),f(1),y()),e&2&&(m(),qe(o))}var A1=(()=>{class e{constructor(){this.option=$.required(),this.isActive=$(!1),this.isSelected=$(!1),this.descriptor=$(null),this.selectOption=Ce(),this.hovered=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-select-option"]],hostAttrs:[1,"contents"],inputs:{option:[1,"option"],isActive:[1,"isActive"],isSelected:[1,"isSelected"],descriptor:[1,"descriptor"]},outputs:{selectOption:"selectOption",hovered:"hovered"},decls:9,vars:14,consts:[["type","button",1,"flex","items-center","justify-between","gap-2","w-full","px-2","py-1","rounded","border-0","text-left","cursor-pointer",3,"click","mouseenter","title"],[1,"flex","flex-col","items-start","gap-0.5","min-w-0","flex-1"],[1,"truncate","w-full"],[1,"text-xs","opacity-50"],[1,"text-xs","opacity-60","truncate","w-full"],[1,"text-xs","opacity-60","shrink-0"]],template:function(i,n){if(i&1&&(w(0,"button",0),at(1,"attributeDescriptorTooltip"),K("click",function(){return n.selectOption.emit(n.option().name)})("mouseenter",function(){return n.hovered.emit()}),w(2,"span",1)(3,"span",2),f(4),O(5,pS,2,0,"span",3),y(),O(6,uS,2,1,"span",4),y(),w(7,"span",5),f(8),y()()),i&2){let r;yt(n.isActive()?"bg-base-200":"bg-transparent hover:bg-base-200"),Ne("font-semibold",n.isSelected()),le("title",gi(1,11,n.descriptor(),n.option().name)),rt("data-metric-name",n.option().name)("data-active",n.isActive()?"true":null),m(4),he(" ",n.option().name," "),m(),z(n.option().name==="complexity"||n.option().name==="sonar_complexity"?5:-1),m(),z((r=(r=n.descriptor())==null?null:r.description)?6:-1,r),m(2),he("(",n.option().maxValue,")")}},dependencies:[bo],encapsulation:2,changeDetection:0})}}return e})();var fS=["searchInput"],gS=(e,o)=>o.name;function bS(e,o){if(e&1){let t=xe();v(0,"li",6)(1,"cc-metric-select-option",8),W("selectOption",function(n){ae(t);let r=D(2);return se(r.handleSelect(n))})("hovered",function(){let n=ae(t).$index,r=D(2);return se(r.activeIndex.set(n))}),b()()}if(e&2){let t=o.$implicit,i=o.$index,n=D(2);m(),L("option",t)("isActive",i===n.activeIndex())("isSelected",t.name===n.selected())("descriptor",n.attributeDescriptors()[t.name]??null)}}function vS(e,o){e&1&&(v(0,"li",7),f(1,"No metrics found"),b())}function xS(e,o){if(e&1&&(Ae(0,bS,2,4,"li",6,gS,!1,vS,2,0,"li",7),at(3,"filterMetricDataBySearchTerm")),e&2){let t=D();Le(gi(3,1,t.metricData(),t.searchTerm()))}}var pr=(()=>{class e{constructor(){this.metricsBarReadStore=q(ht),this.metricsLensFacade=q(zn),this.popoverId=$.required(),this.anchorName=$.required(),this.placeholder=$("Search metric"),this.kind=$("node"),this.selected=$(null),this.metricSelected=Ce(),this.shell=je.required(Ot),this.searchInput=je.required("searchInput"),this.searchTerm=be(""),this.activeIndex=be(0),this.isOpen=be(!1),this.metricDataState=R(this.metricsBarReadStore.metricData$,{initialValue:{nodeMetricData:[],edgeMetricData:[],nodeEdgeMetricsMap:new Map}}),this.attributeDescriptors=R(this.metricsLensFacade.descriptors$,{initialValue:{}}),this.metricData=X(()=>{let t=this.metricDataState();return this.kind()==="edge"?t.edgeMetricData:t.nodeMetricData}),this.toggleListener=t=>{let i=t;this.isOpen.set(i.newState==="open"),i.newState==="open"&&(this.searchTerm.set(""),this.activeIndex.set(this.getSelectedMetricIndex()),queueMicrotask(()=>{this.searchInput().nativeElement.focus(),this.scrollActiveIntoView(this.popover().nativeElement)}))}}popover(){return this.shell().popover()}getSelectedMetricIndex(){let t=this.selected();if(!t)return 0;let i=this.metricData().findIndex(n=>n.name===t);return i===-1?0:i}ngAfterViewInit(){this.popover().nativeElement.addEventListener("toggle",this.toggleListener)}ngOnDestroy(){this.popover().nativeElement.removeEventListener("toggle",this.toggleListener)}handleSearchTermChange(t){this.searchTerm.set(t),this.activeIndex.set(0)}handleKeyDown(t){let i=this.popover().nativeElement,n=this.getFilteredItems(i);if(n.length!==0)switch(t.key){case"ArrowDown":t.preventDefault(),this.activeIndex.set(Math.min(n.length-1,this.activeIndex()+1)),this.scrollActiveIntoView(i);break;case"ArrowUp":t.preventDefault(),this.activeIndex.set(Math.max(0,this.activeIndex()-1)),this.scrollActiveIntoView(i);break;case"Enter":{t.preventDefault();let r=n[this.activeIndex()]?.dataset.metricName;r&&this.handleSelect(r);break}case"Escape":this.closePopover();break}}handleSelect(t){this.metricSelected.emit(t),this.closePopover()}closePopover(){let t=this.popover().nativeElement;t.matches(":popover-open")&&t.hidePopover()}getFilteredItems(t){return Array.from(t.querySelectorAll("[data-metric-name]"))}scrollActiveIntoView(t){this.getFilteredItems(t)[this.activeIndex()]?.scrollIntoView?.({block:"nearest"})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-select-popover"]],viewQuery:function(i,n){i&1&&it(n.shell,Ot,5)(n.searchInput,fS,5),i&2&&ot(2)},hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"],placeholder:[1,"placeholder"],kind:[1,"kind"],selected:[1,"selected"]},outputs:{metricSelected:"metricSelected"},decls:7,vars:6,consts:[["searchInput",""],["widthClass","w-80","contentClass","gap-2 p-2",3,"popoverId","anchorName","testId"],["aria-label","Search metrics",1,"input","input-sm","input-bordered","flex","items-center","gap-2"],[1,"fa","fa-search","opacity-60"],["type","text","autofocus","",1,"grow",3,"input","keydown","placeholder","value"],[1,"flex","flex-col","max-h-[440px]","overflow-y-auto","m-0","p-0","list-none"],[1,"flex"],[1,"px-2","py-3","text-xs","opacity-60"],[3,"selectOption","hovered","option","isActive","isSelected","descriptor"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",1)(1,"label",2),F(2,"i",3),v(3,"input",4,0),W("input",function(a){return n.handleSearchTermChange(a.target.value)})("keydown",function(a){return n.handleKeyDown(a)}),b()(),v(5,"ul",5),O(6,xS,4,4),b()()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName())("testId","metric-select-popover-"+n.anchorName()),m(3),L("placeholder",n.placeholder())("value",n.searchTerm()),m(3),z(n.isOpen()?6:-1))},dependencies:[mo,Ot,A1,D1],encapsulation:2,changeDetection:0})}}return e})();var wS=["*"],ul=(()=>{class e{constructor(){this.label=$.required(),this.metricName=$(""),this.metricFor=$.required(),this.placeholder=$(""),this.searchPopoverId=$.required(),this.searchAnchorName=$.required(),this.settingsPopoverId=$.required(),this.settingsAnchorName=$.required(),this.testIdPrefix=$.required(),this.metricSelected=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-segment"]],hostAttrs:[1,"contents"],inputs:{label:[1,"label"],metricName:[1,"metricName"],metricFor:[1,"metricFor"],placeholder:[1,"placeholder"],searchPopoverId:[1,"searchPopoverId"],searchAnchorName:[1,"searchAnchorName"],settingsPopoverId:[1,"settingsPopoverId"],settingsAnchorName:[1,"settingsAnchorName"],testIdPrefix:[1,"testIdPrefix"]},outputs:{metricSelected:"metricSelected"},ngContentSelectors:wS,decls:5,vars:14,consts:[[3,"label","metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],[3,"metricFor"],["kind","node",3,"metricSelected","popoverId","anchorName","placeholder","selected"]],template:function(i,n){i&1&&(Kh(),v(0,"cc-axis-card",0)(1,"div",1),F(2,"cc-metric-meta-value",2),b()(),v(3,"cc-metric-select-popover",3),W("metricSelected",function(a){return n.metricSelected.emit(a)}),b(),Qh(4)),i&2&&(L("label",n.label())("metricName",n.metricName())("hasCog",!0)("cogPopoverId",n.settingsPopoverId())("cogAnchorName",n.settingsAnchorName())("searchPopoverId",n.searchPopoverId())("searchAnchorName",n.searchAnchorName())("testId",n.testIdPrefix())("cogTestId",n.testIdPrefix()+"-cog"),m(2),L("metricFor",n.metricFor()),m(),L("popoverId",n.searchPopoverId())("anchorName",n.searchAnchorName())("placeholder",n.placeholder())("selected",n.metricName()))},dependencies:[co,pl,pr],encapsulation:2,changeDetection:0})}}return e})();var L1=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-area",this.searchAnchorName="metric-segment-area",this.settingsPopoverId="metric-settings-popover-area",this.settingsAnchorName="metric-segment-area-cog",this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.areaMetric=R(this.mapStateReadWindow.areaMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setAreaMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-area-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Area","metricFor","areaMetric","placeholder","Area Metric (highest value)","testIdPrefix","metric-segment-area",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(v(0,"cc-metric-segment",0),W("metricSelected",function(a){return n.handleMetricSelected(a)}),F(1,"cc-area-settings-popover",1),b()),i&2&&(L("metricName",n.areaMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),m(),L("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[ul,R1],encapsulation:2,changeDetection:0})}}return e})();function SS(e,o){if(e&1&&(v(0,"span",3),f(1),b()),e&2){let t=D();m(),qe(t.count())}}var F1=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.mapColorFor=$.required(),this.count=$(null),this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.colorRange=R(this.mapStateReadWindow.colorRange$,{initialValue:{from:0,to:0}}),this.nodeMetricRange=R(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.color=X(()=>this.mapColors()[this.mapColorFor()])}handleColorChange(t){this.metricsBarWriteStore.setMapColors({[this.mapColorFor()]:t})}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(ht),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-band-row"]],inputs:{mapColorFor:[1,"mapColorFor"],count:[1,"count"]},decls:6,vars:9,consts:[[1,"flex","items-center","gap-2"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"cc-inline-color-picker",1),W("colorChange",function(a){return n.handleColorChange(a)}),b(),v(2,"span",2),f(3),at(4,"mapColorLabel"),b(),O(5,SS,2,1,"span",3),b()),i&2&&(m(),L("hexColor",n.color())("ariaLabel","Recolor "+n.mapColorFor()),m(2),he(" ",Ba(4,4,n.mapColorFor(),n.colorRange(),n.nodeMetricRange(),n.colorMetric())," "),m(2),z(n.count()!==null?5:-1))},dependencies:[ho,ml],encapsulation:2,changeDetection:0})}}return e})();function yS(e,o){if(e&1&&F(0,"cc-color-band-row",3)(1,"cc-color-band-row",4)(2,"cc-color-band-row",5),e&2){let t=D();L("count",t.colorCategoryCounts().positive),m(),L("count",t.colorCategoryCounts().neutral),m(),L("count",t.colorCategoryCounts().negative)}}function CS(e,o){e&1&&F(0,"cc-color-band-row",6)(1,"cc-color-band-row",7)}var P1=(()=>{class e{constructor(t,i){this.fileStoreReadWindow=t,this.colorCategoryCountsStore=i,this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.colorCategoryCounts=R(this.colorCategoryCountsStore.colorCategoryCounts$,{initialValue:{positive:0,neutral:0,negative:0}})}static{this.\u0275fac=function(i){return new(i||e)(te(Te),te(Xn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-bands-section"]],hostAttrs:[1,"contents"],decls:6,vars:1,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["mapColorFor","selected"],["mapColorFor","positive",3,"count"],["mapColorFor","neutral",3,"count"],["mapColorFor","negative",3,"count"],["mapColorFor","positiveDelta"],["mapColorFor","negativeDelta"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Bands"),b(),O(3,yS,3,3)(4,CS,2,0),F(5,"cc-color-band-row",2),b()),i&2&&(m(3),z(n.isDeltaState()?4:3))},dependencies:[F1],encapsulation:2,changeDetection:0})}}return e})();function $o(e,o){return e==null||o==null?NaN:e<o?-1:e>o?1:e>=o?0:NaN}function Od(e,o){return e==null||o==null?NaN:o<e?-1:o>e?1:o>=e?0:NaN}function fl(e){let o,t,i;e.length!==2?(o=$o,t=(s,l)=>$o(e(s),l),i=(s,l)=>e(s)-l):(o=e===$o||e===Od?e:MS,t=e,i=e);function n(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let h=d+c>>>1;t(s[h],l)<0?d=h+1:c=h}while(d<c)}return d}function r(s,l,d=0,c=s.length){if(d<c){if(o(l,l)!==0)return c;do{let h=d+c>>>1;t(s[h],l)<=0?d=h+1:c=h}while(d<c)}return d}function a(s,l,d=0,c=s.length){let h=n(s,l,d,c-1);return h>d&&i(s[h-1],l)>-i(s[h],l)?h-1:h}return{left:n,center:a,right:r}}function MS(){return 0}function zd(e){return e===null?NaN:+e}var N1=fl($o),B1=N1.right,_S=N1.left,ES=fl(zd).center,$d=B1;function gl(e,o){let t,i;if(o===void 0)for(let n of e)n!=null&&(t===void 0?n>=n&&(t=i=n):(t>n&&(t=n),i<n&&(i=n)));else{let n=-1;for(let r of e)(r=o(r,++n,e))!=null&&(t===void 0?r>=r&&(t=i=r):(t>r&&(t=r),i<r&&(i=r)))}return[t,i]}var kS=Math.sqrt(50),qS=Math.sqrt(10),TS=Math.sqrt(2);function bl(e,o,t){let i=(o-e)/Math.max(0,t),n=Math.floor(Math.log10(i)),r=i/Math.pow(10,n),a=r>=kS?10:r>=qS?5:r>=TS?2:1,s,l,d;return n<0?(d=Math.pow(10,-n)/a,s=Math.round(e*d),l=Math.round(o*d),s/d<e&&++s,l/d>o&&--l,d=-d):(d=Math.pow(10,n)*a,s=Math.round(e/d),l=Math.round(o/d),s*d<e&&++s,l*d>o&&--l),l<s&&.5<=t&&t<2?bl(e,o,t*2):[s,l,d]}function vl(e,o,t){if(o=+o,e=+e,t=+t,!(t>0))return[];if(e===o)return[e];let i=o<e,[n,r,a]=i?bl(o,e,t):bl(e,o,t);if(!(r>=n))return[];let s=r-n+1,l=new Array(s);if(i)if(a<0)for(let d=0;d<s;++d)l[d]=(r-d)/-a;else for(let d=0;d<s;++d)l[d]=(r-d)*a;else if(a<0)for(let d=0;d<s;++d)l[d]=(n+d)/-a;else for(let d=0;d<s;++d)l[d]=(n+d)*a;return l}function Hr(e,o,t){return o=+o,e=+e,t=+t,bl(e,o,t)[2]}function jd(e,o,t){o=+o,e=+e,t=+t;let i=o<e,n=i?Hr(o,e,t):Hr(e,o,t);return(i?-1:1)*(n<0?1/-n:n)}function Ur(e,o){let t;if(o===void 0)for(let i of e)i!=null&&(t<i||t===void 0&&i>=i)&&(t=i);else{let i=-1;for(let n of e)(n=o(n,++i,e))!=null&&(t<n||t===void 0&&n>=n)&&(t=n)}return t}function V1(e){return e}var Hd=1,Ud=2,Gd=3,Gr=4,W1=1e-6;function IS(e){return"translate("+e+",0)"}function RS(e){return"translate(0,"+e+")"}function DS(e){return o=>+e(o)}function AS(e,o){return o=Math.max(0,e.bandwidth()-o*2)/2,e.round()&&(o=Math.round(o)),t=>+e(t)+o}function LS(){return!this.__axis}function O1(e,o){var t=[],i=null,n=null,r=6,a=6,s=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,d=e===Hd||e===Gr?-1:1,c=e===Gr||e===Ud?"x":"y",h=e===Hd||e===Gd?IS:RS;function p(u){var k=i??(o.ticks?o.ticks.apply(o,t):o.domain()),E=n??(o.tickFormat?o.tickFormat.apply(o,t):V1),N=Math.max(r,0)+s,j=o.range(),ee=+j[0]+l,B=+j[j.length-1]+l,H=(o.bandwidth?AS:DS)(o.copy(),l),G=u.selection?u.selection():u,Z=G.selectAll(".domain").data([null]),ie=G.selectAll(".tick").data(k,o).order(),oe=ie.exit(),ne=ie.enter().append("g").attr("class","tick"),Me=ie.select("line"),He=ie.select("text");Z=Z.merge(Z.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),ie=ie.merge(ne),Me=Me.merge(ne.append("line").attr("stroke","currentColor").attr(c+"2",d*r)),He=He.merge(ne.append("text").attr("fill","currentColor").attr(c,d*N).attr("dy",e===Hd?"0em":e===Gd?"0.71em":"0.32em")),u!==G&&(Z=Z.transition(u),ie=ie.transition(u),Me=Me.transition(u),He=He.transition(u),oe=oe.transition(u).attr("opacity",W1).attr("transform",function(U){return isFinite(U=H(U))?h(U+l):this.getAttribute("transform")}),ne.attr("opacity",W1).attr("transform",function(U){var De=this.parentNode.__axis;return h((De&&isFinite(De=De(U))?De:H(U))+l)})),oe.remove(),Z.attr("d",e===Gr||e===Ud?a?"M"+d*a+","+ee+"H"+l+"V"+B+"H"+d*a:"M"+l+","+ee+"V"+B:a?"M"+ee+","+d*a+"V"+l+"H"+B+"V"+d*a:"M"+ee+","+l+"H"+B),ie.attr("opacity",1).attr("transform",function(U){return h(H(U)+l)}),Me.attr(c+"2",d*r),He.attr(c,d*N).text(E),G.filter(LS).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ud?"start":e===Gr?"end":"middle"),G.each(function(){this.__axis=H})}return p.scale=function(u){return arguments.length?(o=u,p):o},p.ticks=function(){return t=Array.from(arguments),p},p.tickArguments=function(u){return arguments.length?(t=u==null?[]:Array.from(u),p):t.slice()},p.tickValues=function(u){return arguments.length?(i=u==null?null:Array.from(u),p):i&&i.slice()},p.tickFormat=function(u){return arguments.length?(n=u,p):n},p.tickSize=function(u){return arguments.length?(r=a=+u,p):r},p.tickSizeInner=function(u){return arguments.length?(r=+u,p):r},p.tickSizeOuter=function(u){return arguments.length?(a=+u,p):a},p.tickPadding=function(u){return arguments.length?(s=+u,p):s},p.offset=function(u){return arguments.length?(l=+u,p):l},p}function Xd(e){return O1(Gd,e)}function Kd(e){return O1(Gr,e)}var FS={value:()=>{}};function $1(){for(var e=0,o=arguments.length,t={},i;e<o;++e){if(!(i=arguments[e]+"")||i in t||/[\s.]/.test(i))throw new Error("illegal type: "+i);t[i]=[]}return new xl(t)}function xl(e){this._=e}function PS(e,o){return e.trim().split(/^|\s+/).map(function(t){var i="",n=t.indexOf(".");if(n>=0&&(i=t.slice(n+1),t=t.slice(0,n)),t&&!o.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:i}})}xl.prototype=$1.prototype={constructor:xl,on:function(e,o){var t=this._,i=PS(e+"",t),n,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((n=(e=i[r]).type)&&(n=NS(t[n],e.name)))return n;return}if(o!=null&&typeof o!="function")throw new Error("invalid callback: "+o);for(;++r<a;)if(n=(e=i[r]).type)t[n]=z1(t[n],e.name,o);else if(o==null)for(n in t)t[n]=z1(t[n],e.name,null);return this},copy:function(){var e={},o=this._;for(var t in o)e[t]=o[t].slice();return new xl(e)},call:function(e,o){if((n=arguments.length-2)>0)for(var t=new Array(n),i=0,n,r;i<n;++i)t[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,n=r.length;i<n;++i)r[i].value.apply(o,t)},apply:function(e,o,t){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,r=i.length;n<r;++n)i[n].value.apply(o,t)}};function NS(e,o){for(var t=0,i=e.length,n;t<i;++t)if((n=e[t]).name===o)return n.value}function z1(e,o,t){for(var i=0,n=e.length;i<n;++i)if(e[i].name===o){e[i]=FS,e=e.slice(0,i).concat(e.slice(i+1));break}return t!=null&&e.push({name:o,value:t}),e}var Qd=$1;var wl="http://www.w3.org/1999/xhtml",Yd={svg:"http://www.w3.org/2000/svg",xhtml:wl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Bi(e){var o=e+="",t=o.indexOf(":");return t>=0&&(o=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),Yd.hasOwnProperty(o)?{space:Yd[o],local:e}:e}function BS(e){return function(){var o=this.ownerDocument,t=this.namespaceURI;return t===wl&&o.documentElement.namespaceURI===wl?o.createElement(e):o.createElementNS(t,e)}}function VS(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Sl(e){var o=Bi(e);return(o.local?VS:BS)(o)}function WS(){}function jo(e){return e==null?WS:function(){return this.querySelector(e)}}function j1(e){typeof e!="function"&&(e=jo(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=new Array(a),l,d,c=0;c<a;++c)(l=r[c])&&(d=e.call(l,l.__data__,c,r))&&("__data__"in l&&(d.__data__=l.__data__),s[c]=d);return new pt(i,this._parents)}function Zd(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function OS(){return[]}function Xr(e){return e==null?OS:function(){return this.querySelectorAll(e)}}function zS(e){return function(){return Zd(e.apply(this,arguments))}}function H1(e){typeof e=="function"?e=zS(e):e=Xr(e);for(var o=this._groups,t=o.length,i=[],n=[],r=0;r<t;++r)for(var a=o[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&(i.push(e.call(l,l.__data__,d,a)),n.push(l));return new pt(i,n)}function Kr(e){return function(){return this.matches(e)}}function yl(e){return function(o){return o.matches(e)}}var $S=Array.prototype.find;function jS(e){return function(){return $S.call(this.children,e)}}function HS(){return this.firstElementChild}function U1(e){return this.select(e==null?HS:jS(typeof e=="function"?e:yl(e)))}var US=Array.prototype.filter;function GS(){return Array.from(this.children)}function XS(e){return function(){return US.call(this.children,e)}}function G1(e){return this.selectAll(e==null?GS:XS(typeof e=="function"?e:yl(e)))}function X1(e){typeof e!="function"&&(e=Kr(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new pt(i,this._parents)}function Cl(e){return new Array(e.length)}function K1(){return new pt(this._enter||this._groups.map(Cl),this._parents)}function Qr(e,o){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=o}Qr.prototype={constructor:Qr,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,o){return this._parent.insertBefore(e,o)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Q1(e){return function(){return e}}function KS(e,o,t,i,n,r){for(var a=0,s,l=o.length,d=r.length;a<d;++a)(s=o[a])?(s.__data__=r[a],i[a]=s):t[a]=new Qr(e,r[a]);for(;a<l;++a)(s=o[a])&&(n[a]=s)}function QS(e,o,t,i,n,r,a){var s,l,d=new Map,c=o.length,h=r.length,p=new Array(c),u;for(s=0;s<c;++s)(l=o[s])&&(p[s]=u=a.call(l,l.__data__,s,o)+"",d.has(u)?n[s]=l:d.set(u,l));for(s=0;s<h;++s)u=a.call(e,r[s],s,r)+"",(l=d.get(u))?(i[s]=l,l.__data__=r[s],d.delete(u)):t[s]=new Qr(e,r[s]);for(s=0;s<c;++s)(l=o[s])&&d.get(p[s])===l&&(n[s]=l)}function YS(e){return e.__data__}function Y1(e,o){if(!arguments.length)return Array.from(this,YS);var t=o?QS:KS,i=this._parents,n=this._groups;typeof e!="function"&&(e=Q1(e));for(var r=n.length,a=new Array(r),s=new Array(r),l=new Array(r),d=0;d<r;++d){var c=i[d],h=n[d],p=h.length,u=ZS(e.call(c,c&&c.__data__,d,i)),k=u.length,E=s[d]=new Array(k),N=a[d]=new Array(k),j=l[d]=new Array(p);t(c,h,E,N,j,u,o);for(var ee=0,B=0,H,G;ee<k;++ee)if(H=E[ee]){for(ee>=B&&(B=ee+1);!(G=N[B])&&++B<k;);H._next=G||null}}return a=new pt(a,i),a._enter=s,a._exit=l,a}function ZS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Z1(){return new pt(this._exit||this._groups.map(Cl),this._parents)}function J1(e,o,t){var i=this.enter(),n=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),o!=null&&(n=o(n),n&&(n=n.selection())),t==null?r.remove():t(r),i&&n?i.merge(n).order():n}function e2(e){for(var o=e.selection?e.selection():e,t=this._groups,i=o._groups,n=t.length,r=i.length,a=Math.min(n,r),s=new Array(n),l=0;l<a;++l)for(var d=t[l],c=i[l],h=d.length,p=s[l]=new Array(h),u,k=0;k<h;++k)(u=d[k]||c[k])&&(p[k]=u);for(;l<n;++l)s[l]=t[l];return new pt(s,this._parents)}function t2(){for(var e=this._groups,o=-1,t=e.length;++o<t;)for(var i=e[o],n=i.length-1,r=i[n],a;--n>=0;)(a=i[n])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function i2(e){e||(e=JS);function o(h,p){return h&&p?e(h.__data__,p.__data__):!h-!p}for(var t=this._groups,i=t.length,n=new Array(i),r=0;r<i;++r){for(var a=t[r],s=a.length,l=n[r]=new Array(s),d,c=0;c<s;++c)(d=a[c])&&(l[c]=d);l.sort(o)}return new pt(n,this._parents).order()}function JS(e,o){return e<o?-1:e>o?1:e>=o?0:NaN}function o2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function n2(){return Array.from(this)}function r2(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length;n<r;++n){var a=i[n];if(a)return a}return null}function a2(){let e=0;for(let o of this)++e;return e}function s2(){return!this.node()}function l2(e){for(var o=this._groups,t=0,i=o.length;t<i;++t)for(var n=o[t],r=0,a=n.length,s;r<a;++r)(s=n[r])&&e.call(s,s.__data__,r,n);return this}function ey(e){return function(){this.removeAttribute(e)}}function ty(e){return function(){this.removeAttributeNS(e.space,e.local)}}function iy(e,o){return function(){this.setAttribute(e,o)}}function oy(e,o){return function(){this.setAttributeNS(e.space,e.local,o)}}function ny(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttribute(e):this.setAttribute(e,t)}}function ry(e,o){return function(){var t=o.apply(this,arguments);t==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function c2(e,o){var t=Bi(e);if(arguments.length<2){var i=this.node();return t.local?i.getAttributeNS(t.space,t.local):i.getAttribute(t)}return this.each((o==null?t.local?ty:ey:typeof o=="function"?t.local?ry:ny:t.local?oy:iy)(t,o))}function Ml(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ay(e){return function(){this.style.removeProperty(e)}}function sy(e,o,t){return function(){this.style.setProperty(e,o,t)}}function ly(e,o,t){return function(){var i=o.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,t)}}function d2(e,o,t){return arguments.length>1?this.each((o==null?ay:typeof o=="function"?ly:sy)(e,o,t??"")):xo(this.node(),e)}function xo(e,o){return e.style.getPropertyValue(o)||Ml(e).getComputedStyle(e,null).getPropertyValue(o)}function cy(e){return function(){delete this[e]}}function dy(e,o){return function(){this[e]=o}}function my(e,o){return function(){var t=o.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function m2(e,o){return arguments.length>1?this.each((o==null?cy:typeof o=="function"?my:dy)(e,o)):this.node()[e]}function h2(e){return e.trim().split(/^|\s+/)}function Jd(e){return e.classList||new p2(e)}function p2(e){this._node=e,this._names=h2(e.getAttribute("class")||"")}p2.prototype={add:function(e){var o=this._names.indexOf(e);o<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var o=this._names.indexOf(e);o>=0&&(this._names.splice(o,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function u2(e,o){for(var t=Jd(e),i=-1,n=o.length;++i<n;)t.add(o[i])}function f2(e,o){for(var t=Jd(e),i=-1,n=o.length;++i<n;)t.remove(o[i])}function hy(e){return function(){u2(this,e)}}function py(e){return function(){f2(this,e)}}function uy(e,o){return function(){(o.apply(this,arguments)?u2:f2)(this,e)}}function g2(e,o){var t=h2(e+"");if(arguments.length<2){for(var i=Jd(this.node()),n=-1,r=t.length;++n<r;)if(!i.contains(t[n]))return!1;return!0}return this.each((typeof o=="function"?uy:o?hy:py)(t,o))}function fy(){this.textContent=""}function gy(e){return function(){this.textContent=e}}function by(e){return function(){var o=e.apply(this,arguments);this.textContent=o??""}}function b2(e){return arguments.length?this.each(e==null?fy:(typeof e=="function"?by:gy)(e)):this.node().textContent}function vy(){this.innerHTML=""}function xy(e){return function(){this.innerHTML=e}}function wy(e){return function(){var o=e.apply(this,arguments);this.innerHTML=o??""}}function v2(e){return arguments.length?this.each(e==null?vy:(typeof e=="function"?wy:xy)(e)):this.node().innerHTML}function Sy(){this.nextSibling&&this.parentNode.appendChild(this)}function x2(){return this.each(Sy)}function yy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function w2(){return this.each(yy)}function S2(e){var o=typeof e=="function"?e:Sl(e);return this.select(function(){return this.appendChild(o.apply(this,arguments))})}function Cy(){return null}function y2(e,o){var t=typeof e=="function"?e:Sl(e),i=o==null?Cy:typeof o=="function"?o:jo(o);return this.select(function(){return this.insertBefore(t.apply(this,arguments),i.apply(this,arguments)||null)})}function My(){var e=this.parentNode;e&&e.removeChild(this)}function C2(){return this.each(My)}function _y(){var e=this.cloneNode(!1),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function Ey(){var e=this.cloneNode(!0),o=this.parentNode;return o?o.insertBefore(e,this.nextSibling):e}function M2(e){return this.select(e?Ey:_y)}function _2(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ky(e){return function(o){e.call(this,o,this.__data__)}}function qy(e){return e.trim().split(/^|\s+/).map(function(o){var t="",i=o.indexOf(".");return i>=0&&(t=o.slice(i+1),o=o.slice(0,i)),{type:o,name:t}})}function Ty(e){return function(){var o=this.__on;if(o){for(var t=0,i=-1,n=o.length,r;t<n;++t)r=o[t],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):o[++i]=r;++i?o.length=i:delete this.__on}}}function Iy(e,o,t){return function(){var i=this.__on,n,r=ky(o);if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=r,n.options=t),n.value=o;return}}this.addEventListener(e.type,r,t),n={type:e.type,name:e.name,value:o,listener:r,options:t},i?i.push(n):this.__on=[n]}}function E2(e,o,t){var i=qy(e+""),n,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,d=s.length,c;l<d;++l)for(n=0,c=s[l];n<r;++n)if((a=i[n]).type===c.type&&a.name===c.name)return c.value}return}for(s=o?Iy:Ty,n=0;n<r;++n)this.each(s(i[n],o,t));return this}function k2(e,o,t){var i=Ml(e),n=i.CustomEvent;typeof n=="function"?n=new n(o,t):(n=i.document.createEvent("Event"),t?(n.initEvent(o,t.bubbles,t.cancelable),n.detail=t.detail):n.initEvent(o,!1,!1)),e.dispatchEvent(n)}function Ry(e,o){return function(){return k2(this,e,o)}}function Dy(e,o){return function(){return k2(this,e,o.apply(this,arguments))}}function q2(e,o){return this.each((typeof o=="function"?Dy:Ry)(e,o))}function*T2(){for(var e=this._groups,o=0,t=e.length;o<t;++o)for(var i=e[o],n=0,r=i.length,a;n<r;++n)(a=i[n])&&(yield a)}var em=[null];function pt(e,o){this._groups=e,this._parents=o}function I2(){return new pt([[document.documentElement]],em)}function Ay(){return this}pt.prototype=I2.prototype={constructor:pt,select:j1,selectAll:H1,selectChild:U1,selectChildren:G1,filter:X1,data:Y1,enter:K1,exit:Z1,join:J1,merge:e2,selection:Ay,order:t2,sort:i2,call:o2,nodes:n2,node:r2,size:a2,empty:s2,each:l2,attr:c2,style:d2,property:m2,classed:g2,text:b2,html:v2,raise:x2,lower:w2,append:S2,insert:y2,remove:C2,clone:M2,datum:_2,on:E2,dispatch:q2,[Symbol.iterator]:T2};var Vi=I2;function tm(e){return typeof e=="string"?new pt([[document.querySelector(e)]],[document.documentElement]):new pt([[e]],em)}function R2(e){let o;for(;o=e.sourceEvent;)e=o;return e}function im(e,o){if(e=R2(e),o===void 0&&(o=e.currentTarget),o){var t=o.ownerSVGElement||o;if(t.createSVGPoint){var i=t.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(o.getScreenCTM().inverse()),[i.x,i.y]}if(o.getBoundingClientRect){var n=o.getBoundingClientRect();return[e.clientX-n.left-o.clientLeft,e.clientY-n.top-o.clientTop]}}return[e.pageX,e.pageY]}function _l(e,o,t){e.prototype=o.prototype=t,t.constructor=e}function om(e,o){var t=Object.create(e.prototype);for(var i in o)t[i]=o[i];return t}function Jr(){}var Yr=.7,ql=1/Yr,ur="\\s*([+-]?\\d+)\\s*",Zr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ly=/^#([0-9a-f]{3,8})$/,Fy=new RegExp(`^rgb\\(${ur},${ur},${ur}\\)$`),Py=new RegExp(`^rgb\\(${Ti},${Ti},${Ti}\\)$`),Ny=new RegExp(`^rgba\\(${ur},${ur},${ur},${Zr}\\)$`),By=new RegExp(`^rgba\\(${Ti},${Ti},${Ti},${Zr}\\)$`),Vy=new RegExp(`^hsl\\(${Zr},${Ti},${Ti}\\)$`),Wy=new RegExp(`^hsla\\(${Zr},${Ti},${Ti},${Zr}\\)$`),D2={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};_l(Jr,ci,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:A2,formatHex:A2,formatHex8:Oy,formatHsl:zy,formatRgb:L2,toString:L2});function A2(){return this.rgb().formatHex()}function Oy(){return this.rgb().formatHex8()}function zy(){return W2(this).formatHsl()}function L2(){return this.rgb().formatRgb()}function ci(e){var o,t;return e=(e+"").trim().toLowerCase(),(o=Ly.exec(e))?(t=o[1].length,o=parseInt(o[1],16),t===6?F2(o):t===3?new zt(o>>8&15|o>>4&240,o>>4&15|o&240,(o&15)<<4|o&15,1):t===8?El(o>>24&255,o>>16&255,o>>8&255,(o&255)/255):t===4?El(o>>12&15|o>>8&240,o>>8&15|o>>4&240,o>>4&15|o&240,((o&15)<<4|o&15)/255):null):(o=Fy.exec(e))?new zt(o[1],o[2],o[3],1):(o=Py.exec(e))?new zt(o[1]*255/100,o[2]*255/100,o[3]*255/100,1):(o=Ny.exec(e))?El(o[1],o[2],o[3],o[4]):(o=By.exec(e))?El(o[1]*255/100,o[2]*255/100,o[3]*255/100,o[4]):(o=Vy.exec(e))?B2(o[1],o[2]/100,o[3]/100,1):(o=Wy.exec(e))?B2(o[1],o[2]/100,o[3]/100,o[4]):D2.hasOwnProperty(e)?F2(D2[e]):e==="transparent"?new zt(NaN,NaN,NaN,0):null}function F2(e){return new zt(e>>16&255,e>>8&255,e&255,1)}function El(e,o,t,i){return i<=0&&(e=o=t=NaN),new zt(e,o,t,i)}function $y(e){return e instanceof Jr||(e=ci(e)),e?(e=e.rgb(),new zt(e.r,e.g,e.b,e.opacity)):new zt}function fr(e,o,t,i){return arguments.length===1?$y(e):new zt(e,o,t,i??1)}function zt(e,o,t,i){this.r=+e,this.g=+o,this.b=+t,this.opacity=+i}_l(zt,fr,om(Jr,{brighter(e){return e=e==null?ql:Math.pow(ql,e),new zt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yr:Math.pow(Yr,e),new zt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zt(Uo(this.r),Uo(this.g),Uo(this.b),Tl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:P2,formatHex:P2,formatHex8:jy,formatRgb:N2,toString:N2}));function P2(){return`#${Ho(this.r)}${Ho(this.g)}${Ho(this.b)}`}function jy(){return`#${Ho(this.r)}${Ho(this.g)}${Ho(this.b)}${Ho((isNaN(this.opacity)?1:this.opacity)*255)}`}function N2(){let e=Tl(this.opacity);return`${e===1?"rgb(":"rgba("}${Uo(this.r)}, ${Uo(this.g)}, ${Uo(this.b)}${e===1?")":`, ${e})`}`}function Tl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Uo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ho(e){return e=Uo(e),(e<16?"0":"")+e.toString(16)}function B2(e,o,t,i){return i<=0?e=o=t=NaN:t<=0||t>=1?e=o=NaN:o<=0&&(e=NaN),new li(e,o,t,i)}function W2(e){if(e instanceof li)return new li(e.h,e.s,e.l,e.opacity);if(e instanceof Jr||(e=ci(e)),!e)return new li;if(e instanceof li)return e;e=e.rgb();var o=e.r/255,t=e.g/255,i=e.b/255,n=Math.min(o,t,i),r=Math.max(o,t,i),a=NaN,s=r-n,l=(r+n)/2;return s?(o===r?a=(t-i)/s+(t<i)*6:t===r?a=(i-o)/s+2:a=(o-t)/s+4,s/=l<.5?r+n:2-r-n,a*=60):s=l>0&&l<1?0:a,new li(a,s,l,e.opacity)}function O2(e,o,t,i){return arguments.length===1?W2(e):new li(e,o,t,i??1)}function li(e,o,t,i){this.h=+e,this.s=+o,this.l=+t,this.opacity=+i}_l(li,O2,om(Jr,{brighter(e){return e=e==null?ql:Math.pow(ql,e),new li(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yr:Math.pow(Yr,e),new li(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,o=isNaN(e)||isNaN(this.s)?0:this.s,t=this.l,i=t+(t<.5?t:1-t)*o,n=2*t-i;return new zt(nm(e>=240?e-240:e+120,n,i),nm(e,n,i),nm(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new li(V2(this.h),kl(this.s),kl(this.l),Tl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Tl(this.opacity);return`${e===1?"hsl(":"hsla("}${V2(this.h)}, ${kl(this.s)*100}%, ${kl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function V2(e){return e=(e||0)%360,e<0?e+360:e}function kl(e){return Math.max(0,Math.min(1,e||0))}function nm(e,o,t){return(e<60?o+(t-o)*e/60:e<180?t:e<240?o+(t-o)*(240-e)/60:o)*255}function rm(e,o,t,i,n){var r=e*e,a=r*e;return((1-3*e+3*r-a)*o+(4-6*r+3*a)*t+(1+3*e+3*r-3*a)*i+a*n)/6}function z2(e){var o=e.length-1;return function(t){var i=t<=0?t=0:t>=1?(t=1,o-1):Math.floor(t*o),n=e[i],r=e[i+1],a=i>0?e[i-1]:2*n-r,s=i<o-1?e[i+2]:2*r-n;return rm((t-i/o)*o,a,n,r,s)}}function $2(e){var o=e.length;return function(t){var i=Math.floor(((t%=1)<0?++t:t)*o),n=e[(i+o-1)%o],r=e[i%o],a=e[(i+1)%o],s=e[(i+2)%o];return rm((t-i/o)*o,n,r,a,s)}}var ea=e=>()=>e;function Hy(e,o){return function(t){return e+t*o}}function Uy(e,o,t){return e=Math.pow(e,t),o=Math.pow(o,t)-e,t=1/t,function(i){return Math.pow(e+i*o,t)}}function j2(e){return(e=+e)==1?Il:function(o,t){return t-o?Uy(o,t,e):ea(isNaN(o)?t:o)}}function Il(e,o){var t=o-e;return t?Hy(e,t):ea(isNaN(e)?o:e)}var Go=(function e(o){var t=j2(o);function i(n,r){var a=t((n=fr(n)).r,(r=fr(r)).r),s=t(n.g,r.g),l=t(n.b,r.b),d=Il(n.opacity,r.opacity);return function(c){return n.r=a(c),n.g=s(c),n.b=l(c),n.opacity=d(c),n+""}}return i.gamma=e,i})(1);function H2(e){return function(o){var t=o.length,i=new Array(t),n=new Array(t),r=new Array(t),a,s;for(a=0;a<t;++a)s=fr(o[a]),i[a]=s.r||0,n[a]=s.g||0,r[a]=s.b||0;return i=e(i),n=e(n),r=e(r),s.opacity=1,function(l){return s.r=i(l),s.g=n(l),s.b=r(l),s+""}}}var Gy=H2(z2),Xy=H2($2);function U2(e,o){o||(o=[]);var t=e?Math.min(o.length,e.length):0,i=o.slice(),n;return function(r){for(n=0;n<t;++n)i[n]=e[n]*(1-r)+o[n]*r;return i}}function G2(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function X2(e,o){var t=o?o.length:0,i=e?Math.min(t,e.length):0,n=new Array(i),r=new Array(t),a;for(a=0;a<i;++a)n[a]=Xo(e[a],o[a]);for(;a<t;++a)r[a]=o[a];return function(s){for(a=0;a<i;++a)r[a]=n[a](s);return r}}function K2(e,o){var t=new Date;return e=+e,o=+o,function(i){return t.setTime(e*(1-i)+o*i),t}}function Ct(e,o){return e=+e,o=+o,function(t){return e*(1-t)+o*t}}function Q2(e,o){var t={},i={},n;(e===null||typeof e!="object")&&(e={}),(o===null||typeof o!="object")&&(o={});for(n in o)n in e?t[n]=Xo(e[n],o[n]):i[n]=o[n];return function(r){for(n in t)i[n]=t[n](r);return i}}var sm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,am=new RegExp(sm.source,"g");function Ky(e){return function(){return e}}function Qy(e){return function(o){return e(o)+""}}function ta(e,o){var t=sm.lastIndex=am.lastIndex=0,i,n,r,a=-1,s=[],l=[];for(e=e+"",o=o+"";(i=sm.exec(e))&&(n=am.exec(o));)(r=n.index)>t&&(r=o.slice(t,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:Ct(i,n)})),t=am.lastIndex;return t<o.length&&(r=o.slice(t),s[a]?s[a]+=r:s[++a]=r),s.length<2?l[0]?Qy(l[0].x):Ky(o):(o=l.length,function(d){for(var c=0,h;c<o;++c)s[(h=l[c]).i]=h.x(d);return s.join("")})}function Xo(e,o){var t=typeof o,i;return o==null||t==="boolean"?ea(o):(t==="number"?Ct:t==="string"?(i=ci(o))?(o=i,Go):ta:o instanceof ci?Go:o instanceof Date?K2:G2(o)?U2:Array.isArray(o)?X2:typeof o.valueOf!="function"&&typeof o.toString!="function"||isNaN(o)?Q2:Ct)(e,o)}function lm(e,o){return e=+e,o=+o,function(t){return Math.round(e*(1-t)+o*t)}}var Y2=180/Math.PI,Rl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cm(e,o,t,i,n,r){var a,s,l;return(a=Math.sqrt(e*e+o*o))&&(e/=a,o/=a),(l=e*t+o*i)&&(t-=e*l,i-=o*l),(s=Math.sqrt(t*t+i*i))&&(t/=s,i/=s,l/=s),e*i<o*t&&(e=-e,o=-o,l=-l,a=-a),{translateX:n,translateY:r,rotate:Math.atan2(o,e)*Y2,skewX:Math.atan(l)*Y2,scaleX:a,scaleY:s}}var Dl;function Z2(e){let o=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return o.isIdentity?Rl:cm(o.a,o.b,o.c,o.d,o.e,o.f)}function J2(e){return e==null?Rl:(Dl||(Dl=document.createElementNS("http://www.w3.org/2000/svg","g")),Dl.setAttribute("transform",e),(e=Dl.transform.baseVal.consolidate())?(e=e.matrix,cm(e.a,e.b,e.c,e.d,e.e,e.f)):Rl)}function eb(e,o,t,i){function n(d){return d.length?d.pop()+" ":""}function r(d,c,h,p,u,k){if(d!==h||c!==p){var E=u.push("translate(",null,o,null,t);k.push({i:E-4,x:Ct(d,h)},{i:E-2,x:Ct(c,p)})}else(h||p)&&u.push("translate("+h+o+p+t)}function a(d,c,h,p){d!==c?(d-c>180?c+=360:c-d>180&&(d+=360),p.push({i:h.push(n(h)+"rotate(",null,i)-2,x:Ct(d,c)})):c&&h.push(n(h)+"rotate("+c+i)}function s(d,c,h,p){d!==c?p.push({i:h.push(n(h)+"skewX(",null,i)-2,x:Ct(d,c)}):c&&h.push(n(h)+"skewX("+c+i)}function l(d,c,h,p,u,k){if(d!==h||c!==p){var E=u.push(n(u)+"scale(",null,",",null,")");k.push({i:E-4,x:Ct(d,h)},{i:E-2,x:Ct(c,p)})}else(h!==1||p!==1)&&u.push(n(u)+"scale("+h+","+p+")")}return function(d,c){var h=[],p=[];return d=e(d),c=e(c),r(d.translateX,d.translateY,c.translateX,c.translateY,h,p),a(d.rotate,c.rotate,h,p),s(d.skewX,c.skewX,h,p),l(d.scaleX,d.scaleY,c.scaleX,c.scaleY,h,p),d=c=null,function(u){for(var k=-1,E=p.length,N;++k<E;)h[(N=p[k]).i]=N.x(u);return h.join("")}}}var dm=eb(Z2,"px, ","px)","deg)"),mm=eb(J2,", ",")",")");var gr=0,oa=0,ia=0,ib=1e3,Al,na,Ll=0,Ko=0,Fl=0,ra=typeof performance=="object"&&performance.now?performance:Date,ob=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function sa(){return Ko||(ob(Yy),Ko=ra.now()+Fl)}function Yy(){Ko=0}function aa(){this._call=this._time=this._next=null}aa.prototype=Pl.prototype={constructor:aa,restart:function(e,o,t){if(typeof e!="function")throw new TypeError("callback is not a function");t=(t==null?sa():+t)+(o==null?0:+o),!this._next&&na!==this&&(na?na._next=this:Al=this,na=this),this._call=e,this._time=t,hm()},stop:function(){this._call&&(this._call=null,this._time=1/0,hm())}};function Pl(e,o,t){var i=new aa;return i.restart(e,o,t),i}function nb(){sa(),++gr;for(var e=Al,o;e;)(o=Ko-e._time)>=0&&e._call.call(void 0,o),e=e._next;--gr}function tb(){Ko=(Ll=ra.now())+Fl,gr=oa=0;try{nb()}finally{gr=0,Jy(),Ko=0}}function Zy(){var e=ra.now(),o=e-Ll;o>ib&&(Fl-=o,Ll=e)}function Jy(){for(var e,o=Al,t,i=1/0;o;)o._call?(i>o._time&&(i=o._time),e=o,o=o._next):(t=o._next,o._next=null,o=e?e._next=t:Al=t);na=e,hm(i)}function hm(e){if(!gr){oa&&(oa=clearTimeout(oa));var o=e-Ko;o>24?(e<1/0&&(oa=setTimeout(tb,e-ra.now()-Fl)),ia&&(ia=clearInterval(ia))):(ia||(Ll=ra.now(),ia=setInterval(Zy,ib)),gr=1,ob(tb))}}function Nl(e,o,t){var i=new aa;return o=o==null?0:+o,i.restart(n=>{i.stop(),e(n+o)},o,t),i}var e6=Qd("start","end","cancel","interrupt"),t6=[],sb=0,rb=1,Vl=2,Bl=3,ab=4,Wl=5,la=6;function wo(e,o,t,i,n,r){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;i6(e,t,{name:o,index:i,group:n,on:e6,tween:t6,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:sb})}function ca(e,o){var t=bt(e,o);if(t.state>sb)throw new Error("too late; already scheduled");return t}function Mt(e,o){var t=bt(e,o);if(t.state>Bl)throw new Error("too late; already running");return t}function bt(e,o){var t=e.__transition;if(!t||!(t=t[o]))throw new Error("transition not found");return t}function i6(e,o,t){var i=e.__transition,n;i[o]=t,t.timer=Pl(r,0,t.time);function r(d){t.state=rb,t.timer.restart(a,t.delay,t.time),t.delay<=d&&a(d-t.delay)}function a(d){var c,h,p,u;if(t.state!==rb)return l();for(c in i)if(u=i[c],u.name===t.name){if(u.state===Bl)return Nl(a);u.state===ab?(u.state=la,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[c]):+c<o&&(u.state=la,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[c])}if(Nl(function(){t.state===Bl&&(t.state=ab,t.timer.restart(s,t.delay,t.time),s(d))}),t.state=Vl,t.on.call("start",e,e.__data__,t.index,t.group),t.state===Vl){for(t.state=Bl,n=new Array(p=t.tween.length),c=0,h=-1;c<p;++c)(u=t.tween[c].value.call(e,e.__data__,t.index,t.group))&&(n[++h]=u);n.length=h+1}}function s(d){for(var c=d<t.duration?t.ease.call(null,d/t.duration):(t.timer.restart(l),t.state=Wl,1),h=-1,p=n.length;++h<p;)n[h].call(e,c);t.state===Wl&&(t.on.call("end",e,e.__data__,t.index,t.group),l())}function l(){t.state=la,t.timer.stop(),delete i[o];for(var d in i)return;delete e.__transition}}function Ol(e,o){var t=e.__transition,i,n,r=!0,a;if(t){o=o==null?null:o+"";for(a in t){if((i=t[a]).name!==o){r=!1;continue}n=i.state>Vl&&i.state<Wl,i.state=la,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete t[a]}r&&delete e.__transition}}function lb(e){return this.each(function(){Ol(this,e)})}function o6(e,o){var t,i;return function(){var n=Mt(this,e),r=n.tween;if(r!==t){i=t=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===o){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function n6(e,o,t){var i,n;if(typeof t!="function")throw new Error;return function(){var r=Mt(this,e),a=r.tween;if(a!==i){n=(i=a).slice();for(var s={name:o,value:t},l=0,d=n.length;l<d;++l)if(n[l].name===o){n[l]=s;break}l===d&&n.push(s)}r.tween=n}}function cb(e,o){var t=this._id;if(e+="",arguments.length<2){for(var i=bt(this.node(),t).tween,n=0,r=i.length,a;n<r;++n)if((a=i[n]).name===e)return a.value;return null}return this.each((o==null?o6:n6)(t,e,o))}function br(e,o,t){var i=e._id;return e.each(function(){var n=Mt(this,i);(n.value||(n.value={}))[o]=t.apply(this,arguments)}),function(n){return bt(n,i).value[o]}}function zl(e,o){var t;return(typeof o=="number"?Ct:o instanceof ci?Go:(t=ci(o))?(o=t,Go):ta)(e,o)}function r6(e){return function(){this.removeAttribute(e)}}function a6(e){return function(){this.removeAttributeNS(e.space,e.local)}}function s6(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttribute(e);return a===n?null:a===i?r:r=o(i=a,t)}}function l6(e,o,t){var i,n=t+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===n?null:a===i?r:r=o(i=a,t)}}function c6(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function d6(e,o,t){var i,n,r;return function(){var a,s=t(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s)))}}function db(e,o){var t=Bi(e),i=t==="transform"?mm:zl;return this.attrTween(e,typeof o=="function"?(t.local?d6:c6)(t,i,br(this,"attr."+e,o)):o==null?(t.local?a6:r6)(t):(t.local?l6:s6)(t,i,o))}function m6(e,o){return function(t){this.setAttribute(e,o.call(this,t))}}function h6(e,o){return function(t){this.setAttributeNS(e.space,e.local,o.call(this,t))}}function p6(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&h6(e,r)),t}return n._value=o,n}function u6(e,o){var t,i;function n(){var r=o.apply(this,arguments);return r!==i&&(t=(i=r)&&m6(e,r)),t}return n._value=o,n}function mb(e,o){var t="attr."+e;if(arguments.length<2)return(t=this.tween(t))&&t._value;if(o==null)return this.tween(t,null);if(typeof o!="function")throw new Error;var i=Bi(e);return this.tween(t,(i.local?p6:u6)(i,o))}function f6(e,o){return function(){ca(this,e).delay=+o.apply(this,arguments)}}function g6(e,o){return o=+o,function(){ca(this,e).delay=o}}function hb(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?f6:g6)(o,e)):bt(this.node(),o).delay}function b6(e,o){return function(){Mt(this,e).duration=+o.apply(this,arguments)}}function v6(e,o){return o=+o,function(){Mt(this,e).duration=o}}function pb(e){var o=this._id;return arguments.length?this.each((typeof e=="function"?b6:v6)(o,e)):bt(this.node(),o).duration}function x6(e,o){if(typeof o!="function")throw new Error;return function(){Mt(this,e).ease=o}}function ub(e){var o=this._id;return arguments.length?this.each(x6(o,e)):bt(this.node(),o).ease}function w6(e,o){return function(){var t=o.apply(this,arguments);if(typeof t!="function")throw new Error;Mt(this,e).ease=t}}function fb(e){if(typeof e!="function")throw new Error;return this.each(w6(this._id,e))}function gb(e){typeof e!="function"&&(e=Kr(e));for(var o=this._groups,t=o.length,i=new Array(t),n=0;n<t;++n)for(var r=o[n],a=r.length,s=i[n]=[],l,d=0;d<a;++d)(l=r[d])&&e.call(l,l.__data__,d,r)&&s.push(l);return new At(i,this._parents,this._name,this._id)}function bb(e){if(e._id!==this._id)throw new Error;for(var o=this._groups,t=e._groups,i=o.length,n=t.length,r=Math.min(i,n),a=new Array(i),s=0;s<r;++s)for(var l=o[s],d=t[s],c=l.length,h=a[s]=new Array(c),p,u=0;u<c;++u)(p=l[u]||d[u])&&(h[u]=p);for(;s<i;++s)a[s]=o[s];return new At(a,this._parents,this._name,this._id)}function S6(e){return(e+"").trim().split(/^|\s+/).every(function(o){var t=o.indexOf(".");return t>=0&&(o=o.slice(0,t)),!o||o==="start"})}function y6(e,o,t){var i,n,r=S6(o)?ca:Mt;return function(){var a=r(this,e),s=a.on;s!==i&&(n=(i=s).copy()).on(o,t),a.on=n}}function vb(e,o){var t=this._id;return arguments.length<2?bt(this.node(),t).on.on(e):this.each(y6(t,e,o))}function C6(e){return function(){var o=this.parentNode;for(var t in this.__transition)if(+t!==e)return;o&&o.removeChild(this)}}function xb(){return this.on("end.remove",C6(this._id))}function wb(e){var o=this._name,t=this._id;typeof e!="function"&&(e=jo(e));for(var i=this._groups,n=i.length,r=new Array(n),a=0;a<n;++a)for(var s=i[a],l=s.length,d=r[a]=new Array(l),c,h,p=0;p<l;++p)(c=s[p])&&(h=e.call(c,c.__data__,p,s))&&("__data__"in c&&(h.__data__=c.__data__),d[p]=h,wo(d[p],o,t,p,d,bt(c,t)));return new At(r,this._parents,o,t)}function Sb(e){var o=this._name,t=this._id;typeof e!="function"&&(e=Xr(e));for(var i=this._groups,n=i.length,r=[],a=[],s=0;s<n;++s)for(var l=i[s],d=l.length,c,h=0;h<d;++h)if(c=l[h]){for(var p=e.call(c,c.__data__,h,l),u,k=bt(c,t),E=0,N=p.length;E<N;++E)(u=p[E])&&wo(u,o,t,E,p,k);r.push(p),a.push(c)}return new At(r,a,o,t)}var M6=Vi.prototype.constructor;function yb(){return new M6(this._groups,this._parents)}function _6(e,o){var t,i,n;return function(){var r=xo(this,e),a=(this.style.removeProperty(e),xo(this,e));return r===a?null:r===t&&a===i?n:n=o(t=r,i=a)}}function Cb(e){return function(){this.style.removeProperty(e)}}function E6(e,o,t){var i,n=t+"",r;return function(){var a=xo(this,e);return a===n?null:a===i?r:r=o(i=a,t)}}function k6(e,o,t){var i,n,r;return function(){var a=xo(this,e),s=t(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),xo(this,e))),a===l?null:a===i&&l===n?r:(n=l,r=o(i=a,s))}}function q6(e,o){var t,i,n,r="style."+o,a="end."+r,s;return function(){var l=Mt(this,e),d=l.on,c=l.value[r]==null?s||(s=Cb(o)):void 0;(d!==t||n!==c)&&(i=(t=d).copy()).on(a,n=c),l.on=i}}function Mb(e,o,t){var i=(e+="")=="transform"?dm:zl;return o==null?this.styleTween(e,_6(e,i)).on("end.style."+e,Cb(e)):typeof o=="function"?this.styleTween(e,k6(e,i,br(this,"style."+e,o))).each(q6(this._id,e)):this.styleTween(e,E6(e,i,o),t).on("end.style."+e,null)}function T6(e,o,t){return function(i){this.style.setProperty(e,o.call(this,i),t)}}function I6(e,o,t){var i,n;function r(){var a=o.apply(this,arguments);return a!==n&&(i=(n=a)&&T6(e,a,t)),i}return r._value=o,r}function _b(e,o,t){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(o==null)return this.tween(i,null);if(typeof o!="function")throw new Error;return this.tween(i,I6(e,o,t??""))}function R6(e){return function(){this.textContent=e}}function D6(e){return function(){var o=e(this);this.textContent=o??""}}function Eb(e){return this.tween("text",typeof e=="function"?D6(br(this,"text",e)):R6(e==null?"":e+""))}function A6(e){return function(o){this.textContent=e.call(this,o)}}function L6(e){var o,t;function i(){var n=e.apply(this,arguments);return n!==t&&(o=(t=n)&&A6(n)),o}return i._value=e,i}function kb(e){var o="text";if(arguments.length<1)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,L6(e))}function qb(){for(var e=this._name,o=this._id,t=$l(),i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)if(l=a[d]){var c=bt(l,o);wo(l,e,t,d,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new At(i,this._parents,e,t)}function Tb(){var e,o,t=this,i=t._id,n=t.size();return new Promise(function(r,a){var s={value:a},l={value:function(){--n===0&&r()}};t.each(function(){var d=Mt(this,i),c=d.on;c!==e&&(o=(e=c).copy(),o._.cancel.push(s),o._.interrupt.push(s),o._.end.push(l)),d.on=o}),n===0&&r()})}var F6=0;function At(e,o,t,i){this._groups=e,this._parents=o,this._name=t,this._id=i}function Ib(e){return Vi().transition(e)}function $l(){return++F6}var Wi=Vi.prototype;At.prototype=Ib.prototype={constructor:At,select:wb,selectAll:Sb,selectChild:Wi.selectChild,selectChildren:Wi.selectChildren,filter:gb,merge:bb,selection:yb,transition:qb,call:Wi.call,nodes:Wi.nodes,node:Wi.node,size:Wi.size,empty:Wi.empty,each:Wi.each,on:vb,attr:db,attrTween:mb,style:Mb,styleTween:_b,text:Eb,textTween:kb,remove:xb,tween:cb,delay:hb,duration:pb,ease:ub,easeVarying:fb,end:Tb,[Symbol.iterator]:Wi[Symbol.iterator]};function jl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var P6={time:null,delay:0,duration:250,ease:jl};function N6(e,o){for(var t;!(t=e.__transition)||!(t=t[o]);)if(!(e=e.parentNode))throw new Error(`transition ${o} not found`);return t}function Rb(e){var o,t;e instanceof At?(o=e._id,e=e._name):(o=$l(),(t=P6).time=sa(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,r=0;r<n;++r)for(var a=i[r],s=a.length,l,d=0;d<s;++d)(l=a[d])&&wo(l,e,o,d,a,t||N6(l,o));return new At(i,this._parents,e,o)}Vi.prototype.interrupt=lb;Vi.prototype.transition=Rb;var{abs:PO,max:NO,min:BO}=Math;function Db(e){return[+e[0],+e[1]]}function B6(e){return[Db(e[0]),Db(e[1])]}var VO={name:"x",handles:["w","e"].map(pm),input:function(e,o){return e==null?null:[[+e[0],o[0][1]],[+e[1],o[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},WO={name:"y",handles:["n","s"].map(pm),input:function(e,o){return e==null?null:[[o[0][0],+e[0]],[o[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},OO={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(pm),input:function(e){return e==null?null:B6(e)},output:function(e){return e}};function pm(e){return{type:e}}var um=Math.PI,fm=2*um,Qo=1e-6,V6=fm-Qo;function Ab(e){this._+=e[0];for(let o=1,t=e.length;o<t;++o)this._+=arguments[o]+e[o]}function W6(e){let o=Math.floor(e);if(!(o>=0))throw new Error(`invalid digits: ${e}`);if(o>15)return Ab;let t=10**o;return function(i){this._+=i[0];for(let n=1,r=i.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+i[n]}}var Yo=class{constructor(o){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=o==null?Ab:W6(o)}moveTo(o,t){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(o,t){this._append`L${this._x1=+o},${this._y1=+t}`}quadraticCurveTo(o,t,i,n){this._append`Q${+o},${+t},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(o,t,i,n,r,a){this._append`C${+o},${+t},${+i},${+n},${this._x1=+r},${this._y1=+a}`}arcTo(o,t,i,n,r){if(o=+o,t=+t,i=+i,n=+n,r=+r,r<0)throw new Error(`negative radius: ${r}`);let a=this._x1,s=this._y1,l=i-o,d=n-t,c=a-o,h=s-t,p=c*c+h*h;if(this._x1===null)this._append`M${this._x1=o},${this._y1=t}`;else if(p>Qo)if(!(Math.abs(h*l-d*c)>Qo)||!r)this._append`L${this._x1=o},${this._y1=t}`;else{let u=i-a,k=n-s,E=l*l+d*d,N=u*u+k*k,j=Math.sqrt(E),ee=Math.sqrt(p),B=r*Math.tan((um-Math.acos((E+p-N)/(2*j*ee)))/2),H=B/ee,G=B/j;Math.abs(H-1)>Qo&&this._append`L${o+H*c},${t+H*h}`,this._append`A${r},${r},0,0,${+(h*u>c*k)},${this._x1=o+G*l},${this._y1=t+G*d}`}}arc(o,t,i,n,r,a){if(o=+o,t=+t,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),d=o+s,c=t+l,h=1^a,p=a?n-r:r-n;this._x1===null?this._append`M${d},${c}`:(Math.abs(this._x1-d)>Qo||Math.abs(this._y1-c)>Qo)&&this._append`L${d},${c}`,i&&(p<0&&(p=p%fm+fm),p>V6?this._append`A${i},${i},0,1,${h},${o-s},${t-l}A${i},${i},0,1,${h},${this._x1=d},${this._y1=c}`:p>Qo&&this._append`A${i},${i},0,${+(p>=um)},${h},${this._x1=o+i*Math.cos(r)},${this._y1=t+i*Math.sin(r)}`)}rect(o,t,i,n){this._append`M${this._x0=this._x1=+o},${this._y0=this._y1=+t}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function Lb(){return new Yo}Lb.prototype=Yo.prototype;function Fb(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Zo(e,o){if(!isFinite(e)||e===0)return null;var t=(e=o?e.toExponential(o-1):e.toExponential()).indexOf("e"),i=e.slice(0,t);return[i.length>1?i[0]+i.slice(2):i,+e.slice(t+1)]}function Ii(e){return e=Zo(Math.abs(e)),e?e[1]:NaN}function Pb(e,o){return function(t,i){for(var n=t.length,r=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),r.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return r.reverse().join(o)}}function Nb(e){return function(o){return o.replace(/[0-9]/g,function(t){return e[+t]})}}var O6=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function So(e){if(!(o=O6.exec(e)))throw new Error("invalid format: "+e);var o;return new Hl({fill:o[1],align:o[2],sign:o[3],symbol:o[4],zero:o[5],width:o[6],comma:o[7],precision:o[8]&&o[8].slice(1),trim:o[9],type:o[10]})}So.prototype=Hl.prototype;function Hl(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Hl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Bb(e){e:for(var o=e.length,t=1,i=-1,n;t<o;++t)switch(e[t]){case".":i=n=t;break;case"0":i===0&&(i=t),n=t;break;default:if(!+e[t])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var da;function Vb(e,o){var t=Zo(e,o);if(!t)return da=void 0,e.toPrecision(o);var i=t[0],n=t[1],r=n-(da=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return r===a?i:r>a?i+new Array(r-a+1).join("0"):r>0?i.slice(0,r)+"."+i.slice(r):"0."+new Array(1-r).join("0")+Zo(e,Math.max(0,o+r-1))[0]}function gm(e,o){var t=Zo(e,o);if(!t)return e+"";var i=t[0],n=t[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}var bm={"%":(e,o)=>(e*100).toFixed(o),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Fb,e:(e,o)=>e.toExponential(o),f:(e,o)=>e.toFixed(o),g:(e,o)=>e.toPrecision(o),o:e=>Math.round(e).toString(8),p:(e,o)=>gm(e*100,o),r:gm,s:Vb,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vm(e){return e}var Wb=Array.prototype.map,Ob=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function zb(e){var o=e.grouping===void 0||e.thousands===void 0?vm:Pb(Wb.call(e.grouping,Number),e.thousands+""),t=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",r=e.numerals===void 0?vm:Nb(Wb.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function d(h,p){h=So(h);var u=h.fill,k=h.align,E=h.sign,N=h.symbol,j=h.zero,ee=h.width,B=h.comma,H=h.precision,G=h.trim,Z=h.type;Z==="n"?(B=!0,Z="g"):bm[Z]||(H===void 0&&(H=12),G=!0,Z="g"),(j||u==="0"&&k==="=")&&(j=!0,u="0",k="=");var ie=(p&&p.prefix!==void 0?p.prefix:"")+(N==="$"?t:N==="#"&&/[boxX]/.test(Z)?"0"+Z.toLowerCase():""),oe=(N==="$"?i:/[%p]/.test(Z)?a:"")+(p&&p.suffix!==void 0?p.suffix:""),ne=bm[Z],Me=/[defgprs%]/.test(Z);H=H===void 0?6:/[gprs]/.test(Z)?Math.max(1,Math.min(21,H)):Math.max(0,Math.min(20,H));function He(U){var De=ie,_e=oe,Ve,We,ge;if(Z==="c")_e=ne(U)+_e,U="";else{U=+U;var J=U<0||1/U<0;if(U=isNaN(U)?l:ne(Math.abs(U),H),G&&(U=Bb(U)),J&&+U==0&&E!=="+"&&(J=!1),De=(J?E==="("?E:s:E==="-"||E==="("?"":E)+De,_e=(Z==="s"&&!isNaN(U)&&da!==void 0?Ob[8+da/3]:"")+_e+(J&&E==="("?")":""),Me){for(Ve=-1,We=U.length;++Ve<We;)if(ge=U.charCodeAt(Ve),48>ge||ge>57){_e=(ge===46?n+U.slice(Ve+1):U.slice(Ve))+_e,U=U.slice(0,Ve);break}}}B&&!j&&(U=o(U,1/0));var Ue=De.length+U.length+_e.length,Be=Ue<ee?new Array(ee-Ue+1).join(u):"";switch(B&&j&&(U=o(Be+U,Be.length?ee-_e.length:1/0),Be=""),k){case"<":U=De+U+_e+Be;break;case"=":U=De+Be+U+_e;break;case"^":U=Be.slice(0,Ue=Be.length>>1)+De+U+_e+Be.slice(Ue);break;default:U=Be+De+U+_e;break}return r(U)}return He.toString=function(){return h+""},He}function c(h,p){var u=Math.max(-8,Math.min(8,Math.floor(Ii(p)/3)))*3,k=Math.pow(10,-u),E=d((h=So(h),h.type="f",h),{suffix:Ob[8+u/3]});return function(N){return E(k*N)}}return{format:d,formatPrefix:c}}var Ul,Jo,Gl;xm({thousands:",",grouping:[3],currency:["$",""]});function xm(e){return Ul=zb(e),Jo=Ul.format,Gl=Ul.formatPrefix,Ul}function wm(e){return Math.max(0,-Ii(Math.abs(e)))}function Sm(e,o){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ii(o)/3)))*3-Ii(Math.abs(e)))}function ym(e,o){return e=Math.abs(e),o=Math.abs(o)-e,Math.max(0,Ii(o)-Ii(e))+1}function $b(e,o){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(o).domain(e);break}return this}function Cm(e){return function(){return e}}function Mm(e){return+e}var jb=[0,1];function vr(e){return e}function _m(e,o){return(o-=e=+e)?function(t){return(t-e)/o}:Cm(isNaN(o)?NaN:.5)}function z6(e,o){var t;return e>o&&(t=e,e=o,o=t),function(i){return Math.max(e,Math.min(o,i))}}function $6(e,o,t){var i=e[0],n=e[1],r=o[0],a=o[1];return n<i?(i=_m(n,i),r=t(a,r)):(i=_m(i,n),r=t(r,a)),function(s){return r(i(s))}}function j6(e,o,t){var i=Math.min(e.length,o.length)-1,n=new Array(i),r=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),o=o.slice().reverse());++a<i;)n[a]=_m(e[a],e[a+1]),r[a]=t(o[a],o[a+1]);return function(s){var l=$d(e,s,1,i)-1;return r[l](n[l](s))}}function Hb(e,o){return o.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function H6(){var e=jb,o=jb,t=Xo,i,n,r,a=vr,s,l,d;function c(){var p=Math.min(e.length,o.length);return a!==vr&&(a=z6(e[0],e[p-1])),s=p>2?j6:$6,l=d=null,h}function h(p){return p==null||isNaN(p=+p)?r:(l||(l=s(e.map(i),o,t)))(i(a(p)))}return h.invert=function(p){return a(n((d||(d=s(o,e.map(i),Ct)))(p)))},h.domain=function(p){return arguments.length?(e=Array.from(p,Mm),c()):e.slice()},h.range=function(p){return arguments.length?(o=Array.from(p),c()):o.slice()},h.rangeRound=function(p){return o=Array.from(p),t=lm,c()},h.clamp=function(p){return arguments.length?(a=p?!0:vr,c()):a!==vr},h.interpolate=function(p){return arguments.length?(t=p,c()):t},h.unknown=function(p){return arguments.length?(r=p,h):r},function(p,u){return i=p,n=u,c()}}function Em(){return H6()(vr,vr)}function km(e,o,t,i){var n=jd(e,o,t),r;switch(i=So(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(o));return i.precision==null&&!isNaN(r=Sm(n,a))&&(i.precision=r),Gl(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(r=ym(n,Math.max(Math.abs(e),Math.abs(o))))&&(i.precision=r-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(r=wm(n))&&(i.precision=r-(i.type==="%")*2);break}}return Jo(i)}function U6(e){var o=e.domain;return e.ticks=function(t){var i=o();return vl(i[0],i[i.length-1],t??10)},e.tickFormat=function(t,i){var n=o();return km(n[0],n[n.length-1],t??10,i)},e.nice=function(t){t==null&&(t=10);var i=o(),n=0,r=i.length-1,a=i[n],s=i[r],l,d,c=10;for(s<a&&(d=a,a=s,s=d,d=n,n=r,r=d);c-- >0;){if(d=Hr(a,s,t),d===l)return i[n]=a,i[r]=s,o(i);if(d>0)a=Math.floor(a/d)*d,s=Math.ceil(s/d)*d;else if(d<0)a=Math.ceil(a*d)/d,s=Math.floor(s*d)/d;else break;l=d}return e},e}function xr(){var e=Em();return e.copy=function(){return Hb(e,xr())},$b.apply(e,arguments),U6(e)}function en(e){return function(){return e}}function Ub(e){let o=3;return e.digits=function(t){if(!arguments.length)return o;if(t==null)o=null;else{let i=Math.floor(t);if(!(i>=0))throw new RangeError(`invalid digits: ${t}`);o=i}return e},()=>new Yo(o)}var r$=Array.prototype.slice;function Gb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Xb(e){this._context=e}Xb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:this._context.lineTo(e,o);break}}};function Kb(e){return new Xb(e)}function Qb(e){return e[0]}function Yb(e){return e[1]}function qm(e,o){var t=en(!0),i=null,n=Kb,r=null,a=Ub(s);e=typeof e=="function"?e:e===void 0?Qb:en(e),o=typeof o=="function"?o:o===void 0?Yb:en(o);function s(l){var d,c=(l=Gb(l)).length,h,p=!1,u;for(i==null&&(r=n(u=a())),d=0;d<=c;++d)!(d<c&&t(h=l[d],d,l))===p&&((p=!p)?r.lineStart():r.lineEnd()),p&&r.point(+e(h,d,l),+o(h,d,l));if(u)return r=null,u+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:en(+l),s):e},s.y=function(l){return arguments.length?(o=typeof l=="function"?l:en(+l),s):o},s.defined=function(l){return arguments.length?(t=typeof l=="function"?l:en(!!l),s):t},s.curve=function(l){return arguments.length?(n=l,i!=null&&(r=n(i)),s):n},s.context=function(l){return arguments.length?(l==null?i=r=null:r=n(i=l),s):i},s}function Zb(e,o){this._context=e,this._t=o}Zb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,o){switch(e=+e,o=+o,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,o):this._context.moveTo(e,o);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,o),this._context.lineTo(e,o);else{var t=this._x*(1-this._t)+e*this._t;this._context.lineTo(t,this._y),this._context.lineTo(t,o)}break}}this._x=e,this._y=o}};function Tm(e){return new Zb(e,0)}function yo(e,o,t){this.k=e,this.x=o,this.y=t}yo.prototype={constructor:yo,scale:function(e){return e===1?this:new yo(this.k*e,this.x,this.y)},translate:function(e,o){return e===0&o===0?this:new yo(this.k,this.x+this.k*e,this.y+this.k*o)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Im=new yo(1,0,0);Rm.prototype=yo.prototype;function Rm(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Im;return e.__zoom}var Jb=(()=>{class e{constructor(){this.elementRef=q(Lt),this.diagramWidth=550,this.diagramHeight=250,this.showAxisLabels=!0,this.ranksAreStale=!0,this.pendingRender=null,this.popoverAncestor=null,this.popoverToggleListener=t=>{t.newState==="open"&&this.pendingRender!==null&&this.render(this.pendingRender==="full")}}ngOnChanges(t){if(this.values.length===0)return;let i=!!(t.values||t.isAttributeDirectionInverted||t.colorMetric||t.diagramWidth||t.diagramHeight||t.showAxisLabels);if(i&&(this.ranksAreStale=!0),this.isHiddenInClosedPopover()){this.pendingRender=this.pendingRender==="full"||i?"full":"areas";return}this.render(i)}ngAfterViewInit(){this.popoverAncestor=this.elementRef.nativeElement.closest("[popover]"),this.popoverAncestor?.addEventListener("toggle",this.popoverToggleListener)}ngOnDestroy(){this.popoverAncestor?.removeEventListener("toggle",this.popoverToggleListener)}render(t){this.ranksAreStale&&(this.percentileRanks=this.isAttributeDirectionInverted?this.calculateReversedPercentileRanks(this.values):this.calculatePercentileRanks(this.values),this.updatePercentileToMetricValueMap(),this.ranksAreStale=!1),(t||!this.hasRenderedDiagram()||!this.updateAreas())&&this.renderDiagram(),this.pendingRender=null}isHiddenInClosedPopover(){let t=this.popoverAncestor??this.elementRef.nativeElement.closest("[popover]");if(!t)return!1;try{return!t.matches(":popover-open")}catch{return!1}}hasRenderedDiagram(){return!this.rangeDiagramContainer().select("svg").empty()}updateAreas(){let t=this.rangeDiagramContainer().select("g");if(t.empty()||t.select(".left-area").empty())return!1;let i=this.createXScale(),n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));return t.select(".left-area").attr("width",n).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor),t.select(".middle-area").attr("x",n+this.framePadding).attr("width",r-n).style("fill",this.middleColor),t.select(".right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor),!0}updatePercentileToMetricValueMap(){this.percentileToMetricValueMap=new Map;let t=0;for(let i=0;i<=100;i++){for(;i>this.percentileRanks[t].x&&t<this.percentileRanks.length-1;)t++;this.percentileToMetricValueMap.set(i,this.percentileRanks[t].y)}}renderDiagram(){this.initializeDiagramDimesions(),this.clearDiagramContainer();let t=this.createSvg(),i=this.createGroup(t),n=this.createXScale(),r=this.createYScale();this.drawAxes(i,n,r),this.drawFrame(i),this.showAxisLabels&&this.drawLabels(i),this.drawAreas(i,n),this.drawLine(i),this.addCrossHair(i,n,r)}initializeDiagramDimesions(){this.svgWidth=this.diagramWidth,this.svgHeight=this.diagramHeight,this.frameMarginTop=10,this.frameMarginBottom=this.showAxisLabels?50:30,this.frameMarginLeft=this.showAxisLabels?50:40,this.frameMarginRight=10,this.framePadding=5,this.frameHeight=this.svgHeight-this.frameMarginTop-this.frameMarginBottom,this.frameWidth=this.svgWidth-this.frameMarginLeft-this.frameMarginRight,this.yLabelXOffset=80,this.xLabelYOffset=20}rangeDiagramContainer(){return tm(this.elementRef.nativeElement.querySelector("#cc-range-diagram-container"))}clearDiagramContainer(){this.rangeDiagramContainer().selectAll("*").remove()}createSvg(){return this.rangeDiagramContainer().append("svg").attr("width",this.svgWidth).attr("height",this.svgHeight)}createGroup(t){return t.append("g").attr("transform",`translate(${this.frameMarginLeft}, ${this.frameMarginTop})`).attr("display","flex").attr("justify-content","center")}drawFrame(t){t.append("path").attr("d",`M 0 0
3453
3461
  h${this.frameWidth}
3454
3462
  v${this.frameHeight}
3455
3463
  h${-this.frameWidth}
3456
- v${-this.frameHeight}`).attr("fill","none").attr("stroke","#888").attr("stroke-width","1px")}drawAxes(t,i,n){t.append("g").attr("id","axis-x").attr("transform",`translate(${this.framePadding},${this.frameHeight})`).call(Kd(i).ticks(5)).attr("font-size","13px").attr("color","#888"),t.append("g").attr("id","axis-y").attr("transform",`translate(0,${this.framePadding})`).call(Qd(n).ticks(5).tickFormat(function(r){return r>=1e4?`${Jo(".0f")(r/1e3)}k`:r>=1e3?`${Jo(".1f")(r/1e3)}k`:r.toString()})).attr("font-size","13px").attr("color","#888")}createXScale(){return Sr().domain(bl(this.percentileRanks,t=>t.x)).range([0,this.frameWidth-2*this.framePadding])}createYScale(){let t=[0,Xr(this.percentileRanks,n=>n.y)],i=[Xr(this.percentileRanks,n=>n.y),0];return Sr().domain(this.isAttributeDirectionInverted?i:t).range([this.frameHeight-2*this.framePadding,0])}drawLabels(t){t.append("text").attr("id","y-label").attr("class","y label").attr("text-anchor","middle").attr("transform","rotate(-90)").attr("x",-this.frameHeight/2-this.frameMarginTop).attr("y",this.frameMarginLeft-this.yLabelXOffset).attr("fill","#888").text(`${this.colorMetric}`),t.append("text").attr("id","x-label").attr("class","x label").attr("text-anchor","middle").attr("x",this.frameWidth/2).attr("y",this.frameHeight+this.frameMarginTop+this.xLabelYOffset).attr("fill","#888").text(`Quantiles (% of ${this.colorMetric})`)}drawAreas(t,i){let n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));t.append("rect").attr("class","left-area").attr("x",this.framePadding).attr("width",n).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor).style("fill-opacity","0.3"),t.append("rect").attr("class","middle-area").attr("x",n+this.framePadding).attr("width",r-n).attr("height",this.frameHeight).style("fill",this.middleColor).style("fill-opacity","0.3"),t.append("rect").attr("class","right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor).style("fill-opacity","0.3")}drawLine(t){t.append("path").attr("id","diagram-path").datum(this.percentileRanks).attr("fill","none").attr("stroke","#888").attr("stroke-width",1).attr("d",Tm().curve(Im).x(i=>this.createXScale()(i.x)).y(i=>this.createYScale()(i.y))).attr("transform",`translate(${this.framePadding}, ${this.framePadding})`)}calculatePercentileRanks(t){let i=[...t].sort((a,s)=>a-s),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r}calculateReversedPercentileRanks(t){let i=[...t].sort((a,s)=>s-a),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r.sort((a,s)=>a.x-s.x)}calculatePercentileFromMetricValue(t){if(t===this.minValue)return 0;if(t===this.maxValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y<t)i=n.x;else return i??0;return 100}calculateReversedPercentileFromMetricValue(t){if(t===this.maxValue)return 0;if(t===this.minValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y>t)i=n.x;else return i??0;return 100}addCrossHair(t,i,n){let r=t.append("text").attr("class","cross-tooltip").attr("fill","#000").attr("font-size","13px").style("display","none"),a=t.append("line").attr("class","dashed-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").attr("stroke-dasharray","4").style("display","none"),s=t.append("line").attr("class","straight-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),l=t.append("line").attr("class","horizontal-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),d=t.append("rect").attr("class","mouse-event-rect").attr("width",this.frameWidth).attr("height",this.frameHeight+this.frameMarginBottom/2).attr("fill","none").attr("pointer-events","all");this.addOnMouseMoveEvent(d,i,n,r,a,s,l),this.addOnMouseOutEvent(d,r,a,s,l)}addOnMouseMoveEvent(t,i,n,r,a,s,l){t.on("mousemove",d=>{let c=om(d)[0],h=Math.round(i.invert(c-this.framePadding));h=Math.max(0,Math.min(h,100));let p=this.percentileToMetricValueMap.get(h),u=n(p)+this.framePadding,k=c<this.frameWidth/2?c+10:c-80,E=u<this.frameHeight/2?u+20:u-20;r.style("display","block").attr("x",k).attr("y",E).text(`Quantile: ${h}`).append("tspan").attr("x",k).attr("dy","1.2em").text(`Value: ${p}`),a.attr("x1",c).attr("x2",c).attr("y2",this.frameHeight).style("display","block"),s.attr("x1",c).attr("x2",c).attr("y1",u).attr("y2",this.frameHeight).style("display","block"),l.attr("x2",c).attr("y1",u).attr("y2",u).style("display","block")})}addOnMouseOutEvent(t,i,n,r,a){t.on("mouseout",()=>{i.style("display","none"),n.style("display","none"),r.style("display","none"),a.style("display","none")})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-color-range-diagram"]],hostAttrs:[1,"flex","justify-center"],inputs:{minValue:"minValue",maxValue:"maxValue",colorMetric:"colorMetric",values:"values",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",isAttributeDirectionInverted:"isAttributeDirectionInverted",diagramWidth:"diagramWidth",diagramHeight:"diagramHeight",showAxisLabels:"showAxisLabels"},features:[La],decls:1,vars:0,consts:[["id","cc-range-diagram-container"]],template:function(i,n){i&1&&ue(0,"div",0)},encapsulation:2,changeDetection:0})}}return e})();var X6=["minLabel"],K6=["maxLabel"],Q6=["currentLeftLabel"],Y6=["currentRightLabel"],Z6=["combinedCurrentLeftRightLabel"],Am=4,e3=(()=>{class e{constructor(t){this.changeDetector=t,this.hideMinLabel=!1,this.hideMaxLabel=!1,this.doLeftRightLabelOverlap=!1}ngAfterViewChecked(){this.updateLabelDisplays()}updateLabelDisplays(){let t=this.minLabel.nativeElement.getBoundingClientRect().width,i=this.currentLeftLabel.nativeElement.getBoundingClientRect().width;this.currentLeftLabelLeftPosition=this.sliderRangePosition.leftEnd-i/2;let n=this.currentRightLabel.nativeElement.getBoundingClientRect().width,r=this.sliderWidth-this.maxLabel.nativeElement.getBoundingClientRect().width;this.currentRightLabelLeftPosition=this.sliderRangePosition.rightStart-n/2,this.hideMinLabel=this.currentLeftLabelLeftPosition<=t+Am,this.hideMaxLabel=this.currentRightLabelLeftPosition+n+Am>=r;let a=this.currentLeftLabelLeftPosition+i;this.doLeftRightLabelOverlap=a+Am>=this.currentRightLabelLeftPosition;let s=(a+this.currentRightLabelLeftPosition)/2,l=this.combinedCurrentLeftRightLabel.nativeElement.getBoundingClientRect().width;this.combinedCurrentLeftRightLabelLeftPosition=s-l/2,this.changeDetector.detectChanges()}static{this.\u0275fac=function(i){return new(i||e)(te(pn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-range-slider-labels"]],viewQuery:function(i,n){if(i&1&&Pa(X6,5)(K6,5)(Q6,5)(Y6,5)(Z6,5),i&2){let r;pi(r=ui())&&(n.minLabel=r.first),pi(r=ui())&&(n.maxLabel=r.first),pi(r=ui())&&(n.currentLeftLabel=r.first),pi(r=ui())&&(n.currentRightLabel=r.first),pi(r=ui())&&(n.combinedCurrentLeftRightLabel=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",leftValueLabel:"leftValueLabel",rightValueLabel:"rightValueLabel",sliderRangePosition:"sliderRangePosition",sliderWidth:"sliderWidth"},decls:15,vars:26,consts:[["minLabel",""],["currentLeftLabel",""],["currentRightLabel",""],["combinedCurrentLeftRightLabel",""],["maxLabel",""],[1,"absolute","-top-6","leading-6","text-sm","text-base-content/60"]],template:function(i,n){i&1&&(w(0,"div",5,0),f(2),y(),w(3,"div",5,1),f(5),y(),w(6,"div",5,2),f(8),y(),w(9,"div",5,3),f(11),y(),w(12,"div",5,4),f(14),y()),i&2&&(Oe("left",0,"px")("visibility",n.hideMinLabel?"hidden":"visible"),m(2),he(" ",n.minValue,`
3464
+ v${-this.frameHeight}`).attr("fill","none").attr("stroke","#888").attr("stroke-width","1px")}drawAxes(t,i,n){t.append("g").attr("id","axis-x").attr("transform",`translate(${this.framePadding},${this.frameHeight})`).call(Xd(i).ticks(5)).attr("font-size","13px").attr("color","#888"),t.append("g").attr("id","axis-y").attr("transform",`translate(0,${this.framePadding})`).call(Kd(n).ticks(5).tickFormat(function(r){return r>=1e4?`${Jo(".0f")(r/1e3)}k`:r>=1e3?`${Jo(".1f")(r/1e3)}k`:r.toString()})).attr("font-size","13px").attr("color","#888")}createXScale(){return xr().domain(gl(this.percentileRanks,t=>t.x)).range([0,this.frameWidth-2*this.framePadding])}createYScale(){let t=[0,Ur(this.percentileRanks,n=>n.y)],i=[Ur(this.percentileRanks,n=>n.y),0];return xr().domain(this.isAttributeDirectionInverted?i:t).range([this.frameHeight-2*this.framePadding,0])}drawLabels(t){t.append("text").attr("id","y-label").attr("class","y label").attr("text-anchor","middle").attr("transform","rotate(-90)").attr("x",-this.frameHeight/2-this.frameMarginTop).attr("y",this.frameMarginLeft-this.yLabelXOffset).attr("fill","#888").text(`${this.colorMetric}`),t.append("text").attr("id","x-label").attr("class","x label").attr("text-anchor","middle").attr("x",this.frameWidth/2).attr("y",this.frameHeight+this.frameMarginTop+this.xLabelYOffset).attr("fill","#888").text(`Quantiles (% of ${this.colorMetric})`)}drawAreas(t,i){let n=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),r=i(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));t.append("rect").attr("class","left-area").attr("x",this.framePadding).attr("width",n).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor).style("fill-opacity","0.3"),t.append("rect").attr("class","middle-area").attr("x",n+this.framePadding).attr("width",r-n).attr("height",this.frameHeight).style("fill",this.middleColor).style("fill-opacity","0.3"),t.append("rect").attr("class","right-area").attr("x",r+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-r).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor).style("fill-opacity","0.3")}drawLine(t){t.append("path").attr("id","diagram-path").datum(this.percentileRanks).attr("fill","none").attr("stroke","#888").attr("stroke-width",1).attr("d",qm().curve(Tm).x(i=>this.createXScale()(i.x)).y(i=>this.createYScale()(i.y))).attr("transform",`translate(${this.framePadding}, ${this.framePadding})`)}calculatePercentileRanks(t){let i=[...t].sort((a,s)=>a-s),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r}calculateReversedPercentileRanks(t){let i=[...t].sort((a,s)=>s-a),n=i.length,r=[{x:0,y:i[0]}];for(let a=0;a<n;a++)a+1<n&&i[a+1]===i[a]||r.push({x:(a+1)/n*100,y:i[a]});return r.sort((a,s)=>a.x-s.x)}calculatePercentileFromMetricValue(t){if(t===this.minValue)return 0;if(t===this.maxValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y<t)i=n.x;else return i??0;return 100}calculateReversedPercentileFromMetricValue(t){if(t===this.maxValue)return 0;if(t===this.minValue)return 100;let i=null;for(let n of this.percentileRanks)if(n.y>t)i=n.x;else return i??0;return 100}addCrossHair(t,i,n){let r=t.append("text").attr("class","cross-tooltip").attr("fill","#000").attr("font-size","13px").style("display","none"),a=t.append("line").attr("class","dashed-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").attr("stroke-dasharray","4").style("display","none"),s=t.append("line").attr("class","straight-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),l=t.append("line").attr("class","horizontal-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),d=t.append("rect").attr("class","mouse-event-rect").attr("width",this.frameWidth).attr("height",this.frameHeight+this.frameMarginBottom/2).attr("fill","none").attr("pointer-events","all");this.addOnMouseMoveEvent(d,i,n,r,a,s,l),this.addOnMouseOutEvent(d,r,a,s,l)}addOnMouseMoveEvent(t,i,n,r,a,s,l){t.on("mousemove",d=>{let c=im(d)[0],h=Math.round(i.invert(c-this.framePadding));h=Math.max(0,Math.min(h,100));let p=this.percentileToMetricValueMap.get(h),u=n(p)+this.framePadding,k=c<this.frameWidth/2?c+10:c-80,E=u<this.frameHeight/2?u+20:u-20;r.style("display","block").attr("x",k).attr("y",E).text(`Quantile: ${h}`).append("tspan").attr("x",k).attr("dy","1.2em").text(`Value: ${p}`),a.attr("x1",c).attr("x2",c).attr("y2",this.frameHeight).style("display","block"),s.attr("x1",c).attr("x2",c).attr("y1",u).attr("y2",this.frameHeight).style("display","block"),l.attr("x2",c).attr("y1",u).attr("y2",u).style("display","block")})}addOnMouseOutEvent(t,i,n,r,a){t.on("mouseout",()=>{i.style("display","none"),n.style("display","none"),r.style("display","none"),a.style("display","none")})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-color-range-diagram"]],hostAttrs:[1,"flex","justify-center"],inputs:{minValue:"minValue",maxValue:"maxValue",colorMetric:"colorMetric",values:"values",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",isAttributeDirectionInverted:"isAttributeDirectionInverted",diagramWidth:"diagramWidth",diagramHeight:"diagramHeight",showAxisLabels:"showAxisLabels"},features:[Da],decls:1,vars:0,consts:[["id","cc-range-diagram-container"]],template:function(i,n){i&1&&ue(0,"div",0)},encapsulation:2,changeDetection:0})}}return e})();var X6=["minLabel"],K6=["maxLabel"],Q6=["currentLeftLabel"],Y6=["currentRightLabel"],Z6=["combinedCurrentLeftRightLabel"],Dm=4,e3=(()=>{class e{constructor(t){this.changeDetector=t,this.hideMinLabel=!1,this.hideMaxLabel=!1,this.doLeftRightLabelOverlap=!1}ngAfterViewChecked(){this.updateLabelDisplays()}updateLabelDisplays(){let t=this.minLabel.nativeElement.getBoundingClientRect().width,i=this.currentLeftLabel.nativeElement.getBoundingClientRect().width;this.currentLeftLabelLeftPosition=this.sliderRangePosition.leftEnd-i/2;let n=this.currentRightLabel.nativeElement.getBoundingClientRect().width,r=this.sliderWidth-this.maxLabel.nativeElement.getBoundingClientRect().width;this.currentRightLabelLeftPosition=this.sliderRangePosition.rightStart-n/2,this.hideMinLabel=this.currentLeftLabelLeftPosition<=t+Dm,this.hideMaxLabel=this.currentRightLabelLeftPosition+n+Dm>=r;let a=this.currentLeftLabelLeftPosition+i;this.doLeftRightLabelOverlap=a+Dm>=this.currentRightLabelLeftPosition;let s=(a+this.currentRightLabelLeftPosition)/2,l=this.combinedCurrentLeftRightLabel.nativeElement.getBoundingClientRect().width;this.combinedCurrentLeftRightLabelLeftPosition=s-l/2,this.changeDetector.detectChanges()}static{this.\u0275fac=function(i){return new(i||e)(te(pn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-range-slider-labels"]],viewQuery:function(i,n){if(i&1&&La(X6,5)(K6,5)(Q6,5)(Y6,5)(Z6,5),i&2){let r;pi(r=ui())&&(n.minLabel=r.first),pi(r=ui())&&(n.maxLabel=r.first),pi(r=ui())&&(n.currentLeftLabel=r.first),pi(r=ui())&&(n.currentRightLabel=r.first),pi(r=ui())&&(n.combinedCurrentLeftRightLabel=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",leftValueLabel:"leftValueLabel",rightValueLabel:"rightValueLabel",sliderRangePosition:"sliderRangePosition",sliderWidth:"sliderWidth"},decls:15,vars:26,consts:[["minLabel",""],["currentLeftLabel",""],["currentRightLabel",""],["combinedCurrentLeftRightLabel",""],["maxLabel",""],[1,"absolute","-top-6","leading-6","text-sm","text-base-content/60"]],template:function(i,n){i&1&&(w(0,"div",5,0),f(2),y(),w(3,"div",5,1),f(5),y(),w(6,"div",5,2),f(8),y(),w(9,"div",5,3),f(11),y(),w(12,"div",5,4),f(14),y()),i&2&&(Oe("left",0,"px")("visibility",n.hideMinLabel?"hidden":"visible"),m(2),he(" ",n.minValue,`
3457
3465
  `),m(),Oe("left",n.currentLeftLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"hidden":"visible"),m(2),he(" ",n.leftValueLabel,`
3458
3466
  `),m(),Oe("left",n.currentRightLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"hidden":"visible"),m(2),he(" ",n.rightValueLabel,`
3459
- `),m(),Oe("left",n.combinedCurrentLeftRightLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"visible":"hidden"),m(2),Yi(" ",n.leftValueLabel," - ",n.rightValueLabel,`
3467
+ `),m(),Oe("left",n.combinedCurrentLeftRightLabelLeftPosition,"px")("visibility",n.doLeftRightLabelOverlap?"visible":"hidden"),m(2),Qi(" ",n.leftValueLabel," - ",n.rightValueLabel,`
3460
3468
  `),m(),Oe("right",0,"px")("visibility",n.hideMaxLabel?"hidden":"visible"),m(2),he(" ",n.maxValue,`
3461
- `))},encapsulation:2,changeDetection:0})}}return e})();var yr=(e,o,t)=>Math.min(Math.max(e,o),t),t3=({minValue:e,maxValue:o,currentLeftValue:t,currentRightValue:i,sliderWidth:n})=>{let r=o-e;if(r<=0)return{leftEnd:n,rightStart:n};let a=(t-e)/r,s=(i-e)/r,l=yr(a*n,0,n),d=yr(s*n,l,n);return{leftEnd:l,rightStart:d}},J6=({thumbX:e,minValue:o,maxValue:t,sliderWidth:i})=>{let n=(t-o)/i,r=o+e*n;return Math.round(r)},i3=e=>n3(e,{lowerBound:0,upperBound:e.otherThumbX}),o3=e=>n3(e,{lowerBound:e.otherThumbX,upperBound:e.sliderWidth}),n3=({deltaX:e,thumbScreenX:o,thumbRadius:t,sliderBoundingClientRectX:i,sliderWidth:n,minValue:r,maxValue:a},{lowerBound:s,upperBound:l})=>{let d=o+e-i+t,c=yr(d,s,l);return{updatedThumbX:c,upcomingValue:J6({thumbX:c,minValue:r,maxValue:a,sliderWidth:n})}};var e8=["rangeSliderContainer"],t8=["leftThumb"],i8=["rightThumb"],r3=(()=>{class e{get segmentWidths(){let t=yr(this.sliderRangePosition.leftEnd,0,this.actualSliderWidth),i=yr(this.sliderRangePosition.rightStart,t,this.actualSliderWidth);return{left:t,middle:i-t,right:this.actualSliderWidth-i}}constructor(t){this.changeDetectorRef=t,this.sliderWidth=150,this.sliderRangePosition={leftEnd:0,rightStart:0},this.thumbRadius=7,this.actualSliderWidth=this.sliderWidth,this.currentlySliding=void 0,this.activeMouseMoveHandler=null,this.activeMouseUpHandler=null,this.handleLeftThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=i3({deltaX:i.movementX,thumbScreenX:this.leftThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.rightStart,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:n.updatedThumbX,rightStart:this.sliderRangePosition.rightStart},this.upcomingLeftValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newLeftValue:n.upcomingValue})},this.handleRightThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=o3({deltaX:i.movementX,thumbScreenX:this.rightThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.leftEnd,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:this.sliderRangePosition.leftEnd,rightStart:n.updatedThumbX},this.upcomingRightValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newRightValue:n.upcomingValue})}}ngOnChanges(t){t.sliderWidth&&(this.actualSliderWidth=this.sliderWidth),this.currentlySliding||(t.currentLeftValue&&(this.upcomingLeftValue=this.currentLeftValue),t.currentRightValue&&(this.upcomingRightValue=this.currentRightValue),this.updateSliderRangePosition())}ngAfterViewInit(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(t=>{let i=t.at(-1).contentRect.width;i>0&&i!==this.actualSliderWidth&&(this.actualSliderWidth=i,this.currentlySliding||this.updateSliderRangePosition(),this.changeDetectorRef.markForCheck())}),this.resizeObserver.observe(this.sliderContainer.nativeElement))}ngOnDestroy(){this.stopSliding(),this.resizeObserver?.disconnect()}setCurrentlySliding(t){switch(this.stopSliding(),this.currentlySliding=t,this.currentlySliding){case"leftThumb":this.activeMouseMoveHandler=this.handleLeftThumbMoved,this.rightThumb.nativeElement.style.zIndex="0",this.leftThumb.nativeElement.style.zIndex="1";break;case"rightThumb":this.activeMouseMoveHandler=this.handleRightThumbMoved,this.leftThumb.nativeElement.style.zIndex="0",this.rightThumb.nativeElement.style.zIndex="1";break;default:return}this.activeMouseUpHandler=()=>this.stopSliding(),document.addEventListener("mousemove",this.activeMouseMoveHandler),document.addEventListener("mouseup",this.activeMouseUpHandler)}stopSliding(){this.currentlySliding=void 0,this.activeMouseMoveHandler&&(document.removeEventListener("mousemove",this.activeMouseMoveHandler),this.activeMouseMoveHandler=null),this.activeMouseUpHandler&&(document.removeEventListener("mouseup",this.activeMouseUpHandler),this.activeMouseUpHandler=null)}handleLeftThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingLeftValue,this.minValue,this.upcomingRightValue);i===void 0||i===this.upcomingLeftValue||(t.preventDefault(),this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleRightThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingRightValue,this.upcomingLeftValue,this.maxValue);i===void 0||i===this.upcomingRightValue||(t.preventDefault(),this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}calculateValueFromKeyboard(t,i,n,r){let a;switch(t.key){case"ArrowLeft":case"ArrowDown":a=i-1;break;case"ArrowRight":case"ArrowUp":a=i+1;break;case"Home":a=n;break;case"End":a=r;break;default:return}return Math.max(n,Math.min(r,a))}handleCurrentLeftInputChanged(t){let i=rd(t,this.minValue,this.upcomingRightValue,this.upcomingLeftValue);i!==void 0&&(this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleCurrentRightInputChanged(t){let i=rd(t,this.upcomingLeftValue,this.maxValue,this.upcomingRightValue);i!==void 0&&(this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}updateSliderRangePosition(){this.sliderRangePosition=t3({minValue:this.minValue,maxValue:this.maxValue,currentLeftValue:this.upcomingLeftValue??this.currentLeftValue,currentRightValue:this.upcomingRightValue??this.currentRightValue,sliderWidth:this.actualSliderWidth})}abortSlidingWhenHidden(){return this.sliderContainer.nativeElement.getBoundingClientRect().width===0?(this.stopSliding(),!0):!1}static{this.\u0275fac=function(i){return new(i||e)(te(pn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-color-range-slider"]],viewQuery:function(i,n){if(i&1&&Pa(e8,5)(t8,5)(i8,5),i&2){let r;pi(r=ui())&&(n.sliderContainer=r.first),pi(r=ui())&&(n.leftThumb=r.first),pi(r=ui())&&(n.rightThumb=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",handleValueChange:"handleValueChange",sliderWidth:"sliderWidth"},features:[La],decls:15,vars:34,consts:[["rangeSliderContainer",""],["leftThumb",""],["rightThumb",""],[1,"flex","items-center","gap-2"],["type","number","aria-label","Lower color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"],[1,"flex","flex-1","mx-2","relative","leading-[48px]"],[1,"inline-block","border-b-4","border-solid"],["aria-hidden","true",1,"cursor-pointer","absolute","-top-1","rounded-full","border-[7px]","border-primary",3,"mousedown"],["type","range","step","1","aria-label","Lower color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],["type","range","step","1","aria-label","Upper color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],[3,"minValue","maxValue","leftValueLabel","rightValueLabel","sliderRangePosition","sliderWidth"],["type","number","aria-label","Upper color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"]],template:function(i,n){i&1&&(v(0,"div",3)(1,"input",4),W("input",function(a){return n.handleCurrentLeftInputChanged(a)}),b(),v(2,"div",5,0),F(4,"span",6)(5,"span",6)(6,"span",6),v(7,"div",7,1),W("mousedown",function(){return n.setCurrentlySliding("leftThumb")}),b(),v(9,"div",7,2),W("mousedown",function(){return n.setCurrentlySliding("rightThumb")}),b(),v(11,"input",8),W("keydown",function(a){return n.handleLeftThumbKeydown(a)}),b(),v(12,"input",9),W("keydown",function(a){return n.handleRightThumbKeydown(a)}),b(),F(13,"cc-range-slider-labels",10),b(),v(14,"input",11),W("input",function(a){return n.handleCurrentRightInputChanged(a)}),b()()),i&2&&(m(),L("value",n.currentLeftValue)("min",n.minValue)("max",n.upcomingRightValue),m(3),Oe("width",n.segmentWidths.left,"px")("border-bottom-color",n.leftColor),m(),Oe("width",n.segmentWidths.middle,"px")("border-bottom-color",n.middleColor),m(),Oe("width",n.segmentWidths.right,"px")("border-bottom-color",n.rightColor),m(),Oe("left",n.sliderRangePosition.leftEnd-n.thumbRadius,"px"),m(2),Oe("left",n.sliderRangePosition.rightStart-n.thumbRadius,"px"),m(2),L("min",n.minValue)("max",n.currentRightValue)("value",n.currentLeftValue),m(),L("min",n.currentLeftValue)("max",n.maxValue)("value",n.currentRightValue),m(),L("minValue",n.minValue)("maxValue",n.maxValue)("leftValueLabel",n.upcomingLeftValue)("rightValueLabel",n.upcomingRightValue)("sliderRangePosition",n.sliderRangePosition)("sliderWidth",n.actualSliderWidth),m(),L("value",n.currentRightValue)("min",n.upcomingLeftValue)("max",n.maxValue))},dependencies:[e3],encapsulation:2,changeDetection:0})}}return e})();var a3=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.metricsLensFacade=r,this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.sliderValues=R(this.metricsBarReadStore.metricColorRangeValues$,{initialValue:{values:[],min:0,max:0,from:0,to:0}}),this.sliderColors=R(this.metricsBarReadStore.metricColorRangeColors$,{initialValue:{leftColor:"#000",middleColor:"#000",rightColor:"#000"}}),this.isAttributeDirectionInversed=R(St([this.mapStateReadWindow.colorMetric$,this.metricsLensFacade.descriptors$]).pipe(ke(([a,s])=>s[a]?.direction===1)),{initialValue:!1}),this.pendingLeftValue=null,this.pendingRightValue=null,this.commitColorRange=Ni(()=>{let a={};this.pendingLeftValue!==null&&(a.from=this.pendingLeftValue),this.pendingRightValue!==null&&(a.to=this.pendingRightValue),this.pendingLeftValue=null,this.pendingRightValue=null,this.metricsBarWriteStore.setColorRange(a)},Vf),this.handleValueChange=({newLeftValue:a,newRightValue:s})=>{this.pendingLeftValue=a??this.pendingLeftValue,this.pendingRightValue=s??this.pendingRightValue,this.commitColorRange()}}ngOnDestroy(){this.commitColorRange.flush()}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(ht),te(Ye),te(jn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-range-section"]],hostAttrs:[1,"contents"],decls:7,vars:23,consts:[[1,"block",3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","handleValueChange","sliderWidth"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"truncate","text-xs","opacity-60"],[3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","colorMetric","values","isAttributeDirectionInverted","diagramWidth","diagramHeight","showAxisLabels"]],template:function(i,n){i&1&&(F(0,"cc-metric-color-range-slider",0),v(1,"div",1)(2,"span",2),f(3,"Distribution"),b(),v(4,"span",3),f(5),b()(),F(6,"cc-metric-color-range-diagram",4)),i&2&&(L("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("handleValueChange",n.handleValueChange)("sliderWidth",220),m(5),he("",n.colorMetric()," \xD7 quantile %"),m(),L("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("colorMetric",n.colorMetric())("values",n.sliderValues().values)("isAttributeDirectionInverted",n.isAttributeDirectionInversed())("diagramWidth",380)("diagramHeight",190)("showAxisLabels",!1))},dependencies:[r3,Jb],encapsulation:2,changeDetection:0})}}return e})();function o8(e,o){if(e&1){let t=xe();w(0,"button",6),K("click",function(){ae(t);let n=D();return se(n.resetThresholds())}),ue(1,"i",7),y()}}var s3=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.metricsBarReadStore=n,this.metricsBarWriteStore=r,this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.selectedColorMetricData=R(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.canResetThresholds=X(()=>!this.isDeltaState()&&this.colorMetric()!=="unary"),this.swatchGradient=X(()=>{let a=this.mapColors();return this.isDeltaState()?`linear-gradient(90deg, ${a.positiveDelta}, ${a.negativeDelta})`:`linear-gradient(90deg, ${a.positive}, ${a.neutral}, ${a.negative})`})}resetThresholds(){this.metricsBarWriteStore.setColorRange(dr(this.selectedColorMetricData()))}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(Te),te(ht),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-settings-header"]],hostAttrs:[1,"contents"],decls:8,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","min-w-0","items-center","gap-2"],[1,"inline-block","h-3.5","w-3.5","shrink-0","rounded-full"],[1,"truncate","text-sm"],[1,"font-semibold","text-primary"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-undo"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1),ue(2,"span",2),w(3,"span",3),f(4,"Color by "),w(5,"span",4),f(6),y()()(),O(7,o8,2,0,"button",5),y()),i&2&&(m(2),Oe("background",n.swatchGradient()),m(4),qe(n.colorMetric()),m(),z(n.canResetThresholds()?7:-1))},encapsulation:2,changeDetection:0})}}return e})();var l3=(()=>{class e{constructor(){this.override=$.required(),this.recolorOverride=Ce(),this.unpinOverride=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-folder-override-row"]],hostAttrs:[1,"contents"],inputs:{override:[1,"override"]},outputs:{recolorOverride:"recolorOverride",unpinOverride:"unpinOverride"},decls:8,vars:7,consts:[[1,"flex","shrink-0","items-center","gap-2","rounded-md","border","border-base-300","px-2","py-1",3,"title"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums",3,"title"],[1,"btn","btn-ghost","btn-xs","btn-square",3,"click","title"],[1,"fa","fa-times"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"cc-inline-color-picker",1),W("colorChange",function(a){return n.recolorOverride.emit(a)}),b(),v(2,"span",2),f(3),b(),v(4,"span",3),f(5),b(),v(6,"button",4),W("click",function(){return n.unpinOverride.emit()}),F(7,"i",5),b()()),i&2&&(L("title",n.override().path),m(),L("hexColor",n.override().color)("ariaLabel","Recolor "+n.override().path),m(2),qe(n.override().path),m(),L("title",n.override().fileCount+" files"),m(),qe(n.override().fileCount),m(),L("title","Unpin "+n.override().path))},dependencies:[ho],encapsulation:2,changeDetection:0})}}return e})();var n8=["pinInput"];function r8(e,o){if(e&1){let t=xe();w(0,"button",2),K("click",function(){ae(t);let n=D();return se(n.startPinning())}),ue(1,"i",3),w(2,"span"),f(3,"Pin a folder color\u2026"),y()()}}function a8(e,o){if(e&1){let t=xe();w(0,"li",8)(1,"button",10),K("mousedown",function(n){return n.preventDefault()})("click",function(){let n=ae(t).$implicit,r=D(2);return se(r.handlePin(n))}),w(2,"span",11),f(3),y()()()}if(e&2){let t=o.$implicit;m(),le("title",t),m(2),qe(t)}}function s8(e,o){e&1&&(w(0,"li",9),f(1,"No folders found"),y())}function l8(e,o){if(e&1){let t=xe();w(0,"div",4),ue(1,"i",5),w(2,"input",6,0),K("input",function(n){ae(t);let r=D();return se(r.handleSearchTermChange(n.target.value))})("keydown.escape",function(n){ae(t);let r=D();return se(r.handleSearchEscape(n))})("blur",function(){ae(t);let n=D();return se(n.handleSearchBlur())}),y()(),w(4,"ul",7),Ae(5,a8,4,2,"li",8,ti,!1,s8,2,0,"li",9),y()}if(e&2){let t=D();m(2),le("value",t.searchTerm()),m(3),Le(t.folderSuggestions())}}var c8=8,c3=(()=>{class e{constructor(t){this.metricsBarReadStore=t,this.pinFolder=Ce(),this.folderPaths=R(this.metricsBarReadStore.markableFolderPaths$,{initialValue:[]}),this.overrides=R(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.isPinning=be(!1),this.searchTerm=be(""),this.pinInput=je("pinInput"),this.folderSuggestions=X(()=>{let i=this.searchTerm().toLowerCase(),n=new Set(this.overrides().map(a=>a.path)),r=[];for(let a of this.folderPaths())if(!(n.has(a)||!a.toLowerCase().includes(i))&&(r.push(a),r.length>=c8))break;return r})}startPinning(){this.isPinning.set(!0),setTimeout(()=>this.pinInput()?.nativeElement.focus())}stopPinning(){this.isPinning.set(!1),this.searchTerm.set("")}handleSearchTermChange(t){this.searchTerm.set(t)}handleSearchBlur(){this.searchTerm().trim()===""&&this.stopPinning()}handleSearchEscape(t){t.preventDefault(),this.stopPinning()}handlePin(t){this.pinFolder.emit(t),this.stopPinning()}static{this.\u0275fac=function(i){return new(i||e)(te(ht))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-pin-folder-search"]],viewQuery:function(i,n){i&1&&it(n.pinInput,n8,5),i&2&&ot()},hostAttrs:[1,"contents"],outputs:{pinFolder:"pinFolder"},decls:2,vars:1,consts:[["pinInput",""],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal"],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal",3,"click"],[1,"fa","fa-plus"],[1,"input","input-sm","input-bordered","flex","items-center","gap-2"],[1,"fa","fa-search","opacity-60"],["type","text","placeholder","Search folders\u2026","aria-label","Search folders",1,"grow",3,"input","keydown.escape","blur","value"],[1,"m-0","flex","max-h-40","list-none","flex-col","overflow-y-auto","p-0"],[1,"flex"],[1,"px-2","py-1","text-xs","opacity-60"],[1,"btn","btn-ghost","btn-xs","w-full","flex-nowrap","justify-start","font-normal",3,"mousedown","click","title"],[1,"min-w-0","truncate"]],template:function(i,n){i&1&&O(0,r8,4,0,"button",1)(1,l8,8,2),i&2&&z(n.isPinning()?1:0)},encapsulation:2,changeDetection:0})}}return e})();var d8=(e,o)=>o.path;function m8(e,o){if(e&1&&(v(0,"span",2),f(1),b()),e&2){let t=D();m(),he("",t.overrides().length," pinned")}}function h8(e,o){if(e&1){let t=xe();v(0,"cc-folder-override-row",7),W("recolorOverride",function(n){let r=ae(t).$implicit,a=D(2);return se(a.handleRecolor(r.path,n))})("unpinOverride",function(){let n=ae(t).$implicit,r=D(2);return se(r.handleUnpin(n.path))}),b()}if(e&2){let t=o.$implicit;L("override",t)}}function p8(e,o){if(e&1&&(v(0,"div",4),Ae(1,h8,1,1,"cc-folder-override-row",6,d8),b()),e&2){let t=D();m(),Le(t.overrides())}}var d3=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.overrides=R(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt})}handlePin(t){this.metricsBarWriteStore.markPackage({path:t,color:this.nextMarkingColor(t)})}handleRecolor(t,i){this.metricsBarWriteStore.markPackage({path:t,color:i})}handleUnpin(t){this.metricsBarWriteStore.unmarkPackage(t)}nextMarkingColor(t){let i=this.mapColors().markingColors,n=this.findMarkedParentColor(t),r=i.filter(s=>s!==n);if(r.length===0)return i[0];let a=new Set(this.overrides().map(s=>s.color));return r.find(s=>!a.has(s))??r[this.overrides().length%r.length]}findMarkedParentColor(t){let i,n=0;for(let r of this.overrides())t.startsWith(`${r.path}/`)&&r.path.length>n&&(i=r.color,n=r.path.length);return i}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(ht),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-folder-overrides"]],hostAttrs:[1,"contents"],decls:8,vars:2,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"text-xs","opacity-60"],[1,"m-0","text-xs","opacity-60"],[1,"flex","max-h-36","flex-col","gap-0.5","overflow-y-auto"],[3,"pinFolder"],[3,"override"],[3,"recolorOverride","unpinOverride","override"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Folder Overrides"),b(),O(3,m8,2,1,"span",2),b(),v(4,"p",3),f(5,"These folders\u2019 floors are tinted with the pinned color."),b(),O(6,p8,3,0,"div",4),v(7,"cc-pin-folder-search",5),W("pinFolder",function(a){return n.handlePin(a)}),b()),i&2&&(m(3),z(n.overrides().length>0?3:-1),m(3),z(n.overrides().length>0?6:-1))},dependencies:[l3,c3],encapsulation:2,changeDetection:0})}}return e})();var m3=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.metricsBarWriteStore=i,this.groupName=$.required(),this.colorMode=R(this.mapStateReadWindow.colorMode$,{initialValue:"absolute"})}handleColorModeChange(t){this.metricsBarWriteStore.setColorMode(t)}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-gradient-mode-picker"]],hostAttrs:[1,"contents"],inputs:{groupName:[1,"groupName"]},decls:8,vars:8,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["role","radiogroup","aria-label","Gradient mode",1,"join","w-full"],["type","radio","aria-label","Absolute",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Focused",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Weighted",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Relative",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"span",1),f(2,"Gradient Mode"),y(),w(3,"div",2)(4,"input",3),K("change",function(){return n.handleColorModeChange("absolute")}),y(),w(5,"input",4),K("change",function(){return n.handleColorModeChange("focusedGradient")}),y(),w(6,"input",5),K("change",function(){return n.handleColorModeChange("weightedGradient")}),y(),w(7,"input",6),K("change",function(){return n.handleColorModeChange("trueGradient")}),y()()()),i&2&&(m(4),le("name",n.groupName())("checked",n.colorMode()==="absolute"),m(),le("name",n.groupName())("checked",n.colorMode()==="focusedGradient"),m(),le("name",n.groupName())("checked",n.colorMode()==="weightedGradient"),m(),le("name",n.groupName())("checked",n.colorMode()==="trueGradient"))},encapsulation:2,changeDetection:0})}}return e})();function u8(e,o){if(e&1){let t=xe();v(0,"label",1)(1,"input",3),W("change",function(){ae(t);let n=D();return se(n.handleIsColorRangeInvertedChange())}),b(),v(2,"span",4),f(3,"Invert colors"),b()()}if(e&2){let t=D();m(),L("checked",t.isColorRangeInverted())}}function f8(e,o){if(e&1){let t=xe();v(0,"label",1)(1,"input",3),W("change",function(){ae(t);let n=D();return se(n.handleAreDeltaColorsInvertedChange())}),b(),v(2,"span",4),f(3,"Invert colors"),b()()}if(e&2){let t=D();m(),L("checked",t.areDeltaColorsInverted())}}var h3=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.mapStateReadWindow=i,this.metricsBarWriteStore=n,this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.isColorRangeInverted=X(()=>this.mapColors().isColorRangeInverted??!1),this.areDeltaColorsInverted=X(()=>this.mapColors().areDeltaColorsInverted??!1)}handleIsColorRangeInvertedChange(){this.metricsBarWriteStore.invertColorRange()}handleAreDeltaColorsInvertedChange(){this.metricsBarWriteStore.invertDeltaColors()}resetColorsKeys(){return this.isDeltaState()?["mapState.mapColors.positiveDelta","mapState.mapColors.negativeDelta","mapState.mapColors.selected","mapState.mapColors.areDeltaColorsInverted"]:["mapState.mapColors.positive","mapState.mapColors.negative","mapState.mapColors.neutral","mapState.mapColors.selected","mapState.mapColors.isColorRangeInverted","mapState.colorMode"]}static{this.\u0275fac=function(i){return new(i||e)(te(Te),te(ve),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-invert-reset-row"]],hostAttrs:[1,"contents"],decls:4,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","cursor-pointer","items-center","gap-2"],["label","Reset colors",3,"settingsKeys","tooltip","small"],["type","checkbox",1,"toggle","toggle-sm","toggle-primary",3,"change","checked"],[1,"text-sm"]],template:function(i,n){i&1&&(v(0,"div",0),O(1,u8,4,1,"label",1)(2,f8,4,1,"label",1),F(3,"cc-reset-settings-button",2),b()),i&2&&(m(),z(n.isDeltaState()?2:1),m(2),L("settingsKeys",n.resetColorsKeys())("tooltip",n.isDeltaState()?"Reset color values to default":"Reset color values and gradient mode to default")("small",!0))},dependencies:[po],encapsulation:2,changeDetection:0})}}return e})();function g8(e,o){if(e&1&&F(0,"cc-color-range-section")(1,"cc-gradient-mode-picker",1),e&2){let t=D();m(),L("groupName",t.popoverId()+"-gradient-mode")}}var Kl=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.popoverId=$.required(),this.anchorName=$.required(),this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasRangeSection=X(()=>!this.isDeltaState()&&this.colorMetric()!=="unary")}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(Te))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:6,vars:4,consts:[[3,"popoverId","anchorName","widthClass"],[3,"groupName"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",0),F(1,"cc-color-settings-header"),O(2,g8,2,1),F(3,"cc-color-bands-section")(4,"cc-invert-reset-row")(5,"cc-folder-overrides"),b()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName())("widthClass","max-w-[95vw] "+(n.hasRangeSection()?"w-[420px]":"w-80")),m(2),z(n.hasRangeSection()?2:-1))},dependencies:[Ot,s3,a3,m3,P1,h3,d3],encapsulation:2,changeDetection:0})}}return e})();var p3=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.preferencesReadWindow=i,this.metricsBarWriteStore=n,this.searchPopoverId="metric-select-popover-color",this.searchAnchorName="metric-segment-color",this.settingsPopoverId="metric-settings-popover-color",this.settingsAnchorName="metric-segment-color-cog",this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isLinked=R(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1})}handleMetricSelected(t){this.metricsBarWriteStore.setColorMetric(t)}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(Zn),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-segment"]],hostAttrs:[1,"contents"],decls:5,vars:14,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","disabled","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],["metricFor","colorMetric"],["placeholder","Color Metric (highest value)","kind","node",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(v(0,"cc-axis-card",0)(1,"div",1),F(2,"cc-metric-meta-value",2),b()(),v(3,"cc-metric-select-popover",3),W("metricSelected",function(a){return n.handleMetricSelected(a)}),b(),F(4,"cc-color-settings-popover",4)),i&2&&(L("metricName",n.colorMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("disabled",n.isLinked())("testId","metric-segment-color")("cogTestId","metric-segment-color-cog"),m(3),L("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.colorMetric()),m(),L("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[co,fr,ul,Kl],encapsulation:2,changeDetection:0})}}return e})();var u3=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.isEdgeMetricVisible=R(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0})}toggle(){this.metricsBarWriteStore.toggleEdgeMetricVisible()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-edge-metric-toggle"]],decls:4,vars:1,consts:[[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(w(0,"label",0)(1,"input",1),K("change",function(){return n.toggle()}),y(),w(2,"span"),f(3,"Disable edge metric"),y()()),i&2&&(m(),le("checked",!n.isEdgeMetricVisible()))},encapsulation:2,changeDetection:0})}}return e})();var f3=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.metricsBarReadStore=q(ht),this.metricsBarWriteStore=q(Ye),this.popoverId=$.required(),this.anchorName=$.required(),this.amountOfBuildingsWithSelectedEdgeMetric=R(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$,{initialValue:0}),this.edgePreviewLabel=R(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$.pipe(ke(t=>`Preview the edges of up to ${t} buildings with the highest amount of incoming and outgoing edges`)),{initialValue:""}),this.amountOfEdgePreviews=R(this.mapStateReadWindow.amountOfEdgePreviews$,{initialValue:0}),this.edgeHeight=R(this.mapStateReadWindow.edgeHeight$,{initialValue:1}),this.showOutgoingEdges=R(this.mapStateReadWindow.showOutgoingEdges$,{initialValue:!1}),this.showIncomingEdges=R(this.mapStateReadWindow.showIncomingEdges$,{initialValue:!1}),this.showOnlyBuildingsWithEdges=R(this.mapStateReadWindow.showOnlyBuildingsWithEdges$,{initialValue:!1}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.outgoingEdgeColor=X(()=>this.mapColors().outgoingEdge),this.incomingEdgeColor=X(()=>this.mapColors().incomingEdge),this.resetKeys=["mapState.amountOfEdgePreviews","mapState.edgeHeight","mapState.mapColors.outgoingEdge","mapState.showOutgoingEdges","mapState.mapColors.incomingEdge","mapState.showIncomingEdges","mapState.showOnlyBuildingsWithEdges","mapState.isEdgeMetricVisible"]}setAmountOfEdgePreviews(t){this.metricsBarWriteStore.setAmountOfEdgePreviews(t)}setEdgeHeight(t){this.metricsBarWriteStore.setEdgeHeight(t)}setShowOutgoingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOutgoingEdges(i)}setShowIncomingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowIncomingEdges(i)}setShowOnlyBuildingsWithEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOnlyBuildingsWithEdges(i)}setMapColor(t,i){this.metricsBarWriteStore.setMapColors({[t]:i})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-edge-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:32,vars:18,consts:[["widthClass","w-80",3,"popoverId","anchorName"],[3,"title"],[1,"text-sm"],["ariaLabel","Edge preview amount",3,"valueChange","min","max","value","disabled"],["title","Adjust the curve height"],["ariaLabel","Edge height",3,"valueChange","min","max","value","disabled"],[1,"flex","flex-col","gap-2"],[1,"flex","items-center","gap-2"],["ariaLabel","Outgoing edge color",3,"colorChange","hexColor"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["ariaLabel","Incoming edge color",3,"colorChange","hexColor"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["tooltip","Reset edge metric settings to their defaults","label","Reset edge metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),f(3,"Preview"),b(),v(4,"cc-slider-number-input",3),W("valueChange",function(a){return n.setAmountOfEdgePreviews(a)}),b()(),v(5,"div",4)(6,"span",2),f(7,"Height"),b(),v(8,"cc-slider-number-input",5),W("valueChange",function(a){return n.setEdgeHeight(a)}),b()(),v(9,"div",6)(10,"div",7)(11,"cc-inline-color-picker",8),W("colorChange",function(a){return n.setMapColor("outgoingEdge",a)}),b(),v(12,"span",9),f(13,"Outgoing Edge"),b(),v(14,"label",10)(15,"input",11),W("change",function(a){return n.setShowOutgoingEdges(a)}),b(),v(16,"span"),f(17,"Show"),b()()(),v(18,"div",7)(19,"cc-inline-color-picker",12),W("colorChange",function(a){return n.setMapColor("incomingEdge",a)}),b(),v(20,"span",9),f(21,"Incoming Edge"),b(),v(22,"label",10)(23,"input",11),W("change",function(a){return n.setShowIncomingEdges(a)}),b(),v(24,"span"),f(25,"Show"),b()()()(),v(26,"label",10)(27,"input",13),W("change",function(a){return n.setShowOnlyBuildingsWithEdges(a)}),b(),v(28,"span"),f(29,"Only show nodes with edges"),b()(),F(30,"cc-edge-metric-toggle")(31,"cc-reset-settings-button",14),b()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName()),m(),L("title",n.edgePreviewLabel()),m(3),L("min",0)("max",n.amountOfBuildingsWithSelectedEdgeMetric())("value",n.amountOfEdgePreviews())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),m(4),L("min",1)("max",9)("value",n.edgeHeight())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),m(3),L("hexColor",n.outgoingEdgeColor()),m(4),L("checked",n.showOutgoingEdges()),m(4),L("hexColor",n.incomingEdgeColor()),m(4),L("checked",n.showIncomingEdges()),m(4),L("checked",n.showOnlyBuildingsWithEdges())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),m(4),L("settingsKeys",n.resetKeys))},dependencies:[ho,po,u3,Ot,nr],encapsulation:2,changeDetection:0})}}return e})();function b8(e,o){e&1&&(F(0,"cc-metric-chooser-type",5),v(1,"span"),f(2),b()),e&2&&(L("metricFor","edgeMetric"),m(2),qe(o))}function v8(e,o){e&1&&(v(0,"span",2),f(1,"\xA0"),b())}var b3=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.nodeSelectionService=q(ur),this.searchPopoverId="metric-select-popover-edge",this.searchAnchorName="metric-segment-edges",this.settingsPopoverId="metric-settings-popover-edge",this.settingsAnchorName="metric-segment-edges-cog",this.edgeMetric=R(this.mapStateReadWindow.edgeMetric$,{initialValue:""}),this.isEdgeMetricVisible=R(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0}),this.hoveredNode=R(this.nodeSelectionService.createNodeObservable()),this.hoveredEdgeValue=X(()=>{let t=this.hoveredNode(),i=this.edgeMetric();if(!t||!i)return null;let n=t.edgeAttributes?.[i];return n?`${g3(n.incoming)} / ${g3(n.outgoing)}`:null})}handleMetricSelected(t){this.metricsBarWriteStore.setEdgeMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-edge-segment"]],hostAttrs:[1,"contents"],decls:6,vars:15,consts:[["label","Edges",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","dimmed","testId","cogTestId"],["body","",1,"flex","items-center","justify-center","gap-1","text-xs","opacity-60","leading-tight","min-h-4"],["aria-hidden","true"],["placeholder","Edge Metric (highest value)","kind","edge",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"],["attributeType","edges",3,"metricFor"]],template:function(i,n){if(i&1&&(v(0,"cc-axis-card",0)(1,"div",1),O(2,b8,3,2)(3,v8,2,0,"span",2),b()(),v(4,"cc-metric-select-popover",3),W("metricSelected",function(a){return n.handleMetricSelected(a)}),b(),F(5,"cc-edge-settings-popover",4)),i&2){let r;L("metricName",n.edgeMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("dimmed",!n.isEdgeMetricVisible())("testId","metric-segment-edges")("cogTestId","metric-segment-edges-cog"),m(2),z((r=n.hoveredEdgeValue())?2:3,r),m(2),L("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.edgeMetric()),m(),L("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName)}},dependencies:[co,pl,fr,f3],encapsulation:2,changeDetection:0})}}return e})();function g3(e){return typeof e=="number"?e.toLocaleString():"-"}function x8(e,o){if(e&1){let t=xe();v(0,"label",4)(1,"input",6),W("change",function(n){ae(t);let r=D();return se(r.toggleInvertHeight(n))}),b(),v(2,"span"),f(3,"Invert Height"),b()()}if(e&2){let t=D();m(),L("checked",t.invertHeight())}}var v3=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.fileStoreReadWindow=q(Te),this.metricsBarWriteStore=q(Ye),this.popoverId=$.required(),this.anchorName=$.required(),this.scalingY=R(this.mapStateReadWindow.scaling$,{initialValue:{x:1,y:1,z:1}}),this.invertHeight=R(this.mapStateReadWindow.invertHeight$,{initialValue:!1}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.resetKeys=["mapState.scaling.y","mapState.invertHeight"]}setScalingY(t){this.metricsBarWriteStore.setScaling({y:t})}toggleInvertHeight(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertHeight(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-height-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:7,vars:7,consts:[[3,"popoverId","anchorName"],["title","Height scaling"],[1,"text-sm"],["ariaLabel","Height",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["tooltip","Reset height metric settings to their defaults","label","Reset height metric settings",3,"settingsKeys"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),f(3,"Height"),b(),v(4,"cc-slider-number-input",3),W("valueChange",function(a){return n.setScalingY(a)}),b()(),O(5,x8,4,1,"label",4),F(6,"cc-reset-settings-button",5),b()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName()),m(4),L("min",1)("max",25)("value",n.scalingY().y),m(),z(n.isDeltaState()?-1:5),m(),L("settingsKeys",n.resetKeys))},dependencies:[po,Ot,nr],encapsulation:2,changeDetection:0})}}return e})();var x3=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-height",this.searchAnchorName="metric-segment-height",this.settingsPopoverId="metric-settings-popover-height",this.settingsAnchorName="metric-segment-height-cog",this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.heightMetric=R(this.mapStateReadWindow.heightMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setHeightMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-height-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Height","metricFor","heightMetric","placeholder","Height Metric (highest value)","testIdPrefix","metric-segment-height",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(v(0,"cc-metric-segment",0),W("metricSelected",function(a){return n.handleMetricSelected(a)}),F(1,"cc-height-settings-popover",1),b()),i&2&&(L("metricName",n.heightMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),m(),L("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[fl,v3],encapsulation:2,changeDetection:0})}}return e})();var Tt={areaMetric:{group:"area",label:"Area metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.areaMetric,patch:e=>({mapState:{areaMetric:e.areaMetric}})},margin:{group:"area",label:"Margin",read:e=>e.state.mapState.margin,patch:e=>({mapState:{margin:e.margin}})},invertArea:{group:"area",label:"Invert area",read:e=>e.state.mapState.invertArea,patch:e=>({mapState:{invertArea:e.invertArea}})},enableFloorLabels:{group:"area",label:"Floor labels",read:e=>e.state.mapState.enableFloorLabels,patch:e=>({mapState:{enableFloorLabels:e.enableFloorLabels}})},heightMetric:{group:"height",label:"Height metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.heightMetric,patch:e=>({mapState:{heightMetric:e.heightMetric}})},heightScaling:{group:"height",label:"Height scaling",read:e=>e.state.mapState.scaling.y,patch:e=>({mapState:{scaling:{y:e.heightScaling}}})},invertHeight:{group:"height",label:"Invert height",read:e=>e.state.mapState.invertHeight,patch:e=>({mapState:{invertHeight:e.invertHeight}})},colorMetric:{group:"color",label:"Color metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.colorMetric,patch:e=>({mapState:{colorMetric:e.colorMetric}})},isColorMetricLinkedToHeightMetric:{group:"color",label:"Color follows height metric",isAppliedFirst:!0,read:e=>e.state.preferences.isColorMetricLinkedToHeightMetric,patch:e=>({preferences:{isColorMetricLinkedToHeightMetric:e.isColorMetricLinkedToHeightMetric}})},colorRange:{group:"color",label:"Color range",read:e=>Ee({},e.state.mapState.colorRange),patch:e=>({mapState:{colorRange:e.colorRange}})},colorMode:{group:"color",label:"Gradient mode",read:e=>e.state.mapState.colorMode,patch:e=>({mapState:{colorMode:e.colorMode}})},mapColors:{group:"color",label:"Colors",read:e=>w8(e.state.mapState.mapColors),patch:e=>({mapState:{mapColors:e.mapColors}})},markedPackages:{group:"color",label:"Folder color overrides",read:e=>[...e.state.sharedView.markedPackages],patch:e=>({sharedView:{markedPackages:[...e.markedPackages]}})},edgeMetric:{group:"edge",label:"Edge metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.edgeMetric,patch:e=>({mapState:{edgeMetric:e.edgeMetric}})},isEdgeMetricVisible:{group:"edge",label:"Edge metric enabled",read:e=>e.state.mapState.isEdgeMetricVisible,patch:e=>({mapState:{isEdgeMetricVisible:e.isEdgeMetricVisible}})},amountOfEdgePreviews:{group:"edge",label:"Edge previews",read:e=>e.state.mapState.amountOfEdgePreviews,patch:e=>({mapState:{amountOfEdgePreviews:e.amountOfEdgePreviews}})},edgeHeight:{group:"edge",label:"Edge curve height",read:e=>e.state.mapState.edgeHeight,patch:e=>({mapState:{edgeHeight:e.edgeHeight}})},showOutgoingEdges:{group:"edge",label:"Show outgoing edges",read:e=>e.state.mapState.showOutgoingEdges,patch:e=>({mapState:{showOutgoingEdges:e.showOutgoingEdges}})},showIncomingEdges:{group:"edge",label:"Show incoming edges",read:e=>e.state.mapState.showIncomingEdges,patch:e=>({mapState:{showIncomingEdges:e.showIncomingEdges}})},showOnlyBuildingsWithEdges:{group:"edge",label:"Only nodes with edges",read:e=>e.state.mapState.showOnlyBuildingsWithEdges,patch:e=>({mapState:{showOnlyBuildingsWithEdges:e.showOnlyBuildingsWithEdges}})},edgeColors:{group:"edge",label:"Edge colors",read:e=>({outgoingEdge:e.state.mapState.mapColors.outgoingEdge,incomingEdge:e.state.mapState.mapColors.incomingEdge}),patch:e=>({mapState:{mapColors:Ee({},e.edgeColors)}})},amountOfTopLabels:{group:"labels",label:"Top labels",read:e=>e.state.mapState.amountOfTopLabels,patch:e=>({mapState:{amountOfTopLabels:e.amountOfTopLabels}})},labelsPerMap:{group:"labels",label:"Top labels scope",read:e=>e.state.mapState.labelsPerMap,patch:e=>({mapState:{labelsPerMap:e.labelsPerMap}})},labelSize:{group:"labels",label:"Label size",read:e=>e.state.mapState.labelSize,patch:e=>({mapState:{labelSize:e.labelSize}})},labelMode:{group:"labels",label:"Label mode",read:e=>e.state.mapState.labelMode,patch:e=>({mapState:{labelMode:e.labelMode}})},showMetricLabelNodeName:{group:"labels",label:"Show node names",read:e=>e.state.mapState.showMetricLabelNodeName,patch:e=>({mapState:{showMetricLabelNodeName:e.showMetricLabelNodeName}})},showMetricLabelNameValue:{group:"labels",label:"Show metric values",read:e=>e.state.mapState.showMetricLabelNameValue,patch:e=>({mapState:{showMetricLabelNameValue:e.showMetricLabelNameValue}})},groupLabelCollisions:{group:"labels",label:"Group overlapping labels",read:e=>e.state.mapState.groupLabelCollisions,patch:e=>({mapState:{groupLabelCollisions:e.groupLabelCollisions}})},colorLabels:{group:"labels",label:"Labels by color metric",read:e=>Ee({},e.state.mapState.colorLabels),patch:e=>({mapState:{colorLabels:e.colorLabels}})},camera:{group:"camera",label:"Position and zoom",read:e=>({position:Ee({},e.camera.position),target:Ee({},e.camera.target)})},blacklist:{group:"filters",label:"Excluded and hidden nodes",read:e=>[...e.state.sharedView.blacklist],patch:e=>({sharedView:{blacklist:[...e.blacklist]}})},metricRules:{group:"filters",label:"Flattened and hidden by metric",read:e=>[...e.state.sharedView.metricRules],patch:e=>({sharedView:{metricRules:[...e.metricRules]}})},focusedNodePath:{group:"filters",label:"Focused folder",read:e=>[...e.state.sharedView.focusedNodePath],patch:e=>({sharedView:{focusedNodePath:[...e.focusedNodePath]}})}};function w8(e){let n=e,{outgoingEdge:o,incomingEdge:t}=n;return Dr(n,["outgoingEdge","incomingEdge"])}var tn=Object.keys(Tt),pa={area:"Area",height:"Height",color:"Color",edge:"Edges",labels:"Labels",camera:"Camera",filters:"Filters"},Ql=Object.keys(pa),Yl={area:"fa-th-large",height:"fa-bar-chart",color:"fa-paint-brush",edge:"fa-share-alt",labels:"fa-tags",camera:"fa-video-camera",filters:"fa-filter"};function Lm(e){return!!Tt[e].isMetricSelection}var kU=tn.filter(Lm);function Fm(e){return!!Tt[e].isAppliedFirst}function w3(e,o){return Object.fromEntries(Object.entries(e).filter(([t])=>o.has(t)))}function S3(e,o){let t={};for(let i of tn){if(!o.has(i))continue;let n=Tt[i].read(e);n!==void 0&&(t[i]=n)}return t}var Zl=".ccscenario",Jl=2;function Pm(e){return tn.filter(o=>e.settings[o]!==void 0)}function y3(e){let o=new Set(Pm(e).map(t=>Tt[t].group));return Ql.filter(t=>o.has(t))}function C3(e){return tt(Ee(Ee({schemaVersion:Jl,name:e.name},e.description?{description:e.description}:{}),e.mapFileNames?.length>0?{mapFileNames:e.mapFileNames}:{}),{settings:e.settings})}function M3(e){return{id:crypto.randomUUID(),name:e.name,description:e.description,mapFileNames:e.mapFileNames,createdAt:Date.now(),settings:e.settings}}var E3=(e,o)=>o.key;function S8(e,o){if(e&1){let t=xe();w(0,"label",8)(1,"input",12),K("change",function(n){let r=ae(t).$implicit,a=D(2);return se(a.toggleSetting(r.key,n.target.checked))}),y(),w(2,"span",13),f(3),y()()}if(e&2){let t=o.$implicit;m(),le("checked",t.selected),rt("data-testid","scenario-setting-"+t.key),m(2),qe(t.label)}}function y8(e,o){if(e&1){let t=xe();w(0,"div",7)(1,"label",8)(2,"input",9),K("change",function(n){let r=ae(t).$implicit,a=D();return se(a.toggleGroup(r,n.target.checked))}),y(),ue(3,"i"),w(4,"span",10),f(5),y()(),w(6,"div",11),Ae(7,S8,4,3,"label",8,E3),y()()}if(e&2){let t=o.$implicit;m(2),le("checked",t.allSelected)("indeterminate",t.someSelected&&!t.allSelected),rt("data-testid","scenario-group-"+t.key),m(),yt(hn("fa ",t.icon," w-4 text-center opacity-60")),m(2),qe(t.label),m(2),Le(t.settings)}}var ec=(()=>{class e{constructor(){this.availableKeys=$.required(),this.defaultKeys=$.required(),this.selectedKeys=op.required(),this.isDefaultSelection=X(()=>{let t=this.selectedKeys(),i=this.defaultKeys();return t.size===i.length&&i.every(n=>t.has(n))}),this.groups=X(()=>{let t=this.selectedKeys(),i=this.availableKeys();return Ql.map(n=>this.toPickerGroup(n,i,t)).filter(n=>n.settings.length>0)})}selectAll(){this.selectedKeys.set(new Set(this.availableKeys()))}selectNone(){this.selectedKeys.set(new Set)}resetSelection(){this.selectedKeys.set(new Set(this.defaultKeys()))}toggleSetting(t,i){this.selectedKeys.update(n=>_3(n,[t],i))}toggleGroup(t,i){this.selectedKeys.update(n=>_3(n,t.settings.map(r=>r.key),i))}toPickerGroup(t,i,n){let r=i.filter(a=>Tt[a].group===t).map(a=>({key:a,label:Tt[a].label,selected:n.has(a)}));return{key:t,label:pa[t],icon:Yl[t],settings:r,allSelected:r.length>0&&r.every(a=>a.selected),someSelected:r.some(a=>a.selected)}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-settings-picker"]],inputs:{availableKeys:[1,"availableKeys"],defaultKeys:[1,"defaultKeys"],selectedKeys:[1,"selectedKeys"]},outputs:{selectedKeys:"selectedKeysChange"},decls:13,vars:1,consts:[[1,"mb-1","flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wide","opacity-60"],[1,"join"],["type","button","data-testid","scenario-settings-select-all",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-select-none",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-reset",1,"btn","btn-xs","join-item",3,"click","disabled"],[1,"flex","flex-col","gap-2","max-h-64","overflow-y-auto","pr-1"],[1,"flex","flex-col","gap-1"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","indeterminate"],[1,"text-sm","font-semibold"],[1,"flex","flex-col","gap-0.5","pl-7"],["type","checkbox",1,"checkbox","checkbox-xs","checkbox-primary",3,"change","checked"],[1,"text-xs"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"span",1),f(2,"Toggle all"),y(),w(3,"div",2)(4,"button",3),K("click",function(){return n.selectAll()}),f(5," On "),y(),w(6,"button",4),K("click",function(){return n.selectNone()}),f(7," Off "),y(),w(8,"button",5),K("click",function(){return n.resetSelection()}),f(9," Reset "),y()()(),w(10,"div",6),Ae(11,y8,9,7,"div",7,E3),y()),i&2&&(m(8),le("disabled",n.isDefaultSelection()),m(3),Le(n.groups()))},encapsulation:2,changeDetection:0})}}return e})();function _3(e,o,t){let i=new Set(e);for(let n of o)t?i.add(n):i.delete(n);return i}function tc(e){return`${e} ${e===1?"setting":"settings"}`}var ic=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}getValue(){return this.ccStateSnapshot.get()}setStatePatch(t){this.store.dispatch(qi({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var C8=["areaMetric","heightMetric","colorMetric"],oc=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.threeRendererService=r}getAvailableMetricNames(t){return{nodeMetrics:new Set(t.nodeMetricData.map(i=>i.name)),edgeMetrics:new Set(t.edgeMetricData.map(i=>i.name))}}getMissingMetrics(t,i){let n=this.getAvailableMetricNames(i),r=C8.map(a=>t[a]).filter(a=>!!a);return{nodeMetrics:[...new Set(r.filter(a=>!n.nodeMetrics.has(a)))],edgeMetrics:t.edgeMetric&&!n.edgeMetrics.has(t.edgeMetric)?[t.edgeMetric]:[]}}hasMissingMetrics(t){return t.nodeMetrics.length>0||t.edgeMetrics.length>0}buildOrderedStatePatches(t,i,n){let r=this.getApplicableKeys(t,i,n);return[this.mergePatchesOf(t,r.filter(Fm)),this.mergePatchesOf(t,r.filter(a=>!Fm(a)))].filter(a=>Object.keys(a).length>0)}getCameraVectors(t){if(!t.camera)return;let{position:i,target:n}=t.camera;return{position:new Qe(i.x,i.y,i.z),target:new Qe(n.x,n.y,n.z)}}async applyScenario(t,i,n){od(!0);try{let r=i.has("camera")?this.getCameraVectors(t.settings):void 0,a=r!==void 0,s=this.buildOrderedStatePatches(t.settings,i,n),l=a&&s.length>0?this.scenariosStore.getValue().preferences.resetCameraIfNewFileIsLoaded:void 0;l&&s.length>0&&(s[0].preferences=tt(Ee({},s[0].preferences),{resetCameraIfNewFileIsLoaded:!1}));for(let d of s)this.scenariosStore.setStatePatch(d),await new Promise(c=>setTimeout(c));if(a&&this.threeCameraService.camera){let{position:d,target:c}=r;this.threeCameraService.camera.position.set(d.x,d.y,d.z),this.threeMapControlsService.setControlTarget(c),this.threeCameraService.camera.lookAt(c),this.threeCameraService.camera.updateProjectionMatrix(),this.threeMapControlsService.updateControls()}l&&setTimeout(()=>{this.scenariosStore.setStatePatch({preferences:{resetCameraIfNewFileIsLoaded:!0}})}),this.threeRendererService.render()}finally{od(!1)}}getApplicableKeys(t,i,n){let r=n?this.getAvailableMetricNames(n):void 0;return[...i].filter(a=>t[a]!==void 0&&Tt[a].patch!==void 0&&this.isMetricAvailable(a,t,r))}isMetricAvailable(t,i,n){if(!n||!Lm(t))return!0;let r=i[t]??"";return t==="edgeMetric"?r===""||n.edgeMetrics.has(r):n.nodeMetrics.has(r)}mergePatchesOf(t,i){let n={};for(let r of i){let a=Tt[r].patch;a&&(n=T3(n,a(t)))}return n}static{this.\u0275fac=function(i){return new(i||e)(M(ic),M(Yn),M(Wt),M(kt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function T3(e,o){let t=Ee({},e);for(let[i,n]of Object.entries(o)){let r=t[i];t[i]=q3(n)&&q3(r)?T3(Ee({},r),n):n}return t}function q3(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var M8=["dialog"];function _8(e,o){if(e&1&&(v(0,"div",4)(1,"span",13),F(2,"i",14),v(3,"span",15),f(4),b()()()),e&2){let t=D();m(),L("title",t.scenario().mapFileNames.join(", ")),m(3),qe(t.scenario().mapFileNames.join(", "))}}function E8(e,o){if(e&1&&(v(0,"li"),f(1),b()),e&2){let t=o.$implicit;m(),he("",t," (node metric)")}}function k8(e,o){if(e&1&&(v(0,"li"),f(1),b()),e&2){let t=o.$implicit;m(),he("",t," (edge metric)")}}function q8(e,o){if(e&1&&(v(0,"div",7),F(1,"i",16),v(2,"div")(3,"strong"),f(4,"Some metrics are not available in the current map and will not be applied:"),b(),v(5,"ul",17),Ae(6,E8,2,1,"li",null,ti),Ae(8,k8,2,1,"li",null,ti),b()()()),e&2){let t=D();m(6),Le(t.missingMetrics().nodeMetrics),m(2),Le(t.missingMetrics().edgeMetrics)}}var Nm=(()=>{class e{constructor(t){this.scenarioApplier=t,this.scenario=$.required(),this.metricData=$.required(),this.closed=Ce(),this.dialogElement=je.required("dialog"),this.availableKeys=X(()=>Pm(this.scenario())),this.defaultKeys=X(()=>this.availableKeys().filter(i=>Tt[i].group!=="camera")),this.selectedKeys=ip(()=>new Set(this.defaultKeys())),this.missingMetrics=X(()=>this.scenarioApplier.getMissingMetrics(w3(this.scenario().settings,this.selectedKeys()),this.metricData())),this.hasMissing=X(()=>this.scenarioApplier.hasMissingMetrics(this.missingMetrics())),this.hasAnySelected=X(()=>this.selectedKeys().size>0),this.applySelectedLabel=X(()=>`Apply ${tc(this.selectedKeys().size)}`),this.destroyRef=q(dn)}ngAfterViewInit(){let t=this.dialogElement().nativeElement,i=()=>this.closed.emit();t.addEventListener("close",i),this.destroyRef.onDestroy(()=>t.removeEventListener("close",i)),t.showModal()}async apply(){await this.applyKeys(this.selectedKeys())}async applyAll(){await this.applyKeys(new Set(this.availableKeys()))}async applyKeys(t){this.dialogElement().nativeElement.close(),await this.scenarioApplier.applyScenario(this.scenario(),t,this.metricData())}close(){this.dialogElement().nativeElement.close()}static{this.\u0275fac=function(i){return new(i||e)(te(oc))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-apply-scenario-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,M8,5),i&2&&ot()},inputs:{scenario:[1,"scenario"],metricData:[1,"metricData"]},outputs:{closed:"closed"},decls:20,vars:9,consts:[["dialog",""],["aria-labelledby","apply-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","apply-scenario-title",1,"text-xl","font-bold","mb-1","truncate",3,"title"],[1,"mb-3"],[1,"text-sm","text-base-content/60","mb-3"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"alert","alert-warning","mt-4","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["title","Apply everything this scenario holds, the camera included","data-testid","apply-scenario-all",1,"btn","btn-outline",3,"click"],["data-testid","apply-scenario-selected",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[1,"badge","badge-sm","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[1,"fa","fa-exclamation-triangle"],[1,"list-disc","pl-5","mt-1"]],template:function(i,n){if(i&1){let r=xe();v(0,"dialog",1,0)(2,"div",2)(3,"h2",3),f(4),b(),O(5,_8,5,2,"div",4),v(6,"p",5),f(7,"Select which settings to apply:"),b(),v(8,"cc-scenario-settings-picker",6),Va("selectedKeysChange",function(s){return ae(r),Ba(n.selectedKeys,s)||(n.selectedKeys=s),se(s)}),b(),O(9,q8,10,0,"div",7),v(10,"div",8)(11,"button",9),W("click",function(){return n.close()}),f(12,"Cancel"),b(),v(13,"button",10),W("click",function(){return n.applyAll()}),f(14," Apply all "),b(),v(15,"button",11),W("click",function(){return n.apply()}),f(16),b()()(),v(17,"form",12)(18,"button"),f(19,"close"),b()()()}if(i&2){let r;m(3),L("title","Apply: "+n.scenario().name),m(),he("Apply: ",n.scenario().name),m(),z((r=n.scenario().mapFileNames)!=null&&r.length?5:-1),m(3),L("availableKeys",n.availableKeys())("defaultKeys",n.defaultKeys()),Na("selectedKeys",n.selectedKeys),m(),z(n.hasMissing()?9:-1),m(6),L("disabled",!n.hasAnySelected()),m(),he(" ",n.applySelectedLabel()," ")}},dependencies:[mo,ir,er,tr,ec],encapsulation:2,changeDetection:0})}}return e})();function D3(e){return e.settings??T8(e.sections??{})}function A3(e){let i=e,{sections:o}=i,t=Dr(i,["sections"]);return tt(Ee({},t),{settings:D3(e)})}function L3(e){let o=e;if(!(!o?.name||o.schemaVersion!==1&&o.schemaVersion!==Jl)&&!(!o.sections&&!o.settings))return{schemaVersion:Jl,name:o.name,description:o.description,mapFileNames:o.mapFileNames,settings:D3(o)}}function T8(e){let{metrics:o,colors:t,camera:i,filters:n,labelsAndFolders:r}=e,c=t?.mapColors??{},{outgoingEdge:a,incomingEdge:s}=c,l=Dr(c,["outgoingEdge","incomingEdge"]),d=a!==void 0||s!==void 0;return I8({areaMetric:o?.areaMetric,enableFloorLabels:r?.enableFloorLabels,heightMetric:o?.heightMetric,colorMetric:o?.colorMetric,isColorMetricLinkedToHeightMetric:o?.isColorMetricLinkedToHeightMetric,colorRange:t?.colorRange,colorMode:t?.colorMode,mapColors:Object.keys(l).length>0?l:void 0,markedPackages:r?.markedPackages,edgeMetric:o?.edgeMetric,edgeColors:d?{outgoingEdge:a,incomingEdge:s}:void 0,amountOfTopLabels:r?.amountOfTopLabels,labelSize:r?.labelSize,labelMode:r?.labelMode,showMetricLabelNodeName:r?.showMetricLabelNodeName,showMetricLabelNameValue:r?.showMetricLabelNameValue,groupLabelCollisions:r?.groupLabelCollisions,colorLabels:r?.colorLabels,camera:i,blacklist:n?.blacklist,focusedNodePath:n?.focusedNodePath})}function I8(e){return Object.fromEntries(Object.entries(e).filter(([,o])=>o!==void 0))}var nc=(()=>{class e{async readAll(){return(await(await Vr()).getAll(Br)).map(A3)}async add(t){let n=(await Vr()).transaction(Br,"readwrite");await Promise.all([n.store.add(t),n.done])}async update(t){let n=(await Vr()).transaction(Br,"readwrite");await Promise.all([n.store.put(t),n.done])}async delete(t){let n=(await Vr()).transaction(Br,"readwrite");await Promise.all([n.store.delete(t),n.done])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var P3={position:{x:0,y:300,z:1e3},target:{x:0,y:0,z:0}},rc={positive:"#69AE40",neutral:"#ddcc00",negative:"#820E0E"},R8={positive:rc.negative,neutral:rc.neutral,negative:rc.positive,isColorRangeInverted:!0},D8=[{id:"built-in-rloc",name:"Real Lines of Code",description:"Visualize code size using real lines of code",metric:"rloc",colorRange:{from:250,to:500}},{id:"built-in-complexity",name:"Complexity",description:"Visualize cyclomatic complexity",metric:"complexity",colorRange:{from:50,to:100}},{id:"built-in-comment-lines",name:"Comment Lines",description:"Visualize comment density",metric:"comment_lines",colorRange:{from:50,to:100}},{id:"built-in-code-smells",name:"Code Smells",description:"Visualize code smell density",metric:"sonar_code_smells",colorRange:{from:10,to:50}},{id:"built-in-logic-complexity",name:"Logic Complexity",description:"Visualize cognitive/logic complexity",metric:"logic_complexity",colorRange:{from:40,to:80}},{id:"built-in-max-complexity-per-function",name:"Max Complexity per Function",description:"Visualize maximum complexity per function",metric:"max_complexity_per_function",colorRange:{from:10,to:20}},{id:"built-in-authors",name:"Authors",description:"Visualize the number of authors per file",metric:"number_of_authors",colorRange:{from:2,to:3},colorMode:Do.absolute,mapColors:R8}],N3=D8.map(e=>({id:e.id,name:e.name,description:e.description,createdAt:0,isBuiltIn:!0,settings:{areaMetric:"rloc",heightMetric:e.metric,colorMetric:e.metric,isColorMetricLinkedToHeightMetric:!0,colorRange:e.colorRange,colorMode:e.colorMode??Do.weightedGradient,mapColors:e.mapColors??rc}})),zi=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.db=r,this.scenarios$=new Ph([])}async loadScenarios(){try{let t=await this.db.readAll();t.sort((i,n)=>n.createdAt-i.createdAt),this.scenarios$.next([...t,...N3])}catch(t){console.error("Failed to load scenarios from IndexedDB:",t),this.scenarios$.next([...N3])}}async saveScenario(t){let i=this.buildScenario(t,this.readCurrentSource());try{await this.db.add(i),await this.loadScenarios()}catch(n){console.error("Failed to save scenario:",n)}return i}async removeScenario(t){try{await this.db.delete(t),await this.loadScenarios()}catch(i){console.error("Failed to remove scenario:",i)}}buildScenario(t,i){return{id:crypto.randomUUID(),name:t.name,description:t.description,mapFileNames:t.mapFileNames,createdAt:Date.now(),settings:S3(i,t.selectedKeys)}}readCurrentSource(){return{state:this.scenariosStore.getValue(),camera:this.readCurrentCamera()}}readCurrentCamera(){let t=this.threeCameraService.camera?.position,i=this.threeMapControlsService.controls?.target;return{position:t?{x:t.x,y:t.y,z:t.z}:P3.position,target:i?{x:i.x,y:i.y,z:i.z}:P3.target}}static{this.\u0275fac=function(i){return new(i||e)(M(ic),M(Yn),M(Wt),M(nc))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var A8=["dialog"];function L8(e,o){e&1&&(v(0,"span",8),f(1,"A name is required."),b())}var Vm=tn.filter(e=>Tt[e].group!=="camera"),Wm=(()=>{class e{constructor(t,i){this.scenariosService=t,this.fileStoreReadWindow=i,this.dialogElement=je.required("dialog"),this.name=be(""),this.description=be(""),this.bindToMap=be(!1),this.nameValid=X(()=>this.name().trim().length>0),this.availableKeys=tn,this.defaultKeys=Vm,this.selectedKeys=be(new Set(Vm)),this.selectionSummary=X(()=>`${this.selectedKeys().size} of ${this.availableKeys.length} settings`),this.saveLabel=X(()=>`Save ${tc(this.selectedKeys().size)}`),this.visibleFileNames=R(this.fileStoreReadWindow.files$.pipe(ke(n=>fn(n).map(r=>r.fileMeta.fileName))),{initialValue:[]}),this.hasFiles=X(()=>this.visibleFileNames().length>0)}open(){this.name.set(""),this.description.set(""),this.bindToMap.set(!1),this.selectedKeys.set(new Set(Vm)),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}async save(){if(!this.nameValid()||this.selectedKeys().size===0)return;let t=this.bindToMap()&&this.hasFiles()?this.visibleFileNames():void 0;await this.scenariosService.saveScenario({name:this.name(),description:this.description()||void 0,mapFileNames:t,selectedKeys:this.selectedKeys()}),this.close()}static{this.\u0275fac=function(i){return new(i||e)(te(zi),te(Te))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-save-scenario-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,A8,5),i&2&&ot()},decls:38,vars:13,consts:[["dialog",""],["aria-labelledby","save-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","save-scenario-title",1,"text-xl","font-bold","mb-4"],[1,"form-control","mb-4"],["for","scenario-name",1,"label"],[1,"label-text"],["id","scenario-name","placeholder","Enter scenario name",1,"input","input-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label-text-alt","text-error"],["for","scenario-description",1,"label"],["id","scenario-description","rows","3","placeholder","Describe what this scenario captures",1,"textarea","textarea-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label","cursor-pointer","justify-start","gap-3"],["type","checkbox",1,"checkbox","checkbox-sm",3,"ngModelChange","ngModel","disabled"],[1,"mb-4","rounded-md","border","border-base-300","p-2"],["data-testid","save-scenario-extended-settings",1,"cursor-pointer","text-sm"],[1,"text-xs","opacity-60"],[1,"m-0","mt-2","text-xs","opacity-60"],[1,"mt-2"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"modal-action"],[1,"btn",3,"click"],["data-testid","save-scenario-submit",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){if(i&1){let r=xe();v(0,"dialog",1,0)(2,"div",2)(3,"h2",3),f(4,"Save Scenario"),b(),v(5,"div",4)(6,"label",5)(7,"span",6),f(8,"Scenario Name"),b()(),v(9,"input",7),W("ngModelChange",function(s){return n.name.set(s)}),b(),O(10,L8,2,0,"span",8),b(),v(11,"div",4)(12,"label",9)(13,"span",6),f(14,"Description (optional)"),b()(),v(15,"textarea",10),W("ngModelChange",function(s){return n.description.set(s)}),b()(),v(16,"div",4)(17,"label",11)(18,"input",12),W("ngModelChange",function(s){return n.bindToMap.set(s)}),b(),v(19,"span",6),f(20," Bind to current maps "),b()()(),v(21,"details",13)(22,"summary",14),f(23," Extended settings "),v(24,"span",15),f(25),b()(),v(26,"p",16),f(27,"Uncheck what this scenario should not carry."),b(),v(28,"div",17)(29,"cc-scenario-settings-picker",18),Va("selectedKeysChange",function(s){return ae(r),Ba(n.selectedKeys,s)||(n.selectedKeys=s),se(s)}),b()()(),v(30,"div",19)(31,"button",20),W("click",function(){return n.close()}),f(32,"Cancel"),b(),v(33,"button",21),W("click",function(){return n.save()}),f(34),b()()(),v(35,"form",22)(36,"button",23),W("click",function(){return n.close()}),f(37,"close"),b()()()}i&2&&(m(9),L("ngModel",n.name()),m(),z(!n.nameValid()&&n.name().length>0?10:-1),m(5),L("ngModel",n.description()),m(2),Ne("opacity-40",!n.hasFiles()),m(),L("ngModel",n.bindToMap())("disabled",!n.hasFiles()),m(7),he("(",n.selectionSummary(),")"),m(4),L("availableKeys",n.availableKeys)("defaultKeys",n.defaultKeys),Na("selectedKeys",n.selectedKeys),m(4),L("disabled",!n.nameValid()||n.selectedKeys().size===0),m(),he(" ",n.saveLabel()," "))},dependencies:[mo,ir,ks,pf,qs,er,Ts,tr,ec],encapsulation:2,changeDetection:0})}}return e})();var F8=["dialog"],ac=(()=>{class e{constructor(){this.scenarioName=$.required(),this.confirmed=Ce(),this.cancelled=Ce(),this.dialogElement=je.required("dialog")}open(){this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}confirm(){this.close(),this.confirmed.emit()}cancel(){this.close(),this.cancelled.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-delete-confirm-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,F8,5),i&2&&ot()},inputs:{scenarioName:[1,"scenarioName"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:15,vars:1,consts:[["dialog",""],["aria-labelledby","delete-confirm-title",1,"modal"],[1,"modal-box","max-w-sm"],["id","delete-confirm-title",1,"text-lg","font-bold","mb-2"],[1,"modal-action"],[1,"btn",3,"click"],[1,"btn","btn-error",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){i&1&&(w(0,"dialog",1,0)(2,"div",2)(3,"h3",3),f(4,"Delete Scenario"),y(),w(5,"p"),f(6),y(),w(7,"div",4)(8,"button",5),K("click",function(){return n.cancel()}),f(9,"Cancel"),y(),w(10,"button",6),K("click",function(){return n.confirm()}),f(11,"Delete"),y()()(),w(12,"form",7)(13,"button",8),K("click",function(){return n.cancel()}),f(14,"close"),y()()()),i&2&&(m(6),he('Are you sure you want to delete "',n.scenarioName(),'"?'))},encapsulation:2,changeDetection:0})}}return e})();var P8=["dialog"];function N8(e,o){if(e&1&&(w(0,"li"),f(1),y()),e&2){let t=o.$implicit;m(),qe(t)}}function B8(e,o){if(e&1&&(w(0,"div",5)(1,"div"),ue(2,"i",11),w(3,"strong"),f(4,"Already existing:"),y(),w(5,"ul",12),Ae(6,N8,2,1,"li",null,ti),y()()()),e&2){let t=D();m(6),Le(t.feedback().duplicates)}}function V8(e,o){if(e&1&&(w(0,"li"),f(1),y()),e&2){let t=o.$implicit;m(),qe(t)}}function W8(e,o){if(e&1&&(w(0,"div",6)(1,"div"),ue(2,"i",13),w(3,"strong"),f(4,"Invalid scenario files:"),y(),w(5,"ul",12),Ae(6,V8,2,1,"li",null,ti),y()()()),e&2){let t=D();m(6),Le(t.feedback().invalid)}}function O8(e,o){if(e&1&&(w(0,"li"),f(1),y()),e&2){let t=o.$implicit;m(),qe(t)}}function z8(e,o){if(e&1&&(w(0,"div",6)(1,"div"),ue(2,"i",13),w(3,"strong"),f(4,"Could not read (bad format):"),y(),w(5,"ul",12),Ae(6,O8,2,1,"li",null,ti),y()()()),e&2){let t=D();m(6),Le(t.feedback().parseErrors)}}var sc=(()=>{class e{constructor(){this.closed=Ce(),this.dialogElement=je.required("dialog"),this.feedback=be({duplicates:[],invalid:[],parseErrors:[]})}open(t){let{duplicates:i,invalid:n,parseErrors:r}=t;(i.length>0||n.length>0||r.length>0)&&(this.feedback.set({duplicates:i,invalid:n,parseErrors:r}),this.dialogElement().nativeElement.showModal())}close(){this.dialogElement().nativeElement.close(),this.feedback.set({duplicates:[],invalid:[],parseErrors:[]}),this.closed.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-import-feedback-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,P8,5),i&2&&ot()},outputs:{closed:"closed"},decls:15,vars:3,consts:[["dialog",""],["aria-labelledby","import-feedback-title",1,"modal"],[1,"modal-box","max-w-lg"],["id","import-feedback-title",1,"text-lg","font-bold","mb-2"],[1,"flex","flex-col","gap-2"],[1,"alert","alert-warning","text-sm"],[1,"alert","alert-error","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"],[1,"fa","fa-exclamation-triangle","mr-1"],[1,"list-disc","list-inside","ml-1"],[1,"fa","fa-exclamation-circle","mr-1"]],template:function(i,n){i&1&&(w(0,"dialog",1,0)(2,"div",2)(3,"h3",3),f(4,"Import Results"),y(),w(5,"div",4),O(6,B8,8,0,"div",5),O(7,W8,8,0,"div",6),O(8,z8,8,0,"div",6),y(),w(9,"div",7)(10,"button",8),K("click",function(){return n.close()}),f(11,"OK"),y()()(),w(12,"form",9)(13,"button",10),K("click",function(){return n.close()}),f(14,"close"),y()()()),i&2&&(m(6),z(n.feedback().duplicates.length?6:-1),m(),z(n.feedback().invalid.length?7:-1),m(),z(n.feedback().parseErrors.length?8:-1))},encapsulation:2,changeDetection:0})}}return e})();function $8(e,o){if(e&1){let t=xe();w(0,"button",0),K("click",function(n){return ae(t),D().exportRequested.emit(),se(n.stopPropagation())}),ue(1,"i",1),y(),w(2,"button",2),K("click",function(n){return ae(t),D().deleteRequested.emit(),se(n.stopPropagation())}),ue(3,"i",3),y()}}var B3=(()=>{class e{constructor(){this.isBuiltIn=$.required(),this.exportRequested=Ce(),this.deleteRequested=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-item-actions"]],inputs:{isBuiltIn:[1,"isBuiltIn"]},outputs:{exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:1,vars:1,consts:[["title","Export scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-download"],["title","Delete scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&O(0,$8,4,0),i&2&&z(n.isBuiltIn()?-1:0)},encapsulation:2,changeDetection:0})}}return e})();function j8(e,o){e&1&&(w(0,"span",1),f(1,"Built-in"),y())}function H8(e,o){if(e&1&&(w(0,"span",2),f(1),y()),e&2){let t=D();m(),qe(t.view().formattedDate)}}function U8(e,o){if(e&1&&(w(0,"span",3),ue(1,"i",6),w(2,"span",7),f(3),y()()),e&2){let t=D();le("title","Bound to "+t.view().scenario.mapFileNames.join(", ")),m(3),qe(t.view().scenario.mapFileNames.join(", "))}}function G8(e,o){if(e&1&&ue(0,"i",8),e&2){let t=o.$implicit,i=D();yt(hn("fa ",i.groupIcons[t])),le("title",i.groupLabels[t])}}var V3=(()=>{class e{constructor(){this.view=$.required(),this.groupLabels=pa,this.groupIcons=Yl}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-item-badges"]],hostAttrs:[1,"block","overflow-hidden"],inputs:{view:[1,"view"]},decls:7,vars:2,consts:[[1,"flex","items-center","gap-3","mt-1","min-w-0"],[1,"badge","badge-xs","badge-info"],[1,"text-[11px]","text-base-content/40"],[1,"badge","badge-xs","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"flex","gap-1.5","text-[11px]","text-base-content/40"],[3,"class","title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[3,"title"]],template:function(i,n){i&1&&(w(0,"div",0),O(1,j8,2,0,"span",1)(2,H8,2,1,"span",2),O(3,U8,4,2,"span",3),w(4,"span",4),Ae(5,G8,1,4,"i",5,ti),y()()),i&2&&(m(),z(n.view().scenario.isBuiltIn?1:2),m(2),z(n.view().mapBound?3:-1),m(2),Le(n.view().groupKeys))},encapsulation:2,changeDetection:0})}}return e})();function X8(e,o){e&1&&(v(0,"span",3),F(1,"i",7),b())}function K8(e,o){if(e&1&&(v(0,"div",4),f(1),b()),e&2){let t=D();m(),qe(t.view().scenario.description)}}var W3=(()=>{class e{constructor(){this.view=$.required(),this.applyRequested=Ce(),this.exportRequested=Ce(),this.deleteRequested=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-item"]],inputs:{view:[1,"view"]},outputs:{applyRequested:"applyRequested",exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:8,vars:8,consts:[["type","button",1,"flex","items-center","w-full","px-4","py-2","border-t","border-base-300","hover:bg-base-200","cursor-pointer","bg-transparent","text-left",3,"click"],[1,"flex-1","min-w-0"],[1,"font-medium","text-sm","truncate",3,"title"],["title","Some metrics in this scenario are not available",1,"text-warning","ml-1"],[1,"text-xs","text-base-content/50","truncate"],[3,"view"],[3,"exportRequested","deleteRequested","isBuiltIn"],[1,"fa","fa-exclamation-triangle","text-xs"]],template:function(i,n){i&1&&(v(0,"button",0),W("click",function(){return n.applyRequested.emit()}),v(1,"div",1)(2,"div",2),f(3),O(4,X8,2,0,"span",3),b(),O(5,K8,2,1,"div",4),F(6,"cc-scenario-item-badges",5),b(),v(7,"cc-scenario-item-actions",6),W("exportRequested",function(){return n.exportRequested.emit()})("deleteRequested",function(){return n.deleteRequested.emit()}),b()()),i&2&&(m(),Ne("opacity-40",n.view().mapMismatch),m(),L("title",n.view().scenario.name),m(),he(" ",n.view().scenario.name," "),m(),z(n.view().warning?4:-1),m(),z(n.view().scenario.description?5:-1),m(),L("view",n.view()),m(),L("isBuiltIn",!!n.view().scenario.isBuiltIn))},dependencies:[V3,B3],encapsulation:2,changeDetection:0})}}return e})();var Cr=class{static downloadData(o,t){let i=new Blob([o],{type:"text/json"}),n=document.createEvent("MouseEvents"),r=document.createElement("a");r.download=t,r.href=window.URL.createObjectURL(i),r.dataset.downloadurl=["text/json",r.download,r.href].join(":"),n.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(n)}};var O3=(()=>{class e{constructor(t,i){this.scenariosService=t,this.db=i}exportScenario(t){let i=C3(t),n=t.name.replaceAll(/[^\w-]/g,"_");Cr.downloadData(JSON.stringify(i,null,2),n+Zl)}async importScenarioFiles(t){let i=this.scenariosService.scenarios$.getValue(),n={imported:0,duplicates:[],invalid:[],parseErrors:[]};for(let r of t){let a;try{let l=await r.text();a=L3(JSON.parse(l))}catch{n.parseErrors.push(r.name);continue}if(!a){n.invalid.push(r.name);continue}if(this.isDuplicate(a,i)){n.duplicates.push(a.name);continue}let s=M3(a);i.push(s),await this.db.add(s),n.imported++}return n.imported>0&&await this.scenariosService.loadScenarios(),n}isDuplicate(t,i){return i.some(n=>n.name===t.name&&JSON.stringify(n.settings)===JSON.stringify(t.settings))}static{this.\u0275fac=function(i){return new(i||e)(M(zi),M(nc))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var z3=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select(Hn)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Z8=[{priority:0,label:"Current Map",icon:"fa-map-pin"},{priority:1,label:"Global",icon:"fa-globe"},{priority:2,label:"Built-in",icon:"fa-cube"},{priority:3,label:"Other Maps",icon:"fa-map-o"}],$3=(()=>{class e{constructor(t){this.scenarioApplier=t}groupScenarios(t,i){let n=new Map;for(let r of t){let a=this.getScenarioPriority(r,i),s=n.get(a);s?s.push(r):n.set(a,[r])}return Z8.filter(r=>n.has(r.priority)).map(r=>({label:r.label,icon:r.icon,scenarios:n.get(r.priority)??[]}))}toScenarioView(t,i,n){let r=(t.mapFileNames?.length??0)>0,a=r&&!t.mapFileNames.some(l=>i.has(l)),s=this.scenarioApplier.hasMissingMetrics(this.scenarioApplier.getMissingMetrics(t.settings,n));return{scenario:t,warning:s,mapMismatch:a,mapBound:r,groupKeys:y3(t),formattedDate:new Date(t.createdAt).toLocaleDateString()}}getScenarioPriority(t,i){let n=(t.mapFileNames?.length??0)>0;return n&&t.mapFileNames?.some(r=>i.has(r))?0:!n&&!t.isBuiltIn?1:t.isBuiltIn?2:3}static{this.\u0275fac=function(i){return new(i||e)(M(oc))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var e7=["dialog"],t7=["fileInput"],i7=(e,o)=>o.label,o7=(e,o)=>o.scenario.id;function n7(e,o){e&1&&(v(0,"p",13),f(1,"No scenarios found."),b())}function r7(e,o){if(e&1){let t=xe();v(0,"cc-scenario-item",25),W("applyRequested",function(){let n=ae(t).$implicit,r=D(2);return se(r.applyScenario(n.scenario))})("exportRequested",function(){let n=ae(t).$implicit,r=D(2);return se(r.exportScenario(n.scenario))})("deleteRequested",function(){let n=ae(t).$implicit,r=D(2);return se(r.requestDelete(n.scenario))}),b()}if(e&2){let t=o.$implicit;L("view",t)}}function a7(e,o){if(e&1&&(v(0,"div",19),F(1,"input",20),v(2,"div",21),F(3,"i"),f(4),v(5,"span",22),f(6),b()(),v(7,"div",23),Ae(8,r7,1,1,"cc-scenario-item",24,o7),b()()),e&2){let t=o.$implicit,i=o.$index;Ne("mt-1",i!==0),m(),L("checked",i===0),m(2),yt(hn("fa ",t.icon," mr-2")),m(),he(" ",t.label," "),m(2),qe(t.scenarios.length),m(2),Le(t.scenarios)}}var Om=(()=>{class e{constructor(t,i,n,r,a){this.scenariosService=t,this.importExportService=i,this.scenarioDialogStore=n,this.fileStoreReadWindow=r,this.helpers=a,this.dialogElement=je.required("dialog"),this.deleteConfirmDialogRef=je.required(ac),this.importFeedbackDialogRef=je.required(sc),this.fileInput=je.required("fileInput"),this.applyRequested=Ce(),this.deleteTarget=be(null),this.acceptExtensions=`${Zl},.json`,this.scenarios=R(this.scenariosService.scenarios$,{initialValue:[]}),this.metricData=R(this.scenarioDialogStore.metricData$,{requireSync:!0}),this.searchTerm=be(""),this.visibleFileNames=R(this.fileStoreReadWindow.files$.pipe(ke(s=>new Set(fn(s).map(l=>l.fileMeta.fileName)))),{initialValue:new Set}),this.filteredScenarios=X(()=>{let s=this.searchTerm().toLowerCase(),l=this.scenarios(),d=this.visibleFileNames();return(s?l.filter(h=>h.name.toLowerCase().includes(s)||h.description?.toLowerCase().includes(s)):[...l]).sort((h,p)=>this.helpers.getScenarioPriority(h,d)-this.helpers.getScenarioPriority(p,d))}),this.groupedScenarios=X(()=>{let s=this.visibleFileNames(),l=this.metricData();return this.helpers.groupScenarios(this.filteredScenarios(),s).map(c=>tt(Ee({},c),{scenarios:c.scenarios.map(h=>this.helpers.toScenarioView(h,s,l))}))})}async open(){await this.scenariosService.loadScenarios(),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}applyScenario(t){this.close(),this.applyRequested.emit({scenario:t,metricData:this.metricData()})}exportScenario(t){this.importExportService.exportScenario(t)}openImportDialog(){this.fileInput().nativeElement.click()}async handleImportFiles(t){let i=t.target;if(!i.files||i.files.length===0)return;let n=await this.importExportService.importScenarioFiles(i.files);i.value="",this.importFeedbackDialogRef().open(n)}requestDelete(t){this.deleteTarget.set(t),this.deleteConfirmDialogRef().open()}cancelDelete(){this.deleteTarget.set(null)}async confirmDelete(){let t=this.deleteTarget();t&&(this.deleteTarget.set(null),await this.scenariosService.removeScenario(t.id))}static{this.\u0275fac=function(i){return new(i||e)(te(zi),te(O3),te(z3),te(Te),te($3))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-list-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,e7,5)(n.deleteConfirmDialogRef,ac,5)(n.importFeedbackDialogRef,sc,5)(n.fileInput,t7,5),i&2&&ot(4)},outputs:{applyRequested:"applyRequested"},decls:23,vars:4,consts:[["dialog",""],["fileInput",""],["aria-labelledby","scenario-list-title",1,"modal"],[1,"modal-box","max-w-xl"],[1,"flex","items-center","justify-between","mb-4"],["id","scenario-list-title",1,"text-xl","font-bold"],[1,"flex","items-center","gap-1"],["title","Import scenarios",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-upload"],[1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-close"],["type","file","multiple","",1,"hidden",3,"change","accept"],["placeholder","Search scenarios...","aria-label","Search scenarios",1,"input","input-bordered","w-full","mb-4",3,"ngModelChange","ngModel"],[1,"text-center","py-8","text-base-content/50"],[1,"max-h-[60vh]","overflow-y-auto"],[1,"collapse","collapse-arrow","border","border-base-300",3,"mt-1"],["method","dialog",1,"modal-backdrop"],[3,"click"],[3,"confirmed","cancelled","scenarioName"],[1,"collapse","collapse-arrow","border","border-base-300"],["type","radio","name","scenario-accordion",3,"checked"],[1,"collapse-title","font-semibold","text-sm","bg-primary","text-primary-content"],[1,"badge","badge-sm","ml-2"],[1,"collapse-content","px-0"],[3,"view"],[3,"applyRequested","exportRequested","deleteRequested","view"]],template:function(i,n){if(i&1&&(v(0,"dialog",2,0)(2,"div",3)(3,"div",4)(4,"h2",5),f(5,"Scenarios"),b(),v(6,"div",6)(7,"button",7),W("click",function(){return n.openImportDialog()}),F(8,"i",8),b(),v(9,"button",9),W("click",function(){return n.close()}),F(10,"i",10),b()()(),v(11,"input",11,1),W("change",function(a){return n.handleImportFiles(a)}),b(),v(13,"input",12),W("ngModelChange",function(a){return n.searchTerm.set(a)}),b(),O(14,n7,2,0,"p",13),v(15,"div",14),Ae(16,a7,10,8,"div",15,i7),b()(),v(18,"form",16)(19,"button",17),W("click",function(){return n.close()}),f(20,"close"),b()()(),v(21,"cc-delete-confirm-dialog",18),W("confirmed",function(){return n.confirmDelete()})("cancelled",function(){return n.cancelDelete()}),b(),F(22,"cc-import-feedback-dialog")),i&2){let r;m(11),L("accept",n.acceptExtensions),m(2),L("ngModel",n.searchTerm()),m(),z(n.filteredScenarios().length===0?14:-1),m(2),Le(n.groupedScenarios()),m(5),L("scenarioName",((r=n.deleteTarget())==null?null:r.name)??"")}},dependencies:[mo,ir,ks,qs,er,Ts,tr,ac,sc,W3],encapsulation:2,changeDetection:0})}}return e})();var s7=["listDialog"],l7=["saveDialog"];function c7(e,o){if(e&1){let t=xe();v(0,"cc-apply-scenario-dialog",16),W("closed",function(){ae(t);let n=D();return se(n.handleApplyClosed())}),b()}if(e&2){let t=o;L("scenario",t.scenario)("metricData",t.metricData)}}var j3=(()=>{class e{constructor(){this.scenariosService=q(zi),this.listDialog=je.required("listDialog"),this.saveDialog=je.required("saveDialog"),this.applyTarget=be(null),this.scenarios=R(this.scenariosService.scenarios$,{initialValue:[]}),this.scenariosCountLabel=X(()=>{let t=this.scenarios().length;return`${t} ${t===1?"scenario":"scenarios"} available`})}async ngOnInit(){await this.scenariosService.loadScenarios()}openScenarioList(){this.listDialog().open()}openSaveDialog(){this.saveDialog().open()}handleApplyRequested(t){this.applyTarget.set(t)}handleApplyClosed(){this.applyTarget.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-labels-scenarios-segment"]],viewQuery:function(i,n){i&1&&it(n.listDialog,s7,5)(n.saveDialog,l7,5),i&2&&ot(2)},hostAttrs:[1,"group","flex","flex-col","items-stretch","px-3","py-2","transition-colors","relative"],decls:23,vars:2,consts:[["listDialog",""],["saveDialog",""],[1,"flex","flex-col","items-stretch","gap-1.5","px-2","py-1","rounded-md","transition-colors","max-w-[220px]","min-w-[160px]"],["data-testid","metric-segment-labels",1,"flex","flex-col","gap-1"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wide","opacity-70"],["type","button","popovertarget","metric-settings-popover-labels","data-anchor-name","metric-segment-labels","title","Label Settings",1,"btn","btn-ghost","btn-xs","btn-square",2,"anchor-name","--metric-segment-labels"],[1,"fa","fa-cog","text-[10px]"],[1,"border-t","border-base-300","-mx-1"],["data-testid","metric-segment-scenario",1,"flex","flex-col","gap-1"],["type","button","title","Save current state as scenario","data-testid","metric-segment-scenario-save",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-plus","text-[10px]"],["type","button","title","Open saved scenarios",1,"text-sm","font-semibold","leading-tight","text-center","bg-transparent","border-0","p-0","rounded-sm","cursor-pointer","hover:bg-base-200","whitespace-nowrap","overflow-hidden","text-ellipsis",3,"click"],["popoverId","metric-settings-popover-labels","anchorName","metric-segment-labels","widthClass","w-80"],[3,"applyRequested"],[3,"scenario","metricData"],[3,"closed","scenario","metricData"]],template:function(i,n){if(i&1&&(v(0,"div",2)(1,"div",3)(2,"div",4)(3,"span",5),f(4,"Labels"),b(),v(5,"button",6),F(6,"i",7),b()()(),F(7,"div",8),v(8,"div",9)(9,"div",4)(10,"span",5),f(11,"Scenarios"),b(),v(12,"button",10),W("click",function(){return n.openSaveDialog()}),F(13,"i",11),b()(),v(14,"button",12),W("click",function(){return n.openScenarioList()}),f(15),b()()(),v(16,"cc-settings-popover-shell",13),F(17,"cc-label-settings-panel"),b(),v(18,"cc-scenario-list-dialog",14,0),W("applyRequested",function(a){return n.handleApplyRequested(a)}),b(),F(20,"cc-save-scenario-dialog",null,1),O(22,c7,1,2,"cc-apply-scenario-dialog",15)),i&2){let r;m(15),he(" ",n.scenariosCountLabel()," "),m(7),z((r=n.applyTarget())?22:-1,r)}},dependencies:[qd,Om,Wm,Nm,Ot],encapsulation:2,changeDetection:0})}}return e})();var H3=(()=>{class e{constructor(){this.preferencesReadWindow=q(Zn),this.metricsBarWriteStore=q(Ye),this.isLinked=R(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1}),this.iconClass=X(()=>this.isLinked()?"fa fa-link":"fa fa-unlink"),this.title=X(()=>this.isLinked()?"Unlink Height and Color Metric":"Link Height and Color Metric"),this.buttonClass=X(()=>this.isLinked()?"btn btn-circle btn-sm ring-2 ring-primary text-primary bg-primary/10 border-0":"btn btn-circle btn-sm ring-1 ring-base-300 text-base-content/60 border-0 cc-link-button-dashed")}toggle(){this.metricsBarWriteStore.toggleIsHeightAndColorMetricLinked()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-link-color-height-button"]],hostAttrs:[1,"self-center","px-1"],decls:2,vars:8,consts:[["type","button",3,"click","title"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.toggle()}),ue(1,"i"),y()),i&2&&(yt(n.buttonClass()),le("title",n.title()),rt("aria-label",n.title())("data-testid","metric-link-button")("aria-pressed",n.isLinked()),m(),yt(n.iconClass()))},encapsulation:2,changeDetection:0})}}return e})();function d7(e,o){e&1&&F(0,"cc-link-color-height-button")(1,"cc-color-segment")}function m7(e,o){if(e&1&&F(0,"cc-axis-card",0)(1,"cc-color-settings-popover",1),e&2){let t=D();L("metricName","Settings")("hasCog",!0)("cogPopoverId",t.deltaColorSettingsPopoverId)("cogAnchorName",t.deltaColorSettingsAnchorName)("testId","metric-segment-color-settings")("cogTestId","metric-segment-color-settings-cog"),m(),L("popoverId",t.deltaColorSettingsPopoverId)("anchorName",t.deltaColorSettingsAnchorName)}}function h7(e,o){e&1&&F(0,"cc-edge-segment")}var zm=(()=>{class e{constructor(){this.barBottom=df,this.fileStoreReadWindow=q(Te),this.metricsBarReadStore=q(ht),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasEdgeMetric=R(this.metricsBarReadStore.metricData$.pipe(ke(t=>t.edgeMetricData.length>0)),{initialValue:!1}),this.showColorMetricSegment=X(()=>!this.isDeltaState()),this.deltaColorSettingsPopoverId="metric-settings-popover-color-delta",this.deltaColorSettingsAnchorName="metric-segment-color-settings"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metrics-bar"]],hostVars:2,hostBindings:function(i,n){i&2&&Oe("bottom",n.barBottom)},features:[Qi([mf])],decls:6,vars:2,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","testId","cogTestId"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(F(0,"cc-area-segment")(1,"cc-height-segment"),O(2,d7,2,0)(3,m7,2,8),O(4,h7,1,0,"cc-edge-segment"),F(5,"cc-labels-scenarios-segment")),i&2&&(m(2),z(n.showColorMetricSegment()?2:3),m(2),z(n.hasEdgeMetric()?4:-1))},dependencies:[L1,co,p3,Kl,b3,x3,j3,H3],encapsulation:2,changeDetection:0})}}return e})();var $m=(()=>{class e extends b0{constructor(){super(...arguments),this.areaMetric=R(q(ve).areaMetric$,{requireSync:!0}),this.pathToNode=q(me).selectSignal(Wu)}isEnabledFor(t){let i=this.pathToNode().get(t);return i!==void 0&&Ua(i,this.areaMetric())}static{this.\u0275fac=(()=>{let t;return function(n){return(t||(t=Uh(e)))(n||e)}})()}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var p7=(e,o,t)=>{let i=e.length>0?e.filter(l=>bi(l)):o,n=0,r=0,a=0,s=0;for(let l of i)l.isFlattened&&n++,l.isExcluded&&r++,!l.isFlattened&&!l.isExcluded&&(a++,Ua(l,t)||s++);return{shown:a,flattened:n,hidden:r,noArea:s}},U3=Ie(ju,Pi,vi,p7);var jm=(()=>{class e{constructor(){this.store=q(me),this.counts$=this.store.select(U3)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var G3=Ie(Au,e=>e?.map?Ji(e.map).descendants().map(({data:o})=>o).filter(o=>bi(o)):[]);var ua=Ie(G3,e=>{let o=new Map;for(let t of u7(e))o.set(t,e.map(i=>i.attributes?.[t]??0).filter(i=>typeof i=="number"&&!Number.isNaN(i)));return o});function u7(e){let o=new Set;for(let t of e)for(let i of Object.keys(t.attributes??{}))i!==kp&&o.add(i);return o}var Hm=(()=>{class e{constructor(){this.store=q(me),this.metricValues$=this.store.select(ua)}addRule(t){Bi(this.store,fu({rule:tt(Ee({},t),{id:f7()})}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();function f7(){return`metric-rule-${crypto.randomUUID()}`}var Um=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.sharedViewReadWindow=q(Bt),this.store=q(me),this.idToBuildingService=q(Kn),this.areaMetric=R(this.mapStateReadWindow.areaMetric$,{requireSync:!0}),this.buildingIds=R(this.idToBuildingService.buildingIds$,{requireSync:!0}),this.rootUnary=R(this.store.select(Ou),{requireSync:!0}),this.markedPackages=R(this.sharedViewReadWindow.markedPackages$,{requireSync:!0})}project(t){return v0(t,{areaMetric:this.areaMetric(),buildingIds:this.buildingIds(),rootUnary:this.rootUnary(),showsFlattenedState:!0,hidesExcludedNodes:!0,markedPackages:this.markedPackages()})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var ev=Da(xw());var X3=e=>/[*?]/.test(e);var g7={gt:">",gte:"\u2265",lt:"<",lte:"\u2264",eq:"="};function K3(e){if(e.operator==="between"){let o=Math.min(e.value,e.upperValue??e.value),t=Math.max(e.value,e.upperValue??e.value);return`${e.metric} ${o}\u2026${t}`}return`${e.metric} ${g7[e.operator]} ${e.value}`}var b7=(e,o)=>(o.get(e.metric)??[]).filter(t=>qp(e,t)).length,Q3=(e,o,t)=>e.filter(i=>i.type===t).map(i=>({id:i.id,label:K3(i),affectedCount:b7(i,o),kind:"METRIC",metricRule:i})),Y3=Ie(Qc,ua,(e,o)=>Q3(e,o,"flatten")),Z3=Ie(Qc,ua,(e,o)=>Q3(e,o,"exclude"));var tv=(e,o,t)=>{let i=e.filter(s=>s.type===t);if(i.length===0)return[];let n=o.map(s=>Cp(s.path)),{rules:r,combinedPositivePrefilter:a}=v7(i);return x7(r,a,n),r.map(({item:s,affectedCount:l})=>({id:`${s.type}/${s.path}`,label:s.path,item:s,affectedCount:l,kind:X3(s.path)?"RULE":"MANUAL"})).sort((s,l)=>s.label.localeCompare(l.label))};function v7(e){let o=(0,ev.default)();return{rules:e.map(i=>{let{ignoredNodePaths:n,condition:r}=Mp(i.path);return r&&_p(o,i.path),{item:i,ignoredNodePaths:n,condition:r,affectedCount:0}}),combinedPositivePrefilter:o}}function x7(e,o,t){let i=e.filter(r=>r.condition),n=e.filter(r=>!r.condition);for(let r of t)i.length>0&&o.ignores(r)&&J3(i,r,!0),J3(n,r,!1)}function J3(e,o,t){for(let i of e)i.ignoredNodePaths.ignores(o)===t&&i.affectedCount++}var iv=Ie(Pr,Pi,Y3,(e,o,t)=>[...t,...tv(e,o,"flatten")]),ov=Ie(Pr,Pi,Z3,(e,o,t)=>[...t,...tv(e,o,"exclude")]);var nv=(e,o,t)=>{let i=t.trim().split(",");if(t.trim().startsWith("!")){i[0]=i[0].slice(1);for(let n of i){let r=`!${cr(n)}`;if(e.some(a=>r===a.path&&o===a.type))return!0}return!1}for(let n of i)if(e.some(r=>cr(n)===r.path&&o===r.type))return!0;return!1};var lc=Ie(no,m0);var rv=e=>Ie(no,lc,Pr,(o,t,i)=>t||nv(i,e,o)),av=rv("flatten"),sv=rv("exclude");var Gm=(()=>{class e{constructor(){this.store=q(me),this.flattenRules$=this.store.select(iv),this.excludeRules$=this.store.select(ov),this.isFlattenPatternDisabled$=this.store.select(av),this.isExcludePatternDisabled$=this.store.select(sv)}removeRule(t){if(t.kind==="METRIC"){Bi(this.store,gu({id:t.metricRule.id}));return}Bi(this.store,Pn({item:t.item}))}clearRules(t){Bi(this.store,mu({blacklistType:t}))}ruleFromSearchPattern(t){Bi(this.store,Zg(t))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var lv={patternSelector:no,setPattern:Fi,isPatternEmptySelector:lc,searchedNodePathsSelector:Hu};var Xm=(()=>{class e{constructor(){this.store=q(me),this.sharedViewReadWindow=q(Bt),this.threeSceneService=q(ft),this.idToBuildingService=q(Kn),this.threeRendererService=q(kt),this.codeMapMouseEventService=q(Wo),this.codeMapTooltipService=q(Xn),this.selectedBuildingId=R(this.sharedViewReadWindow.selectedBuildingId$,{requireSync:!0}),this.hoveredNodeId=R(this.sharedViewReadWindow.hoveredNodeId$,{requireSync:!0})}isSelected(t){return this.selectedBuildingId()===t.path}isHovered(t){return this.hoveredNodeId()===t.path}select(t){this.store.dispatch(Yc({value:t.path}));let i=this.idToBuildingService.get(t.id);this.codeMapMouseEventService.drawLabelSelectedBuilding(i),this.threeSceneService.selectBuilding(i),this.threeSceneService.clearConstantHighlight(),this.threeRendererService.render()}deselect(){this.store.dispatch(Yc({value:null})),this.threeSceneService.clearSelection(),this.threeSceneService.clearConstantHighlight(),this.threeRendererService.render()}hover(t,i){this.store.dispatch(Ao({value:t.path})),this.codeMapMouseEventService.hoverNode(t.path),this.codeMapTooltipService.show(t,i.right,i.top)}hoverEnd(){this.store.dispatch(Ao({value:null})),this.codeMapMouseEventService.unhoverNode(),this.codeMapTooltipService.hide()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var cv={options:Object.values(Ha),optionSelector:Zu,ascendingSelector:Ju,setOption:nf,toggleAscending:()=>rf()};var dv=(e,o)=>e!==Ha.AREA_SIZE?Ie(Et,t=>ad(sd(t.unifiedMapNode),e,o)):Ie(Et,vi,(t,i)=>ad(sd(t.unifiedMapNode),e,o,i));var Km=(()=>{class e{constructor(){this.store=q(me)}rootNodeFor(t,i){return this.store.select(dv(t,i))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var w7=2e3,mv=(()=>{class e{constructor(){this.actions$=q(mt),this.sharedViewReadWindow=q(Bt),this.revealService=q(Ns),this.actions$.pipe(st(ni),Ut(()=>this.sharedViewReadWindow.selectedBuildingId$.pipe(Re(Boolean),ut(1),zh(Bh(w7)))),fp()).subscribe(t=>this.revealService.revealNode(t,{expand:!1}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=Fa({type:e,selectors:[["","ccRevealsSelectedNodeAfterLoad",""]]})}}return e})();var hv=(()=>{class e{constructor(){this.store=q(me),this.selection=q(Ps),this.revealService=q(Ns),x0("metrics",t=>this.showNode(t))}showNode(t){this.store.select($u(t)).pipe(ut(1)).subscribe(i=>{i&&(this.selection.select(i),this.revealService.revealNode(t))})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=Fa({type:e,selectors:[["","ccShowsHandedOverNode",""]]})}}return e})();var pv=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metrics-view"]],features:[Zi([Um,{provide:s0,useExisting:Um},Xm,{provide:Ps,useExisting:Xm},$m,{provide:l0,useExisting:$m},Km,{provide:a0,useExisting:Km},jm,{provide:r0,useExisting:jm},Gm,{provide:o0,useExisting:Gm},Hm,{provide:i0,useExisting:Hm},p0(cv),h0(lv),{provide:e0,useValue:t0},{provide:f0,useValue:u0},d0("metrics"),gf()]),Qi([mv,hv])],decls:10,vars:0,consts:[["view","metrics"],["collapsedContent","",1,"flex-1","min-w-0"]],template:function(i,n){i&1&&(F(0,"cc-loading-file-progress-spinner",0)(1,"cc-code-map"),v(2,"cc-sidebar-explorer"),F(3,"cc-explorer-search-bar",1),b(),F(4,"cc-sidebar-inspector")(5,"cc-node-context-menu")(6,"cc-metrics-bar")(7,"cc-legend-panel")(8,"cc-file-extension-bar")(9,"cc-bottom-bar"))},dependencies:[Wd,zm,g0,c0,n0,Nd,Bd,Od,Jf,ff],encapsulation:2,changeDetection:0})}}return e})();var C7=[{path:nd.metrics,component:pv},{path:nd.domain,loadComponent:()=>import("./chunk-Z45ZNHXF.js").then(e=>e.DomainViewComponent)}],M7={provide:np,useClass:Gg},_7=[up(C7),M7],Qm={providers:[cp(dp()),bp(Xg,{metaReducers:[Kg]}),..._7,{provide:pp,useClass:nl},vp([...ug,...Mg,...vg,...bg,...Eg,...qg,...Ug,...Yg,...e1]),{provide:Kh,useFactory:e=>()=>e.synchronizeVersion(),deps:[$0],multi:!0}]};var cc=class{parse(o,t={}){t=Object.assign({binary:!1},t);let i=t.binary,n=[],r=0;o.traverse(function(j){if(j.isMesh){let ee=j.geometry,B=ee.index,H=ee.getAttribute("position");r+=B!==null?B.count/3:H.count/3,n.push({object3d:j,geometry:ee})}});let a,s=80;if(i===!0){let j=r*2+r*3*4*4+80+4,ee=new ArrayBuffer(j);a=new DataView(ee),a.setUint32(s,r,!0),s+=4}else a="",a+=`solid exported
3469
+ `))},encapsulation:2,changeDetection:0})}}return e})();var wr=(e,o,t)=>Math.min(Math.max(e,o),t),t3=({minValue:e,maxValue:o,currentLeftValue:t,currentRightValue:i,sliderWidth:n})=>{let r=o-e;if(r<=0)return{leftEnd:n,rightStart:n};let a=(t-e)/r,s=(i-e)/r,l=wr(a*n,0,n),d=wr(s*n,l,n);return{leftEnd:l,rightStart:d}},J6=({thumbX:e,minValue:o,maxValue:t,sliderWidth:i})=>{let n=(t-o)/i,r=o+e*n;return Math.round(r)},i3=e=>n3(e,{lowerBound:0,upperBound:e.otherThumbX}),o3=e=>n3(e,{lowerBound:e.otherThumbX,upperBound:e.sliderWidth}),n3=({deltaX:e,thumbScreenX:o,thumbRadius:t,sliderBoundingClientRectX:i,sliderWidth:n,minValue:r,maxValue:a},{lowerBound:s,upperBound:l})=>{let d=o+e-i+t,c=wr(d,s,l);return{updatedThumbX:c,upcomingValue:J6({thumbX:c,minValue:r,maxValue:a,sliderWidth:n})}};var e8=["rangeSliderContainer"],t8=["leftThumb"],i8=["rightThumb"],r3=(()=>{class e{get segmentWidths(){let t=wr(this.sliderRangePosition.leftEnd,0,this.actualSliderWidth),i=wr(this.sliderRangePosition.rightStart,t,this.actualSliderWidth);return{left:t,middle:i-t,right:this.actualSliderWidth-i}}constructor(t){this.changeDetectorRef=t,this.sliderWidth=150,this.sliderRangePosition={leftEnd:0,rightStart:0},this.thumbRadius=7,this.actualSliderWidth=this.sliderWidth,this.currentlySliding=void 0,this.activeMouseMoveHandler=null,this.activeMouseUpHandler=null,this.handleLeftThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=i3({deltaX:i.movementX,thumbScreenX:this.leftThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.rightStart,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:n.updatedThumbX,rightStart:this.sliderRangePosition.rightStart},this.upcomingLeftValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newLeftValue:n.upcomingValue})},this.handleRightThumbMoved=i=>{if(this.abortSlidingWhenHidden())return;let n=o3({deltaX:i.movementX,thumbScreenX:this.rightThumb.nativeElement.getBoundingClientRect().x,thumbRadius:this.thumbRadius,otherThumbX:this.sliderRangePosition.leftEnd,sliderBoundingClientRectX:this.sliderContainer.nativeElement.getBoundingClientRect().x,sliderWidth:this.actualSliderWidth,minValue:this.minValue,maxValue:this.maxValue});this.sliderRangePosition={leftEnd:this.sliderRangePosition.leftEnd,rightStart:n.updatedThumbX},this.upcomingRightValue=n.upcomingValue,this.changeDetectorRef.markForCheck(),this.handleValueChange({newRightValue:n.upcomingValue})}}ngOnChanges(t){t.sliderWidth&&(this.actualSliderWidth=this.sliderWidth),this.currentlySliding||(t.currentLeftValue&&(this.upcomingLeftValue=this.currentLeftValue),t.currentRightValue&&(this.upcomingRightValue=this.currentRightValue),this.updateSliderRangePosition())}ngAfterViewInit(){typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(t=>{let i=t.at(-1).contentRect.width;i>0&&i!==this.actualSliderWidth&&(this.actualSliderWidth=i,this.currentlySliding||this.updateSliderRangePosition(),this.changeDetectorRef.markForCheck())}),this.resizeObserver.observe(this.sliderContainer.nativeElement))}ngOnDestroy(){this.stopSliding(),this.resizeObserver?.disconnect()}setCurrentlySliding(t){switch(this.stopSliding(),this.currentlySliding=t,this.currentlySliding){case"leftThumb":this.activeMouseMoveHandler=this.handleLeftThumbMoved,this.rightThumb.nativeElement.style.zIndex="0",this.leftThumb.nativeElement.style.zIndex="1";break;case"rightThumb":this.activeMouseMoveHandler=this.handleRightThumbMoved,this.leftThumb.nativeElement.style.zIndex="0",this.rightThumb.nativeElement.style.zIndex="1";break;default:return}this.activeMouseUpHandler=()=>this.stopSliding(),document.addEventListener("mousemove",this.activeMouseMoveHandler),document.addEventListener("mouseup",this.activeMouseUpHandler)}stopSliding(){this.currentlySliding=void 0,this.activeMouseMoveHandler&&(document.removeEventListener("mousemove",this.activeMouseMoveHandler),this.activeMouseMoveHandler=null),this.activeMouseUpHandler&&(document.removeEventListener("mouseup",this.activeMouseUpHandler),this.activeMouseUpHandler=null)}handleLeftThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingLeftValue,this.minValue,this.upcomingRightValue);i===void 0||i===this.upcomingLeftValue||(t.preventDefault(),this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleRightThumbKeydown(t){let i=this.calculateValueFromKeyboard(t,this.upcomingRightValue,this.upcomingLeftValue,this.maxValue);i===void 0||i===this.upcomingRightValue||(t.preventDefault(),this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}calculateValueFromKeyboard(t,i,n,r){let a;switch(t.key){case"ArrowLeft":case"ArrowDown":a=i-1;break;case"ArrowRight":case"ArrowUp":a=i+1;break;case"Home":a=n;break;case"End":a=r;break;default:return}return Math.max(n,Math.min(r,a))}handleCurrentLeftInputChanged(t){let i=nd(t,this.minValue,this.upcomingRightValue,this.upcomingLeftValue);i!==void 0&&(this.upcomingLeftValue=i,this.updateSliderRangePosition(),this.handleValueChange({newLeftValue:i}))}handleCurrentRightInputChanged(t){let i=nd(t,this.upcomingLeftValue,this.maxValue,this.upcomingRightValue);i!==void 0&&(this.upcomingRightValue=i,this.updateSliderRangePosition(),this.handleValueChange({newRightValue:i}))}updateSliderRangePosition(){this.sliderRangePosition=t3({minValue:this.minValue,maxValue:this.maxValue,currentLeftValue:this.upcomingLeftValue??this.currentLeftValue,currentRightValue:this.upcomingRightValue??this.currentRightValue,sliderWidth:this.actualSliderWidth})}abortSlidingWhenHidden(){return this.sliderContainer.nativeElement.getBoundingClientRect().width===0?(this.stopSliding(),!0):!1}static{this.\u0275fac=function(i){return new(i||e)(te(pn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metric-color-range-slider"]],viewQuery:function(i,n){if(i&1&&La(e8,5)(t8,5)(i8,5),i&2){let r;pi(r=ui())&&(n.sliderContainer=r.first),pi(r=ui())&&(n.leftThumb=r.first),pi(r=ui())&&(n.rightThumb=r.first)}},inputs:{minValue:"minValue",maxValue:"maxValue",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",handleValueChange:"handleValueChange",sliderWidth:"sliderWidth"},features:[Da],decls:15,vars:34,consts:[["rangeSliderContainer",""],["leftThumb",""],["rightThumb",""],[1,"flex","items-center","gap-2"],["type","number","aria-label","Lower color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"],[1,"flex","flex-1","mx-2","relative","leading-[48px]"],[1,"inline-block","border-b-4","border-solid"],["aria-hidden","true",1,"cursor-pointer","absolute","-top-1","rounded-full","border-[7px]","border-primary",3,"mousedown"],["type","range","step","1","aria-label","Lower color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],["type","range","step","1","aria-label","Upper color range value",1,"absolute","inset-0","m-0","h-full","w-full","opacity-0","pointer-events-none",3,"keydown","min","max","value"],[3,"minValue","maxValue","leftValueLabel","rightValueLabel","sliderRangePosition","sliderWidth"],["type","number","aria-label","Upper color range value input",1,"input","input-sm","input-bordered","w-16","text-center",3,"input","value","min","max"]],template:function(i,n){i&1&&(v(0,"div",3)(1,"input",4),W("input",function(a){return n.handleCurrentLeftInputChanged(a)}),b(),v(2,"div",5,0),F(4,"span",6)(5,"span",6)(6,"span",6),v(7,"div",7,1),W("mousedown",function(){return n.setCurrentlySliding("leftThumb")}),b(),v(9,"div",7,2),W("mousedown",function(){return n.setCurrentlySliding("rightThumb")}),b(),v(11,"input",8),W("keydown",function(a){return n.handleLeftThumbKeydown(a)}),b(),v(12,"input",9),W("keydown",function(a){return n.handleRightThumbKeydown(a)}),b(),F(13,"cc-range-slider-labels",10),b(),v(14,"input",11),W("input",function(a){return n.handleCurrentRightInputChanged(a)}),b()()),i&2&&(m(),L("value",n.currentLeftValue)("min",n.minValue)("max",n.upcomingRightValue),m(3),Oe("width",n.segmentWidths.left,"px")("border-bottom-color",n.leftColor),m(),Oe("width",n.segmentWidths.middle,"px")("border-bottom-color",n.middleColor),m(),Oe("width",n.segmentWidths.right,"px")("border-bottom-color",n.rightColor),m(),Oe("left",n.sliderRangePosition.leftEnd-n.thumbRadius,"px"),m(2),Oe("left",n.sliderRangePosition.rightStart-n.thumbRadius,"px"),m(2),L("min",n.minValue)("max",n.currentRightValue)("value",n.currentLeftValue),m(),L("min",n.currentLeftValue)("max",n.maxValue)("value",n.currentRightValue),m(),L("minValue",n.minValue)("maxValue",n.maxValue)("leftValueLabel",n.upcomingLeftValue)("rightValueLabel",n.upcomingRightValue)("sliderRangePosition",n.sliderRangePosition)("sliderWidth",n.actualSliderWidth),m(),L("value",n.currentRightValue)("min",n.upcomingLeftValue)("max",n.maxValue))},dependencies:[e3],encapsulation:2,changeDetection:0})}}return e})();var a3=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.metricsLensFacade=r,this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.sliderValues=R(this.metricsBarReadStore.metricColorRangeValues$,{initialValue:{values:[],min:0,max:0,from:0,to:0}}),this.sliderColors=R(this.metricsBarReadStore.metricColorRangeColors$,{initialValue:{leftColor:"#000",middleColor:"#000",rightColor:"#000"}}),this.isAttributeDirectionInversed=R(St([this.mapStateReadWindow.colorMetric$,this.metricsLensFacade.descriptors$]).pipe(ke(([a,s])=>s[a]?.direction===1)),{initialValue:!1}),this.pendingLeftValue=null,this.pendingRightValue=null,this.commitColorRange=Pi(()=>{let a={};this.pendingLeftValue!==null&&(a.from=this.pendingLeftValue),this.pendingRightValue!==null&&(a.to=this.pendingRightValue),this.pendingLeftValue=null,this.pendingRightValue=null,this.metricsBarWriteStore.setColorRange(a)},Vf),this.handleValueChange=({newLeftValue:a,newRightValue:s})=>{this.pendingLeftValue=a??this.pendingLeftValue,this.pendingRightValue=s??this.pendingRightValue,this.commitColorRange()}}ngOnDestroy(){this.commitColorRange.flush()}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(ht),te(Ye),te(zn))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-range-section"]],hostAttrs:[1,"contents"],decls:7,vars:23,consts:[[1,"block",3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","handleValueChange","sliderWidth"],[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"truncate","text-xs","opacity-60"],[3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","colorMetric","values","isAttributeDirectionInverted","diagramWidth","diagramHeight","showAxisLabels"]],template:function(i,n){i&1&&(F(0,"cc-metric-color-range-slider",0),v(1,"div",1)(2,"span",2),f(3,"Distribution"),b(),v(4,"span",3),f(5),b()(),F(6,"cc-metric-color-range-diagram",4)),i&2&&(L("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("handleValueChange",n.handleValueChange)("sliderWidth",220),m(5),he("",n.colorMetric()," \xD7 quantile %"),m(),L("minValue",n.sliderValues().min)("maxValue",n.sliderValues().max)("currentLeftValue",n.sliderValues().from)("currentRightValue",n.sliderValues().to)("leftColor",n.sliderColors().leftColor)("middleColor",n.sliderColors().middleColor)("rightColor",n.sliderColors().rightColor)("colorMetric",n.colorMetric())("values",n.sliderValues().values)("isAttributeDirectionInverted",n.isAttributeDirectionInversed())("diagramWidth",380)("diagramHeight",190)("showAxisLabels",!1))},dependencies:[r3,Jb],encapsulation:2,changeDetection:0})}}return e})();function o8(e,o){if(e&1){let t=xe();w(0,"button",6),K("click",function(){ae(t);let n=D();return se(n.resetThresholds())}),ue(1,"i",7),y()}}var s3=(()=>{class e{constructor(t,i,n,r){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.metricsBarReadStore=n,this.metricsBarWriteStore=r,this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.selectedColorMetricData=R(this.metricsBarReadStore.selectedColorMetricData$,{initialValue:{values:[],minValue:0,maxValue:0}}),this.canResetThresholds=X(()=>!this.isDeltaState()&&this.colorMetric()!=="unary"),this.swatchGradient=X(()=>{let a=this.mapColors();return this.isDeltaState()?`linear-gradient(90deg, ${a.positiveDelta}, ${a.negativeDelta})`:`linear-gradient(90deg, ${a.positive}, ${a.neutral}, ${a.negative})`})}resetThresholds(){this.metricsBarWriteStore.setColorRange(lr(this.selectedColorMetricData()))}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(Te),te(ht),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-settings-header"]],hostAttrs:[1,"contents"],decls:8,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","min-w-0","items-center","gap-2"],[1,"inline-block","h-3.5","w-3.5","shrink-0","rounded-full"],[1,"truncate","text-sm"],[1,"font-semibold","text-primary"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square"],["title","Reset slider thresholds to default","aria-label","Reset thresholds",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-undo"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1),ue(2,"span",2),w(3,"span",3),f(4,"Color by "),w(5,"span",4),f(6),y()()(),O(7,o8,2,0,"button",5),y()),i&2&&(m(2),Oe("background",n.swatchGradient()),m(4),qe(n.colorMetric()),m(),z(n.canResetThresholds()?7:-1))},encapsulation:2,changeDetection:0})}}return e})();var l3=(()=>{class e{constructor(){this.override=$.required(),this.recolorOverride=Ce(),this.unpinOverride=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-folder-override-row"]],hostAttrs:[1,"contents"],inputs:{override:[1,"override"]},outputs:{recolorOverride:"recolorOverride",unpinOverride:"unpinOverride"},decls:8,vars:7,consts:[[1,"flex","shrink-0","items-center","gap-2","rounded-md","border","border-base-300","px-2","py-1",3,"title"],[3,"colorChange","hexColor","ariaLabel"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"text-xs","opacity-60","tabular-nums",3,"title"],[1,"btn","btn-ghost","btn-xs","btn-square",3,"click","title"],[1,"fa","fa-times"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"cc-inline-color-picker",1),W("colorChange",function(a){return n.recolorOverride.emit(a)}),b(),v(2,"span",2),f(3),b(),v(4,"span",3),f(5),b(),v(6,"button",4),W("click",function(){return n.unpinOverride.emit()}),F(7,"i",5),b()()),i&2&&(L("title",n.override().path),m(),L("hexColor",n.override().color)("ariaLabel","Recolor "+n.override().path),m(2),qe(n.override().path),m(),L("title",n.override().fileCount+" files"),m(),qe(n.override().fileCount),m(),L("title","Unpin "+n.override().path))},dependencies:[ho],encapsulation:2,changeDetection:0})}}return e})();var n8=["pinInput"];function r8(e,o){if(e&1){let t=xe();w(0,"button",2),K("click",function(){ae(t);let n=D();return se(n.startPinning())}),ue(1,"i",3),w(2,"span"),f(3,"Pin a folder color\u2026"),y()()}}function a8(e,o){if(e&1){let t=xe();w(0,"li",8)(1,"button",10),K("mousedown",function(n){return n.preventDefault()})("click",function(){let n=ae(t).$implicit,r=D(2);return se(r.handlePin(n))}),w(2,"span",11),f(3),y()()()}if(e&2){let t=o.$implicit;m(),le("title",t),m(2),qe(t)}}function s8(e,o){e&1&&(w(0,"li",9),f(1,"No folders found"),y())}function l8(e,o){if(e&1){let t=xe();w(0,"div",4),ue(1,"i",5),w(2,"input",6,0),K("input",function(n){ae(t);let r=D();return se(r.handleSearchTermChange(n.target.value))})("keydown.escape",function(n){ae(t);let r=D();return se(r.handleSearchEscape(n))})("blur",function(){ae(t);let n=D();return se(n.handleSearchBlur())}),y()(),w(4,"ul",7),Ae(5,a8,4,2,"li",8,ti,!1,s8,2,0,"li",9),y()}if(e&2){let t=D();m(2),le("value",t.searchTerm()),m(3),Le(t.folderSuggestions())}}var c8=8,c3=(()=>{class e{constructor(t){this.metricsBarReadStore=t,this.pinFolder=Ce(),this.folderPaths=R(this.metricsBarReadStore.markableFolderPaths$,{initialValue:[]}),this.overrides=R(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.isPinning=be(!1),this.searchTerm=be(""),this.pinInput=je("pinInput"),this.folderSuggestions=X(()=>{let i=this.searchTerm().toLowerCase(),n=new Set(this.overrides().map(a=>a.path)),r=[];for(let a of this.folderPaths())if(!(n.has(a)||!a.toLowerCase().includes(i))&&(r.push(a),r.length>=c8))break;return r})}startPinning(){this.isPinning.set(!0),setTimeout(()=>this.pinInput()?.nativeElement.focus())}stopPinning(){this.isPinning.set(!1),this.searchTerm.set("")}handleSearchTermChange(t){this.searchTerm.set(t)}handleSearchBlur(){this.searchTerm().trim()===""&&this.stopPinning()}handleSearchEscape(t){t.preventDefault(),this.stopPinning()}handlePin(t){this.pinFolder.emit(t),this.stopPinning()}static{this.\u0275fac=function(i){return new(i||e)(te(ht))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-pin-folder-search"]],viewQuery:function(i,n){i&1&&it(n.pinInput,n8,5),i&2&&ot()},hostAttrs:[1,"contents"],outputs:{pinFolder:"pinFolder"},decls:2,vars:1,consts:[["pinInput",""],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal"],[1,"btn","btn-ghost","btn-sm","w-full","justify-start","gap-2","border","border-dashed","border-base-300","font-normal",3,"click"],[1,"fa","fa-plus"],[1,"input","input-sm","input-bordered","flex","items-center","gap-2"],[1,"fa","fa-search","opacity-60"],["type","text","placeholder","Search folders\u2026","aria-label","Search folders",1,"grow",3,"input","keydown.escape","blur","value"],[1,"m-0","flex","max-h-40","list-none","flex-col","overflow-y-auto","p-0"],[1,"flex"],[1,"px-2","py-1","text-xs","opacity-60"],[1,"btn","btn-ghost","btn-xs","w-full","flex-nowrap","justify-start","font-normal",3,"mousedown","click","title"],[1,"min-w-0","truncate"]],template:function(i,n){i&1&&O(0,r8,4,0,"button",1)(1,l8,8,2),i&2&&z(n.isPinning()?1:0)},encapsulation:2,changeDetection:0})}}return e})();var d8=(e,o)=>o.path;function m8(e,o){if(e&1&&(v(0,"span",2),f(1),b()),e&2){let t=D();m(),he("",t.overrides().length," pinned")}}function h8(e,o){if(e&1){let t=xe();v(0,"cc-folder-override-row",7),W("recolorOverride",function(n){let r=ae(t).$implicit,a=D(2);return se(a.handleRecolor(r.path,n))})("unpinOverride",function(){let n=ae(t).$implicit,r=D(2);return se(r.handleUnpin(n.path))}),b()}if(e&2){let t=o.$implicit;L("override",t)}}function p8(e,o){if(e&1&&(v(0,"div",4),Ae(1,h8,1,1,"cc-folder-override-row",6,d8),b()),e&2){let t=D();m(),Le(t.overrides())}}var d3=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.metricsBarReadStore=i,this.metricsBarWriteStore=n,this.overrides=R(this.metricsBarReadStore.markedPackagesWithCounts$,{initialValue:[]}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt})}handlePin(t){this.metricsBarWriteStore.markPackage({path:t,color:this.nextMarkingColor(t)})}handleRecolor(t,i){this.metricsBarWriteStore.markPackage({path:t,color:i})}handleUnpin(t){this.metricsBarWriteStore.unmarkPackage(t)}nextMarkingColor(t){let i=this.mapColors().markingColors,n=this.findMarkedParentColor(t),r=i.filter(s=>s!==n);if(r.length===0)return i[0];let a=new Set(this.overrides().map(s=>s.color));return r.find(s=>!a.has(s))??r[this.overrides().length%r.length]}findMarkedParentColor(t){let i,n=0;for(let r of this.overrides())t.startsWith(`${r.path}/`)&&r.path.length>n&&(i=r.color,n=r.path.length);return i}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(ht),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-folder-overrides"]],hostAttrs:[1,"contents"],decls:8,vars:2,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],[1,"text-xs","opacity-60"],[1,"m-0","text-xs","opacity-60"],[1,"flex","max-h-36","flex-col","gap-0.5","overflow-y-auto"],[3,"pinFolder"],[3,"override"],[3,"recolorOverride","unpinOverride","override"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"span",1),f(2,"Folder Overrides"),b(),O(3,m8,2,1,"span",2),b(),v(4,"p",3),f(5,"These folders\u2019 floors are tinted with the pinned color."),b(),O(6,p8,3,0,"div",4),v(7,"cc-pin-folder-search",5),W("pinFolder",function(a){return n.handlePin(a)}),b()),i&2&&(m(3),z(n.overrides().length>0?3:-1),m(3),z(n.overrides().length>0?6:-1))},dependencies:[l3,c3],encapsulation:2,changeDetection:0})}}return e})();var m3=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.metricsBarWriteStore=i,this.groupName=$.required(),this.colorMode=R(this.mapStateReadWindow.colorMode$,{initialValue:"absolute"})}handleColorModeChange(t){this.metricsBarWriteStore.setColorMode(t)}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-gradient-mode-picker"]],hostAttrs:[1,"contents"],inputs:{groupName:[1,"groupName"]},decls:8,vars:8,consts:[[1,"flex","flex-col","gap-1"],[1,"text-xs","uppercase","tracking-wider","opacity-60"],["role","radiogroup","aria-label","Gradient mode",1,"join","w-full"],["type","radio","aria-label","Absolute",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Focused",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Weighted",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"],["type","radio","aria-label","Relative",1,"join-item","btn","btn-sm","flex-1",3,"change","name","checked"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"span",1),f(2,"Gradient Mode"),y(),w(3,"div",2)(4,"input",3),K("change",function(){return n.handleColorModeChange("absolute")}),y(),w(5,"input",4),K("change",function(){return n.handleColorModeChange("focusedGradient")}),y(),w(6,"input",5),K("change",function(){return n.handleColorModeChange("weightedGradient")}),y(),w(7,"input",6),K("change",function(){return n.handleColorModeChange("trueGradient")}),y()()()),i&2&&(m(4),le("name",n.groupName())("checked",n.colorMode()==="absolute"),m(),le("name",n.groupName())("checked",n.colorMode()==="focusedGradient"),m(),le("name",n.groupName())("checked",n.colorMode()==="weightedGradient"),m(),le("name",n.groupName())("checked",n.colorMode()==="trueGradient"))},encapsulation:2,changeDetection:0})}}return e})();function u8(e,o){if(e&1){let t=xe();v(0,"label",1)(1,"input",3),W("change",function(){ae(t);let n=D();return se(n.handleIsColorRangeInvertedChange())}),b(),v(2,"span",4),f(3,"Invert colors"),b()()}if(e&2){let t=D();m(),L("checked",t.isColorRangeInverted())}}function f8(e,o){if(e&1){let t=xe();v(0,"label",1)(1,"input",3),W("change",function(){ae(t);let n=D();return se(n.handleAreDeltaColorsInvertedChange())}),b(),v(2,"span",4),f(3,"Invert colors"),b()()}if(e&2){let t=D();m(),L("checked",t.areDeltaColorsInverted())}}var h3=(()=>{class e{constructor(t,i,n){this.fileStoreReadWindow=t,this.mapStateReadWindow=i,this.metricsBarWriteStore=n,this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.isColorRangeInverted=X(()=>this.mapColors().isColorRangeInverted??!1),this.areDeltaColorsInverted=X(()=>this.mapColors().areDeltaColorsInverted??!1)}handleIsColorRangeInvertedChange(){this.metricsBarWriteStore.invertColorRange()}handleAreDeltaColorsInvertedChange(){this.metricsBarWriteStore.invertDeltaColors()}resetColorsKeys(){return this.isDeltaState()?["mapState.mapColors.positiveDelta","mapState.mapColors.negativeDelta","mapState.mapColors.selected","mapState.mapColors.areDeltaColorsInverted"]:["mapState.mapColors.positive","mapState.mapColors.negative","mapState.mapColors.neutral","mapState.mapColors.selected","mapState.mapColors.isColorRangeInverted","mapState.colorMode"]}static{this.\u0275fac=function(i){return new(i||e)(te(Te),te(ve),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-invert-reset-row"]],hostAttrs:[1,"contents"],decls:4,vars:4,consts:[[1,"flex","items-center","justify-between","gap-2"],[1,"flex","cursor-pointer","items-center","gap-2"],["label","Reset colors",3,"settingsKeys","tooltip","small"],["type","checkbox",1,"toggle","toggle-sm","toggle-primary",3,"change","checked"],[1,"text-sm"]],template:function(i,n){i&1&&(v(0,"div",0),O(1,u8,4,1,"label",1)(2,f8,4,1,"label",1),F(3,"cc-reset-settings-button",2),b()),i&2&&(m(),z(n.isDeltaState()?2:1),m(2),L("settingsKeys",n.resetColorsKeys())("tooltip",n.isDeltaState()?"Reset color values to default":"Reset color values and gradient mode to default")("small",!0))},dependencies:[po],encapsulation:2,changeDetection:0})}}return e})();function g8(e,o){if(e&1&&F(0,"cc-color-range-section")(1,"cc-gradient-mode-picker",1),e&2){let t=D();m(),L("groupName",t.popoverId()+"-gradient-mode")}}var Xl=(()=>{class e{constructor(t,i){this.mapStateReadWindow=t,this.fileStoreReadWindow=i,this.popoverId=$.required(),this.anchorName=$.required(),this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasRangeSection=X(()=>!this.isDeltaState()&&this.colorMetric()!=="unary")}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(Te))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:6,vars:4,consts:[[3,"popoverId","anchorName","widthClass"],[3,"groupName"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",0),F(1,"cc-color-settings-header"),O(2,g8,2,1),F(3,"cc-color-bands-section")(4,"cc-invert-reset-row")(5,"cc-folder-overrides"),b()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName())("widthClass","max-w-[95vw] "+(n.hasRangeSection()?"w-[420px]":"w-80")),m(2),z(n.hasRangeSection()?2:-1))},dependencies:[Ot,s3,a3,m3,P1,h3,d3],encapsulation:2,changeDetection:0})}}return e})();var p3=(()=>{class e{constructor(t,i,n){this.mapStateReadWindow=t,this.preferencesReadWindow=i,this.metricsBarWriteStore=n,this.searchPopoverId="metric-select-popover-color",this.searchAnchorName="metric-segment-color",this.settingsPopoverId="metric-settings-popover-color",this.settingsAnchorName="metric-segment-color-cog",this.colorMetric=R(this.mapStateReadWindow.colorMetric$,{initialValue:""}),this.isLinked=R(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1})}handleMetricSelected(t){this.metricsBarWriteStore.setColorMetric(t)}static{this.\u0275fac=function(i){return new(i||e)(te(ve),te(Qn),te(Ye))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-color-segment"]],hostAttrs:[1,"contents"],decls:5,vars:14,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","disabled","testId","cogTestId"],["body","",1,"flex","flex-col","items-stretch","gap-1"],["metricFor","colorMetric"],["placeholder","Color Metric (highest value)","kind","node",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(v(0,"cc-axis-card",0)(1,"div",1),F(2,"cc-metric-meta-value",2),b()(),v(3,"cc-metric-select-popover",3),W("metricSelected",function(a){return n.handleMetricSelected(a)}),b(),F(4,"cc-color-settings-popover",4)),i&2&&(L("metricName",n.colorMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("disabled",n.isLinked())("testId","metric-segment-color")("cogTestId","metric-segment-color-cog"),m(3),L("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.colorMetric()),m(),L("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[co,pr,pl,Xl],encapsulation:2,changeDetection:0})}}return e})();var u3=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.isEdgeMetricVisible=R(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0})}toggle(){this.metricsBarWriteStore.toggleEdgeMetricVisible()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-edge-metric-toggle"]],decls:4,vars:1,consts:[[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(w(0,"label",0)(1,"input",1),K("change",function(){return n.toggle()}),y(),w(2,"span"),f(3,"Disable edge metric"),y()()),i&2&&(m(),le("checked",!n.isEdgeMetricVisible()))},encapsulation:2,changeDetection:0})}}return e})();var f3=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.metricsBarReadStore=q(ht),this.metricsBarWriteStore=q(Ye),this.popoverId=$.required(),this.anchorName=$.required(),this.amountOfBuildingsWithSelectedEdgeMetric=R(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$,{initialValue:0}),this.edgePreviewLabel=R(this.metricsBarReadStore.amountOfBuildingsWithSelectedEdgeMetric$.pipe(ke(t=>`Preview the edges of up to ${t} buildings with the highest amount of incoming and outgoing edges`)),{initialValue:""}),this.amountOfEdgePreviews=R(this.mapStateReadWindow.amountOfEdgePreviews$,{initialValue:0}),this.edgeHeight=R(this.mapStateReadWindow.edgeHeight$,{initialValue:1}),this.showOutgoingEdges=R(this.mapStateReadWindow.showOutgoingEdges$,{initialValue:!1}),this.showIncomingEdges=R(this.mapStateReadWindow.showIncomingEdges$,{initialValue:!1}),this.showOnlyBuildingsWithEdges=R(this.mapStateReadWindow.showOnlyBuildingsWithEdges$,{initialValue:!1}),this.mapColors=R(this.mapStateReadWindow.mapColors$,{initialValue:Pt}),this.outgoingEdgeColor=X(()=>this.mapColors().outgoingEdge),this.incomingEdgeColor=X(()=>this.mapColors().incomingEdge),this.resetKeys=["mapState.amountOfEdgePreviews","mapState.edgeHeight","mapState.mapColors.outgoingEdge","mapState.showOutgoingEdges","mapState.mapColors.incomingEdge","mapState.showIncomingEdges","mapState.showOnlyBuildingsWithEdges","mapState.isEdgeMetricVisible"]}setAmountOfEdgePreviews(t){this.metricsBarWriteStore.setAmountOfEdgePreviews(t)}setEdgeHeight(t){this.metricsBarWriteStore.setEdgeHeight(t)}setShowOutgoingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOutgoingEdges(i)}setShowIncomingEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowIncomingEdges(i)}setShowOnlyBuildingsWithEdges(t){let i=t.target.checked;this.metricsBarWriteStore.setShowOnlyBuildingsWithEdges(i)}setMapColor(t,i){this.metricsBarWriteStore.setMapColors({[t]:i})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-edge-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:32,vars:18,consts:[["widthClass","w-80",3,"popoverId","anchorName"],[3,"title"],[1,"text-sm"],["ariaLabel","Edge preview amount",3,"valueChange","min","max","value","disabled"],["title","Adjust the curve height"],["ariaLabel","Edge height",3,"valueChange","min","max","value","disabled"],[1,"flex","flex-col","gap-2"],[1,"flex","items-center","gap-2"],["ariaLabel","Outgoing edge color",3,"colorChange","hexColor"],[1,"min-w-0","flex-1","truncate","text-sm"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"],["ariaLabel","Incoming edge color",3,"colorChange","hexColor"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","disabled"],["tooltip","Reset edge metric settings to their defaults","label","Reset edge metric settings",3,"settingsKeys"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),f(3,"Preview"),b(),v(4,"cc-slider-number-input",3),W("valueChange",function(a){return n.setAmountOfEdgePreviews(a)}),b()(),v(5,"div",4)(6,"span",2),f(7,"Height"),b(),v(8,"cc-slider-number-input",5),W("valueChange",function(a){return n.setEdgeHeight(a)}),b()(),v(9,"div",6)(10,"div",7)(11,"cc-inline-color-picker",8),W("colorChange",function(a){return n.setMapColor("outgoingEdge",a)}),b(),v(12,"span",9),f(13,"Outgoing Edge"),b(),v(14,"label",10)(15,"input",11),W("change",function(a){return n.setShowOutgoingEdges(a)}),b(),v(16,"span"),f(17,"Show"),b()()(),v(18,"div",7)(19,"cc-inline-color-picker",12),W("colorChange",function(a){return n.setMapColor("incomingEdge",a)}),b(),v(20,"span",9),f(21,"Incoming Edge"),b(),v(22,"label",10)(23,"input",11),W("change",function(a){return n.setShowIncomingEdges(a)}),b(),v(24,"span"),f(25,"Show"),b()()()(),v(26,"label",10)(27,"input",13),W("change",function(a){return n.setShowOnlyBuildingsWithEdges(a)}),b(),v(28,"span"),f(29,"Only show nodes with edges"),b()(),F(30,"cc-edge-metric-toggle")(31,"cc-reset-settings-button",14),b()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName()),m(),L("title",n.edgePreviewLabel()),m(3),L("min",0)("max",n.amountOfBuildingsWithSelectedEdgeMetric())("value",n.amountOfEdgePreviews())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),m(4),L("min",1)("max",9)("value",n.edgeHeight())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),m(3),L("hexColor",n.outgoingEdgeColor()),m(4),L("checked",n.showOutgoingEdges()),m(4),L("hexColor",n.incomingEdgeColor()),m(4),L("checked",n.showIncomingEdges()),m(4),L("checked",n.showOnlyBuildingsWithEdges())("disabled",n.amountOfBuildingsWithSelectedEdgeMetric()===0),m(4),L("settingsKeys",n.resetKeys))},dependencies:[ho,po,u3,Ot,ir],encapsulation:2,changeDetection:0})}}return e})();function b8(e,o){e&1&&(F(0,"cc-metric-chooser-type",5),v(1,"span"),f(2),b()),e&2&&(L("metricFor","edgeMetric"),m(2),qe(o))}function v8(e,o){e&1&&(v(0,"span",2),f(1,"\xA0"),b())}var b3=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.nodeSelectionService=q(hr),this.searchPopoverId="metric-select-popover-edge",this.searchAnchorName="metric-segment-edges",this.settingsPopoverId="metric-settings-popover-edge",this.settingsAnchorName="metric-segment-edges-cog",this.edgeMetric=R(this.mapStateReadWindow.edgeMetric$,{initialValue:""}),this.isEdgeMetricVisible=R(this.mapStateReadWindow.isEdgeMetricVisible$,{initialValue:!0}),this.hoveredNode=R(this.nodeSelectionService.createNodeObservable()),this.hoveredEdgeValue=X(()=>{let t=this.hoveredNode(),i=this.edgeMetric();if(!t||!i)return null;let n=t.edgeAttributes?.[i];return n?`${g3(n.incoming)} / ${g3(n.outgoing)}`:null})}handleMetricSelected(t){this.metricsBarWriteStore.setEdgeMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-edge-segment"]],hostAttrs:[1,"contents"],decls:6,vars:15,consts:[["label","Edges",3,"metricName","hasCog","cogPopoverId","cogAnchorName","searchPopoverId","searchAnchorName","dimmed","testId","cogTestId"],["body","",1,"flex","items-center","justify-center","gap-1","text-xs","opacity-60","leading-tight","min-h-4"],["aria-hidden","true"],["placeholder","Edge Metric (highest value)","kind","edge",3,"metricSelected","popoverId","anchorName","selected"],[3,"popoverId","anchorName"],["attributeType","edges",3,"metricFor"]],template:function(i,n){if(i&1&&(v(0,"cc-axis-card",0)(1,"div",1),O(2,b8,3,2)(3,v8,2,0,"span",2),b()(),v(4,"cc-metric-select-popover",3),W("metricSelected",function(a){return n.handleMetricSelected(a)}),b(),F(5,"cc-edge-settings-popover",4)),i&2){let r;L("metricName",n.edgeMetric())("hasCog",!0)("cogPopoverId",n.settingsPopoverId)("cogAnchorName",n.settingsAnchorName)("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("dimmed",!n.isEdgeMetricVisible())("testId","metric-segment-edges")("cogTestId","metric-segment-edges-cog"),m(2),z((r=n.hoveredEdgeValue())?2:3,r),m(2),L("popoverId",n.searchPopoverId)("anchorName",n.searchAnchorName)("selected",n.edgeMetric()),m(),L("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName)}},dependencies:[co,hl,pr,f3],encapsulation:2,changeDetection:0})}}return e})();function g3(e){return typeof e=="number"?e.toLocaleString():"-"}function x8(e,o){if(e&1){let t=xe();v(0,"label",4)(1,"input",6),W("change",function(n){ae(t);let r=D();return se(r.toggleInvertHeight(n))}),b(),v(2,"span"),f(3,"Invert Height"),b()()}if(e&2){let t=D();m(),L("checked",t.invertHeight())}}var v3=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.fileStoreReadWindow=q(Te),this.metricsBarWriteStore=q(Ye),this.popoverId=$.required(),this.anchorName=$.required(),this.scalingY=R(this.mapStateReadWindow.scaling$,{initialValue:{x:1,y:1,z:1}}),this.invertHeight=R(this.mapStateReadWindow.invertHeight$,{initialValue:!1}),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.resetKeys=["mapState.scaling.y","mapState.invertHeight"]}setScalingY(t){this.metricsBarWriteStore.setScaling({y:t})}toggleInvertHeight(t){let i=t.target.checked;this.metricsBarWriteStore.setInvertHeight(i)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-height-settings-popover"]],hostAttrs:[1,"contents"],inputs:{popoverId:[1,"popoverId"],anchorName:[1,"anchorName"]},decls:7,vars:7,consts:[[3,"popoverId","anchorName"],["title","Height scaling"],[1,"text-sm"],["ariaLabel","Height",3,"valueChange","min","max","value"],[1,"flex","items-center","gap-2","cursor-pointer"],["tooltip","Reset height metric settings to their defaults","label","Reset height metric settings",3,"settingsKeys"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked"]],template:function(i,n){i&1&&(v(0,"cc-settings-popover-shell",0)(1,"div",1)(2,"span",2),f(3,"Height"),b(),v(4,"cc-slider-number-input",3),W("valueChange",function(a){return n.setScalingY(a)}),b()(),O(5,x8,4,1,"label",4),F(6,"cc-reset-settings-button",5),b()),i&2&&(L("popoverId",n.popoverId())("anchorName",n.anchorName()),m(4),L("min",1)("max",25)("value",n.scalingY().y),m(),z(n.isDeltaState()?-1:5),m(),L("settingsKeys",n.resetKeys))},dependencies:[po,Ot,ir],encapsulation:2,changeDetection:0})}}return e})();var x3=(()=>{class e{constructor(){this.searchPopoverId="metric-select-popover-height",this.searchAnchorName="metric-segment-height",this.settingsPopoverId="metric-settings-popover-height",this.settingsAnchorName="metric-segment-height-cog",this.mapStateReadWindow=q(ve),this.metricsBarWriteStore=q(Ye),this.heightMetric=R(this.mapStateReadWindow.heightMetric$,{initialValue:""})}handleMetricSelected(t){this.metricsBarWriteStore.setHeightMetric(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-height-segment"]],hostAttrs:[1,"contents"],decls:2,vars:7,consts:[["label","Height","metricFor","heightMetric","placeholder","Height Metric (highest value)","testIdPrefix","metric-segment-height",3,"metricSelected","metricName","searchPopoverId","searchAnchorName","settingsPopoverId","settingsAnchorName"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(v(0,"cc-metric-segment",0),W("metricSelected",function(a){return n.handleMetricSelected(a)}),F(1,"cc-height-settings-popover",1),b()),i&2&&(L("metricName",n.heightMetric())("searchPopoverId",n.searchPopoverId)("searchAnchorName",n.searchAnchorName)("settingsPopoverId",n.settingsPopoverId)("settingsAnchorName",n.settingsAnchorName),m(),L("popoverId",n.settingsPopoverId)("anchorName",n.settingsAnchorName))},dependencies:[ul,v3],encapsulation:2,changeDetection:0})}}return e})();var Tt={areaMetric:{group:"area",label:"Area metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.areaMetric,patch:e=>({mapState:{areaMetric:e.areaMetric}})},margin:{group:"area",label:"Margin",read:e=>e.state.mapState.margin,patch:e=>({mapState:{margin:e.margin}})},invertArea:{group:"area",label:"Invert area",read:e=>e.state.mapState.invertArea,patch:e=>({mapState:{invertArea:e.invertArea}})},enableFloorLabels:{group:"area",label:"Floor labels",read:e=>e.state.mapState.enableFloorLabels,patch:e=>({mapState:{enableFloorLabels:e.enableFloorLabels}})},heightMetric:{group:"height",label:"Height metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.heightMetric,patch:e=>({mapState:{heightMetric:e.heightMetric}})},heightScaling:{group:"height",label:"Height scaling",read:e=>e.state.mapState.scaling.y,patch:e=>({mapState:{scaling:{y:e.heightScaling}}})},invertHeight:{group:"height",label:"Invert height",read:e=>e.state.mapState.invertHeight,patch:e=>({mapState:{invertHeight:e.invertHeight}})},colorMetric:{group:"color",label:"Color metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.colorMetric,patch:e=>({mapState:{colorMetric:e.colorMetric}})},isColorMetricLinkedToHeightMetric:{group:"color",label:"Color follows height metric",isAppliedFirst:!0,read:e=>e.state.preferences.isColorMetricLinkedToHeightMetric,patch:e=>({preferences:{isColorMetricLinkedToHeightMetric:e.isColorMetricLinkedToHeightMetric}})},colorRange:{group:"color",label:"Color range",read:e=>Ee({},e.state.mapState.colorRange),patch:e=>({mapState:{colorRange:e.colorRange}})},colorMode:{group:"color",label:"Gradient mode",read:e=>e.state.mapState.colorMode,patch:e=>({mapState:{colorMode:e.colorMode}})},mapColors:{group:"color",label:"Colors",read:e=>w8(e.state.mapState.mapColors),patch:e=>({mapState:{mapColors:e.mapColors}})},markedPackages:{group:"color",label:"Folder color overrides",read:e=>[...e.state.sharedView.markedPackages],patch:e=>({sharedView:{markedPackages:[...e.markedPackages]}})},edgeMetric:{group:"edge",label:"Edge metric",isMetricSelection:!0,isAppliedFirst:!0,read:e=>e.state.mapState.edgeMetric,patch:e=>({mapState:{edgeMetric:e.edgeMetric}})},isEdgeMetricVisible:{group:"edge",label:"Edge metric enabled",read:e=>e.state.mapState.isEdgeMetricVisible,patch:e=>({mapState:{isEdgeMetricVisible:e.isEdgeMetricVisible}})},amountOfEdgePreviews:{group:"edge",label:"Edge previews",read:e=>e.state.mapState.amountOfEdgePreviews,patch:e=>({mapState:{amountOfEdgePreviews:e.amountOfEdgePreviews}})},edgeHeight:{group:"edge",label:"Edge curve height",read:e=>e.state.mapState.edgeHeight,patch:e=>({mapState:{edgeHeight:e.edgeHeight}})},showOutgoingEdges:{group:"edge",label:"Show outgoing edges",read:e=>e.state.mapState.showOutgoingEdges,patch:e=>({mapState:{showOutgoingEdges:e.showOutgoingEdges}})},showIncomingEdges:{group:"edge",label:"Show incoming edges",read:e=>e.state.mapState.showIncomingEdges,patch:e=>({mapState:{showIncomingEdges:e.showIncomingEdges}})},showOnlyBuildingsWithEdges:{group:"edge",label:"Only nodes with edges",read:e=>e.state.mapState.showOnlyBuildingsWithEdges,patch:e=>({mapState:{showOnlyBuildingsWithEdges:e.showOnlyBuildingsWithEdges}})},edgeColors:{group:"edge",label:"Edge colors",read:e=>({outgoingEdge:e.state.mapState.mapColors.outgoingEdge,incomingEdge:e.state.mapState.mapColors.incomingEdge}),patch:e=>({mapState:{mapColors:Ee({},e.edgeColors)}})},amountOfTopLabels:{group:"labels",label:"Top labels",read:e=>e.state.mapState.amountOfTopLabels,patch:e=>({mapState:{amountOfTopLabels:e.amountOfTopLabels}})},labelsPerMap:{group:"labels",label:"Top labels scope",read:e=>e.state.mapState.labelsPerMap,patch:e=>({mapState:{labelsPerMap:e.labelsPerMap}})},labelSize:{group:"labels",label:"Label size",read:e=>e.state.mapState.labelSize,patch:e=>({mapState:{labelSize:e.labelSize}})},labelMode:{group:"labels",label:"Label mode",read:e=>e.state.mapState.labelMode,patch:e=>({mapState:{labelMode:e.labelMode}})},showMetricLabelNodeName:{group:"labels",label:"Show node names",read:e=>e.state.mapState.showMetricLabelNodeName,patch:e=>({mapState:{showMetricLabelNodeName:e.showMetricLabelNodeName}})},showMetricLabelNameValue:{group:"labels",label:"Show metric values",read:e=>e.state.mapState.showMetricLabelNameValue,patch:e=>({mapState:{showMetricLabelNameValue:e.showMetricLabelNameValue}})},groupLabelCollisions:{group:"labels",label:"Group overlapping labels",read:e=>e.state.mapState.groupLabelCollisions,patch:e=>({mapState:{groupLabelCollisions:e.groupLabelCollisions}})},colorLabels:{group:"labels",label:"Labels by color metric",read:e=>Ee({},e.state.mapState.colorLabels),patch:e=>({mapState:{colorLabels:e.colorLabels}})},camera:{group:"camera",label:"Position and zoom",read:e=>({position:Ee({},e.camera.position),target:Ee({},e.camera.target)})},blacklist:{group:"filters",label:"Excluded and hidden nodes",read:e=>[...e.state.sharedView.blacklist],patch:e=>({sharedView:{blacklist:[...e.blacklist]}})},metricRules:{group:"filters",label:"Flattened and hidden by metric",read:e=>[...e.state.sharedView.metricRules],patch:e=>({sharedView:{metricRules:[...e.metricRules]}})},focusedNodePath:{group:"filters",label:"Focused folder",read:e=>[...e.state.sharedView.focusedNodePath],patch:e=>({sharedView:{focusedNodePath:[...e.focusedNodePath]}})}};function w8(e){let n=e,{outgoingEdge:o,incomingEdge:t}=n;return Ir(n,["outgoingEdge","incomingEdge"])}var tn=Object.keys(Tt),ma={area:"Area",height:"Height",color:"Color",edge:"Edges",labels:"Labels",camera:"Camera",filters:"Filters"},Kl=Object.keys(ma),Ql={area:"fa-th-large",height:"fa-bar-chart",color:"fa-paint-brush",edge:"fa-share-alt",labels:"fa-tags",camera:"fa-video-camera",filters:"fa-filter"};function Am(e){return!!Tt[e].isMetricSelection}var EU=tn.filter(Am);function Lm(e){return!!Tt[e].isAppliedFirst}function w3(e,o){return Object.fromEntries(Object.entries(e).filter(([t])=>o.has(t)))}function S3(e,o){let t={};for(let i of tn){if(!o.has(i))continue;let n=Tt[i].read(e);n!==void 0&&(t[i]=n)}return t}var Yl=".ccscenario",Zl=2;function Fm(e){return tn.filter(o=>e.settings[o]!==void 0)}function y3(e){let o=new Set(Fm(e).map(t=>Tt[t].group));return Kl.filter(t=>o.has(t))}function C3(e){return tt(Ee(Ee({schemaVersion:Zl,name:e.name},e.description?{description:e.description}:{}),e.mapFileNames?.length>0?{mapFileNames:e.mapFileNames}:{}),{settings:e.settings})}function M3(e){return{id:crypto.randomUUID(),name:e.name,description:e.description,mapFileNames:e.mapFileNames,createdAt:Date.now(),settings:e.settings}}var E3=(e,o)=>o.key;function S8(e,o){if(e&1){let t=xe();w(0,"label",8)(1,"input",12),K("change",function(n){let r=ae(t).$implicit,a=D(2);return se(a.toggleSetting(r.key,n.target.checked))}),y(),w(2,"span",13),f(3),y()()}if(e&2){let t=o.$implicit;m(),le("checked",t.selected),rt("data-testid","scenario-setting-"+t.key),m(2),qe(t.label)}}function y8(e,o){if(e&1){let t=xe();w(0,"div",7)(1,"label",8)(2,"input",9),K("change",function(n){let r=ae(t).$implicit,a=D();return se(a.toggleGroup(r,n.target.checked))}),y(),ue(3,"i"),w(4,"span",10),f(5),y()(),w(6,"div",11),Ae(7,S8,4,3,"label",8,E3),y()()}if(e&2){let t=o.$implicit;m(2),le("checked",t.allSelected)("indeterminate",t.someSelected&&!t.allSelected),rt("data-testid","scenario-group-"+t.key),m(),yt(hn("fa ",t.icon," w-4 text-center opacity-60")),m(2),qe(t.label),m(2),Le(t.settings)}}var Jl=(()=>{class e{constructor(){this.availableKeys=$.required(),this.defaultKeys=$.required(),this.selectedKeys=ip.required(),this.isDefaultSelection=X(()=>{let t=this.selectedKeys(),i=this.defaultKeys();return t.size===i.length&&i.every(n=>t.has(n))}),this.groups=X(()=>{let t=this.selectedKeys(),i=this.availableKeys();return Kl.map(n=>this.toPickerGroup(n,i,t)).filter(n=>n.settings.length>0)})}selectAll(){this.selectedKeys.set(new Set(this.availableKeys()))}selectNone(){this.selectedKeys.set(new Set)}resetSelection(){this.selectedKeys.set(new Set(this.defaultKeys()))}toggleSetting(t,i){this.selectedKeys.update(n=>_3(n,[t],i))}toggleGroup(t,i){this.selectedKeys.update(n=>_3(n,t.settings.map(r=>r.key),i))}toPickerGroup(t,i,n){let r=i.filter(a=>Tt[a].group===t).map(a=>({key:a,label:Tt[a].label,selected:n.has(a)}));return{key:t,label:ma[t],icon:Ql[t],settings:r,allSelected:r.length>0&&r.every(a=>a.selected),someSelected:r.some(a=>a.selected)}}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-settings-picker"]],inputs:{availableKeys:[1,"availableKeys"],defaultKeys:[1,"defaultKeys"],selectedKeys:[1,"selectedKeys"]},outputs:{selectedKeys:"selectedKeysChange"},decls:13,vars:1,consts:[[1,"mb-1","flex","items-center","justify-between","gap-2"],[1,"text-xs","uppercase","tracking-wide","opacity-60"],[1,"join"],["type","button","data-testid","scenario-settings-select-all",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-select-none",1,"btn","btn-xs","join-item",3,"click"],["type","button","data-testid","scenario-settings-reset",1,"btn","btn-xs","join-item",3,"click","disabled"],[1,"flex","flex-col","gap-2","max-h-64","overflow-y-auto","pr-1"],[1,"flex","flex-col","gap-1"],[1,"flex","items-center","gap-2","cursor-pointer"],["type","checkbox",1,"checkbox","checkbox-sm","checkbox-primary",3,"change","checked","indeterminate"],[1,"text-sm","font-semibold"],[1,"flex","flex-col","gap-0.5","pl-7"],["type","checkbox",1,"checkbox","checkbox-xs","checkbox-primary",3,"change","checked"],[1,"text-xs"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"span",1),f(2,"Toggle all"),y(),w(3,"div",2)(4,"button",3),K("click",function(){return n.selectAll()}),f(5," On "),y(),w(6,"button",4),K("click",function(){return n.selectNone()}),f(7," Off "),y(),w(8,"button",5),K("click",function(){return n.resetSelection()}),f(9," Reset "),y()()(),w(10,"div",6),Ae(11,y8,9,7,"div",7,E3),y()),i&2&&(m(8),le("disabled",n.isDefaultSelection()),m(3),Le(n.groups()))},encapsulation:2,changeDetection:0})}}return e})();function _3(e,o,t){let i=new Set(e);for(let n of o)t?i.add(n):i.delete(n);return i}function ec(e){return`${e} ${e===1?"setting":"settings"}`}var tc=(()=>{class e{constructor(t,i){this.store=t,this.ccStateSnapshot=i}getValue(){return this.ccStateSnapshot.get()}setStatePatch(t){this.store.dispatch(ki({value:t}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var C8=["areaMetric","heightMetric","colorMetric"],ic=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.threeRendererService=r}getAvailableMetricNames(t){return{nodeMetrics:new Set(t.nodeMetricData.map(i=>i.name)),edgeMetrics:new Set(t.edgeMetricData.map(i=>i.name))}}getMissingMetrics(t,i){let n=this.getAvailableMetricNames(i),r=C8.map(a=>t[a]).filter(a=>!!a);return{nodeMetrics:[...new Set(r.filter(a=>!n.nodeMetrics.has(a)))],edgeMetrics:t.edgeMetric&&!n.edgeMetrics.has(t.edgeMetric)?[t.edgeMetric]:[]}}hasMissingMetrics(t){return t.nodeMetrics.length>0||t.edgeMetrics.length>0}buildOrderedStatePatches(t,i,n){let r=this.getApplicableKeys(t,i,n);return[this.mergePatchesOf(t,r.filter(Lm)),this.mergePatchesOf(t,r.filter(a=>!Lm(a)))].filter(a=>Object.keys(a).length>0)}getCameraVectors(t){if(!t.camera)return;let{position:i,target:n}=t.camera;return{position:new Qe(i.x,i.y,i.z),target:new Qe(n.x,n.y,n.z)}}async applyScenario(t,i,n){id(!0);try{let r=i.has("camera")?this.getCameraVectors(t.settings):void 0,a=r!==void 0,s=this.buildOrderedStatePatches(t.settings,i,n),l=a&&s.length>0?this.scenariosStore.getValue().preferences.resetCameraIfNewFileIsLoaded:void 0;l&&s.length>0&&(s[0].preferences=tt(Ee({},s[0].preferences),{resetCameraIfNewFileIsLoaded:!1}));for(let d of s)this.scenariosStore.setStatePatch(d),await new Promise(c=>setTimeout(c));if(a&&this.threeCameraService.camera){let{position:d,target:c}=r;this.threeCameraService.camera.position.set(d.x,d.y,d.z),this.threeMapControlsService.setControlTarget(c),this.threeCameraService.camera.lookAt(c),this.threeCameraService.camera.updateProjectionMatrix(),this.threeMapControlsService.updateControls()}l&&setTimeout(()=>{this.scenariosStore.setStatePatch({preferences:{resetCameraIfNewFileIsLoaded:!0}})}),this.threeRendererService.render()}finally{id(!1)}}getApplicableKeys(t,i,n){let r=n?this.getAvailableMetricNames(n):void 0;return[...i].filter(a=>t[a]!==void 0&&Tt[a].patch!==void 0&&this.isMetricAvailable(a,t,r))}isMetricAvailable(t,i,n){if(!n||!Am(t))return!0;let r=i[t]??"";return t==="edgeMetric"?r===""||n.edgeMetrics.has(r):n.nodeMetrics.has(r)}mergePatchesOf(t,i){let n={};for(let r of i){let a=Tt[r].patch;a&&(n=T3(n,a(t)))}return n}static{this.\u0275fac=function(i){return new(i||e)(M(tc),M(Kn),M(Wt),M(kt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function T3(e,o){let t=Ee({},e);for(let[i,n]of Object.entries(o)){let r=t[i];t[i]=q3(n)&&q3(r)?T3(Ee({},r),n):n}return t}function q3(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var M8=["dialog"];function _8(e,o){if(e&1&&(v(0,"div",4)(1,"span",13),F(2,"i",14),v(3,"span",15),f(4),b()()()),e&2){let t=D();m(),L("title",t.scenario().mapFileNames.join(", ")),m(3),qe(t.scenario().mapFileNames.join(", "))}}function E8(e,o){if(e&1&&(v(0,"li"),f(1),b()),e&2){let t=o.$implicit;m(),he("",t," (node metric)")}}function k8(e,o){if(e&1&&(v(0,"li"),f(1),b()),e&2){let t=o.$implicit;m(),he("",t," (edge metric)")}}function q8(e,o){if(e&1&&(v(0,"div",7),F(1,"i",16),v(2,"div")(3,"strong"),f(4,"Some metrics are not available in the current map and will not be applied:"),b(),v(5,"ul",17),Ae(6,E8,2,1,"li",null,ti),Ae(8,k8,2,1,"li",null,ti),b()()()),e&2){let t=D();m(6),Le(t.missingMetrics().nodeMetrics),m(2),Le(t.missingMetrics().edgeMetrics)}}var Pm=(()=>{class e{constructor(t){this.scenarioApplier=t,this.scenario=$.required(),this.metricData=$.required(),this.closed=Ce(),this.dialogElement=je.required("dialog"),this.availableKeys=X(()=>Fm(this.scenario())),this.defaultKeys=X(()=>this.availableKeys().filter(i=>Tt[i].group!=="camera")),this.selectedKeys=tp(()=>new Set(this.defaultKeys())),this.missingMetrics=X(()=>this.scenarioApplier.getMissingMetrics(w3(this.scenario().settings,this.selectedKeys()),this.metricData())),this.hasMissing=X(()=>this.scenarioApplier.hasMissingMetrics(this.missingMetrics())),this.hasAnySelected=X(()=>this.selectedKeys().size>0),this.applySelectedLabel=X(()=>`Apply ${ec(this.selectedKeys().size)}`),this.destroyRef=q(dn)}ngAfterViewInit(){let t=this.dialogElement().nativeElement,i=()=>this.closed.emit();t.addEventListener("close",i),this.destroyRef.onDestroy(()=>t.removeEventListener("close",i)),t.showModal()}async apply(){await this.applyKeys(this.selectedKeys())}async applyAll(){await this.applyKeys(new Set(this.availableKeys()))}async applyKeys(t){this.dialogElement().nativeElement.close(),await this.scenarioApplier.applyScenario(this.scenario(),t,this.metricData())}close(){this.dialogElement().nativeElement.close()}static{this.\u0275fac=function(i){return new(i||e)(te(ic))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-apply-scenario-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,M8,5),i&2&&ot()},inputs:{scenario:[1,"scenario"],metricData:[1,"metricData"]},outputs:{closed:"closed"},decls:20,vars:9,consts:[["dialog",""],["aria-labelledby","apply-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","apply-scenario-title",1,"text-xl","font-bold","mb-1","truncate",3,"title"],[1,"mb-3"],[1,"text-sm","text-base-content/60","mb-3"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"alert","alert-warning","mt-4","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["title","Apply everything this scenario holds, the camera included","data-testid","apply-scenario-all",1,"btn","btn-outline",3,"click"],["data-testid","apply-scenario-selected",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[1,"badge","badge-sm","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[1,"fa","fa-exclamation-triangle"],[1,"list-disc","pl-5","mt-1"]],template:function(i,n){if(i&1){let r=xe();v(0,"dialog",1,0)(2,"div",2)(3,"h2",3),f(4),b(),O(5,_8,5,2,"div",4),v(6,"p",5),f(7,"Select which settings to apply:"),b(),v(8,"cc-scenario-settings-picker",6),Na("selectedKeysChange",function(s){return ae(r),Pa(n.selectedKeys,s)||(n.selectedKeys=s),se(s)}),b(),O(9,q8,10,0,"div",7),v(10,"div",8)(11,"button",9),W("click",function(){return n.close()}),f(12,"Cancel"),b(),v(13,"button",10),W("click",function(){return n.applyAll()}),f(14," Apply all "),b(),v(15,"button",11),W("click",function(){return n.apply()}),f(16),b()()(),v(17,"form",12)(18,"button"),f(19,"close"),b()()()}if(i&2){let r;m(3),L("title","Apply: "+n.scenario().name),m(),he("Apply: ",n.scenario().name),m(),z((r=n.scenario().mapFileNames)!=null&&r.length?5:-1),m(3),L("availableKeys",n.availableKeys())("defaultKeys",n.defaultKeys()),Fa("selectedKeys",n.selectedKeys),m(),z(n.hasMissing()?9:-1),m(6),L("disabled",!n.hasAnySelected()),m(),he(" ",n.applySelectedLabel()," ")}},dependencies:[mo,er,Zn,Jn,Jl],encapsulation:2,changeDetection:0})}}return e})();function D3(e){return e.settings??T8(e.sections??{})}function A3(e){let i=e,{sections:o}=i,t=Ir(i,["sections"]);return tt(Ee({},t),{settings:D3(e)})}function L3(e){let o=e;if(!(!o?.name||o.schemaVersion!==1&&o.schemaVersion!==Zl)&&!(!o.sections&&!o.settings))return{schemaVersion:Zl,name:o.name,description:o.description,mapFileNames:o.mapFileNames,settings:D3(o)}}function T8(e){let{metrics:o,colors:t,camera:i,filters:n,labelsAndFolders:r}=e,c=t?.mapColors??{},{outgoingEdge:a,incomingEdge:s}=c,l=Ir(c,["outgoingEdge","incomingEdge"]),d=a!==void 0||s!==void 0;return I8({areaMetric:o?.areaMetric,enableFloorLabels:r?.enableFloorLabels,heightMetric:o?.heightMetric,colorMetric:o?.colorMetric,isColorMetricLinkedToHeightMetric:o?.isColorMetricLinkedToHeightMetric,colorRange:t?.colorRange,colorMode:t?.colorMode,mapColors:Object.keys(l).length>0?l:void 0,markedPackages:r?.markedPackages,edgeMetric:o?.edgeMetric,edgeColors:d?{outgoingEdge:a,incomingEdge:s}:void 0,amountOfTopLabels:r?.amountOfTopLabels,labelSize:r?.labelSize,labelMode:r?.labelMode,showMetricLabelNodeName:r?.showMetricLabelNodeName,showMetricLabelNameValue:r?.showMetricLabelNameValue,groupLabelCollisions:r?.groupLabelCollisions,colorLabels:r?.colorLabels,camera:i,blacklist:n?.blacklist,focusedNodePath:n?.focusedNodePath})}function I8(e){return Object.fromEntries(Object.entries(e).filter(([,o])=>o!==void 0))}var oc=(()=>{class e{async readAll(){return(await(await Nr()).getAll(Pr)).map(A3)}async add(t){let n=(await Nr()).transaction(Pr,"readwrite");await Promise.all([n.store.add(t),n.done])}async update(t){let n=(await Nr()).transaction(Pr,"readwrite");await Promise.all([n.store.put(t),n.done])}async delete(t){let n=(await Nr()).transaction(Pr,"readwrite");await Promise.all([n.store.delete(t),n.done])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var P3={position:{x:0,y:300,z:1e3},target:{x:0,y:0,z:0}},nc={positive:"#69AE40",neutral:"#ddcc00",negative:"#820E0E"},R8={positive:nc.negative,neutral:nc.neutral,negative:nc.positive,isColorRangeInverted:!0},D8=[{id:"built-in-rloc",name:"Real Lines of Code",description:"Visualize code size using real lines of code",metric:"rloc",colorRange:{from:250,to:500}},{id:"built-in-complexity",name:"Complexity",description:"Visualize cyclomatic complexity",metric:"complexity",colorRange:{from:50,to:100}},{id:"built-in-comment-lines",name:"Comment Lines",description:"Visualize comment density",metric:"comment_lines",colorRange:{from:50,to:100}},{id:"built-in-code-smells",name:"Code Smells",description:"Visualize code smell density",metric:"sonar_code_smells",colorRange:{from:10,to:50}},{id:"built-in-logic-complexity",name:"Logic Complexity",description:"Visualize cognitive/logic complexity",metric:"logic_complexity",colorRange:{from:40,to:80}},{id:"built-in-max-complexity-per-function",name:"Max Complexity per Function",description:"Visualize maximum complexity per function",metric:"max_complexity_per_function",colorRange:{from:10,to:20}},{id:"built-in-authors",name:"Authors",description:"Visualize the number of authors per file",metric:"number_of_authors",colorRange:{from:2,to:3},colorMode:Do.absolute,mapColors:R8}],N3=D8.map(e=>({id:e.id,name:e.name,description:e.description,createdAt:0,isBuiltIn:!0,settings:{areaMetric:"rloc",heightMetric:e.metric,colorMetric:e.metric,isColorMetricLinkedToHeightMetric:!0,colorRange:e.colorRange,colorMode:e.colorMode??Do.weightedGradient,mapColors:e.mapColors??nc}})),Oi=(()=>{class e{constructor(t,i,n,r){this.scenariosStore=t,this.threeCameraService=i,this.threeMapControlsService=n,this.db=r,this.scenarios$=new Fh([])}async loadScenarios(){try{let t=await this.db.readAll();t.sort((i,n)=>n.createdAt-i.createdAt),this.scenarios$.next([...t,...N3])}catch(t){console.error("Failed to load scenarios from IndexedDB:",t),this.scenarios$.next([...N3])}}async saveScenario(t){let i=this.buildScenario(t,this.readCurrentSource());try{await this.db.add(i),await this.loadScenarios()}catch(n){console.error("Failed to save scenario:",n)}return i}async removeScenario(t){try{await this.db.delete(t),await this.loadScenarios()}catch(i){console.error("Failed to remove scenario:",i)}}buildScenario(t,i){return{id:crypto.randomUUID(),name:t.name,description:t.description,mapFileNames:t.mapFileNames,createdAt:Date.now(),settings:S3(i,t.selectedKeys)}}readCurrentSource(){return{state:this.scenariosStore.getValue(),camera:this.readCurrentCamera()}}readCurrentCamera(){let t=this.threeCameraService.camera?.position,i=this.threeMapControlsService.controls?.target;return{position:t?{x:t.x,y:t.y,z:t.z}:P3.position,target:i?{x:i.x,y:i.y,z:i.z}:P3.target}}static{this.\u0275fac=function(i){return new(i||e)(M(tc),M(Kn),M(Wt),M(oc))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var A8=["dialog"];function L8(e,o){e&1&&(v(0,"span",8),f(1,"A name is required."),b())}var Bm=tn.filter(e=>Tt[e].group!=="camera"),Vm=(()=>{class e{constructor(t,i){this.scenariosService=t,this.fileStoreReadWindow=i,this.dialogElement=je.required("dialog"),this.name=be(""),this.description=be(""),this.bindToMap=be(!1),this.nameValid=X(()=>this.name().trim().length>0),this.availableKeys=tn,this.defaultKeys=Bm,this.selectedKeys=be(new Set(Bm)),this.selectionSummary=X(()=>`${this.selectedKeys().size} of ${this.availableKeys.length} settings`),this.saveLabel=X(()=>`Save ${ec(this.selectedKeys().size)}`),this.visibleFileNames=R(this.fileStoreReadWindow.files$.pipe(ke(n=>fn(n).map(r=>r.fileMeta.fileName))),{initialValue:[]}),this.hasFiles=X(()=>this.visibleFileNames().length>0)}open(){this.name.set(""),this.description.set(""),this.bindToMap.set(!1),this.selectedKeys.set(new Set(Bm)),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}async save(){if(!this.nameValid()||this.selectedKeys().size===0)return;let t=this.bindToMap()&&this.hasFiles()?this.visibleFileNames():void 0;await this.scenariosService.saveScenario({name:this.name(),description:this.description()||void 0,mapFileNames:t,selectedKeys:this.selectedKeys()}),this.close()}static{this.\u0275fac=function(i){return new(i||e)(te(Oi),te(Te))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-save-scenario-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,A8,5),i&2&&ot()},decls:38,vars:13,consts:[["dialog",""],["aria-labelledby","save-scenario-title",1,"modal"],[1,"modal-box","max-w-md"],["id","save-scenario-title",1,"text-xl","font-bold","mb-4"],[1,"form-control","mb-4"],["for","scenario-name",1,"label"],[1,"label-text"],["id","scenario-name","placeholder","Enter scenario name",1,"input","input-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label-text-alt","text-error"],["for","scenario-description",1,"label"],["id","scenario-description","rows","3","placeholder","Describe what this scenario captures",1,"textarea","textarea-bordered","w-full",3,"ngModelChange","ngModel"],[1,"label","cursor-pointer","justify-start","gap-3"],["type","checkbox",1,"checkbox","checkbox-sm",3,"ngModelChange","ngModel","disabled"],[1,"mb-4","rounded-md","border","border-base-300","p-2"],["data-testid","save-scenario-extended-settings",1,"cursor-pointer","text-sm"],[1,"text-xs","opacity-60"],[1,"m-0","mt-2","text-xs","opacity-60"],[1,"mt-2"],[3,"selectedKeysChange","availableKeys","defaultKeys","selectedKeys"],[1,"modal-action"],[1,"btn",3,"click"],["data-testid","save-scenario-submit",1,"btn","btn-primary",3,"click","disabled"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){if(i&1){let r=xe();v(0,"dialog",1,0)(2,"div",2)(3,"h2",3),f(4,"Save Scenario"),b(),v(5,"div",4)(6,"label",5)(7,"span",6),f(8,"Scenario Name"),b()(),v(9,"input",7),W("ngModelChange",function(s){return n.name.set(s)}),b(),O(10,L8,2,0,"span",8),b(),v(11,"div",4)(12,"label",9)(13,"span",6),f(14,"Description (optional)"),b()(),v(15,"textarea",10),W("ngModelChange",function(s){return n.description.set(s)}),b()(),v(16,"div",4)(17,"label",11)(18,"input",12),W("ngModelChange",function(s){return n.bindToMap.set(s)}),b(),v(19,"span",6),f(20," Bind to current maps "),b()()(),v(21,"details",13)(22,"summary",14),f(23," Extended settings "),v(24,"span",15),f(25),b()(),v(26,"p",16),f(27,"Uncheck what this scenario should not carry."),b(),v(28,"div",17)(29,"cc-scenario-settings-picker",18),Na("selectedKeysChange",function(s){return ae(r),Pa(n.selectedKeys,s)||(n.selectedKeys=s),se(s)}),b()()(),v(30,"div",19)(31,"button",20),W("click",function(){return n.close()}),f(32,"Cancel"),b(),v(33,"button",21),W("click",function(){return n.save()}),f(34),b()()(),v(35,"form",22)(36,"button",23),W("click",function(){return n.close()}),f(37,"close"),b()()()}i&2&&(m(9),L("ngModel",n.name()),m(),z(!n.nameValid()&&n.name().length>0?10:-1),m(5),L("ngModel",n.description()),m(2),Ne("opacity-40",!n.hasFiles()),m(),L("ngModel",n.bindToMap())("disabled",!n.hasFiles()),m(7),he("(",n.selectionSummary(),")"),m(4),L("availableKeys",n.availableKeys)("defaultKeys",n.defaultKeys),Fa("selectedKeys",n.selectedKeys),m(4),L("disabled",!n.nameValid()||n.selectedKeys().size===0),m(),he(" ",n.saveLabel()," "))},dependencies:[mo,er,Es,pf,ks,Zn,qs,Jn,Jl],encapsulation:2,changeDetection:0})}}return e})();var F8=["dialog"],rc=(()=>{class e{constructor(){this.scenarioName=$.required(),this.confirmed=Ce(),this.cancelled=Ce(),this.dialogElement=je.required("dialog")}open(){this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}confirm(){this.close(),this.confirmed.emit()}cancel(){this.close(),this.cancelled.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-delete-confirm-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,F8,5),i&2&&ot()},inputs:{scenarioName:[1,"scenarioName"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:15,vars:1,consts:[["dialog",""],["aria-labelledby","delete-confirm-title",1,"modal"],[1,"modal-box","max-w-sm"],["id","delete-confirm-title",1,"text-lg","font-bold","mb-2"],[1,"modal-action"],[1,"btn",3,"click"],[1,"btn","btn-error",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"]],template:function(i,n){i&1&&(w(0,"dialog",1,0)(2,"div",2)(3,"h3",3),f(4,"Delete Scenario"),y(),w(5,"p"),f(6),y(),w(7,"div",4)(8,"button",5),K("click",function(){return n.cancel()}),f(9,"Cancel"),y(),w(10,"button",6),K("click",function(){return n.confirm()}),f(11,"Delete"),y()()(),w(12,"form",7)(13,"button",8),K("click",function(){return n.cancel()}),f(14,"close"),y()()()),i&2&&(m(6),he('Are you sure you want to delete "',n.scenarioName(),'"?'))},encapsulation:2,changeDetection:0})}}return e})();var P8=["dialog"];function N8(e,o){if(e&1&&(w(0,"li"),f(1),y()),e&2){let t=o.$implicit;m(),qe(t)}}function B8(e,o){if(e&1&&(w(0,"div",5)(1,"div"),ue(2,"i",11),w(3,"strong"),f(4,"Already existing:"),y(),w(5,"ul",12),Ae(6,N8,2,1,"li",null,ti),y()()()),e&2){let t=D();m(6),Le(t.feedback().duplicates)}}function V8(e,o){if(e&1&&(w(0,"li"),f(1),y()),e&2){let t=o.$implicit;m(),qe(t)}}function W8(e,o){if(e&1&&(w(0,"div",6)(1,"div"),ue(2,"i",13),w(3,"strong"),f(4,"Invalid scenario files:"),y(),w(5,"ul",12),Ae(6,V8,2,1,"li",null,ti),y()()()),e&2){let t=D();m(6),Le(t.feedback().invalid)}}function O8(e,o){if(e&1&&(w(0,"li"),f(1),y()),e&2){let t=o.$implicit;m(),qe(t)}}function z8(e,o){if(e&1&&(w(0,"div",6)(1,"div"),ue(2,"i",13),w(3,"strong"),f(4,"Could not read (bad format):"),y(),w(5,"ul",12),Ae(6,O8,2,1,"li",null,ti),y()()()),e&2){let t=D();m(6),Le(t.feedback().parseErrors)}}var ac=(()=>{class e{constructor(){this.closed=Ce(),this.dialogElement=je.required("dialog"),this.feedback=be({duplicates:[],invalid:[],parseErrors:[]})}open(t){let{duplicates:i,invalid:n,parseErrors:r}=t;(i.length>0||n.length>0||r.length>0)&&(this.feedback.set({duplicates:i,invalid:n,parseErrors:r}),this.dialogElement().nativeElement.showModal())}close(){this.dialogElement().nativeElement.close(),this.feedback.set({duplicates:[],invalid:[],parseErrors:[]}),this.closed.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-import-feedback-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,P8,5),i&2&&ot()},outputs:{closed:"closed"},decls:15,vars:3,consts:[["dialog",""],["aria-labelledby","import-feedback-title",1,"modal"],[1,"modal-box","max-w-lg"],["id","import-feedback-title",1,"text-lg","font-bold","mb-2"],[1,"flex","flex-col","gap-2"],[1,"alert","alert-warning","text-sm"],[1,"alert","alert-error","text-sm"],[1,"modal-action"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"],[3,"click"],[1,"fa","fa-exclamation-triangle","mr-1"],[1,"list-disc","list-inside","ml-1"],[1,"fa","fa-exclamation-circle","mr-1"]],template:function(i,n){i&1&&(w(0,"dialog",1,0)(2,"div",2)(3,"h3",3),f(4,"Import Results"),y(),w(5,"div",4),O(6,B8,8,0,"div",5),O(7,W8,8,0,"div",6),O(8,z8,8,0,"div",6),y(),w(9,"div",7)(10,"button",8),K("click",function(){return n.close()}),f(11,"OK"),y()()(),w(12,"form",9)(13,"button",10),K("click",function(){return n.close()}),f(14,"close"),y()()()),i&2&&(m(6),z(n.feedback().duplicates.length?6:-1),m(),z(n.feedback().invalid.length?7:-1),m(),z(n.feedback().parseErrors.length?8:-1))},encapsulation:2,changeDetection:0})}}return e})();function $8(e,o){if(e&1){let t=xe();w(0,"button",0),K("click",function(n){return ae(t),D().exportRequested.emit(),se(n.stopPropagation())}),ue(1,"i",1),y(),w(2,"button",2),K("click",function(n){return ae(t),D().deleteRequested.emit(),se(n.stopPropagation())}),ue(3,"i",3),y()}}var B3=(()=>{class e{constructor(){this.isBuiltIn=$.required(),this.exportRequested=Ce(),this.deleteRequested=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-item-actions"]],inputs:{isBuiltIn:[1,"isBuiltIn"]},outputs:{exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:1,vars:1,consts:[["title","Export scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-download"],["title","Delete scenario",1,"btn","btn-ghost","btn-sm",3,"click"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&O(0,$8,4,0),i&2&&z(n.isBuiltIn()?-1:0)},encapsulation:2,changeDetection:0})}}return e})();function j8(e,o){e&1&&(w(0,"span",1),f(1,"Built-in"),y())}function H8(e,o){if(e&1&&(w(0,"span",2),f(1),y()),e&2){let t=D();m(),qe(t.view().formattedDate)}}function U8(e,o){if(e&1&&(w(0,"span",3),ue(1,"i",6),w(2,"span",7),f(3),y()()),e&2){let t=D();le("title","Bound to "+t.view().scenario.mapFileNames.join(", ")),m(3),qe(t.view().scenario.mapFileNames.join(", "))}}function G8(e,o){if(e&1&&ue(0,"i",8),e&2){let t=o.$implicit,i=D();yt(hn("fa ",i.groupIcons[t])),le("title",i.groupLabels[t])}}var V3=(()=>{class e{constructor(){this.view=$.required(),this.groupLabels=ma,this.groupIcons=Ql}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-item-badges"]],hostAttrs:[1,"block","overflow-hidden"],inputs:{view:[1,"view"]},decls:7,vars:2,consts:[[1,"flex","items-center","gap-3","mt-1","min-w-0"],[1,"badge","badge-xs","badge-info"],[1,"text-[11px]","text-base-content/40"],[1,"badge","badge-xs","badge-outline","gap-1","max-w-full","overflow-hidden",3,"title"],[1,"flex","gap-1.5","text-[11px]","text-base-content/40"],[3,"class","title"],[1,"fa","fa-map-pin","text-[9px]","shrink-0"],[1,"truncate"],[3,"title"]],template:function(i,n){i&1&&(w(0,"div",0),O(1,j8,2,0,"span",1)(2,H8,2,1,"span",2),O(3,U8,4,2,"span",3),w(4,"span",4),Ae(5,G8,1,4,"i",5,ti),y()()),i&2&&(m(),z(n.view().scenario.isBuiltIn?1:2),m(2),z(n.view().mapBound?3:-1),m(2),Le(n.view().groupKeys))},encapsulation:2,changeDetection:0})}}return e})();function X8(e,o){e&1&&(v(0,"span",3),F(1,"i",7),b())}function K8(e,o){if(e&1&&(v(0,"div",4),f(1),b()),e&2){let t=D();m(),qe(t.view().scenario.description)}}var W3=(()=>{class e{constructor(){this.view=$.required(),this.applyRequested=Ce(),this.exportRequested=Ce(),this.deleteRequested=Ce()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-item"]],inputs:{view:[1,"view"]},outputs:{applyRequested:"applyRequested",exportRequested:"exportRequested",deleteRequested:"deleteRequested"},decls:8,vars:8,consts:[["type","button",1,"flex","items-center","w-full","px-4","py-2","border-t","border-base-300","hover:bg-base-200","cursor-pointer","bg-transparent","text-left",3,"click"],[1,"flex-1","min-w-0"],[1,"font-medium","text-sm","truncate",3,"title"],["title","Some metrics in this scenario are not available",1,"text-warning","ml-1"],[1,"text-xs","text-base-content/50","truncate"],[3,"view"],[3,"exportRequested","deleteRequested","isBuiltIn"],[1,"fa","fa-exclamation-triangle","text-xs"]],template:function(i,n){i&1&&(v(0,"button",0),W("click",function(){return n.applyRequested.emit()}),v(1,"div",1)(2,"div",2),f(3),O(4,X8,2,0,"span",3),b(),O(5,K8,2,1,"div",4),F(6,"cc-scenario-item-badges",5),b(),v(7,"cc-scenario-item-actions",6),W("exportRequested",function(){return n.exportRequested.emit()})("deleteRequested",function(){return n.deleteRequested.emit()}),b()()),i&2&&(m(),Ne("opacity-40",n.view().mapMismatch),m(),L("title",n.view().scenario.name),m(),he(" ",n.view().scenario.name," "),m(),z(n.view().warning?4:-1),m(),z(n.view().scenario.description?5:-1),m(),L("view",n.view()),m(),L("isBuiltIn",!!n.view().scenario.isBuiltIn))},dependencies:[V3,B3],encapsulation:2,changeDetection:0})}}return e})();var Sr=class{static downloadData(o,t){let i=new Blob([o],{type:"text/json"}),n=document.createEvent("MouseEvents"),r=document.createElement("a");r.download=t,r.href=window.URL.createObjectURL(i),r.dataset.downloadurl=["text/json",r.download,r.href].join(":"),n.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(n)}};var O3=(()=>{class e{constructor(t,i){this.scenariosService=t,this.db=i}exportScenario(t){let i=C3(t),n=t.name.replaceAll(/[^\w-]/g,"_");Sr.downloadData(JSON.stringify(i,null,2),n+Yl)}async importScenarioFiles(t){let i=this.scenariosService.scenarios$.getValue(),n={imported:0,duplicates:[],invalid:[],parseErrors:[]};for(let r of t){let a;try{let l=await r.text();a=L3(JSON.parse(l))}catch{n.parseErrors.push(r.name);continue}if(!a){n.invalid.push(r.name);continue}if(this.isDuplicate(a,i)){n.duplicates.push(a.name);continue}let s=M3(a);i.push(s),await this.db.add(s),n.imported++}return n.imported>0&&await this.scenariosService.loadScenarios(),n}isDuplicate(t,i){return i.some(n=>n.name===t.name&&JSON.stringify(n.settings)===JSON.stringify(t.settings))}static{this.\u0275fac=function(i){return new(i||e)(M(Oi),M(oc))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var z3=(()=>{class e{constructor(t){this.store=t,this.metricData$=this.store.select($n)}static{this.\u0275fac=function(i){return new(i||e)(M(me))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Z8=[{priority:0,label:"Current Map",icon:"fa-map-pin"},{priority:1,label:"Global",icon:"fa-globe"},{priority:2,label:"Built-in",icon:"fa-cube"},{priority:3,label:"Other Maps",icon:"fa-map-o"}],$3=(()=>{class e{constructor(t){this.scenarioApplier=t}groupScenarios(t,i){let n=new Map;for(let r of t){let a=this.getScenarioPriority(r,i),s=n.get(a);s?s.push(r):n.set(a,[r])}return Z8.filter(r=>n.has(r.priority)).map(r=>({label:r.label,icon:r.icon,scenarios:n.get(r.priority)??[]}))}toScenarioView(t,i,n){let r=(t.mapFileNames?.length??0)>0,a=r&&!t.mapFileNames.some(l=>i.has(l)),s=this.scenarioApplier.hasMissingMetrics(this.scenarioApplier.getMissingMetrics(t.settings,n));return{scenario:t,warning:s,mapMismatch:a,mapBound:r,groupKeys:y3(t),formattedDate:new Date(t.createdAt).toLocaleDateString()}}getScenarioPriority(t,i){let n=(t.mapFileNames?.length??0)>0;return n&&t.mapFileNames?.some(r=>i.has(r))?0:!n&&!t.isBuiltIn?1:t.isBuiltIn?2:3}static{this.\u0275fac=function(i){return new(i||e)(M(ic))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var e7=["dialog"],t7=["fileInput"],i7=(e,o)=>o.label,o7=(e,o)=>o.scenario.id;function n7(e,o){e&1&&(v(0,"p",13),f(1,"No scenarios found."),b())}function r7(e,o){if(e&1){let t=xe();v(0,"cc-scenario-item",25),W("applyRequested",function(){let n=ae(t).$implicit,r=D(2);return se(r.applyScenario(n.scenario))})("exportRequested",function(){let n=ae(t).$implicit,r=D(2);return se(r.exportScenario(n.scenario))})("deleteRequested",function(){let n=ae(t).$implicit,r=D(2);return se(r.requestDelete(n.scenario))}),b()}if(e&2){let t=o.$implicit;L("view",t)}}function a7(e,o){if(e&1&&(v(0,"div",19),F(1,"input",20),v(2,"div",21),F(3,"i"),f(4),v(5,"span",22),f(6),b()(),v(7,"div",23),Ae(8,r7,1,1,"cc-scenario-item",24,o7),b()()),e&2){let t=o.$implicit,i=o.$index;Ne("mt-1",i!==0),m(),L("checked",i===0),m(2),yt(hn("fa ",t.icon," mr-2")),m(),he(" ",t.label," "),m(2),qe(t.scenarios.length),m(2),Le(t.scenarios)}}var Wm=(()=>{class e{constructor(t,i,n,r,a){this.scenariosService=t,this.importExportService=i,this.scenarioDialogStore=n,this.fileStoreReadWindow=r,this.helpers=a,this.dialogElement=je.required("dialog"),this.deleteConfirmDialogRef=je.required(rc),this.importFeedbackDialogRef=je.required(ac),this.fileInput=je.required("fileInput"),this.applyRequested=Ce(),this.deleteTarget=be(null),this.acceptExtensions=`${Yl},.json`,this.scenarios=R(this.scenariosService.scenarios$,{initialValue:[]}),this.metricData=R(this.scenarioDialogStore.metricData$,{requireSync:!0}),this.searchTerm=be(""),this.visibleFileNames=R(this.fileStoreReadWindow.files$.pipe(ke(s=>new Set(fn(s).map(l=>l.fileMeta.fileName)))),{initialValue:new Set}),this.filteredScenarios=X(()=>{let s=this.searchTerm().toLowerCase(),l=this.scenarios(),d=this.visibleFileNames();return(s?l.filter(h=>h.name.toLowerCase().includes(s)||h.description?.toLowerCase().includes(s)):[...l]).sort((h,p)=>this.helpers.getScenarioPriority(h,d)-this.helpers.getScenarioPriority(p,d))}),this.groupedScenarios=X(()=>{let s=this.visibleFileNames(),l=this.metricData();return this.helpers.groupScenarios(this.filteredScenarios(),s).map(c=>tt(Ee({},c),{scenarios:c.scenarios.map(h=>this.helpers.toScenarioView(h,s,l))}))})}async open(){await this.scenariosService.loadScenarios(),this.dialogElement().nativeElement.showModal()}close(){this.dialogElement().nativeElement.close()}applyScenario(t){this.close(),this.applyRequested.emit({scenario:t,metricData:this.metricData()})}exportScenario(t){this.importExportService.exportScenario(t)}openImportDialog(){this.fileInput().nativeElement.click()}async handleImportFiles(t){let i=t.target;if(!i.files||i.files.length===0)return;let n=await this.importExportService.importScenarioFiles(i.files);i.value="",this.importFeedbackDialogRef().open(n)}requestDelete(t){this.deleteTarget.set(t),this.deleteConfirmDialogRef().open()}cancelDelete(){this.deleteTarget.set(null)}async confirmDelete(){let t=this.deleteTarget();t&&(this.deleteTarget.set(null),await this.scenariosService.removeScenario(t.id))}static{this.\u0275fac=function(i){return new(i||e)(te(Oi),te(O3),te(z3),te(Te),te($3))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scenario-list-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialogElement,e7,5)(n.deleteConfirmDialogRef,rc,5)(n.importFeedbackDialogRef,ac,5)(n.fileInput,t7,5),i&2&&ot(4)},outputs:{applyRequested:"applyRequested"},decls:23,vars:4,consts:[["dialog",""],["fileInput",""],["aria-labelledby","scenario-list-title",1,"modal"],[1,"modal-box","max-w-xl"],[1,"flex","items-center","justify-between","mb-4"],["id","scenario-list-title",1,"text-xl","font-bold"],[1,"flex","items-center","gap-1"],["title","Import scenarios",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-upload"],[1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-close"],["type","file","multiple","",1,"hidden",3,"change","accept"],["placeholder","Search scenarios...","aria-label","Search scenarios",1,"input","input-bordered","w-full","mb-4",3,"ngModelChange","ngModel"],[1,"text-center","py-8","text-base-content/50"],[1,"max-h-[60vh]","overflow-y-auto"],[1,"collapse","collapse-arrow","border","border-base-300",3,"mt-1"],["method","dialog",1,"modal-backdrop"],[3,"click"],[3,"confirmed","cancelled","scenarioName"],[1,"collapse","collapse-arrow","border","border-base-300"],["type","radio","name","scenario-accordion",3,"checked"],[1,"collapse-title","font-semibold","text-sm","bg-primary","text-primary-content"],[1,"badge","badge-sm","ml-2"],[1,"collapse-content","px-0"],[3,"view"],[3,"applyRequested","exportRequested","deleteRequested","view"]],template:function(i,n){if(i&1&&(v(0,"dialog",2,0)(2,"div",3)(3,"div",4)(4,"h2",5),f(5,"Scenarios"),b(),v(6,"div",6)(7,"button",7),W("click",function(){return n.openImportDialog()}),F(8,"i",8),b(),v(9,"button",9),W("click",function(){return n.close()}),F(10,"i",10),b()()(),v(11,"input",11,1),W("change",function(a){return n.handleImportFiles(a)}),b(),v(13,"input",12),W("ngModelChange",function(a){return n.searchTerm.set(a)}),b(),O(14,n7,2,0,"p",13),v(15,"div",14),Ae(16,a7,10,8,"div",15,i7),b()(),v(18,"form",16)(19,"button",17),W("click",function(){return n.close()}),f(20,"close"),b()()(),v(21,"cc-delete-confirm-dialog",18),W("confirmed",function(){return n.confirmDelete()})("cancelled",function(){return n.cancelDelete()}),b(),F(22,"cc-import-feedback-dialog")),i&2){let r;m(11),L("accept",n.acceptExtensions),m(2),L("ngModel",n.searchTerm()),m(),z(n.filteredScenarios().length===0?14:-1),m(2),Le(n.groupedScenarios()),m(5),L("scenarioName",((r=n.deleteTarget())==null?null:r.name)??"")}},dependencies:[mo,er,Es,ks,Zn,qs,Jn,rc,ac,W3],encapsulation:2,changeDetection:0})}}return e})();var s7=["listDialog"],l7=["saveDialog"];function c7(e,o){if(e&1){let t=xe();v(0,"cc-apply-scenario-dialog",16),W("closed",function(){ae(t);let n=D();return se(n.handleApplyClosed())}),b()}if(e&2){let t=o;L("scenario",t.scenario)("metricData",t.metricData)}}var j3=(()=>{class e{constructor(){this.scenariosService=q(Oi),this.listDialog=je.required("listDialog"),this.saveDialog=je.required("saveDialog"),this.applyTarget=be(null),this.scenarios=R(this.scenariosService.scenarios$,{initialValue:[]}),this.scenariosCountLabel=X(()=>{let t=this.scenarios().length;return`${t} ${t===1?"scenario":"scenarios"} available`})}async ngOnInit(){await this.scenariosService.loadScenarios()}openScenarioList(){this.listDialog().open()}openSaveDialog(){this.saveDialog().open()}handleApplyRequested(t){this.applyTarget.set(t)}handleApplyClosed(){this.applyTarget.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-labels-scenarios-segment"]],viewQuery:function(i,n){i&1&&it(n.listDialog,s7,5)(n.saveDialog,l7,5),i&2&&ot(2)},hostAttrs:[1,"group","flex","flex-col","items-stretch","px-3","py-2","transition-colors","relative"],decls:23,vars:2,consts:[["listDialog",""],["saveDialog",""],[1,"flex","flex-col","items-stretch","gap-1.5","px-2","py-1","rounded-md","transition-colors","max-w-[220px]","min-w-[160px]"],["data-testid","metric-segment-labels",1,"flex","flex-col","gap-1"],[1,"flex","items-center","justify-between","gap-1"],[1,"text-[10px]","uppercase","tracking-wide","opacity-70"],["type","button","popovertarget","metric-settings-popover-labels","data-anchor-name","metric-segment-labels","title","Label Settings",1,"btn","btn-ghost","btn-xs","btn-square",2,"anchor-name","--metric-segment-labels"],[1,"fa","fa-cog","text-[10px]"],[1,"border-t","border-base-300","-mx-1"],["data-testid","metric-segment-scenario",1,"flex","flex-col","gap-1"],["type","button","title","Save current state as scenario","data-testid","metric-segment-scenario-save",1,"btn","btn-ghost","btn-xs","btn-square",3,"click"],[1,"fa","fa-plus","text-[10px]"],["type","button","title","Open saved scenarios",1,"text-sm","font-semibold","leading-tight","text-center","bg-transparent","border-0","p-0","rounded-sm","cursor-pointer","hover:bg-base-200","whitespace-nowrap","overflow-hidden","text-ellipsis",3,"click"],["popoverId","metric-settings-popover-labels","anchorName","metric-segment-labels","widthClass","w-80"],[3,"applyRequested"],[3,"scenario","metricData"],[3,"closed","scenario","metricData"]],template:function(i,n){if(i&1&&(v(0,"div",2)(1,"div",3)(2,"div",4)(3,"span",5),f(4,"Labels"),b(),v(5,"button",6),F(6,"i",7),b()()(),F(7,"div",8),v(8,"div",9)(9,"div",4)(10,"span",5),f(11,"Scenarios"),b(),v(12,"button",10),W("click",function(){return n.openSaveDialog()}),F(13,"i",11),b()(),v(14,"button",12),W("click",function(){return n.openScenarioList()}),f(15),b()()(),v(16,"cc-settings-popover-shell",13),F(17,"cc-label-settings-panel"),b(),v(18,"cc-scenario-list-dialog",14,0),W("applyRequested",function(a){return n.handleApplyRequested(a)}),b(),F(20,"cc-save-scenario-dialog",null,1),O(22,c7,1,2,"cc-apply-scenario-dialog",15)),i&2){let r;m(15),he(" ",n.scenariosCountLabel()," "),m(7),z((r=n.applyTarget())?22:-1,r)}},dependencies:[kd,Wm,Vm,Pm,Ot],encapsulation:2,changeDetection:0})}}return e})();var H3=(()=>{class e{constructor(){this.preferencesReadWindow=q(Qn),this.metricsBarWriteStore=q(Ye),this.isLinked=R(this.preferencesReadWindow.isColorMetricLinkedToHeightMetric$,{initialValue:!1}),this.iconClass=X(()=>this.isLinked()?"fa fa-link":"fa fa-unlink"),this.title=X(()=>this.isLinked()?"Unlink Height and Color Metric":"Link Height and Color Metric"),this.buttonClass=X(()=>this.isLinked()?"btn btn-circle btn-sm ring-2 ring-primary text-primary bg-primary/10 border-0":"btn btn-circle btn-sm ring-1 ring-base-300 text-base-content/60 border-0 cc-link-button-dashed")}toggle(){this.metricsBarWriteStore.toggleIsHeightAndColorMetricLinked()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-link-color-height-button"]],hostAttrs:[1,"self-center","px-1"],decls:2,vars:8,consts:[["type","button",3,"click","title"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.toggle()}),ue(1,"i"),y()),i&2&&(yt(n.buttonClass()),le("title",n.title()),rt("aria-label",n.title())("data-testid","metric-link-button")("aria-pressed",n.isLinked()),m(),yt(n.iconClass()))},encapsulation:2,changeDetection:0})}}return e})();function d7(e,o){e&1&&F(0,"cc-link-color-height-button")(1,"cc-color-segment")}function m7(e,o){if(e&1&&F(0,"cc-axis-card",0)(1,"cc-color-settings-popover",1),e&2){let t=D();L("metricName","Settings")("hasCog",!0)("cogPopoverId",t.deltaColorSettingsPopoverId)("cogAnchorName",t.deltaColorSettingsAnchorName)("testId","metric-segment-color-settings")("cogTestId","metric-segment-color-settings-cog"),m(),L("popoverId",t.deltaColorSettingsPopoverId)("anchorName",t.deltaColorSettingsAnchorName)}}function h7(e,o){e&1&&F(0,"cc-edge-segment")}var Om=(()=>{class e{constructor(){this.barBottom=df,this.fileStoreReadWindow=q(Te),this.metricsBarReadStore=q(ht),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{initialValue:!1}),this.hasEdgeMetric=R(this.metricsBarReadStore.metricData$.pipe(ke(t=>t.edgeMetricData.length>0)),{initialValue:!1}),this.showColorMetricSegment=X(()=>!this.isDeltaState()),this.deltaColorSettingsPopoverId="metric-settings-popover-color-delta",this.deltaColorSettingsAnchorName="metric-segment-color-settings"}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metrics-bar"]],hostVars:2,hostBindings:function(i,n){i&2&&Oe("bottom",n.barBottom)},features:[Ki([mf])],decls:6,vars:2,consts:[["label","Color",3,"metricName","hasCog","cogPopoverId","cogAnchorName","testId","cogTestId"],[3,"popoverId","anchorName"]],template:function(i,n){i&1&&(F(0,"cc-area-segment")(1,"cc-height-segment"),O(2,d7,2,0)(3,m7,2,8),O(4,h7,1,0,"cc-edge-segment"),F(5,"cc-labels-scenarios-segment")),i&2&&(m(2),z(n.showColorMetricSegment()?2:3),m(2),z(n.hasEdgeMetric()?4:-1))},dependencies:[L1,co,p3,Xl,b3,x3,j3,H3],encapsulation:2,changeDetection:0})}}return e})();var zm=(()=>{class e extends b0{constructor(){super(...arguments),this.areaMetric=R(q(ve).areaMetric$,{requireSync:!0}),this.pathToNode=q(me).selectSignal(Wu)}isEnabledFor(t){let i=this.pathToNode().get(t);return i!==void 0&&ja(i,this.areaMetric())}static{this.\u0275fac=(()=>{let t;return function(n){return(t||(t=Hh(e)))(n||e)}})()}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var p7=(e,o,t)=>{let i=e.length>0?e.filter(l=>bi(l)):o,n=0,r=0,a=0,s=0;for(let l of i)l.isFlattened&&n++,l.isExcluded&&r++,!l.isFlattened&&!l.isExcluded&&(a++,ja(l,t)||s++);return{shown:a,flattened:n,hidden:r,noArea:s}},U3=Ie(ju,Fi,vi,p7);var $m=(()=>{class e{constructor(){this.store=q(me),this.counts$=this.store.select(U3)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var G3=Ie(Au,e=>e?.map?Zi(e.map).descendants().map(({data:o})=>o).filter(o=>bi(o)):[]);var ha=Ie(G3,e=>{let o=new Map;for(let t of u7(e))o.set(t,e.map(i=>i.attributes?.[t]??0).filter(i=>typeof i=="number"&&!Number.isNaN(i)));return o});function u7(e){let o=new Set;for(let t of e)for(let i of Object.keys(t.attributes??{}))i!==Ep&&o.add(i);return o}var jm=(()=>{class e{constructor(){this.store=q(me),this.metricValues$=this.store.select(ha)}addRule(t){Ni(this.store,fu({rule:tt(Ee({},t),{id:f7()})}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();function f7(){return`metric-rule-${crypto.randomUUID()}`}var Hm=(()=>{class e{constructor(){this.mapStateReadWindow=q(ve),this.sharedViewReadWindow=q(Bt),this.store=q(me),this.idToBuildingService=q(Gn),this.areaMetric=R(this.mapStateReadWindow.areaMetric$,{requireSync:!0}),this.buildingIds=R(this.idToBuildingService.buildingIds$,{requireSync:!0}),this.rootUnary=R(this.store.select(Ou),{requireSync:!0}),this.markedPackages=R(this.sharedViewReadWindow.markedPackages$,{requireSync:!0})}project(t){return v0(t,{areaMetric:this.areaMetric(),buildingIds:this.buildingIds(),rootUnary:this.rootUnary(),showsFlattenedState:!0,hidesExcludedNodes:!0,markedPackages:this.markedPackages()})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var ev=Ia(xw());var X3=e=>/[*?]/.test(e);var g7={gt:">",gte:"\u2265",lt:"<",lte:"\u2264",eq:"="};function K3(e){if(e.operator==="between"){let o=Math.min(e.value,e.upperValue??e.value),t=Math.max(e.value,e.upperValue??e.value);return`${e.metric} ${o}\u2026${t}`}return`${e.metric} ${g7[e.operator]} ${e.value}`}var b7=(e,o)=>(o.get(e.metric)??[]).filter(t=>kp(e,t)).length,Q3=(e,o,t)=>e.filter(i=>i.type===t).map(i=>({id:i.id,label:K3(i),affectedCount:b7(i,o),kind:"METRIC",metricRule:i})),Y3=Ie(Kc,ha,(e,o)=>Q3(e,o,"flatten")),Z3=Ie(Kc,ha,(e,o)=>Q3(e,o,"exclude"));var tv=(e,o,t)=>{let i=e.filter(s=>s.type===t);if(i.length===0)return[];let n=o.map(s=>yp(s.path)),{rules:r,combinedPositivePrefilter:a}=v7(i);return x7(r,a,n),r.map(({item:s,affectedCount:l})=>({id:`${s.type}/${s.path}`,label:s.path,item:s,affectedCount:l,kind:X3(s.path)?"RULE":"MANUAL"})).sort((s,l)=>s.label.localeCompare(l.label))};function v7(e){let o=(0,ev.default)();return{rules:e.map(i=>{let{ignoredNodePaths:n,condition:r}=Cp(i.path);return r&&Mp(o,i.path),{item:i,ignoredNodePaths:n,condition:r,affectedCount:0}}),combinedPositivePrefilter:o}}function x7(e,o,t){let i=e.filter(r=>r.condition),n=e.filter(r=>!r.condition);for(let r of t)i.length>0&&o.ignores(r)&&J3(i,r,!0),J3(n,r,!1)}function J3(e,o,t){for(let i of e)i.ignoredNodePaths.ignores(o)===t&&i.affectedCount++}var iv=Ie(Lr,Fi,Y3,(e,o,t)=>[...t,...tv(e,o,"flatten")]),ov=Ie(Lr,Fi,Z3,(e,o,t)=>[...t,...tv(e,o,"exclude")]);var nv=(e,o,t)=>{let i=t.trim().split(",");if(t.trim().startsWith("!")){i[0]=i[0].slice(1);for(let n of i){let r=`!${sr(n)}`;if(e.some(a=>r===a.path&&o===a.type))return!0}return!1}for(let n of i)if(e.some(r=>sr(n)===r.path&&o===r.type))return!0;return!1};var sc=Ie(oo,m0);var rv=e=>Ie(oo,sc,Lr,(o,t,i)=>t||nv(i,e,o)),av=rv("flatten"),sv=rv("exclude");var Um=(()=>{class e{constructor(){this.store=q(me),this.flattenRules$=this.store.select(iv),this.excludeRules$=this.store.select(ov),this.isFlattenPatternDisabled$=this.store.select(av),this.isExcludePatternDisabled$=this.store.select(sv)}removeRule(t){if(t.kind==="METRIC"){Ni(this.store,gu({id:t.metricRule.id}));return}Ni(this.store,Ja({item:t.item}))}clearRules(t){Ni(this.store,du({blacklistType:t}))}ruleFromSearchPattern(t){Ni(this.store,Zg(t))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var lv={patternSelector:oo,setPattern:Li,isPatternEmptySelector:sc,searchedNodePathsSelector:Hu};var Gm=(()=>{class e{constructor(){this.store=q(me),this.sharedViewReadWindow=q(Bt),this.threeSceneService=q(ft),this.idToBuildingService=q(Gn),this.threeRendererService=q(kt),this.codeMapMouseEventService=q(Wo),this.codeMapTooltipService=q(Un),this.selectedBuildingId=R(this.sharedViewReadWindow.selectedBuildingId$,{requireSync:!0}),this.hoveredNodeId=R(this.sharedViewReadWindow.hoveredNodeId$,{requireSync:!0})}isSelected(t){return this.selectedBuildingId()===t.path}isHovered(t){return this.hoveredNodeId()===t.path}select(t){this.store.dispatch(Qc({value:t.path}));let i=this.idToBuildingService.get(t.id);this.codeMapMouseEventService.drawLabelSelectedBuilding(i),this.threeSceneService.selectBuilding(i),this.threeSceneService.clearConstantHighlight(),this.threeRendererService.render()}deselect(){this.store.dispatch(Qc({value:null})),this.threeSceneService.clearSelection(),this.threeSceneService.clearConstantHighlight(),this.threeRendererService.render()}hover(t,i){this.store.dispatch(Ao({value:t.path})),this.codeMapMouseEventService.hoverNode(t.path),this.codeMapTooltipService.show(t,i.right,i.top)}hoverEnd(){this.store.dispatch(Ao({value:null})),this.codeMapMouseEventService.unhoverNode(),this.codeMapTooltipService.hide()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var cv={options:Object.values($a),optionSelector:Zu,ascendingSelector:Ju,setOption:nf,toggleAscending:()=>rf()};var dv=(e,o)=>e!==$a.AREA_SIZE?Ie(Et,t=>rd(ad(t.unifiedMapNode),e,o)):Ie(Et,vi,(t,i)=>rd(ad(t.unifiedMapNode),e,o,i));var Xm=(()=>{class e{constructor(){this.store=q(me)}rootNodeFor(t,i){return this.store.select(dv(t,i))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac})}}return e})();var w7=2e3,mv=(()=>{class e{constructor(){this.actions$=q(mt),this.sharedViewReadWindow=q(Bt),this.revealService=q(Ps),this.actions$.pipe(ct(ni),Ut(()=>this.sharedViewReadWindow.selectedBuildingId$.pipe(Re(Boolean),ut(1),Oh(Nh(w7)))),up()).subscribe(t=>this.revealService.revealNode(t,{expand:!1}))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=Aa({type:e,selectors:[["","ccRevealsSelectedNodeAfterLoad",""]]})}}return e})();var hv=(()=>{class e{constructor(){this.store=q(me),this.selection=q(Fs),this.revealService=q(Ps),x0("metrics",t=>this.showNode(t))}showNode(t){this.store.select($u(t)).pipe(ut(1)).subscribe(i=>{i&&(this.selection.select(i),this.revealService.revealNode(t))})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275dir=Aa({type:e,selectors:[["","ccShowsHandedOverNode",""]]})}}return e})();var pv=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-metrics-view"]],features:[Yi([Hm,{provide:s0,useExisting:Hm},Gm,{provide:Fs,useExisting:Gm},zm,{provide:l0,useExisting:zm},Xm,{provide:a0,useExisting:Xm},$m,{provide:r0,useExisting:$m},Um,{provide:o0,useExisting:Um},jm,{provide:i0,useExisting:jm},p0(cv),h0(lv),{provide:e0,useValue:t0},{provide:f0,useValue:u0},d0("metrics"),gf()]),Ki([mv,hv])],decls:10,vars:0,consts:[["view","metrics"],["collapsedContent","",1,"flex-1","min-w-0"]],template:function(i,n){i&1&&(F(0,"cc-loading-file-progress-spinner",0)(1,"cc-code-map"),v(2,"cc-sidebar-explorer"),F(3,"cc-explorer-search-bar",1),b(),F(4,"cc-sidebar-inspector")(5,"cc-node-context-menu")(6,"cc-metrics-bar")(7,"cc-legend-panel")(8,"cc-file-extension-bar")(9,"cc-bottom-bar"))},dependencies:[Vd,Om,g0,c0,n0,Pd,Nd,Wd,Jf,ff],encapsulation:2,changeDetection:0})}}return e})();var C7=[{path:od.metrics,component:pv},{path:od.domain,loadComponent:()=>import("./chunk-YCIMHKQ4.js").then(e=>e.DomainViewComponent)}],M7={provide:op,useClass:Gg},_7=[pp(C7),M7],Km={providers:[lp(cp()),gp(Xg,{metaReducers:[Kg]}),..._7,{provide:hp,useClass:ol},bp([...ug,...Mg,...vg,...bg,...Eg,...qg,...Ug,...Yg,...e1]),{provide:Xh,useFactory:e=>()=>e.synchronizeVersion(),deps:[$0],multi:!0}]};var lc=class{parse(o,t={}){t=Object.assign({binary:!1},t);let i=t.binary,n=[],r=0;o.traverse(function(j){if(j.isMesh){let ee=j.geometry,B=ee.index,H=ee.getAttribute("position");r+=B!==null?B.count/3:H.count/3,n.push({object3d:j,geometry:ee})}});let a,s=80;if(i===!0){let j=r*2+r*3*4*4+80+4,ee=new ArrayBuffer(j);a=new DataView(ee),a.setUint32(s,r,!0),s+=4}else a="",a+=`solid exported
3462
3470
  `;let l=new Qe,d=new Qe,c=new Qe,h=new Qe,p=new Qe,u=new Qe;for(let j=0,ee=n.length;j<ee;j++){let B=n[j].object3d,H=n[j].geometry,G=H.index,Z=H.getAttribute("position");if(G!==null)for(let ie=0;ie<G.count;ie+=3){let oe=G.getX(ie+0),ne=G.getX(ie+1),Me=G.getX(ie+2);k(oe,ne,Me,Z,B)}else for(let ie=0;ie<Z.count;ie+=3){let oe=ie+0,ne=ie+1,Me=ie+2;k(oe,ne,Me,Z,B)}}return i===!1&&(a+=`endsolid exported
3463
3471
  `),a;function k(j,ee,B,H,G){l.fromBufferAttribute(H,j),d.fromBufferAttribute(H,ee),c.fromBufferAttribute(H,B),G.isSkinnedMesh===!0&&(G.applyBoneTransform(j,l),G.applyBoneTransform(ee,d),G.applyBoneTransform(B,c)),l.applyMatrix4(G.matrixWorld),d.applyMatrix4(G.matrixWorld),c.applyMatrix4(G.matrixWorld),E(l,d,c),N(l),N(d),N(c),i===!0?(a.setUint16(s,0,!0),s+=2):(a+=` endloop
3464
3472
  `,a+=` endfacet
3465
3473
  `)}function E(j,ee,B){h.subVectors(B,ee),p.subVectors(j,ee),h.cross(p).normalize(),u.copy(h).normalize(),i===!0?(a.setFloat32(s,u.x,!0),s+=4,a.setFloat32(s,u.y,!0),s+=4,a.setFloat32(s,u.z,!0),s+=4):(a+=" facet normal "+u.x+" "+u.y+" "+u.z+`
3466
3474
  `,a+=` outer loop
3467
3475
  `)}function N(j){i===!0?(a.setFloat32(s,j.x,!0),s+=4,a.setFloat32(s,j.y,!0),s+=4,a.setFloat32(s,j.z,!0),s+=4):a+=" vertex "+j.x+" "+j.y+" "+j.z+`
3468
- `}}};var fa=class{constructor(o){this.isFont=!0,this.type="Font",this.data=o}generateShapes(o,t=100,i="ltr"){let n=[],r=E7(o,t,this.data,i);for(let a=0,s=r.length;a<s;a++)n.push(...r[a].toShapes());return n}};function E7(e,o,t,i){let n=Array.from(e),r=o/t.resolution,a=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*r,s=[],l=0,d=0;(i=="rtl"||i=="tb")&&n.reverse();for(let c=0;c<n.length;c++){let h=n[c];if(h===`
3469
- `)l=0,d-=a;else{let p=k7(h,r,l,d,t);i=="tb"?(l=0,d+=t.ascender*r):l+=p.offsetX,s.push(p.path)}}return s}function k7(e,o,t,i,n){let r=n.glyphs[e]||n.glyphs["?"];if(!r){console.error('THREE.Font: character "'+e+'" does not exists in font family '+n.familyName+".");return}let a=new Mi,s,l,d,c,h,p,u,k;if(r.o){let E=r._cachedOutline||(r._cachedOutline=r.o.split(" "));for(let N=0,j=E.length;N<j;)switch(E[N++]){case"m":s=E[N++]*o+t,l=E[N++]*o+i,a.moveTo(s,l);break;case"l":s=E[N++]*o+t,l=E[N++]*o+i,a.lineTo(s,l);break;case"q":d=E[N++]*o+t,c=E[N++]*o+i,h=E[N++]*o+t,p=E[N++]*o+i,a.quadraticCurveTo(h,p,d,c);break;case"b":d=E[N++]*o+t,c=E[N++]*o+i,h=E[N++]*o+t,p=E[N++]*o+i,u=E[N++]*o+t,k=E[N++]*o+i,a.bezierCurveTo(h,p,u,k,d,c);break}}return{offsetX:r.ha*o,path:a}}var Ym={glyphs:{\u03BF:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},S:{x_min:0,x_max:788,ha:890,o:"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"\xA6":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{x_min:183.25,x_max:608.328125,ha:792,o:"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},\u03A4:{x_min:-.4375,x_max:777.453125,ha:839,o:"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},y:{x_min:0,x_max:684.78125,ha:771,o:"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},\u03A0:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},\u0390:{x_min:-111,x_max:339,ha:361,o:"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},g:{x_min:0,x_max:686,ha:838,o:"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"\xB2":{x_min:0,x_max:442,ha:539,o:"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"\u2013":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},\u039A:{x_min:0,x_max:819.5625,ha:893,o:"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},\u0192:{x_min:-46.265625,x_max:392,ha:513,o:"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},e:{x_min:0,x_max:714,ha:813,o:"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},\u03CC:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},J:{x_min:0,x_max:588,ha:699,o:"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"\xBB":{x_min:-1,x_max:503,ha:601,o:"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"\xA9":{x_min:-3,x_max:1008,ha:1106,o:"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},\u03CE:{x_min:0,x_max:922,ha:1030,o:"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{x_min:193.0625,x_max:598.609375,ha:792,o:"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"\xAB":{x_min:0,x_max:507.203125,ha:604,o:"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},D:{x_min:0,x_max:828,ha:935,o:"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"\u2219":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u00FF:{x_min:0,x_max:47,ha:125,o:"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},w:{x_min:0,x_max:1009.71875,ha:1100,o:"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},$:{x_min:0,x_max:700,ha:793,o:"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{x_min:-.015625,x_max:425.0625,ha:522,o:"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},\u00B5:{x_min:0,x_max:697.21875,ha:747,o:"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},\u0399:{x_min:42,x_max:181,ha:297,o:"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},\u038E:{x_min:0,x_max:1144.5,ha:1214,o:"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2019":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u039D:{x_min:0,x_max:801,ha:915,o:"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{x_min:8.71875,x_max:350.390625,ha:478,o:"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},Q:{x_min:0,x_max:968,ha:1072,o:"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},\u03C2:{x_min:1,x_max:676.28125,ha:740,o:"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},M:{x_min:0,x_max:954,ha:1067,o:"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},\u03A8:{x_min:0,x_max:1006,ha:1094,o:"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},C:{x_min:0,x_max:886,ha:944,o:"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{x_min:0,x_max:138,ha:236,o:"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{x_min:0,x_max:480.5625,ha:578,o:"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},X:{x_min:-.015625,x_max:854.15625,ha:940,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{x_min:0,x_max:963.890625,ha:1061,o:"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},\u03B9:{x_min:42,x_max:284,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},\u0386:{x_min:0,x_max:906.953125,ha:982,o:"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{x_min:0,x_max:318,ha:415,o:"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},\u03B5:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},\u0394:{x_min:0,x_max:952.78125,ha:1028,o:"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{x_min:0,x_max:481,ha:578,o:"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"\u2030":{x_min:-3,x_max:1672,ha:1821,o:"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},a:{x_min:0,x_max:698.609375,ha:794,o:"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"\u2014":{x_min:0,x_max:941.671875,ha:1039,o:"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{x_min:8.71875,x_max:780.953125,ha:792,o:"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},N:{x_min:0,x_max:801,ha:914,o:"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},\u03C1:{x_min:0,x_max:712,ha:797,o:"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"2":{x_min:59,x_max:731,ha:792,o:"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},"\xAF":{x_min:0,x_max:941.671875,ha:938,o:"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},Z:{x_min:0,x_max:779,ha:849,o:"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},u:{x_min:0,x_max:617,ha:729,o:"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},k:{x_min:0,x_max:612.484375,ha:697,o:"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},\u0397:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u0391:{x_min:0,x_max:906.953125,ha:985,o:"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},s:{x_min:0,x_max:604,ha:697,o:"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},B:{x_min:0,x_max:778,ha:876,o:"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"\u2026":{x_min:0,x_max:614,ha:708,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{x_min:0,x_max:607,ha:704,o:"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},H:{x_min:0,x_max:803,ha:915,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u03BD:{x_min:0,x_max:675,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},c:{x_min:1,x_max:701.390625,ha:775,o:"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"\xB6":{x_min:0,x_max:566.671875,ha:678,o:"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},\u03B2:{x_min:0,x_max:660,ha:745,o:"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},\u039C:{x_min:0,x_max:954,ha:1068,o:"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},\u038C:{x_min:.109375,x_max:1120,ha:1217,o:"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u0389:{x_min:0,x_max:1158,ha:1275,o:"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2022":{x_min:0,x_max:663.890625,ha:775,o:"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"\xA5":{x_min:.1875,x_max:819.546875,ha:886,o:"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{x_min:0,x_max:318.0625,ha:415,o:"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},U:{x_min:0,x_max:796,ha:904,o:"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},\u03B3:{x_min:.5,x_max:744.953125,ha:822,o:"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},\u03B1:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},F:{x_min:0,x_max:683.328125,ha:717,o:"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"\xAD":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03A7:{x_min:0,x_max:854.171875,ha:935,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{x_min:116,x_max:674,ha:792,o:"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"\u2020":{x_min:0,x_max:777,ha:835,o:"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"\xB0":{x_min:0,x_max:347,ha:444,o:"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},V:{x_min:0,x_max:862.71875,ha:940,o:"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},\u039E:{x_min:0,x_max:734.71875,ha:763,o:"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "},"\xA0":{x_min:0,x_max:0,ha:853},\u03AB:{x_min:.328125,x_max:819.515625,ha:889,o:"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"0":{x_min:73,x_max:715,ha:792,o:"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},"\u201D":{x_min:0,x_max:347,ha:454,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{x_min:0,x_max:1260,ha:1357,o:"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},\u038A:{x_min:0,x_max:499,ha:613,o:"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},i:{x_min:14,x_max:136,ha:275,o:"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},\u0392:{x_min:0,x_max:778,ha:877,o:"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},\u03C5:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{x_min:0,x_max:275,ha:372,o:"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},m:{x_min:0,x_max:1019,ha:1128,o:"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},\u03C7:{x_min:8.328125,x_max:780.5625,ha:815,o:"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"8":{x_min:55,x_max:736,ha:792,o:"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},\u03AF:{x_min:42,x_max:326.71875,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},\u0396:{x_min:0,x_max:779.171875,ha:850,o:"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},R:{x_min:0,x_max:781.953125,ha:907,o:"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},o:{x_min:0,x_max:713,ha:821,o:"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},"5":{x_min:54.171875,x_max:738,ha:792,o:"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},"7":{x_min:58.71875,x_max:730.953125,ha:792,o:"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},K:{x_min:0,x_max:819.46875,ha:906,o:"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{x_min:0,x_max:142,ha:239,o:"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},d:{x_min:0,x_max:683,ha:796,o:"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"\xA8":{x_min:-109,x_max:247,ha:232,o:"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},E:{x_min:0,x_max:736.109375,ha:789,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},Y:{x_min:0,x_max:820,ha:886,o:"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},'"':{x_min:0,x_max:299,ha:396,o:"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\u2039":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\u201E":{x_min:0,x_max:364,ha:467,o:"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},\u03B4:{x_min:1,x_max:710,ha:810,o:"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},\u03AD:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},\u03C9:{x_min:0,x_max:922,ha:1031,o:"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"\xB4":{x_min:0,x_max:96,ha:251,o:"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\xB1":{x_min:11,x_max:781,ha:792,o:"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},\u03CB:{x_min:0,x_max:617,ha:725,o:"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"\xA7":{x_min:0,x_max:593,ha:690,o:"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},b:{x_min:0,x_max:685,ha:783,o:"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},q:{x_min:0,x_max:683,ha:876,o:"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},\u03A9:{x_min:-.171875,x_max:969.5625,ha:1068,o:"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},\u03CD:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},z:{x_min:-.015625,x_max:613.890625,ha:697,o:"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"\u2122":{x_min:0,x_max:894,ha:1e3,o:"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},\u03AE:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},\u0398:{x_min:0,x_max:960,ha:1056,o:"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"\xAE":{x_min:-3,x_max:1008,ha:1106,o:"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{x_min:0,x_max:833,ha:931,o:"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},\u0395:{x_min:0,x_max:736.21875,ha:778,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"\xB3":{x_min:0,x_max:450,ha:547,o:"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{x_min:0,x_max:273.609375,ha:371,o:"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},L:{x_min:0,x_max:645.828125,ha:696,o:"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},\u03C3:{x_min:0,x_max:803.390625,ha:894,o:"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},\u03B6:{x_min:0,x_max:573,ha:642,o:"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},\u03B8:{x_min:0,x_max:674,ha:778,o:"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},\u039F:{x_min:0,x_max:958,ha:1054,o:"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},\u0393:{x_min:0,x_max:705.28125,ha:749,o:"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{x_min:0,x_max:0,ha:375},"%":{x_min:-3,x_max:1089,ha:1186,o:"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},P:{x_min:0,x_max:726,ha:806,o:"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},\u0388:{x_min:0,x_max:1078.21875,ha:1118,o:"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u038F:{x_min:.125,x_max:1136.546875,ha:1235,o:"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},_:{x_min:0,x_max:705.5625,ha:803,o:"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},\u03AA:{x_min:-110,x_max:246,ha:275,o:"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{x_min:23,x_max:768,ha:792,o:"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"\xBD":{x_min:0,x_max:1050,ha:1149,o:"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},\u03A1:{x_min:0,x_max:720,ha:783,o:"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u00AA:{x_min:0,x_max:350,ha:397,o:"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"\u0385":{x_min:0,x_max:450,ha:553,o:"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},T:{x_min:0,x_max:777,ha:835,o:"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},\u03A6:{x_min:0,x_max:915,ha:997,o:"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"\u204B":{x_min:0,x_max:0,ha:694},j:{x_min:-77.78125,x_max:167,ha:349,o:"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},\u03A3:{x_min:0,x_max:756.953125,ha:819,o:"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"1":{x_min:215.671875,x_max:574,ha:792,o:"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},"\u203A":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\xA3":{x_min:0,x_max:704.484375,ha:801,o:"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},t:{x_min:0,x_max:367,ha:458,o:"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"\xAC":{x_min:0,x_max:706,ha:803,o:"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},\u03BB:{x_min:0,x_max:750,ha:803,o:"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},W:{x_min:0,x_max:1263.890625,ha:1351,o:"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},v:{x_min:0,x_max:675.15625,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},\u03C4:{x_min:.28125,x_max:644.5,ha:703,o:"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},\u03BE:{x_min:0,x_max:624.9375,ha:699,o:"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{x_min:-3,x_max:894.25,ha:992,o:"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},\u039B:{x_min:0,x_max:862.5,ha:942,o:"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},I:{x_min:41,x_max:180,ha:293,o:"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},G:{x_min:0,x_max:921,ha:1011,o:"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},\u03B0:{x_min:0,x_max:617,ha:725,o:"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{x_min:0,x_max:138.890625,ha:236,o:"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"\xB7":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u03A5:{x_min:.328125,x_max:819.515625,ha:889,o:"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},r:{x_min:0,x_max:355.5625,ha:432,o:"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},x:{x_min:0,x_max:675,ha:764,o:"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},\u03BC:{x_min:0,x_max:696.609375,ha:747,o:"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},h:{x_min:0,x_max:615,ha:724,o:"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{x_min:0,x_max:142,ha:239,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03C6:{x_min:-2,x_max:878,ha:974,o:"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},f:{x_min:0,x_max:378,ha:472,o:"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"\u201C":{x_min:1,x_max:348.21875,ha:454,o:"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},A:{x_min:.03125,x_max:906.953125,ha:1008,o:"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"6":{x_min:53,x_max:739,ha:792,o:"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},"\u2018":{x_min:1,x_max:139.890625,ha:236,o:"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},\u03CA:{x_min:-70,x_max:283,ha:361,o:"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},\u03C0:{x_min:-.21875,x_max:773.21875,ha:857,o:"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},\u03AC:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},O:{x_min:0,x_max:958,ha:1057,o:"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},n:{x_min:0,x_max:615,ha:724,o:"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},"3":{x_min:54,x_max:737,ha:792,o:"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},"9":{x_min:53,x_max:739,ha:792,o:"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},l:{x_min:41,x_max:166,ha:279,o:"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"\xA4":{x_min:40.09375,x_max:728.796875,ha:825,o:"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},\u03BA:{x_min:0,x_max:632.328125,ha:679,o:"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},"4":{x_min:48,x_max:742.453125,ha:792,o:"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},p:{x_min:0,x_max:685,ha:786,o:"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"\u2021":{x_min:0,x_max:777,ha:835,o:"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},\u03C8:{x_min:0,x_max:808,ha:907,o:"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},\u03B7:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},cssFontWeight:"normal",ascender:1189,underlinePosition:-100,cssFontStyle:"normal",boundingBox:{yMin:-334,xMin:-111,yMax:1189,xMax:1672},resolution:1e3,original_font_information:{postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) \u039Cagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"\u039Cagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:`Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r
3476
+ `}}};var pa=class{constructor(o){this.isFont=!0,this.type="Font",this.data=o}generateShapes(o,t=100,i="ltr"){let n=[],r=E7(o,t,this.data,i);for(let a=0,s=r.length;a<s;a++)n.push(...r[a].toShapes());return n}};function E7(e,o,t,i){let n=Array.from(e),r=o/t.resolution,a=(t.boundingBox.yMax-t.boundingBox.yMin+t.underlineThickness)*r,s=[],l=0,d=0;(i=="rtl"||i=="tb")&&n.reverse();for(let c=0;c<n.length;c++){let h=n[c];if(h===`
3477
+ `)l=0,d-=a;else{let p=k7(h,r,l,d,t);i=="tb"?(l=0,d+=t.ascender*r):l+=p.offsetX,s.push(p.path)}}return s}function k7(e,o,t,i,n){let r=n.glyphs[e]||n.glyphs["?"];if(!r){console.error('THREE.Font: character "'+e+'" does not exists in font family '+n.familyName+".");return}let a=new Ci,s,l,d,c,h,p,u,k;if(r.o){let E=r._cachedOutline||(r._cachedOutline=r.o.split(" "));for(let N=0,j=E.length;N<j;)switch(E[N++]){case"m":s=E[N++]*o+t,l=E[N++]*o+i,a.moveTo(s,l);break;case"l":s=E[N++]*o+t,l=E[N++]*o+i,a.lineTo(s,l);break;case"q":d=E[N++]*o+t,c=E[N++]*o+i,h=E[N++]*o+t,p=E[N++]*o+i,a.quadraticCurveTo(h,p,d,c);break;case"b":d=E[N++]*o+t,c=E[N++]*o+i,h=E[N++]*o+t,p=E[N++]*o+i,u=E[N++]*o+t,k=E[N++]*o+i,a.bezierCurveTo(h,p,u,k,d,c);break}}return{offsetX:r.ha*o,path:a}}var Qm={glyphs:{\u03BF:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},S:{x_min:0,x_max:788,ha:890,o:"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"\xA6":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{x_min:183.25,x_max:608.328125,ha:792,o:"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},\u03A4:{x_min:-.4375,x_max:777.453125,ha:839,o:"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},y:{x_min:0,x_max:684.78125,ha:771,o:"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},\u03A0:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},\u0390:{x_min:-111,x_max:339,ha:361,o:"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},g:{x_min:0,x_max:686,ha:838,o:"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"\xB2":{x_min:0,x_max:442,ha:539,o:"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"\u2013":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},\u039A:{x_min:0,x_max:819.5625,ha:893,o:"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},\u0192:{x_min:-46.265625,x_max:392,ha:513,o:"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},e:{x_min:0,x_max:714,ha:813,o:"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},\u03CC:{x_min:0,x_max:712,ha:815,o:"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},J:{x_min:0,x_max:588,ha:699,o:"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"\xBB":{x_min:-1,x_max:503,ha:601,o:"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"\xA9":{x_min:-3,x_max:1008,ha:1106,o:"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},\u03CE:{x_min:0,x_max:922,ha:1030,o:"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{x_min:193.0625,x_max:598.609375,ha:792,o:"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"\xAB":{x_min:0,x_max:507.203125,ha:604,o:"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},D:{x_min:0,x_max:828,ha:935,o:"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"\u2219":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u00FF:{x_min:0,x_max:47,ha:125,o:"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},w:{x_min:0,x_max:1009.71875,ha:1100,o:"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},$:{x_min:0,x_max:700,ha:793,o:"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\":{x_min:-.015625,x_max:425.0625,ha:522,o:"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},\u00B5:{x_min:0,x_max:697.21875,ha:747,o:"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},\u0399:{x_min:42,x_max:181,ha:297,o:"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},\u038E:{x_min:0,x_max:1144.5,ha:1214,o:"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2019":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u039D:{x_min:0,x_max:801,ha:915,o:"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{x_min:8.71875,x_max:350.390625,ha:478,o:"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},Q:{x_min:0,x_max:968,ha:1072,o:"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},\u03C2:{x_min:1,x_max:676.28125,ha:740,o:"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},M:{x_min:0,x_max:954,ha:1067,o:"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},\u03A8:{x_min:0,x_max:1006,ha:1094,o:"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},C:{x_min:0,x_max:886,ha:944,o:"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{x_min:0,x_max:138,ha:236,o:"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{x_min:0,x_max:480.5625,ha:578,o:"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},X:{x_min:-.015625,x_max:854.15625,ha:940,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{x_min:0,x_max:963.890625,ha:1061,o:"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},\u03B9:{x_min:42,x_max:284,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},\u0386:{x_min:0,x_max:906.953125,ha:982,o:"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{x_min:0,x_max:318,ha:415,o:"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},\u03B5:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},\u0394:{x_min:0,x_max:952.78125,ha:1028,o:"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{x_min:0,x_max:481,ha:578,o:"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"\u2030":{x_min:-3,x_max:1672,ha:1821,o:"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},a:{x_min:0,x_max:698.609375,ha:794,o:"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"\u2014":{x_min:0,x_max:941.671875,ha:1039,o:"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{x_min:8.71875,x_max:780.953125,ha:792,o:"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},N:{x_min:0,x_max:801,ha:914,o:"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},\u03C1:{x_min:0,x_max:712,ha:797,o:"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"2":{x_min:59,x_max:731,ha:792,o:"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},"\xAF":{x_min:0,x_max:941.671875,ha:938,o:"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},Z:{x_min:0,x_max:779,ha:849,o:"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},u:{x_min:0,x_max:617,ha:729,o:"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},k:{x_min:0,x_max:612.484375,ha:697,o:"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},\u0397:{x_min:0,x_max:803,ha:917,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u0391:{x_min:0,x_max:906.953125,ha:985,o:"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},s:{x_min:0,x_max:604,ha:697,o:"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},B:{x_min:0,x_max:778,ha:876,o:"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"\u2026":{x_min:0,x_max:614,ha:708,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{x_min:0,x_max:607,ha:704,o:"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},H:{x_min:0,x_max:803,ha:915,o:"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},\u03BD:{x_min:0,x_max:675,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},c:{x_min:1,x_max:701.390625,ha:775,o:"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"\xB6":{x_min:0,x_max:566.671875,ha:678,o:"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},\u03B2:{x_min:0,x_max:660,ha:745,o:"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},\u039C:{x_min:0,x_max:954,ha:1068,o:"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},\u038C:{x_min:.109375,x_max:1120,ha:1217,o:"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u0389:{x_min:0,x_max:1158,ha:1275,o:"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"\u2022":{x_min:0,x_max:663.890625,ha:775,o:"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"\xA5":{x_min:.1875,x_max:819.546875,ha:886,o:"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{x_min:0,x_max:318.0625,ha:415,o:"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},U:{x_min:0,x_max:796,ha:904,o:"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},\u03B3:{x_min:.5,x_max:744.953125,ha:822,o:"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},\u03B1:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},F:{x_min:0,x_max:683.328125,ha:717,o:"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"\xAD":{x_min:0,x_max:705.5625,ha:803,o:"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03A7:{x_min:0,x_max:854.171875,ha:935,o:"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{x_min:116,x_max:674,ha:792,o:"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"\u2020":{x_min:0,x_max:777,ha:835,o:"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"\xB0":{x_min:0,x_max:347,ha:444,o:"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},V:{x_min:0,x_max:862.71875,ha:940,o:"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},\u039E:{x_min:0,x_max:734.71875,ha:763,o:"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "},"\xA0":{x_min:0,x_max:0,ha:853},\u03AB:{x_min:.328125,x_max:819.515625,ha:889,o:"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"0":{x_min:73,x_max:715,ha:792,o:"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},"\u201D":{x_min:0,x_max:347,ha:454,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{x_min:0,x_max:1260,ha:1357,o:"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},\u038A:{x_min:0,x_max:499,ha:613,o:"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},i:{x_min:14,x_max:136,ha:275,o:"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},\u0392:{x_min:0,x_max:778,ha:877,o:"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},\u03C5:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{x_min:0,x_max:275,ha:372,o:"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},m:{x_min:0,x_max:1019,ha:1128,o:"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},\u03C7:{x_min:8.328125,x_max:780.5625,ha:815,o:"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"8":{x_min:55,x_max:736,ha:792,o:"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},\u03AF:{x_min:42,x_max:326.71875,ha:361,o:"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},\u0396:{x_min:0,x_max:779.171875,ha:850,o:"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},R:{x_min:0,x_max:781.953125,ha:907,o:"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},o:{x_min:0,x_max:713,ha:821,o:"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},"5":{x_min:54.171875,x_max:738,ha:792,o:"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},"7":{x_min:58.71875,x_max:730.953125,ha:792,o:"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},K:{x_min:0,x_max:819.46875,ha:906,o:"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{x_min:0,x_max:142,ha:239,o:"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},d:{x_min:0,x_max:683,ha:796,o:"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"\xA8":{x_min:-109,x_max:247,ha:232,o:"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},E:{x_min:0,x_max:736.109375,ha:789,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},Y:{x_min:0,x_max:820,ha:886,o:"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},'"':{x_min:0,x_max:299,ha:396,o:"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\u2039":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\u201E":{x_min:0,x_max:364,ha:467,o:"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},\u03B4:{x_min:1,x_max:710,ha:810,o:"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},\u03AD:{x_min:0,x_max:634.71875,ha:714,o:"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},\u03C9:{x_min:0,x_max:922,ha:1031,o:"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"\xB4":{x_min:0,x_max:96,ha:251,o:"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"\xB1":{x_min:11,x_max:781,ha:792,o:"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{x_min:343,x_max:449,ha:792,o:"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},\u03CB:{x_min:0,x_max:617,ha:725,o:"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"\xA7":{x_min:0,x_max:593,ha:690,o:"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},b:{x_min:0,x_max:685,ha:783,o:"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},q:{x_min:0,x_max:683,ha:876,o:"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},\u03A9:{x_min:-.171875,x_max:969.5625,ha:1068,o:"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},\u03CD:{x_min:0,x_max:617,ha:725,o:"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},z:{x_min:-.015625,x_max:613.890625,ha:697,o:"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"\u2122":{x_min:0,x_max:894,ha:1e3,o:"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},\u03AE:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},\u0398:{x_min:0,x_max:960,ha:1056,o:"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"\xAE":{x_min:-3,x_max:1008,ha:1106,o:"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{x_min:0,x_max:833,ha:931,o:"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},\u0395:{x_min:0,x_max:736.21875,ha:778,o:"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"\xB3":{x_min:0,x_max:450,ha:547,o:"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{x_min:0,x_max:273.609375,ha:371,o:"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},L:{x_min:0,x_max:645.828125,ha:696,o:"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},\u03C3:{x_min:0,x_max:803.390625,ha:894,o:"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},\u03B6:{x_min:0,x_max:573,ha:642,o:"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},\u03B8:{x_min:0,x_max:674,ha:778,o:"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},\u039F:{x_min:0,x_max:958,ha:1054,o:"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},\u0393:{x_min:0,x_max:705.28125,ha:749,o:"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{x_min:0,x_max:0,ha:375},"%":{x_min:-3,x_max:1089,ha:1186,o:"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},P:{x_min:0,x_max:726,ha:806,o:"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},\u0388:{x_min:0,x_max:1078.21875,ha:1118,o:"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},\u038F:{x_min:.125,x_max:1136.546875,ha:1235,o:"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},_:{x_min:0,x_max:705.5625,ha:803,o:"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},\u03AA:{x_min:-110,x_max:246,ha:275,o:"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{x_min:23,x_max:768,ha:792,o:"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"\xBD":{x_min:0,x_max:1050,ha:1149,o:"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},\u03A1:{x_min:0,x_max:720,ha:783,o:"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"'":{x_min:0,x_max:139,ha:236,o:"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},\u00AA:{x_min:0,x_max:350,ha:397,o:"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"\u0385":{x_min:0,x_max:450,ha:553,o:"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},T:{x_min:0,x_max:777,ha:835,o:"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},\u03A6:{x_min:0,x_max:915,ha:997,o:"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"\u204B":{x_min:0,x_max:0,ha:694},j:{x_min:-77.78125,x_max:167,ha:349,o:"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},\u03A3:{x_min:0,x_max:756.953125,ha:819,o:"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"1":{x_min:215.671875,x_max:574,ha:792,o:"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},"\u203A":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{x_min:17.984375,x_max:773.609375,ha:792,o:"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"\xA3":{x_min:0,x_max:704.484375,ha:801,o:"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},t:{x_min:0,x_max:367,ha:458,o:"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"\xAC":{x_min:0,x_max:706,ha:803,o:"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},\u03BB:{x_min:0,x_max:750,ha:803,o:"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},W:{x_min:0,x_max:1263.890625,ha:1351,o:"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{x_min:18.0625,x_max:774,ha:792,o:"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},v:{x_min:0,x_max:675.15625,ha:761,o:"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},\u03C4:{x_min:.28125,x_max:644.5,ha:703,o:"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},\u03BE:{x_min:0,x_max:624.9375,ha:699,o:"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{x_min:-3,x_max:894.25,ha:992,o:"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},\u039B:{x_min:0,x_max:862.5,ha:942,o:"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},I:{x_min:41,x_max:180,ha:293,o:"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},G:{x_min:0,x_max:921,ha:1011,o:"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},\u03B0:{x_min:0,x_max:617,ha:725,o:"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{x_min:0,x_max:138.890625,ha:236,o:"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"\xB7":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},\u03A5:{x_min:.328125,x_max:819.515625,ha:889,o:"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},r:{x_min:0,x_max:355.5625,ha:432,o:"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},x:{x_min:0,x_max:675,ha:764,o:"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},\u03BC:{x_min:0,x_max:696.609375,ha:747,o:"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},h:{x_min:0,x_max:615,ha:724,o:"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{x_min:0,x_max:142,ha:239,o:"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},\u03C6:{x_min:-2,x_max:878,ha:974,o:"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{x_min:0,x_max:142,ha:239,o:"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},f:{x_min:0,x_max:378,ha:472,o:"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"\u201C":{x_min:1,x_max:348.21875,ha:454,o:"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},A:{x_min:.03125,x_max:906.953125,ha:1008,o:"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"6":{x_min:53,x_max:739,ha:792,o:"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},"\u2018":{x_min:1,x_max:139.890625,ha:236,o:"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},\u03CA:{x_min:-70,x_max:283,ha:361,o:"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},\u03C0:{x_min:-.21875,x_max:773.21875,ha:857,o:"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},\u03AC:{x_min:0,x_max:765.5625,ha:809,o:"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},O:{x_min:0,x_max:958,ha:1057,o:"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},n:{x_min:0,x_max:615,ha:724,o:"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},"3":{x_min:54,x_max:737,ha:792,o:"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},"9":{x_min:53,x_max:739,ha:792,o:"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},l:{x_min:41,x_max:166,ha:279,o:"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"\xA4":{x_min:40.09375,x_max:728.796875,ha:825,o:"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},\u03BA:{x_min:0,x_max:632.328125,ha:679,o:"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},"4":{x_min:48,x_max:742.453125,ha:792,o:"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},p:{x_min:0,x_max:685,ha:786,o:"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"\u2021":{x_min:0,x_max:777,ha:835,o:"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},\u03C8:{x_min:0,x_max:808,ha:907,o:"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},\u03B7:{x_min:.78125,x_max:697,ha:810,o:"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}},cssFontWeight:"normal",ascender:1189,underlinePosition:-100,cssFontStyle:"normal",boundingBox:{yMin:-334,xMin:-111,yMax:1189,xMax:1672},resolution:1e3,original_font_information:{postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) \u039Cagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"\u039Cagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:`Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r
3470
3478
  \r
3471
3479
  Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r
3472
3480
  \r
@@ -3478,14 +3486,14 @@ This License becomes null and void to the extent applicable to Fonts or Font Sof
3478
3486
  \r
3479
3487
  The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r
3480
3488
  \r
3481
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.`,manufacturer_name:"\u039Cagenta ltd",font_sub_family_name:"Regular"},descender:-334,familyName:"Helvetiker",lineHeight:1522,underlineThickness:50};var et=class{execute(o,t){if(o<=1)return!1;let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var xt=class e extends lt{constructor(o,t){super(),this.colorChangeStrategy=t,this.name=o,this.boundingBoxCalculated=!1,this.material=new wu}updateColor(o){this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof e&&t.updateColor(o)}getWidth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.x-this.geometry.boundingBox.min.x}getHeight(){return this.updateBoundingBox(),this.geometry.boundingBox.max.z-this.geometry.boundingBox.min.z}getDepth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.y-this.geometry.boundingBox.min.y}isGeneralSizeChangeMesh(){return"changeSize"in this}updateBoundingBox(){this.boundingBoxCalculated||(this.geometry.computeBoundingBox(),this.boundingBoxCalculated=!0)}};var It=class extends xt{constructor(o,t,i=1,n=!0){super(o,t),this.minWidth=i,this.manualVisibility=n}setManualVisibility(o){this.manualVisibility=o,this.updateVisibility()}setCurrentWidth(o){this.currentWidth=o,this.updateVisibility()}updateVisibility(){let o=this.currentWidth?this.currentWidth>=this.minWidth:!0;this.visible=this.manualVisibility&&this.visibleBecauseOfColor&&o}updateColor(o){this.visibleBecauseOfColor=this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof xt&&t.updateColor(o);this.updateVisibility()}};var ga=class extends $n{constructor(o,t={}){let i=t.font;if(i===void 0)super();else{let n=i.generateShapes(o,t.size,t.direction);t.depth===void 0&&(t.depth=50),t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(n,t)}this.type="TextGeometry"}};function Co(e,o=!1){let t=e[0].index!==null,i=new Set(Object.keys(e[0].attributes)),n=new Set(Object.keys(e[0].morphAttributes)),r={},a={},s=e[0].morphTargetsRelative,l=new Gt,d=0;for(let c=0;c<e.length;++c){let h=e[c],p=0;if(t!==(h.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let u in h.attributes){if(!i.has(u))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+u+'" attribute exists among all geometries, or in none of them.'),null;r[u]===void 0&&(r[u]=[]),r[u].push(h.attributes[u]),p++}if(p!==i.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". Make sure all geometries have the same number of attributes."),null;if(s!==h.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let u in h.morphAttributes){if(!n.has(u))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;a[u]===void 0&&(a[u]=[]),a[u].push(h.morphAttributes[u])}if(o){let u;if(t)u=h.index.count;else if(h.attributes.position!==void 0)u=h.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". The geometry must have either an index or a position attribute"),null;l.addGroup(d,u,c),d+=u}}if(t){let c=0,h=[];for(let p=0;p<e.length;++p){let u=e[p].index;for(let k=0;k<u.count;++k)h.push(u.getX(k)+c);c+=e[p].attributes.position.count}l.setIndex(h)}for(let c in r){let h=uv(r[c]);if(!h)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" attribute."),null;l.setAttribute(c,h)}for(let c in a){let h=a[c][0].length;if(h===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[c]=[];for(let p=0;p<h;++p){let u=[];for(let E=0;E<a[c].length;++E)u.push(a[c][E][p]);let k=uv(u);if(!k)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" morphAttribute."),null;l.morphAttributes[c].push(k)}}return l}function uv(e){let o,t,i,n=-1,r=0;for(let d=0;d<e.length;++d){let c=e[d];if(o===void 0&&(o=c.array.constructor),o!==c.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=c.itemSize),t!==c.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(i===void 0&&(i=c.normalized),i!==c.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(n===-1&&(n=c.gpuType),n!==c.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=c.count*t}let a=new o(r),s=new ro(a,t,i),l=0;for(let d=0;d<e.length;++d){let c=e[d];if(c.isInterleavedBufferAttribute){let h=l/t;for(let p=0,u=c.count;p<u;p++)for(let k=0;k<t;k++){let E=c.getComponent(p,k);s.setComponent(p+h,k,E)}}else a.set(c.array,l);l+=c.count*t}return n!==void 0&&(s.gpuType=n),s}var Mr=class{async create(o,t){let{font:i,side:n,text:r,xPosition:a,yPosition:s,align:l}=t;if(!r)return new Gt;let{textSize:d}=t;d||(d=.025);let c=l==="center"&&r.includes(`
3482
- `)?this.createMultilineCenteredTextGeometry(r,i,d,o.printHeight):new ga(r,{font:i,size:d,depth:o.printHeight});c.center(),n==="back"&&c.rotateY(Math.PI),c.computeBoundingBox();let h=c.boundingBox.max.x-c.boundingBox.min.x,p=l==="center"?0:h/2,u=n==="front"?1:-1;return c.translate(u*(p+a),s,n==="front"?o.printHeight/2:-o.baseplateHeight+o.printHeight/2),c}createMultilineCenteredTextGeometry(o,t,i,n){let r=o.split(`
3483
- `),a=[];for(let[s,l]of r.entries()){let d=new ga(l,{font:t,size:i,depth:n});d.center(),d.translate(0,-s*i*1.5,0),a.push(d)}return Co(a)}};var Qt=class extends It{constructor(o,t=new et,i,n,r,a=new Mr){super(o,t,i,n),this.createTextGeometryOptions=r,this.createTextGeometryStrategy=a}async init(o){return this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.updateColor(o.numberOfColors),this}async updateText(o){this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.boundingBoxCalculated=!1}updateTextGeometryOptions(o){this.createTextGeometryOptions.text=o}};var mc=class extends Qt{constructor(o,t){let i={font:t,text:`IT Stabilization & Modernization
3484
- maibornwolff.de/service/it-sanierung`,side:"back",xPosition:0,yPosition:.23,align:"center"};super(o,new et,200,!0,i)}};var T7=xu,hc=class e extends Zc{constructor(o){super(o),this.defaultDPI=90,this.defaultUnit="px"}load(o,t,i,n){let r=this,a=new Jc(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(o,function(s){try{t(r.parse(s))}catch(l){n?n(l):console.error(l),r.manager.itemError(o)}},i,n)}parse(o){let t=this;function i(A,C){if(A.nodeType!==1)return;let x=H(A),g=!1,Q=null;switch(A.nodeName){case"svg":C=k(A,C);break;case"style":r(A);break;case"g":C=k(A,C);break;case"path":C=k(A,C),A.hasAttribute("d")&&(Q=n(A));break;case"rect":C=k(A,C),Q=l(A);break;case"polygon":C=k(A,C),Q=d(A);break;case"polyline":C=k(A,C),Q=c(A);break;case"circle":C=k(A,C),Q=h(A);break;case"ellipse":C=k(A,C),Q=p(A);break;case"line":C=k(A,C),Q=u(A);break;case"defs":g=!0;break;case"use":C=k(A,C);let ce=(A.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").substring(1),pe=A.viewportElement.getElementById(ce);pe?i(pe,C):console.warn("SVGLoader: 'use node' references non-existent node id: "+ce);break;default:}Q&&(C.fill!==void 0&&C.fill!=="none"&&Q.color.setStyle(C.fill,T7),Z(Q,dt),U.push(Q),Q.userData={node:A,style:C});let de=A.childNodes;for(let V=0;V<de.length;V++){let ce=de[V];g&&ce.nodeName!=="style"&&ce.nodeName!=="defs"||i(ce,C)}x&&(_e.pop(),_e.length>0?dt.copy(_e[_e.length-1]):dt.identity())}function n(A){let C=new Mi,x=new Ge,g=new Ge,Q=new Ge,de=!0,V=!1,ce=A.getAttribute("d");if(ce===""||ce==="none")return null;let pe=ce.match(/[a-df-z][^a-df-z]*/ig);for(let fe=0,Y=pe.length;fe<Y;fe++){let re=pe[fe],we=re.charAt(0),Se=re.slice(1).trim();de===!0&&(V=!0,de=!1);let I;switch(we){case"M":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2)x.x=I[S+0],x.y=I[S+1],g.x=x.x,g.y=x.y,S===0?C.moveTo(x.x,x.y):C.lineTo(x.x,x.y),S===0&&Q.copy(x);break;case"H":I=N(Se);for(let S=0,ye=I.length;S<ye;S++)x.x=I[S],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"V":I=N(Se);for(let S=0,ye=I.length;S<ye;S++)x.y=I[S],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"L":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2)x.x=I[S+0],x.y=I[S+1],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"C":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=6)C.bezierCurveTo(I[S+0],I[S+1],I[S+2],I[S+3],I[S+4],I[S+5]),g.x=I[S+2],g.y=I[S+3],x.x=I[S+4],x.y=I[S+5],S===0&&V===!0&&Q.copy(x);break;case"S":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=4)C.bezierCurveTo(E(x.x,g.x),E(x.y,g.y),I[S+0],I[S+1],I[S+2],I[S+3]),g.x=I[S+0],g.y=I[S+1],x.x=I[S+2],x.y=I[S+3],S===0&&V===!0&&Q.copy(x);break;case"Q":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=4)C.quadraticCurveTo(I[S+0],I[S+1],I[S+2],I[S+3]),g.x=I[S+0],g.y=I[S+1],x.x=I[S+2],x.y=I[S+3],S===0&&V===!0&&Q.copy(x);break;case"T":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2){let $e=E(x.x,g.x),Ht=E(x.y,g.y);C.quadraticCurveTo($e,Ht,I[S+0],I[S+1]),g.x=$e,g.y=Ht,x.x=I[S+0],x.y=I[S+1],S===0&&V===!0&&Q.copy(x)}break;case"A":I=N(Se,[3,4],7);for(let S=0,ye=I.length;S<ye;S+=7){if(I[S+5]==x.x&&I[S+6]==x.y)continue;let $e=x.clone();x.x=I[S+5],x.y=I[S+6],g.x=x.x,g.y=x.y,a(C,I[S],I[S+1],I[S+2],I[S+3],I[S+4],$e,x),S===0&&V===!0&&Q.copy(x)}break;case"m":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2)x.x+=I[S+0],x.y+=I[S+1],g.x=x.x,g.y=x.y,S===0?C.moveTo(x.x,x.y):C.lineTo(x.x,x.y),S===0&&Q.copy(x);break;case"h":I=N(Se);for(let S=0,ye=I.length;S<ye;S++)x.x+=I[S],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"v":I=N(Se);for(let S=0,ye=I.length;S<ye;S++)x.y+=I[S],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"l":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2)x.x+=I[S+0],x.y+=I[S+1],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"c":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=6)C.bezierCurveTo(x.x+I[S+0],x.y+I[S+1],x.x+I[S+2],x.y+I[S+3],x.x+I[S+4],x.y+I[S+5]),g.x=x.x+I[S+2],g.y=x.y+I[S+3],x.x+=I[S+4],x.y+=I[S+5],S===0&&V===!0&&Q.copy(x);break;case"s":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=4)C.bezierCurveTo(E(x.x,g.x),E(x.y,g.y),x.x+I[S+0],x.y+I[S+1],x.x+I[S+2],x.y+I[S+3]),g.x=x.x+I[S+0],g.y=x.y+I[S+1],x.x+=I[S+2],x.y+=I[S+3],S===0&&V===!0&&Q.copy(x);break;case"q":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=4)C.quadraticCurveTo(x.x+I[S+0],x.y+I[S+1],x.x+I[S+2],x.y+I[S+3]),g.x=x.x+I[S+0],g.y=x.y+I[S+1],x.x+=I[S+2],x.y+=I[S+3],S===0&&V===!0&&Q.copy(x);break;case"t":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2){let $e=E(x.x,g.x),Ht=E(x.y,g.y);C.quadraticCurveTo($e,Ht,x.x+I[S+0],x.y+I[S+1]),g.x=$e,g.y=Ht,x.x=x.x+I[S+0],x.y=x.y+I[S+1],S===0&&V===!0&&Q.copy(x)}break;case"a":I=N(Se,[3,4],7);for(let S=0,ye=I.length;S<ye;S+=7){if(I[S+5]==0&&I[S+6]==0)continue;let $e=x.clone();x.x+=I[S+5],x.y+=I[S+6],g.x=x.x,g.y=x.y,a(C,I[S],I[S+1],I[S+2],I[S+3],I[S+4],$e,x),S===0&&V===!0&&Q.copy(x)}break;case"Z":case"z":C.currentPath.autoClose=!0,C.currentPath.curves.length>0&&(x.copy(Q),C.currentPath.currentPoint.copy(x),de=!0);break;default:console.warn(re)}V=!1}return C}function r(A){if(!(!A.sheet||!A.sheet.cssRules||!A.sheet.cssRules.length))for(let C=0;C<A.sheet.cssRules.length;C++){let x=A.sheet.cssRules[C];if(x.type!==1)continue;let g=x.selectorText.split(/,/gm).filter(Boolean).map(Q=>Q.trim());for(let Q=0;Q<g.length;Q++){let de=Object.fromEntries(Object.entries(x.style).filter(([,V])=>V!==""));De[g[Q]]=Object.assign(De[g[Q]]||{},de)}}}function a(A,C,x,g,Q,de,V,ce){if(C==0||x==0){A.lineTo(ce.x,ce.y);return}g=g*Math.PI/180,C=Math.abs(C),x=Math.abs(x);let pe=(V.x-ce.x)/2,fe=(V.y-ce.y)/2,Y=Math.cos(g)*pe+Math.sin(g)*fe,re=-Math.sin(g)*pe+Math.cos(g)*fe,we=C*C,Se=x*x,I=Y*Y,S=re*re,ye=I/we+S/Se;if(ye>1){let Ra=Math.sqrt(ye);C=Ra*C,x=Ra*x,we=C*C,Se=x*x}let $e=we*S+Se*I,Ht=(we*Se-$e)/$e,mi=Math.sqrt(Math.max(0,Ht));Q===de&&(mi=-mi);let wt=mi*C*re/x,Ui=-mi*x*Y/C,Ta=Math.cos(g)*wt-Math.sin(g)*Ui+(V.x+ce.x)/2,Ah=Math.sin(g)*wt+Math.cos(g)*Ui+(V.y+ce.y)/2,Ia=s(1,0,(Y-wt)/C,(re-Ui)/x),Gc=s((Y-wt)/C,(re-Ui)/x,(-Y-wt)/C,(-re-Ui)/x)%(Math.PI*2);A.currentPath.absellipse(Ta,Ah,C,x,Ia,Ia+Gc,de===0,g)}function s(A,C,x,g){let Q=A*x+C*g,de=Math.sqrt(A*A+C*C)*Math.sqrt(x*x+g*g),V=Math.acos(Math.max(-1,Math.min(1,Q/de)));return A*g-C*x<0&&(V=-V),V}function l(A){let C=B(A.getAttribute("x")||0),x=B(A.getAttribute("y")||0),g=B(A.getAttribute("rx")||A.getAttribute("ry")||0),Q=B(A.getAttribute("ry")||A.getAttribute("rx")||0),de=B(A.getAttribute("width")),V=B(A.getAttribute("height")),ce=1-.551915024494,pe=new Mi;return pe.moveTo(C+g,x),pe.lineTo(C+de-g,x),(g!==0||Q!==0)&&pe.bezierCurveTo(C+de-g*ce,x,C+de,x+Q*ce,C+de,x+Q),pe.lineTo(C+de,x+V-Q),(g!==0||Q!==0)&&pe.bezierCurveTo(C+de,x+V-Q*ce,C+de-g*ce,x+V,C+de-g,x+V),pe.lineTo(C+g,x+V),(g!==0||Q!==0)&&pe.bezierCurveTo(C+g*ce,x+V,C,x+V-Q*ce,C,x+V-Q),pe.lineTo(C,x+Q),(g!==0||Q!==0)&&pe.bezierCurveTo(C,x+Q*ce,C+g*ce,x,C+g,x),pe}function d(A){function C(de,V,ce){let pe=B(V),fe=B(ce);Q===0?g.moveTo(pe,fe):g.lineTo(pe,fe),Q++}let x=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,g=new Mi,Q=0;return A.getAttribute("points").replace(x,C),g.currentPath.autoClose=!0,g}function c(A){function C(de,V,ce){let pe=B(V),fe=B(ce);Q===0?g.moveTo(pe,fe):g.lineTo(pe,fe),Q++}let x=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,g=new Mi,Q=0;return A.getAttribute("points").replace(x,C),g.currentPath.autoClose=!1,g}function h(A){let C=B(A.getAttribute("cx")||0),x=B(A.getAttribute("cy")||0),g=B(A.getAttribute("r")||0),Q=new ms;Q.absarc(C,x,g,0,Math.PI*2);let de=new Mi;return de.subPaths.push(Q),de}function p(A){let C=B(A.getAttribute("cx")||0),x=B(A.getAttribute("cy")||0),g=B(A.getAttribute("rx")||0),Q=B(A.getAttribute("ry")||0),de=new ms;de.absellipse(C,x,g,Q,0,Math.PI*2);let V=new Mi;return V.subPaths.push(de),V}function u(A){let C=B(A.getAttribute("x1")||0),x=B(A.getAttribute("y1")||0),g=B(A.getAttribute("x2")||0),Q=B(A.getAttribute("y2")||0),de=new Mi;return de.moveTo(C,x),de.lineTo(g,Q),de.currentPath.autoClose=!1,de}function k(A,C){C=Object.assign({},C);let x={};if(A.hasAttribute("class")){let V=A.getAttribute("class").split(/\s/).filter(Boolean).map(ce=>ce.trim());for(let ce=0;ce<V.length;ce++)x=Object.assign(x,De["."+V[ce]])}A.hasAttribute("id")&&(x=Object.assign(x,De["#"+A.getAttribute("id")]));function g(V,ce,pe){pe===void 0&&(pe=function(Y){return Y.startsWith("url")&&console.warn("SVGLoader: url access in attributes is not implemented."),Y}),A.hasAttribute(V)&&(C[ce]=pe(A.getAttribute(V))),x[ce]&&(C[ce]=pe(x[ce])),A.style&&A.style[V]!==""&&(C[ce]=pe(A.style[V]))}function Q(V){return Math.max(0,Math.min(1,B(V)))}function de(V){return Math.max(0,B(V))}return g("fill","fill"),g("fill-opacity","fillOpacity",Q),g("fill-rule","fillRule"),g("opacity","opacity",Q),g("stroke","stroke"),g("stroke-opacity","strokeOpacity",Q),g("stroke-width","strokeWidth",de),g("stroke-linejoin","strokeLineJoin"),g("stroke-linecap","strokeLineCap"),g("stroke-miterlimit","strokeMiterLimit",de),g("visibility","visibility"),C}function E(A,C){return A-(C-A)}function N(A,C,x){if(typeof A!="string")throw new TypeError("Invalid input: "+typeof A);let g={SEPARATOR:/[ \t\r\n\,.\-+]/,WHITESPACE:/[ \t\r\n]/,DIGIT:/[\d]/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/},Q=0,de=1,V=2,ce=3,pe=Q,fe=!0,Y="",re="",we=[];function Se($e,Ht,mi){let wt=new SyntaxError('Unexpected character "'+$e+'" at index '+Ht+".");throw wt.partial=mi,wt}function I(){Y!==""&&(re===""?we.push(Number(Y)):we.push(Number(Y)*Math.pow(10,Number(re)))),Y="",re=""}let S,ye=A.length;for(let $e=0;$e<ye;$e++){if(S=A[$e],Array.isArray(C)&&C.includes(we.length%x)&&g.FLAGS.test(S)){pe=de,Y=S,I();continue}if(pe===Q){if(g.WHITESPACE.test(S))continue;if(g.DIGIT.test(S)||g.SIGN.test(S)){pe=de,Y=S;continue}if(g.POINT.test(S)){pe=V,Y=S;continue}g.COMMA.test(S)&&(fe&&Se(S,$e,we),fe=!0)}if(pe===de){if(g.DIGIT.test(S)){Y+=S;continue}if(g.POINT.test(S)){Y+=S,pe=V;continue}if(g.EXP.test(S)){pe=ce;continue}g.SIGN.test(S)&&Y.length===1&&g.SIGN.test(Y[0])&&Se(S,$e,we)}if(pe===V){if(g.DIGIT.test(S)){Y+=S;continue}if(g.EXP.test(S)){pe=ce;continue}g.POINT.test(S)&&Y[Y.length-1]==="."&&Se(S,$e,we)}if(pe===ce){if(g.DIGIT.test(S)){re+=S;continue}if(g.SIGN.test(S)){if(re===""){re+=S;continue}re.length===1&&g.SIGN.test(re)&&Se(S,$e,we)}}g.WHITESPACE.test(S)?(I(),pe=Q,fe=!1):g.COMMA.test(S)?(I(),pe=Q,fe=!0):g.SIGN.test(S)?(I(),pe=de,Y=S):g.POINT.test(S)?(I(),pe=V,Y=S):Se(S,$e,we)}return I(),we}let j=["mm","cm","in","pt","pc","px"],ee={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:72/6,pc:1,px:-1},px:{px:1}};function B(A){let C="px";if(typeof A=="string"||A instanceof String)for(let g=0,Q=j.length;g<Q;g++){let de=j[g];if(A.endsWith(de)){C=de,A=A.substring(0,A.length-de.length);break}}let x;return C==="px"&&t.defaultUnit!=="px"?x=ee.in[t.defaultUnit]/t.defaultDPI:(x=ee[C][t.defaultUnit],x<0&&(x=ee[C].in*t.defaultDPI)),x*parseFloat(A)}function H(A){if(!(A.hasAttribute("transform")||A.nodeName==="use"&&(A.hasAttribute("x")||A.hasAttribute("y"))))return null;let C=G(A);return _e.length>0&&C.premultiply(_e[_e.length-1]),dt.copy(C),_e.push(C),C}function G(A){let C=new Lo,x=Ve;if(A.nodeName==="use"&&(A.hasAttribute("x")||A.hasAttribute("y"))){let g=B(A.getAttribute("x")||0),Q=B(A.getAttribute("y")||0);C.translate(g,Q)}if(A.hasAttribute("transform")){let g=A.getAttribute("transform").split(")");for(let Q=g.length-1;Q>=0;Q--){let de=g[Q].trim();if(de==="")continue;let V=de.indexOf("("),ce=de.length;if(V>0&&V<ce){let pe=de.slice(0,V),fe=N(de.slice(V+1));switch(x.identity(),pe){case"translate":if(fe.length>=1){let Y=fe[0],re=0;fe.length>=2&&(re=fe[1]),x.translate(Y,re)}break;case"rotate":if(fe.length>=1){let Y=0,re=0,we=0;Y=fe[0]*Math.PI/180,fe.length>=3&&(re=fe[1],we=fe[2]),We.makeTranslation(-re,-we),ge.makeRotation(Y),J.multiplyMatrices(ge,We),We.makeTranslation(re,we),x.multiplyMatrices(We,J)}break;case"scale":if(fe.length>=1){let Y=fe[0],re=Y;fe.length>=2&&(re=fe[1]),x.scale(Y,re)}break;case"skewX":fe.length===1&&x.set(1,Math.tan(fe[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":fe.length===1&&x.set(1,0,0,Math.tan(fe[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":fe.length===6&&x.set(fe[0],fe[2],fe[4],fe[1],fe[3],fe[5],0,0,1);break}}C.premultiply(x)}}return C}function Z(A,C){function x(V){Be.set(V.x,V.y,1).applyMatrix3(C),V.set(Be.x,Be.y)}function g(V){let ce=V.xRadius,pe=V.yRadius,fe=Math.cos(V.aRotation),Y=Math.sin(V.aRotation),re=new Qe(ce*fe,ce*Y,0),we=new Qe(-pe*Y,pe*fe,0),Se=re.applyMatrix3(C),I=we.applyMatrix3(C),S=Ve.set(Se.x,I.x,0,Se.y,I.y,0,0,0,1),ye=We.copy(S).invert(),mi=ge.copy(ye).transpose().multiply(ye).elements,wt=He(mi[0],mi[1],mi[4]),Ui=Math.sqrt(wt.rt1),Ta=Math.sqrt(wt.rt2);if(V.xRadius=1/Ui,V.yRadius=1/Ta,V.aRotation=Math.atan2(wt.sn,wt.cs),!((V.aEndAngle-V.aStartAngle)%(2*Math.PI)<Number.EPSILON)){let Ia=We.set(Ui,0,0,0,Ta,0,0,0,1),Gc=ge.set(wt.cs,wt.sn,0,-wt.sn,wt.cs,0,0,0,1),Ra=Ia.multiply(Gc).multiply(S),Lh=Fh=>{let{x:bw,y:vw}=new Qe(Math.cos(Fh),Math.sin(Fh),0).applyMatrix3(Ra);return Math.atan2(vw,bw)};V.aStartAngle=Lh(V.aStartAngle),V.aEndAngle=Lh(V.aEndAngle),ie(C)&&(V.aClockwise=!V.aClockwise)}}function Q(V){let ce=ne(C),pe=Me(C);V.xRadius*=ce,V.yRadius*=pe;let fe=ce>Number.EPSILON?Math.atan2(C.elements[1],C.elements[0]):Math.atan2(-C.elements[3],C.elements[4]);V.aRotation+=fe,ie(C)&&(V.aStartAngle*=-1,V.aEndAngle*=-1,V.aClockwise=!V.aClockwise)}let de=A.subPaths;for(let V=0,ce=de.length;V<ce;V++){let fe=de[V].curves;for(let Y=0;Y<fe.length;Y++){let re=fe[Y];re.isLineCurve?(x(re.v1),x(re.v2)):re.isCubicBezierCurve?(x(re.v0),x(re.v1),x(re.v2),x(re.v3)):re.isQuadraticBezierCurve?(x(re.v0),x(re.v1),x(re.v2)):re.isEllipseCurve&&(Ue.set(re.aX,re.aY),x(Ue),re.aX=Ue.x,re.aY=Ue.y,oe(C)?g(re):Q(re))}}}function ie(A){let C=A.elements;return C[0]*C[4]-C[1]*C[3]<0}function oe(A){let C=A.elements,x=C[0]*C[3]+C[1]*C[4];if(x===0)return!1;let g=ne(A),Q=Me(A);return Math.abs(x/(g*Q))>Number.EPSILON}function ne(A){let C=A.elements;return Math.sqrt(C[0]*C[0]+C[1]*C[1])}function Me(A){let C=A.elements;return Math.sqrt(C[3]*C[3]+C[4]*C[4])}function He(A,C,x){let g,Q,de,V,ce,pe=A+x,fe=A-x,Y=Math.sqrt(fe*fe+4*C*C);return pe>0?(g=.5*(pe+Y),ce=1/g,Q=A*ce*x-C*ce*C):pe<0?Q=.5*(pe-Y):(g=.5*Y,Q=-.5*Y),fe>0?de=fe+Y:de=fe-Y,Math.abs(de)>2*Math.abs(C)?(ce=-2*C/de,V=1/Math.sqrt(1+ce*ce),de=ce*V):Math.abs(C)===0?(de=1,V=0):(ce=-.5*de/C,de=1/Math.sqrt(1+ce*ce),V=ce*de),fe>0&&(ce=de,de=-V,V=ce),{rt1:g,rt2:Q,cs:de,sn:V}}let U=[],De={},_e=[],Ve=new Lo,We=new Lo,ge=new Lo,J=new Lo,Ue=new Ge,Be=new Qe,dt=new Lo,$t=new DOMParser().parseFromString(o,"image/svg+xml");return i($t.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:U,xml:$t.documentElement}}static createShapes(o){let i={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},n={loc:i.ORIGIN,t:0};function r(E,N,j,ee){let B=E.x,H=N.x,G=j.x,Z=ee.x,ie=E.y,oe=N.y,ne=j.y,Me=ee.y,He=(Z-G)*(ie-ne)-(Me-ne)*(B-G),U=(H-B)*(ie-ne)-(oe-ie)*(B-G),De=(Me-ne)*(H-B)-(Z-G)*(oe-ie),_e=He/De,Ve=U/De;if(De===0&&He!==0||_e<=0||_e>=1||Ve<0||Ve>1)return null;if(He===0&&De===0){for(let We=0;We<2;We++)if(a(We===0?j:ee,E,N),n.loc==i.ORIGIN){let ge=We===0?j:ee;return{x:ge.x,y:ge.y,t:n.t}}else if(n.loc==i.BETWEEN){let ge=+(B+n.t*(H-B)).toPrecision(10),J=+(ie+n.t*(oe-ie)).toPrecision(10);return{x:ge,y:J,t:n.t}}return null}else{for(let J=0;J<2;J++)if(a(J===0?j:ee,E,N),n.loc==i.ORIGIN){let Ue=J===0?j:ee;return{x:Ue.x,y:Ue.y,t:n.t}}let We=+(B+_e*(H-B)).toPrecision(10),ge=+(ie+_e*(oe-ie)).toPrecision(10);return{x:We,y:ge,t:_e}}}function a(E,N,j){let ee=j.x-N.x,B=j.y-N.y,H=E.x-N.x,G=E.y-N.y,Z=ee*G-H*B;if(E.x===N.x&&E.y===N.y){n.loc=i.ORIGIN,n.t=0;return}if(E.x===j.x&&E.y===j.y){n.loc=i.DESTINATION,n.t=1;return}if(Z<-Number.EPSILON){n.loc=i.LEFT;return}if(Z>Number.EPSILON){n.loc=i.RIGHT;return}if(ee*H<0||B*G<0){n.loc=i.BEHIND;return}if(Math.sqrt(ee*ee+B*B)<Math.sqrt(H*H+G*G)){n.loc=i.BEYOND;return}let ie;ee!==0?ie=H/ee:ie=G/B,n.loc=i.BETWEEN,n.t=ie}function s(E,N){let j=[],ee=[];for(let B=1;B<E.length;B++){let H=E[B-1],G=E[B];for(let Z=1;Z<N.length;Z++){let ie=N[Z-1],oe=N[Z],ne=r(H,G,ie,oe);ne!==null&&j.find(Me=>Me.t<=ne.t+Number.EPSILON&&Me.t>=ne.t-Number.EPSILON)===void 0&&(j.push(ne),ee.push(new Ge(ne.x,ne.y)))}}return ee}function l(E,N,j){let ee=new Ge;N.getCenter(ee);let B=[];return j.forEach(H=>{H.boundingBox.containsPoint(ee)&&s(E,H.points).forEach(Z=>{B.push({identifier:H.identifier,isCW:H.isCW,point:Z})})}),B.sort((H,G)=>H.point.x-G.point.x),B}function d(E,N,j,ee,B){(B==null||B==="")&&(B="nonzero");let H=new Ge;E.boundingBox.getCenter(H);let G=[new Ge(j,H.y),new Ge(ee,H.y)],Z=l(G,E.boundingBox,N);Z.sort((U,De)=>U.point.x-De.point.x);let ie=[],oe=[];Z.forEach(U=>{U.identifier===E.identifier?ie.push(U):oe.push(U)});let ne=ie[0].point.x,Me=[],He=0;for(;He<oe.length&&oe[He].point.x<ne;)Me.length>0&&Me[Me.length-1]===oe[He].identifier?Me.pop():Me.push(oe[He].identifier),He++;if(Me.push(E.identifier),B==="evenodd"){let U=Me.length%2===0,De=Me[Me.length-2];return{identifier:E.identifier,isHole:U,for:De}}else if(B==="nonzero"){let U=!0,De=null,_e=null;for(let Ve=0;Ve<Me.length;Ve++){let We=Me[Ve];U?(_e=N[We].isCW,U=!1,De=We):_e!==N[We].isCW&&(_e=N[We].isCW,U=!0)}return{identifier:E.identifier,isHole:U,for:De}}else console.warn('fill-rule: "'+B+'" is currently not implemented.')}let c=999999999,h=-999999999,p=o.subPaths.map(E=>{let N=E.getPoints(),j=-999999999,ee=999999999,B=-999999999,H=999999999;for(let G=0;G<N.length;G++){let Z=N[G];Z.y>j&&(j=Z.y),Z.y<ee&&(ee=Z.y),Z.x>B&&(B=Z.x),Z.x<H&&(H=Z.x)}return h<=B&&(h=B+1),c>=H&&(c=H-1),{curves:E.curves,points:N,isCW:_u.isClockWise(N),identifier:-1,boundingBox:new ku(new Ge(H,ee),new Ge(B,j))}});p=p.filter(E=>E.points.length>1);for(let E=0;E<p.length;E++)p[E].identifier=E;let u=p.map(E=>d(E,p,c,h,o.userData?o.userData.style.fillRule:void 0)),k=[];return p.forEach(E=>{if(!u[E.identifier].isHole){let j=new hs;j.curves=E.curves,u.filter(B=>B.isHole&&B.for===E.identifier).forEach(B=>{let H=p[B.identifier],G=new ms;G.curves=H.curves,j.holes.push(G)}),k.push(j)}}),k}static getStrokeStyle(o,t,i,n,r){return o=o!==void 0?o:1,t=t!==void 0?t:"#000",i=i!==void 0?i:"miter",n=n!==void 0?n:"butt",r=r!==void 0?r:4,{strokeColor:t,strokeWidth:o,strokeLineJoin:i,strokeLineCap:n,strokeMiterLimit:r}}static pointsToStroke(o,t,i,n){let r=[],a=[],s=[];if(e.pointsToStrokeWithBuffers(o,t,i,n,r,a,s)===0)return null;let l=new Gt;return l.setAttribute("position",new Fo(r,3)),l.setAttribute("normal",new Fo(a,3)),l.setAttribute("uv",new Fo(s,2)),l}static pointsToStrokeWithBuffers(o,t,i,n,r,a,s,l){let d=new Ge,c=new Ge,h=new Ge,p=new Ge,u=new Ge,k=new Ge,E=new Ge,N=new Ge,j=new Ge,ee=new Ge,B=new Ge,H=new Ge,G=new Ge,Z=new Ge,ie=new Ge,oe=new Ge,ne=new Ge;i=i!==void 0?i:12,n=n!==void 0?n:.001,l=l!==void 0?l:0,o=fe(o);let Me=o.length;if(Me<2)return 0;let He=o[0].equals(o[Me-1]),U,De=o[0],_e,Ve=t.strokeWidth/2,We=1/(Me-1),ge=0,J,Ue,Be,dt,$t=!1,di=0,A=l*3,C=l*2;x(o[0],o[1],d).multiplyScalar(Ve),N.copy(o[0]).sub(d),j.copy(o[0]).add(d),ee.copy(N),B.copy(j);for(let Y=1;Y<Me;Y++){U=o[Y],Y===Me-1?He?_e=o[1]:_e=void 0:_e=o[Y+1];let re=d;if(x(De,U,re),h.copy(re).multiplyScalar(Ve),H.copy(U).sub(h),G.copy(U).add(h),J=ge+We,Ue=!1,_e!==void 0){x(U,_e,c),h.copy(c).multiplyScalar(Ve),Z.copy(U).sub(h),ie.copy(U).add(h),Be=!0,h.subVectors(_e,De),re.dot(h)<0&&(Be=!1),Y===1&&($t=Be),h.subVectors(_e,U),h.normalize();let we=Math.abs(re.dot(h));if(we>Number.EPSILON){let Se=Ve/we;h.multiplyScalar(-Se),p.subVectors(U,De),u.copy(p).setLength(Se).add(h),oe.copy(u).negate();let I=u.length(),S=p.length();p.divideScalar(S),k.subVectors(_e,U);let ye=k.length();switch(k.divideScalar(ye),p.dot(oe)<S&&k.dot(oe)<ye&&(Ue=!0),ne.copy(u).add(U),oe.add(U),dt=!1,Ue?Be?(ie.copy(oe),G.copy(oe)):(Z.copy(oe),H.copy(oe)):de(),t.strokeLineJoin){case"bevel":V(Be,Ue,J);break;case"round":ce(Be,Ue),Be?Q(U,H,Z,J,0):Q(U,ie,G,J,1);break;default:let $e=Ve*t.strokeMiterLimit/I;if($e<1)if(t.strokeLineJoin!=="miter-clip"){V(Be,Ue,J);break}else ce(Be,Ue),Be?(k.subVectors(ne,H).multiplyScalar($e).add(H),E.subVectors(ne,Z).multiplyScalar($e).add(Z),g(H,J,0),g(k,J,0),g(U,J,.5),g(U,J,.5),g(k,J,0),g(E,J,0),g(U,J,.5),g(E,J,0),g(Z,J,0)):(k.subVectors(ne,G).multiplyScalar($e).add(G),E.subVectors(ne,ie).multiplyScalar($e).add(ie),g(G,J,1),g(k,J,1),g(U,J,.5),g(U,J,.5),g(k,J,1),g(E,J,1),g(U,J,.5),g(E,J,1),g(ie,J,1));else Ue?(Be?(g(j,ge,1),g(N,ge,0),g(ne,J,0),g(j,ge,1),g(ne,J,0),g(oe,J,1)):(g(j,ge,1),g(N,ge,0),g(ne,J,1),g(N,ge,0),g(oe,J,0),g(ne,J,1)),Be?Z.copy(ne):ie.copy(ne)):Be?(g(H,J,0),g(ne,J,0),g(U,J,.5),g(U,J,.5),g(ne,J,0),g(Z,J,0)):(g(G,J,1),g(ne,J,1),g(U,J,.5),g(U,J,.5),g(ne,J,1),g(ie,J,1)),dt=!0;break}}else de()}else de();!He&&Y===Me-1&&pe(o[0],ee,B,Be,!0,ge),ge=J,De=U,N.copy(Z),j.copy(ie)}if(!He)pe(U,H,G,Be,!1,J);else if(Ue&&r){let Y=ne,re=oe;$t!==Be&&(Y=oe,re=ne),Be?(dt||$t)&&(re.toArray(r,0),re.toArray(r,9),dt&&Y.toArray(r,3)):(dt||!$t)&&(re.toArray(r,3),re.toArray(r,9),dt&&Y.toArray(r,0))}return di;function x(Y,re,we){return we.subVectors(re,Y),we.set(-we.y,we.x).normalize()}function g(Y,re,we){r&&(r[A]=Y.x,r[A+1]=Y.y,r[A+2]=0,a&&(a[A]=0,a[A+1]=0,a[A+2]=1),A+=3,s&&(s[C]=re,s[C+1]=we,C+=2)),di+=3}function Q(Y,re,we,Se,I){d.copy(re).sub(Y).normalize(),c.copy(we).sub(Y).normalize();let S=Math.PI,ye=d.dot(c);Math.abs(ye)<1&&(S=Math.abs(Math.acos(ye))),S/=i,h.copy(re);for(let $e=0,Ht=i-1;$e<Ht;$e++)p.copy(h).rotateAround(Y,S),g(h,Se,I),g(p,Se,I),g(Y,Se,.5),h.copy(p);g(p,Se,I),g(we,Se,I),g(Y,Se,.5)}function de(){g(j,ge,1),g(N,ge,0),g(H,J,0),g(j,ge,1),g(H,J,0),g(G,J,1)}function V(Y,re,we){re?Y?(g(j,ge,1),g(N,ge,0),g(H,J,0),g(j,ge,1),g(H,J,0),g(oe,J,1),g(H,we,0),g(Z,we,0),g(oe,we,.5)):(g(j,ge,1),g(N,ge,0),g(G,J,1),g(N,ge,0),g(oe,J,0),g(G,J,1),g(G,we,1),g(oe,we,0),g(ie,we,1)):Y?(g(H,we,0),g(Z,we,0),g(U,we,.5)):(g(G,we,1),g(ie,we,0),g(U,we,.5))}function ce(Y,re){re&&(Y?(g(j,ge,1),g(N,ge,0),g(H,J,0),g(j,ge,1),g(H,J,0),g(oe,J,1),g(H,ge,0),g(U,J,.5),g(oe,J,1),g(U,J,.5),g(Z,ge,0),g(oe,J,1)):(g(j,ge,1),g(N,ge,0),g(G,J,1),g(N,ge,0),g(oe,J,0),g(G,J,1),g(G,ge,1),g(oe,J,0),g(U,J,.5),g(U,J,.5),g(oe,J,0),g(ie,ge,1)))}function pe(Y,re,we,Se,I,S){switch(t.strokeLineCap){case"round":I?Q(Y,we,re,S,.5):Q(Y,re,we,S,.5);break;case"square":if(I)d.subVectors(re,Y),c.set(d.y,-d.x),h.addVectors(d,c).add(Y),p.subVectors(c,d).add(Y),Se?(h.toArray(r,3),p.toArray(r,0),p.toArray(r,9)):(h.toArray(r,3),s[7]===1?p.toArray(r,9):h.toArray(r,9),p.toArray(r,0));else{d.subVectors(we,Y),c.set(d.y,-d.x),h.addVectors(d,c).add(Y),p.subVectors(c,d).add(Y);let ye=r.length;Se?(h.toArray(r,ye-3),p.toArray(r,ye-6),p.toArray(r,ye-12)):(p.toArray(r,ye-6),h.toArray(r,ye-3),p.toArray(r,ye-12))}break;default:break}}function fe(Y){let re=!1;for(let Se=1,I=Y.length-1;Se<I;Se++)if(Y[Se].distanceTo(Y[Se+1])<n){re=!0;break}if(!re)return Y;let we=[];we.push(Y[0]);for(let Se=1,I=Y.length-1;Se<I;Se++)Y[Se].distanceTo(Y[Se+1])>=n&&we.push(Y[Se]);return we.push(Y[Y.length-1]),we}}};var Yt=class{async create(o,t){let i=t.filePath,n=new hc;return new Promise((r,a)=>{n.load(i,function(s){let l=s.paths,d=[];for(let k of l){let E=k.toShapes(!0);for(let N of E){let j=new $n(N,{depth:o.printHeight,bevelEnabled:!1});d.push(j)}}let c=Co(d);c.computeBoundingBox();let h=c.boundingBox.max.x-c.boundingBox.min.x,p=c.boundingBox.max.y-c.boundingBox.min.y,u=t.size/Math.max(h,p);c.scale(u,u,1),c.center(),t.side==="back"?c.rotateZ(Math.PI):(c.rotateZ(Math.PI),c.rotateY(Math.PI)),r(c)},void 0,function(s){console.error(`Error loading ${i}`),a(s)})})}};var pc=class extends It{constructor(o){super(o,new et,120,!0),this.name="BackMWLogo"}async init(o){let t=new Yt,i=.31;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo_text.svg",size:i,side:"back"});let n=0,r=.37,a=-o.baseplateHeight+o.printHeight/2;return this.position.set(n,r,a),this.updateColor(o.numberOfColors),this}};var uc=class extends It{constructor(o,t=new Yt){super(o,new et,180,!0),this.createSvgStrategy=t}async init(o){this.geometry=await this.createSvgStrategy.create(o,{filePath:"./codeCharta/assets/codecharta_logo.svg",size:.17,side:"back"});let i=0,n=.18-.17/2,r=-o.baseplateHeight+o.printHeight/2;return this.position.set(i,n,r),this.updateColor(o.numberOfColors),this}};var fc=class extends Qt{constructor(o,t){let i={font:t,text:"github.com/MaibornWolff/codecharta",side:"back",xPosition:0,yPosition:0,align:"center"};super(o,new et,200,!0,i)}};var gc=class{execute(o,t){if(o<4)return!1;let i=[1,0,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var bc=class{execute(o,t){if(o<4)return!1;let i=[1,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var vc=class{execute(o,t){if(o<4)return!1;let i=[0,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var on=class extends It{constructor(o,t,i){super(o.name,new et,200,!0),this.metricDescriptionBlockOptions=o,this.font=t,this.yOffset=i,this.createSvgGeometryStrategy=new Yt,this.createTextGeometryStrategy=new Mr}async init(o){let t=await this.createIconGeometry(this.createSvgGeometryStrategy,o),i=await this.createTextGeometry(this.createTextGeometryStrategy,this.getText(),o);return this.geometry=Co([t,i]),this.position.y=-.15+this.yOffset,this.updateColor(o.numberOfColors),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:0,align:"left"})}async createIconGeometry(o,t){let i=await o.create(t,{filePath:`./codeCharta/assets/${this.metricDescriptionBlockOptions.iconFilename}`,size:this.metricDescriptionBlockOptions.iconScale,side:"back"});return i.translate(0,0,-t.baseplateHeight+t.printHeight/2),i}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3489
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.`,manufacturer_name:"\u039Cagenta ltd",font_sub_family_name:"Regular"},descender:-334,familyName:"Helvetiker",lineHeight:1522,underlineThickness:50};var et=class{execute(o,t){if(o<=1)return!1;let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var xt=class e extends st{constructor(o,t){super(),this.colorChangeStrategy=t,this.name=o,this.boundingBoxCalculated=!1,this.material=new wu}updateColor(o){this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof e&&t.updateColor(o)}getWidth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.x-this.geometry.boundingBox.min.x}getHeight(){return this.updateBoundingBox(),this.geometry.boundingBox.max.z-this.geometry.boundingBox.min.z}getDepth(){return this.updateBoundingBox(),this.geometry.boundingBox.max.y-this.geometry.boundingBox.min.y}isGeneralSizeChangeMesh(){return"changeSize"in this}updateBoundingBox(){this.boundingBoxCalculated||(this.geometry.computeBoundingBox(),this.boundingBoxCalculated=!0)}};var It=class extends xt{constructor(o,t,i=1,n=!0){super(o,t),this.minWidth=i,this.manualVisibility=n}setManualVisibility(o){this.manualVisibility=o,this.updateVisibility()}setCurrentWidth(o){this.currentWidth=o,this.updateVisibility()}updateVisibility(){let o=this.currentWidth?this.currentWidth>=this.minWidth:!0;this.visible=this.manualVisibility&&this.visibleBecauseOfColor&&o}updateColor(o){this.visibleBecauseOfColor=this.colorChangeStrategy.execute(o,this);for(let t of this.children)t instanceof xt&&t.updateColor(o);this.updateVisibility()}};var ua=class extends On{constructor(o,t={}){let i=t.font;if(i===void 0)super();else{let n=i.generateShapes(o,t.size,t.direction);t.depth===void 0&&(t.depth=50),t.bevelThickness===void 0&&(t.bevelThickness=10),t.bevelSize===void 0&&(t.bevelSize=8),t.bevelEnabled===void 0&&(t.bevelEnabled=!1),super(n,t)}this.type="TextGeometry"}};function Co(e,o=!1){let t=e[0].index!==null,i=new Set(Object.keys(e[0].attributes)),n=new Set(Object.keys(e[0].morphAttributes)),r={},a={},s=e[0].morphTargetsRelative,l=new Gt,d=0;for(let c=0;c<e.length;++c){let h=e[c],p=0;if(t!==(h.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let u in h.attributes){if(!i.has(u))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+u+'" attribute exists among all geometries, or in none of them.'),null;r[u]===void 0&&(r[u]=[]),r[u].push(h.attributes[u]),p++}if(p!==i.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". Make sure all geometries have the same number of attributes."),null;if(s!==h.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let u in h.morphAttributes){if(!n.has(u))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;a[u]===void 0&&(a[u]=[]),a[u].push(h.morphAttributes[u])}if(o){let u;if(t)u=h.index.count;else if(h.attributes.position!==void 0)u=h.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". The geometry must have either an index or a position attribute"),null;l.addGroup(d,u,c),d+=u}}if(t){let c=0,h=[];for(let p=0;p<e.length;++p){let u=e[p].index;for(let k=0;k<u.count;++k)h.push(u.getX(k)+c);c+=e[p].attributes.position.count}l.setIndex(h)}for(let c in r){let h=uv(r[c]);if(!h)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" attribute."),null;l.setAttribute(c,h)}for(let c in a){let h=a[c][0].length;if(h===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[c]=[];for(let p=0;p<h;++p){let u=[];for(let E=0;E<a[c].length;++E)u.push(a[c][E][p]);let k=uv(u);if(!k)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" morphAttribute."),null;l.morphAttributes[c].push(k)}}return l}function uv(e){let o,t,i,n=-1,r=0;for(let d=0;d<e.length;++d){let c=e[d];if(o===void 0&&(o=c.array.constructor),o!==c.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=c.itemSize),t!==c.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(i===void 0&&(i=c.normalized),i!==c.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(n===-1&&(n=c.gpuType),n!==c.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;r+=c.count*t}let a=new o(r),s=new ro(a,t,i),l=0;for(let d=0;d<e.length;++d){let c=e[d];if(c.isInterleavedBufferAttribute){let h=l/t;for(let p=0,u=c.count;p<u;p++)for(let k=0;k<t;k++){let E=c.getComponent(p,k);s.setComponent(p+h,k,E)}}else a.set(c.array,l);l+=c.count*t}return n!==void 0&&(s.gpuType=n),s}var yr=class{async create(o,t){let{font:i,side:n,text:r,xPosition:a,yPosition:s,align:l}=t;if(!r)return new Gt;let{textSize:d}=t;d||(d=.025);let c=l==="center"&&r.includes(`
3490
+ `)?this.createMultilineCenteredTextGeometry(r,i,d,o.printHeight):new ua(r,{font:i,size:d,depth:o.printHeight});c.center(),n==="back"&&c.rotateY(Math.PI),c.computeBoundingBox();let h=c.boundingBox.max.x-c.boundingBox.min.x,p=l==="center"?0:h/2,u=n==="front"?1:-1;return c.translate(u*(p+a),s,n==="front"?o.printHeight/2:-o.baseplateHeight+o.printHeight/2),c}createMultilineCenteredTextGeometry(o,t,i,n){let r=o.split(`
3491
+ `),a=[];for(let[s,l]of r.entries()){let d=new ua(l,{font:t,size:i,depth:n});d.center(),d.translate(0,-s*i*1.5,0),a.push(d)}return Co(a)}};var Qt=class extends It{constructor(o,t=new et,i,n,r,a=new yr){super(o,t,i,n),this.createTextGeometryOptions=r,this.createTextGeometryStrategy=a}async init(o){return this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.updateColor(o.numberOfColors),this}async updateText(o){this.geometry=await this.createTextGeometryStrategy.create(o,this.createTextGeometryOptions),this.boundingBoxCalculated=!1}updateTextGeometryOptions(o){this.createTextGeometryOptions.text=o}};var dc=class extends Qt{constructor(o,t){let i={font:t,text:`IT Stabilization & Modernization
3492
+ maibornwolff.de/service/it-sanierung`,side:"back",xPosition:0,yPosition:.23,align:"center"};super(o,new et,200,!0,i)}};var T7=xu,mc=class e extends Yc{constructor(o){super(o),this.defaultDPI=90,this.defaultUnit="px"}load(o,t,i,n){let r=this,a=new Zc(r.manager);a.setPath(r.path),a.setRequestHeader(r.requestHeader),a.setWithCredentials(r.withCredentials),a.load(o,function(s){try{t(r.parse(s))}catch(l){n?n(l):console.error(l),r.manager.itemError(o)}},i,n)}parse(o){let t=this;function i(A,C){if(A.nodeType!==1)return;let x=H(A),g=!1,Q=null;switch(A.nodeName){case"svg":C=k(A,C);break;case"style":r(A);break;case"g":C=k(A,C);break;case"path":C=k(A,C),A.hasAttribute("d")&&(Q=n(A));break;case"rect":C=k(A,C),Q=l(A);break;case"polygon":C=k(A,C),Q=d(A);break;case"polyline":C=k(A,C),Q=c(A);break;case"circle":C=k(A,C),Q=h(A);break;case"ellipse":C=k(A,C),Q=p(A);break;case"line":C=k(A,C),Q=u(A);break;case"defs":g=!0;break;case"use":C=k(A,C);let ce=(A.getAttributeNS("http://www.w3.org/1999/xlink","href")||"").substring(1),pe=A.viewportElement.getElementById(ce);pe?i(pe,C):console.warn("SVGLoader: 'use node' references non-existent node id: "+ce);break;default:}Q&&(C.fill!==void 0&&C.fill!=="none"&&Q.color.setStyle(C.fill,T7),Z(Q,dt),U.push(Q),Q.userData={node:A,style:C});let de=A.childNodes;for(let V=0;V<de.length;V++){let ce=de[V];g&&ce.nodeName!=="style"&&ce.nodeName!=="defs"||i(ce,C)}x&&(_e.pop(),_e.length>0?dt.copy(_e[_e.length-1]):dt.identity())}function n(A){let C=new Ci,x=new Ge,g=new Ge,Q=new Ge,de=!0,V=!1,ce=A.getAttribute("d");if(ce===""||ce==="none")return null;let pe=ce.match(/[a-df-z][^a-df-z]*/ig);for(let fe=0,Y=pe.length;fe<Y;fe++){let re=pe[fe],we=re.charAt(0),Se=re.slice(1).trim();de===!0&&(V=!0,de=!1);let I;switch(we){case"M":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2)x.x=I[S+0],x.y=I[S+1],g.x=x.x,g.y=x.y,S===0?C.moveTo(x.x,x.y):C.lineTo(x.x,x.y),S===0&&Q.copy(x);break;case"H":I=N(Se);for(let S=0,ye=I.length;S<ye;S++)x.x=I[S],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"V":I=N(Se);for(let S=0,ye=I.length;S<ye;S++)x.y=I[S],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"L":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2)x.x=I[S+0],x.y=I[S+1],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"C":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=6)C.bezierCurveTo(I[S+0],I[S+1],I[S+2],I[S+3],I[S+4],I[S+5]),g.x=I[S+2],g.y=I[S+3],x.x=I[S+4],x.y=I[S+5],S===0&&V===!0&&Q.copy(x);break;case"S":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=4)C.bezierCurveTo(E(x.x,g.x),E(x.y,g.y),I[S+0],I[S+1],I[S+2],I[S+3]),g.x=I[S+0],g.y=I[S+1],x.x=I[S+2],x.y=I[S+3],S===0&&V===!0&&Q.copy(x);break;case"Q":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=4)C.quadraticCurveTo(I[S+0],I[S+1],I[S+2],I[S+3]),g.x=I[S+0],g.y=I[S+1],x.x=I[S+2],x.y=I[S+3],S===0&&V===!0&&Q.copy(x);break;case"T":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2){let $e=E(x.x,g.x),Ht=E(x.y,g.y);C.quadraticCurveTo($e,Ht,I[S+0],I[S+1]),g.x=$e,g.y=Ht,x.x=I[S+0],x.y=I[S+1],S===0&&V===!0&&Q.copy(x)}break;case"A":I=N(Se,[3,4],7);for(let S=0,ye=I.length;S<ye;S+=7){if(I[S+5]==x.x&&I[S+6]==x.y)continue;let $e=x.clone();x.x=I[S+5],x.y=I[S+6],g.x=x.x,g.y=x.y,a(C,I[S],I[S+1],I[S+2],I[S+3],I[S+4],$e,x),S===0&&V===!0&&Q.copy(x)}break;case"m":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2)x.x+=I[S+0],x.y+=I[S+1],g.x=x.x,g.y=x.y,S===0?C.moveTo(x.x,x.y):C.lineTo(x.x,x.y),S===0&&Q.copy(x);break;case"h":I=N(Se);for(let S=0,ye=I.length;S<ye;S++)x.x+=I[S],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"v":I=N(Se);for(let S=0,ye=I.length;S<ye;S++)x.y+=I[S],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"l":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2)x.x+=I[S+0],x.y+=I[S+1],g.x=x.x,g.y=x.y,C.lineTo(x.x,x.y),S===0&&V===!0&&Q.copy(x);break;case"c":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=6)C.bezierCurveTo(x.x+I[S+0],x.y+I[S+1],x.x+I[S+2],x.y+I[S+3],x.x+I[S+4],x.y+I[S+5]),g.x=x.x+I[S+2],g.y=x.y+I[S+3],x.x+=I[S+4],x.y+=I[S+5],S===0&&V===!0&&Q.copy(x);break;case"s":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=4)C.bezierCurveTo(E(x.x,g.x),E(x.y,g.y),x.x+I[S+0],x.y+I[S+1],x.x+I[S+2],x.y+I[S+3]),g.x=x.x+I[S+0],g.y=x.y+I[S+1],x.x+=I[S+2],x.y+=I[S+3],S===0&&V===!0&&Q.copy(x);break;case"q":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=4)C.quadraticCurveTo(x.x+I[S+0],x.y+I[S+1],x.x+I[S+2],x.y+I[S+3]),g.x=x.x+I[S+0],g.y=x.y+I[S+1],x.x+=I[S+2],x.y+=I[S+3],S===0&&V===!0&&Q.copy(x);break;case"t":I=N(Se);for(let S=0,ye=I.length;S<ye;S+=2){let $e=E(x.x,g.x),Ht=E(x.y,g.y);C.quadraticCurveTo($e,Ht,x.x+I[S+0],x.y+I[S+1]),g.x=$e,g.y=Ht,x.x=x.x+I[S+0],x.y=x.y+I[S+1],S===0&&V===!0&&Q.copy(x)}break;case"a":I=N(Se,[3,4],7);for(let S=0,ye=I.length;S<ye;S+=7){if(I[S+5]==0&&I[S+6]==0)continue;let $e=x.clone();x.x+=I[S+5],x.y+=I[S+6],g.x=x.x,g.y=x.y,a(C,I[S],I[S+1],I[S+2],I[S+3],I[S+4],$e,x),S===0&&V===!0&&Q.copy(x)}break;case"Z":case"z":C.currentPath.autoClose=!0,C.currentPath.curves.length>0&&(x.copy(Q),C.currentPath.currentPoint.copy(x),de=!0);break;default:console.warn(re)}V=!1}return C}function r(A){if(!(!A.sheet||!A.sheet.cssRules||!A.sheet.cssRules.length))for(let C=0;C<A.sheet.cssRules.length;C++){let x=A.sheet.cssRules[C];if(x.type!==1)continue;let g=x.selectorText.split(/,/gm).filter(Boolean).map(Q=>Q.trim());for(let Q=0;Q<g.length;Q++){let de=Object.fromEntries(Object.entries(x.style).filter(([,V])=>V!==""));De[g[Q]]=Object.assign(De[g[Q]]||{},de)}}}function a(A,C,x,g,Q,de,V,ce){if(C==0||x==0){A.lineTo(ce.x,ce.y);return}g=g*Math.PI/180,C=Math.abs(C),x=Math.abs(x);let pe=(V.x-ce.x)/2,fe=(V.y-ce.y)/2,Y=Math.cos(g)*pe+Math.sin(g)*fe,re=-Math.sin(g)*pe+Math.cos(g)*fe,we=C*C,Se=x*x,I=Y*Y,S=re*re,ye=I/we+S/Se;if(ye>1){let Ta=Math.sqrt(ye);C=Ta*C,x=Ta*x,we=C*C,Se=x*x}let $e=we*S+Se*I,Ht=(we*Se-$e)/$e,mi=Math.sqrt(Math.max(0,Ht));Q===de&&(mi=-mi);let wt=mi*C*re/x,Hi=-mi*x*Y/C,ka=Math.cos(g)*wt-Math.sin(g)*Hi+(V.x+ce.x)/2,Dh=Math.sin(g)*wt+Math.cos(g)*Hi+(V.y+ce.y)/2,qa=s(1,0,(Y-wt)/C,(re-Hi)/x),Uc=s((Y-wt)/C,(re-Hi)/x,(-Y-wt)/C,(-re-Hi)/x)%(Math.PI*2);A.currentPath.absellipse(ka,Dh,C,x,qa,qa+Uc,de===0,g)}function s(A,C,x,g){let Q=A*x+C*g,de=Math.sqrt(A*A+C*C)*Math.sqrt(x*x+g*g),V=Math.acos(Math.max(-1,Math.min(1,Q/de)));return A*g-C*x<0&&(V=-V),V}function l(A){let C=B(A.getAttribute("x")||0),x=B(A.getAttribute("y")||0),g=B(A.getAttribute("rx")||A.getAttribute("ry")||0),Q=B(A.getAttribute("ry")||A.getAttribute("rx")||0),de=B(A.getAttribute("width")),V=B(A.getAttribute("height")),ce=1-.551915024494,pe=new Ci;return pe.moveTo(C+g,x),pe.lineTo(C+de-g,x),(g!==0||Q!==0)&&pe.bezierCurveTo(C+de-g*ce,x,C+de,x+Q*ce,C+de,x+Q),pe.lineTo(C+de,x+V-Q),(g!==0||Q!==0)&&pe.bezierCurveTo(C+de,x+V-Q*ce,C+de-g*ce,x+V,C+de-g,x+V),pe.lineTo(C+g,x+V),(g!==0||Q!==0)&&pe.bezierCurveTo(C+g*ce,x+V,C,x+V-Q*ce,C,x+V-Q),pe.lineTo(C,x+Q),(g!==0||Q!==0)&&pe.bezierCurveTo(C,x+Q*ce,C+g*ce,x,C+g,x),pe}function d(A){function C(de,V,ce){let pe=B(V),fe=B(ce);Q===0?g.moveTo(pe,fe):g.lineTo(pe,fe),Q++}let x=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,g=new Ci,Q=0;return A.getAttribute("points").replace(x,C),g.currentPath.autoClose=!0,g}function c(A){function C(de,V,ce){let pe=B(V),fe=B(ce);Q===0?g.moveTo(pe,fe):g.lineTo(pe,fe),Q++}let x=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,g=new Ci,Q=0;return A.getAttribute("points").replace(x,C),g.currentPath.autoClose=!1,g}function h(A){let C=B(A.getAttribute("cx")||0),x=B(A.getAttribute("cy")||0),g=B(A.getAttribute("r")||0),Q=new ds;Q.absarc(C,x,g,0,Math.PI*2);let de=new Ci;return de.subPaths.push(Q),de}function p(A){let C=B(A.getAttribute("cx")||0),x=B(A.getAttribute("cy")||0),g=B(A.getAttribute("rx")||0),Q=B(A.getAttribute("ry")||0),de=new ds;de.absellipse(C,x,g,Q,0,Math.PI*2);let V=new Ci;return V.subPaths.push(de),V}function u(A){let C=B(A.getAttribute("x1")||0),x=B(A.getAttribute("y1")||0),g=B(A.getAttribute("x2")||0),Q=B(A.getAttribute("y2")||0),de=new Ci;return de.moveTo(C,x),de.lineTo(g,Q),de.currentPath.autoClose=!1,de}function k(A,C){C=Object.assign({},C);let x={};if(A.hasAttribute("class")){let V=A.getAttribute("class").split(/\s/).filter(Boolean).map(ce=>ce.trim());for(let ce=0;ce<V.length;ce++)x=Object.assign(x,De["."+V[ce]])}A.hasAttribute("id")&&(x=Object.assign(x,De["#"+A.getAttribute("id")]));function g(V,ce,pe){pe===void 0&&(pe=function(Y){return Y.startsWith("url")&&console.warn("SVGLoader: url access in attributes is not implemented."),Y}),A.hasAttribute(V)&&(C[ce]=pe(A.getAttribute(V))),x[ce]&&(C[ce]=pe(x[ce])),A.style&&A.style[V]!==""&&(C[ce]=pe(A.style[V]))}function Q(V){return Math.max(0,Math.min(1,B(V)))}function de(V){return Math.max(0,B(V))}return g("fill","fill"),g("fill-opacity","fillOpacity",Q),g("fill-rule","fillRule"),g("opacity","opacity",Q),g("stroke","stroke"),g("stroke-opacity","strokeOpacity",Q),g("stroke-width","strokeWidth",de),g("stroke-linejoin","strokeLineJoin"),g("stroke-linecap","strokeLineCap"),g("stroke-miterlimit","strokeMiterLimit",de),g("visibility","visibility"),C}function E(A,C){return A-(C-A)}function N(A,C,x){if(typeof A!="string")throw new TypeError("Invalid input: "+typeof A);let g={SEPARATOR:/[ \t\r\n\,.\-+]/,WHITESPACE:/[ \t\r\n]/,DIGIT:/[\d]/,SIGN:/[-+]/,POINT:/\./,COMMA:/,/,EXP:/e/i,FLAGS:/[01]/},Q=0,de=1,V=2,ce=3,pe=Q,fe=!0,Y="",re="",we=[];function Se($e,Ht,mi){let wt=new SyntaxError('Unexpected character "'+$e+'" at index '+Ht+".");throw wt.partial=mi,wt}function I(){Y!==""&&(re===""?we.push(Number(Y)):we.push(Number(Y)*Math.pow(10,Number(re)))),Y="",re=""}let S,ye=A.length;for(let $e=0;$e<ye;$e++){if(S=A[$e],Array.isArray(C)&&C.includes(we.length%x)&&g.FLAGS.test(S)){pe=de,Y=S,I();continue}if(pe===Q){if(g.WHITESPACE.test(S))continue;if(g.DIGIT.test(S)||g.SIGN.test(S)){pe=de,Y=S;continue}if(g.POINT.test(S)){pe=V,Y=S;continue}g.COMMA.test(S)&&(fe&&Se(S,$e,we),fe=!0)}if(pe===de){if(g.DIGIT.test(S)){Y+=S;continue}if(g.POINT.test(S)){Y+=S,pe=V;continue}if(g.EXP.test(S)){pe=ce;continue}g.SIGN.test(S)&&Y.length===1&&g.SIGN.test(Y[0])&&Se(S,$e,we)}if(pe===V){if(g.DIGIT.test(S)){Y+=S;continue}if(g.EXP.test(S)){pe=ce;continue}g.POINT.test(S)&&Y[Y.length-1]==="."&&Se(S,$e,we)}if(pe===ce){if(g.DIGIT.test(S)){re+=S;continue}if(g.SIGN.test(S)){if(re===""){re+=S;continue}re.length===1&&g.SIGN.test(re)&&Se(S,$e,we)}}g.WHITESPACE.test(S)?(I(),pe=Q,fe=!1):g.COMMA.test(S)?(I(),pe=Q,fe=!0):g.SIGN.test(S)?(I(),pe=de,Y=S):g.POINT.test(S)?(I(),pe=V,Y=S):Se(S,$e,we)}return I(),we}let j=["mm","cm","in","pt","pc","px"],ee={mm:{mm:1,cm:.1,in:1/25.4,pt:72/25.4,pc:6/25.4,px:-1},cm:{mm:10,cm:1,in:1/2.54,pt:72/2.54,pc:6/2.54,px:-1},in:{mm:25.4,cm:2.54,in:1,pt:72,pc:6,px:-1},pt:{mm:25.4/72,cm:2.54/72,in:1/72,pt:1,pc:6/72,px:-1},pc:{mm:25.4/6,cm:2.54/6,in:1/6,pt:72/6,pc:1,px:-1},px:{px:1}};function B(A){let C="px";if(typeof A=="string"||A instanceof String)for(let g=0,Q=j.length;g<Q;g++){let de=j[g];if(A.endsWith(de)){C=de,A=A.substring(0,A.length-de.length);break}}let x;return C==="px"&&t.defaultUnit!=="px"?x=ee.in[t.defaultUnit]/t.defaultDPI:(x=ee[C][t.defaultUnit],x<0&&(x=ee[C].in*t.defaultDPI)),x*parseFloat(A)}function H(A){if(!(A.hasAttribute("transform")||A.nodeName==="use"&&(A.hasAttribute("x")||A.hasAttribute("y"))))return null;let C=G(A);return _e.length>0&&C.premultiply(_e[_e.length-1]),dt.copy(C),_e.push(C),C}function G(A){let C=new Lo,x=Ve;if(A.nodeName==="use"&&(A.hasAttribute("x")||A.hasAttribute("y"))){let g=B(A.getAttribute("x")||0),Q=B(A.getAttribute("y")||0);C.translate(g,Q)}if(A.hasAttribute("transform")){let g=A.getAttribute("transform").split(")");for(let Q=g.length-1;Q>=0;Q--){let de=g[Q].trim();if(de==="")continue;let V=de.indexOf("("),ce=de.length;if(V>0&&V<ce){let pe=de.slice(0,V),fe=N(de.slice(V+1));switch(x.identity(),pe){case"translate":if(fe.length>=1){let Y=fe[0],re=0;fe.length>=2&&(re=fe[1]),x.translate(Y,re)}break;case"rotate":if(fe.length>=1){let Y=0,re=0,we=0;Y=fe[0]*Math.PI/180,fe.length>=3&&(re=fe[1],we=fe[2]),We.makeTranslation(-re,-we),ge.makeRotation(Y),J.multiplyMatrices(ge,We),We.makeTranslation(re,we),x.multiplyMatrices(We,J)}break;case"scale":if(fe.length>=1){let Y=fe[0],re=Y;fe.length>=2&&(re=fe[1]),x.scale(Y,re)}break;case"skewX":fe.length===1&&x.set(1,Math.tan(fe[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":fe.length===1&&x.set(1,0,0,Math.tan(fe[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":fe.length===6&&x.set(fe[0],fe[2],fe[4],fe[1],fe[3],fe[5],0,0,1);break}}C.premultiply(x)}}return C}function Z(A,C){function x(V){Be.set(V.x,V.y,1).applyMatrix3(C),V.set(Be.x,Be.y)}function g(V){let ce=V.xRadius,pe=V.yRadius,fe=Math.cos(V.aRotation),Y=Math.sin(V.aRotation),re=new Qe(ce*fe,ce*Y,0),we=new Qe(-pe*Y,pe*fe,0),Se=re.applyMatrix3(C),I=we.applyMatrix3(C),S=Ve.set(Se.x,I.x,0,Se.y,I.y,0,0,0,1),ye=We.copy(S).invert(),mi=ge.copy(ye).transpose().multiply(ye).elements,wt=He(mi[0],mi[1],mi[4]),Hi=Math.sqrt(wt.rt1),ka=Math.sqrt(wt.rt2);if(V.xRadius=1/Hi,V.yRadius=1/ka,V.aRotation=Math.atan2(wt.sn,wt.cs),!((V.aEndAngle-V.aStartAngle)%(2*Math.PI)<Number.EPSILON)){let qa=We.set(Hi,0,0,0,ka,0,0,0,1),Uc=ge.set(wt.cs,wt.sn,0,-wt.sn,wt.cs,0,0,0,1),Ta=qa.multiply(Uc).multiply(S),Ah=Lh=>{let{x:bw,y:vw}=new Qe(Math.cos(Lh),Math.sin(Lh),0).applyMatrix3(Ta);return Math.atan2(vw,bw)};V.aStartAngle=Ah(V.aStartAngle),V.aEndAngle=Ah(V.aEndAngle),ie(C)&&(V.aClockwise=!V.aClockwise)}}function Q(V){let ce=ne(C),pe=Me(C);V.xRadius*=ce,V.yRadius*=pe;let fe=ce>Number.EPSILON?Math.atan2(C.elements[1],C.elements[0]):Math.atan2(-C.elements[3],C.elements[4]);V.aRotation+=fe,ie(C)&&(V.aStartAngle*=-1,V.aEndAngle*=-1,V.aClockwise=!V.aClockwise)}let de=A.subPaths;for(let V=0,ce=de.length;V<ce;V++){let fe=de[V].curves;for(let Y=0;Y<fe.length;Y++){let re=fe[Y];re.isLineCurve?(x(re.v1),x(re.v2)):re.isCubicBezierCurve?(x(re.v0),x(re.v1),x(re.v2),x(re.v3)):re.isQuadraticBezierCurve?(x(re.v0),x(re.v1),x(re.v2)):re.isEllipseCurve&&(Ue.set(re.aX,re.aY),x(Ue),re.aX=Ue.x,re.aY=Ue.y,oe(C)?g(re):Q(re))}}}function ie(A){let C=A.elements;return C[0]*C[4]-C[1]*C[3]<0}function oe(A){let C=A.elements,x=C[0]*C[3]+C[1]*C[4];if(x===0)return!1;let g=ne(A),Q=Me(A);return Math.abs(x/(g*Q))>Number.EPSILON}function ne(A){let C=A.elements;return Math.sqrt(C[0]*C[0]+C[1]*C[1])}function Me(A){let C=A.elements;return Math.sqrt(C[3]*C[3]+C[4]*C[4])}function He(A,C,x){let g,Q,de,V,ce,pe=A+x,fe=A-x,Y=Math.sqrt(fe*fe+4*C*C);return pe>0?(g=.5*(pe+Y),ce=1/g,Q=A*ce*x-C*ce*C):pe<0?Q=.5*(pe-Y):(g=.5*Y,Q=-.5*Y),fe>0?de=fe+Y:de=fe-Y,Math.abs(de)>2*Math.abs(C)?(ce=-2*C/de,V=1/Math.sqrt(1+ce*ce),de=ce*V):Math.abs(C)===0?(de=1,V=0):(ce=-.5*de/C,de=1/Math.sqrt(1+ce*ce),V=ce*de),fe>0&&(ce=de,de=-V,V=ce),{rt1:g,rt2:Q,cs:de,sn:V}}let U=[],De={},_e=[],Ve=new Lo,We=new Lo,ge=new Lo,J=new Lo,Ue=new Ge,Be=new Qe,dt=new Lo,$t=new DOMParser().parseFromString(o,"image/svg+xml");return i($t.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:U,xml:$t.documentElement}}static createShapes(o){let i={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},n={loc:i.ORIGIN,t:0};function r(E,N,j,ee){let B=E.x,H=N.x,G=j.x,Z=ee.x,ie=E.y,oe=N.y,ne=j.y,Me=ee.y,He=(Z-G)*(ie-ne)-(Me-ne)*(B-G),U=(H-B)*(ie-ne)-(oe-ie)*(B-G),De=(Me-ne)*(H-B)-(Z-G)*(oe-ie),_e=He/De,Ve=U/De;if(De===0&&He!==0||_e<=0||_e>=1||Ve<0||Ve>1)return null;if(He===0&&De===0){for(let We=0;We<2;We++)if(a(We===0?j:ee,E,N),n.loc==i.ORIGIN){let ge=We===0?j:ee;return{x:ge.x,y:ge.y,t:n.t}}else if(n.loc==i.BETWEEN){let ge=+(B+n.t*(H-B)).toPrecision(10),J=+(ie+n.t*(oe-ie)).toPrecision(10);return{x:ge,y:J,t:n.t}}return null}else{for(let J=0;J<2;J++)if(a(J===0?j:ee,E,N),n.loc==i.ORIGIN){let Ue=J===0?j:ee;return{x:Ue.x,y:Ue.y,t:n.t}}let We=+(B+_e*(H-B)).toPrecision(10),ge=+(ie+_e*(oe-ie)).toPrecision(10);return{x:We,y:ge,t:_e}}}function a(E,N,j){let ee=j.x-N.x,B=j.y-N.y,H=E.x-N.x,G=E.y-N.y,Z=ee*G-H*B;if(E.x===N.x&&E.y===N.y){n.loc=i.ORIGIN,n.t=0;return}if(E.x===j.x&&E.y===j.y){n.loc=i.DESTINATION,n.t=1;return}if(Z<-Number.EPSILON){n.loc=i.LEFT;return}if(Z>Number.EPSILON){n.loc=i.RIGHT;return}if(ee*H<0||B*G<0){n.loc=i.BEHIND;return}if(Math.sqrt(ee*ee+B*B)<Math.sqrt(H*H+G*G)){n.loc=i.BEYOND;return}let ie;ee!==0?ie=H/ee:ie=G/B,n.loc=i.BETWEEN,n.t=ie}function s(E,N){let j=[],ee=[];for(let B=1;B<E.length;B++){let H=E[B-1],G=E[B];for(let Z=1;Z<N.length;Z++){let ie=N[Z-1],oe=N[Z],ne=r(H,G,ie,oe);ne!==null&&j.find(Me=>Me.t<=ne.t+Number.EPSILON&&Me.t>=ne.t-Number.EPSILON)===void 0&&(j.push(ne),ee.push(new Ge(ne.x,ne.y)))}}return ee}function l(E,N,j){let ee=new Ge;N.getCenter(ee);let B=[];return j.forEach(H=>{H.boundingBox.containsPoint(ee)&&s(E,H.points).forEach(Z=>{B.push({identifier:H.identifier,isCW:H.isCW,point:Z})})}),B.sort((H,G)=>H.point.x-G.point.x),B}function d(E,N,j,ee,B){(B==null||B==="")&&(B="nonzero");let H=new Ge;E.boundingBox.getCenter(H);let G=[new Ge(j,H.y),new Ge(ee,H.y)],Z=l(G,E.boundingBox,N);Z.sort((U,De)=>U.point.x-De.point.x);let ie=[],oe=[];Z.forEach(U=>{U.identifier===E.identifier?ie.push(U):oe.push(U)});let ne=ie[0].point.x,Me=[],He=0;for(;He<oe.length&&oe[He].point.x<ne;)Me.length>0&&Me[Me.length-1]===oe[He].identifier?Me.pop():Me.push(oe[He].identifier),He++;if(Me.push(E.identifier),B==="evenodd"){let U=Me.length%2===0,De=Me[Me.length-2];return{identifier:E.identifier,isHole:U,for:De}}else if(B==="nonzero"){let U=!0,De=null,_e=null;for(let Ve=0;Ve<Me.length;Ve++){let We=Me[Ve];U?(_e=N[We].isCW,U=!1,De=We):_e!==N[We].isCW&&(_e=N[We].isCW,U=!0)}return{identifier:E.identifier,isHole:U,for:De}}else console.warn('fill-rule: "'+B+'" is currently not implemented.')}let c=999999999,h=-999999999,p=o.subPaths.map(E=>{let N=E.getPoints(),j=-999999999,ee=999999999,B=-999999999,H=999999999;for(let G=0;G<N.length;G++){let Z=N[G];Z.y>j&&(j=Z.y),Z.y<ee&&(ee=Z.y),Z.x>B&&(B=Z.x),Z.x<H&&(H=Z.x)}return h<=B&&(h=B+1),c>=H&&(c=H-1),{curves:E.curves,points:N,isCW:_u.isClockWise(N),identifier:-1,boundingBox:new ku(new Ge(H,ee),new Ge(B,j))}});p=p.filter(E=>E.points.length>1);for(let E=0;E<p.length;E++)p[E].identifier=E;let u=p.map(E=>d(E,p,c,h,o.userData?o.userData.style.fillRule:void 0)),k=[];return p.forEach(E=>{if(!u[E.identifier].isHole){let j=new ms;j.curves=E.curves,u.filter(B=>B.isHole&&B.for===E.identifier).forEach(B=>{let H=p[B.identifier],G=new ds;G.curves=H.curves,j.holes.push(G)}),k.push(j)}}),k}static getStrokeStyle(o,t,i,n,r){return o=o!==void 0?o:1,t=t!==void 0?t:"#000",i=i!==void 0?i:"miter",n=n!==void 0?n:"butt",r=r!==void 0?r:4,{strokeColor:t,strokeWidth:o,strokeLineJoin:i,strokeLineCap:n,strokeMiterLimit:r}}static pointsToStroke(o,t,i,n){let r=[],a=[],s=[];if(e.pointsToStrokeWithBuffers(o,t,i,n,r,a,s)===0)return null;let l=new Gt;return l.setAttribute("position",new Fo(r,3)),l.setAttribute("normal",new Fo(a,3)),l.setAttribute("uv",new Fo(s,2)),l}static pointsToStrokeWithBuffers(o,t,i,n,r,a,s,l){let d=new Ge,c=new Ge,h=new Ge,p=new Ge,u=new Ge,k=new Ge,E=new Ge,N=new Ge,j=new Ge,ee=new Ge,B=new Ge,H=new Ge,G=new Ge,Z=new Ge,ie=new Ge,oe=new Ge,ne=new Ge;i=i!==void 0?i:12,n=n!==void 0?n:.001,l=l!==void 0?l:0,o=fe(o);let Me=o.length;if(Me<2)return 0;let He=o[0].equals(o[Me-1]),U,De=o[0],_e,Ve=t.strokeWidth/2,We=1/(Me-1),ge=0,J,Ue,Be,dt,$t=!1,di=0,A=l*3,C=l*2;x(o[0],o[1],d).multiplyScalar(Ve),N.copy(o[0]).sub(d),j.copy(o[0]).add(d),ee.copy(N),B.copy(j);for(let Y=1;Y<Me;Y++){U=o[Y],Y===Me-1?He?_e=o[1]:_e=void 0:_e=o[Y+1];let re=d;if(x(De,U,re),h.copy(re).multiplyScalar(Ve),H.copy(U).sub(h),G.copy(U).add(h),J=ge+We,Ue=!1,_e!==void 0){x(U,_e,c),h.copy(c).multiplyScalar(Ve),Z.copy(U).sub(h),ie.copy(U).add(h),Be=!0,h.subVectors(_e,De),re.dot(h)<0&&(Be=!1),Y===1&&($t=Be),h.subVectors(_e,U),h.normalize();let we=Math.abs(re.dot(h));if(we>Number.EPSILON){let Se=Ve/we;h.multiplyScalar(-Se),p.subVectors(U,De),u.copy(p).setLength(Se).add(h),oe.copy(u).negate();let I=u.length(),S=p.length();p.divideScalar(S),k.subVectors(_e,U);let ye=k.length();switch(k.divideScalar(ye),p.dot(oe)<S&&k.dot(oe)<ye&&(Ue=!0),ne.copy(u).add(U),oe.add(U),dt=!1,Ue?Be?(ie.copy(oe),G.copy(oe)):(Z.copy(oe),H.copy(oe)):de(),t.strokeLineJoin){case"bevel":V(Be,Ue,J);break;case"round":ce(Be,Ue),Be?Q(U,H,Z,J,0):Q(U,ie,G,J,1);break;default:let $e=Ve*t.strokeMiterLimit/I;if($e<1)if(t.strokeLineJoin!=="miter-clip"){V(Be,Ue,J);break}else ce(Be,Ue),Be?(k.subVectors(ne,H).multiplyScalar($e).add(H),E.subVectors(ne,Z).multiplyScalar($e).add(Z),g(H,J,0),g(k,J,0),g(U,J,.5),g(U,J,.5),g(k,J,0),g(E,J,0),g(U,J,.5),g(E,J,0),g(Z,J,0)):(k.subVectors(ne,G).multiplyScalar($e).add(G),E.subVectors(ne,ie).multiplyScalar($e).add(ie),g(G,J,1),g(k,J,1),g(U,J,.5),g(U,J,.5),g(k,J,1),g(E,J,1),g(U,J,.5),g(E,J,1),g(ie,J,1));else Ue?(Be?(g(j,ge,1),g(N,ge,0),g(ne,J,0),g(j,ge,1),g(ne,J,0),g(oe,J,1)):(g(j,ge,1),g(N,ge,0),g(ne,J,1),g(N,ge,0),g(oe,J,0),g(ne,J,1)),Be?Z.copy(ne):ie.copy(ne)):Be?(g(H,J,0),g(ne,J,0),g(U,J,.5),g(U,J,.5),g(ne,J,0),g(Z,J,0)):(g(G,J,1),g(ne,J,1),g(U,J,.5),g(U,J,.5),g(ne,J,1),g(ie,J,1)),dt=!0;break}}else de()}else de();!He&&Y===Me-1&&pe(o[0],ee,B,Be,!0,ge),ge=J,De=U,N.copy(Z),j.copy(ie)}if(!He)pe(U,H,G,Be,!1,J);else if(Ue&&r){let Y=ne,re=oe;$t!==Be&&(Y=oe,re=ne),Be?(dt||$t)&&(re.toArray(r,0),re.toArray(r,9),dt&&Y.toArray(r,3)):(dt||!$t)&&(re.toArray(r,3),re.toArray(r,9),dt&&Y.toArray(r,0))}return di;function x(Y,re,we){return we.subVectors(re,Y),we.set(-we.y,we.x).normalize()}function g(Y,re,we){r&&(r[A]=Y.x,r[A+1]=Y.y,r[A+2]=0,a&&(a[A]=0,a[A+1]=0,a[A+2]=1),A+=3,s&&(s[C]=re,s[C+1]=we,C+=2)),di+=3}function Q(Y,re,we,Se,I){d.copy(re).sub(Y).normalize(),c.copy(we).sub(Y).normalize();let S=Math.PI,ye=d.dot(c);Math.abs(ye)<1&&(S=Math.abs(Math.acos(ye))),S/=i,h.copy(re);for(let $e=0,Ht=i-1;$e<Ht;$e++)p.copy(h).rotateAround(Y,S),g(h,Se,I),g(p,Se,I),g(Y,Se,.5),h.copy(p);g(p,Se,I),g(we,Se,I),g(Y,Se,.5)}function de(){g(j,ge,1),g(N,ge,0),g(H,J,0),g(j,ge,1),g(H,J,0),g(G,J,1)}function V(Y,re,we){re?Y?(g(j,ge,1),g(N,ge,0),g(H,J,0),g(j,ge,1),g(H,J,0),g(oe,J,1),g(H,we,0),g(Z,we,0),g(oe,we,.5)):(g(j,ge,1),g(N,ge,0),g(G,J,1),g(N,ge,0),g(oe,J,0),g(G,J,1),g(G,we,1),g(oe,we,0),g(ie,we,1)):Y?(g(H,we,0),g(Z,we,0),g(U,we,.5)):(g(G,we,1),g(ie,we,0),g(U,we,.5))}function ce(Y,re){re&&(Y?(g(j,ge,1),g(N,ge,0),g(H,J,0),g(j,ge,1),g(H,J,0),g(oe,J,1),g(H,ge,0),g(U,J,.5),g(oe,J,1),g(U,J,.5),g(Z,ge,0),g(oe,J,1)):(g(j,ge,1),g(N,ge,0),g(G,J,1),g(N,ge,0),g(oe,J,0),g(G,J,1),g(G,ge,1),g(oe,J,0),g(U,J,.5),g(U,J,.5),g(oe,J,0),g(ie,ge,1)))}function pe(Y,re,we,Se,I,S){switch(t.strokeLineCap){case"round":I?Q(Y,we,re,S,.5):Q(Y,re,we,S,.5);break;case"square":if(I)d.subVectors(re,Y),c.set(d.y,-d.x),h.addVectors(d,c).add(Y),p.subVectors(c,d).add(Y),Se?(h.toArray(r,3),p.toArray(r,0),p.toArray(r,9)):(h.toArray(r,3),s[7]===1?p.toArray(r,9):h.toArray(r,9),p.toArray(r,0));else{d.subVectors(we,Y),c.set(d.y,-d.x),h.addVectors(d,c).add(Y),p.subVectors(c,d).add(Y);let ye=r.length;Se?(h.toArray(r,ye-3),p.toArray(r,ye-6),p.toArray(r,ye-12)):(p.toArray(r,ye-6),h.toArray(r,ye-3),p.toArray(r,ye-12))}break;default:break}}function fe(Y){let re=!1;for(let Se=1,I=Y.length-1;Se<I;Se++)if(Y[Se].distanceTo(Y[Se+1])<n){re=!0;break}if(!re)return Y;let we=[];we.push(Y[0]);for(let Se=1,I=Y.length-1;Se<I;Se++)Y[Se].distanceTo(Y[Se+1])>=n&&we.push(Y[Se]);return we.push(Y[Y.length-1]),we}}};var Yt=class{async create(o,t){let i=t.filePath,n=new mc;return new Promise((r,a)=>{n.load(i,function(s){let l=s.paths,d=[];for(let k of l){let E=k.toShapes(!0);for(let N of E){let j=new On(N,{depth:o.printHeight,bevelEnabled:!1});d.push(j)}}let c=Co(d);c.computeBoundingBox();let h=c.boundingBox.max.x-c.boundingBox.min.x,p=c.boundingBox.max.y-c.boundingBox.min.y,u=t.size/Math.max(h,p);c.scale(u,u,1),c.center(),t.side==="back"?c.rotateZ(Math.PI):(c.rotateZ(Math.PI),c.rotateY(Math.PI)),r(c)},void 0,function(s){console.error(`Error loading ${i}`),a(s)})})}};var hc=class extends It{constructor(o){super(o,new et,120,!0),this.name="BackMWLogo"}async init(o){let t=new Yt,i=.31;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo_text.svg",size:i,side:"back"});let n=0,r=.37,a=-o.baseplateHeight+o.printHeight/2;return this.position.set(n,r,a),this.updateColor(o.numberOfColors),this}};var pc=class extends It{constructor(o,t=new Yt){super(o,new et,180,!0),this.createSvgStrategy=t}async init(o){this.geometry=await this.createSvgStrategy.create(o,{filePath:"./codeCharta/assets/codecharta_logo.svg",size:.17,side:"back"});let i=0,n=.18-.17/2,r=-o.baseplateHeight+o.printHeight/2;return this.position.set(i,n,r),this.updateColor(o.numberOfColors),this}};var uc=class extends Qt{constructor(o,t){let i={font:t,text:"github.com/MaibornWolff/codecharta",side:"back",xPosition:0,yPosition:0,align:"center"};super(o,new et,200,!0,i)}};var fc=class{execute(o,t){if(o<4)return!1;let i=[1,0,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var gc=class{execute(o,t){if(o<4)return!1;let i=[1,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var bc=class{execute(o,t){if(o<4)return!1;let i=[0,1,0];return t.material.color.setRGB(i[0],i[1],i[2]),!0}};var on=class extends It{constructor(o,t,i){super(o.name,new et,200,!0),this.metricDescriptionBlockOptions=o,this.font=t,this.yOffset=i,this.createSvgGeometryStrategy=new Yt,this.createTextGeometryStrategy=new yr}async init(o){let t=await this.createIconGeometry(this.createSvgGeometryStrategy,o),i=await this.createTextGeometry(this.createTextGeometryStrategy,this.getText(),o);return this.geometry=Co([t,i]),this.position.y=-.15+this.yOffset,this.updateColor(o.numberOfColors),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:0,align:"left"})}async createIconGeometry(o,t){let i=await o.create(t,{filePath:`./codeCharta/assets/${this.metricDescriptionBlockOptions.iconFilename}`,size:this.metricDescriptionBlockOptions.iconScale,side:"back"});return i.translate(0,0,-t.baseplateHeight+t.printHeight/2),i}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3485
3493
  ${this.metricDescriptionBlockOptions.title}
3486
- Value range: ${this.metricDescriptionBlockOptions.nodeMetricData.minValue} - ${this.metricDescriptionBlockOptions.nodeMetricData.maxValue}`}};var xc=class extends on{constructor(o,t,i){super(o,t,i)}async init(o){let t=await this.createColoredBackTextChildren(o);for(let i of t)this.add(i);return super.init(o),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:.015,align:"left"})}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3494
+ Value range: ${this.metricDescriptionBlockOptions.nodeMetricData.minValue} - ${this.metricDescriptionBlockOptions.nodeMetricData.maxValue}`}};var vc=class extends on{constructor(o,t,i){super(o,t,i)}async init(o){let t=await this.createColoredBackTextChildren(o);for(let i of t)this.add(i);return super.init(o),this}async createTextGeometry(o,t,i){return o.create(i,{font:this.font,text:t,side:"back",xPosition:.05,yPosition:.015,align:"left"})}getText(){return`${this.metricDescriptionBlockOptions.nodeMetricData.name}
3487
3495
  ${this.metricDescriptionBlockOptions.title}
3488
- `}async createColoredBackTextChildren(o){let t=this.metricDescriptionBlockOptions,i=[],n=["Value ranges:",`${t.nodeMetricData.minValue} - ${t.colorRange.from-1}`,"/",`${t.colorRange.from} - ${t.colorRange.to-1}`,"/",`${t.colorRange.to} - ${t.nodeMetricData.maxValue}`],r=[new et,new vc,new et,new bc,new et,new gc],a=.05;for(let s=0;s<n.length;s+=1){let l=`ColorMetricLastLine${s}`,d={font:this.font,text:n[s],side:"back",xPosition:a,yPosition:-.045,align:"left"},c=await new Qt(l,r[s],200,!0,d).init(o);this.updateColor(o.numberOfColors),i.push(c),s!==n.length-1&&(a+=c.getWidth()+.03)}return i}};var wc=class extends xt{constructor(o,t){super(o,new et),this.font=t}async init(o){let{areaIcon:t,areaIconScale:i}=this.createAreaAttributes(),{heightIcon:n,heightIconScale:r}=this.createHeightAttributes(),{colorIcon:a,colorIconScale:s}=this.createColorAttributes(),l=await new on({name:"HeigthMetricBlock",title:o.heightMetricTitle,iconFilename:n,iconScale:r,nodeMetricData:o.heightMetricData},this.font,.05).init(o);this.add(l);let d=await new on({name:"AreaMetricBlock",title:o.areaMetricTitle,iconFilename:t,iconScale:i,nodeMetricData:o.areaMetricData},this.font,-.1).init(o);this.add(d);let c=await new xc({name:"ColorMetricBlock",title:o.colorMetricTitle,iconFilename:a,iconScale:s,nodeMetricData:o.colorMetricData,colorRange:o.colorRange},this.font,-.25).init(o);return this.add(c),this.centerMetricsMeshInXDirection(),this}centerMetricsMeshInXDirection(){let o={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};this.traverse(t=>{if(t instanceof lt&&t.visible){t.geometry.computeBoundingBox();let{min:i,max:n}=t.geometry.boundingBox;o.min=Math.min(o.min,i.x),o.max=Math.max(o.max,n.x)}}),this.position.x=(o.max-o.min)/2}createColorAttributes(){return{colorIcon:"color_icon_for_3D_print.svg",colorIconScale:.075}}createHeightAttributes(){return{heightIcon:"height_icon_for_3D_print.svg",heightIconScale:.09}}createAreaAttributes(){return{areaIcon:"area_icon_for_3D_print.svg",areaIconScale:.075}}};var fx=Da(ux());var Dc=class extends It{constructor(o){super(o,new et,0,!1)}async init(o){this.geometry=await this.create(o);let t=.45,i=.45,n=-o.baseplateHeight+o.printHeight/2;return this.position.set(t,i,n),this.updateColor(o.numberOfColors),this}async changeText(o){this.geometry=await this.create(o)}async create(o){if(!o.qrCodeText||o.qrCodeText.length===0)return new Gt;let t=document.createElement("canvas");await fx.toCanvas(t,o.qrCodeText,{errorCorrectionLevel:"H"});let n=t.getContext("2d").getImageData(0,0,t.width,t.height),r=[],a=.6/n.width;for(let s=0;s<n.height;s+=4)for(let l=0;l<n.width;l+=4){let d=(s*n.width+l)*4;if(n.data[d]!==0){let c=new ao(a,a,o.printHeight);c.translate(-l/4*a,-s/4*a,0),r.push(c)}}return this.updateMinWidth(a),Co(r)}updateMinWidth(o){this.minWidth=.6/o}};var Ac=class extends xt{constructor(o){let t=new et;super("BackPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("BackMWLogo",new pc("BackMWLogo")),this.childrenMeshes.set("BackBelowLogoText",new mc("BackBelowLogoText",this.font)),this.childrenMeshes.set("QrCode",new Dc("QrCode")),this.childrenMeshes.set("CodeChartaLogo",new uc("CodeChartaLogo")),this.childrenMeshes.set("CodeChartaText",new fc("CodeChartaText",this.font)),this.childrenMeshes.set("MetricDescriptionsContainer",new wc("MetricDescriptionsContainer",this.font)),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.changeSize(o,1),this}changeSize(o,t){let i=o.width/t;this.scale.set(this.scale.x*i,this.scale.y*i,this.scale.z),this.traverse(n=>{n instanceof It&&n.setCurrentWidth(o.width)})}isQRCodeVisible(){return this.childrenMeshes.get("QrCode").visible}async updateQrCodeText(o,t){t.qrCodeText=o,await this.childrenMeshes.get("QrCode").changeText(t)}updateQrCodeVisibility(o){this.childrenMeshes.get("QrCode").setManualVisibility(o)}getChildrenMeshes(){return this.childrenMeshes}};var Lc=class{execute(o,t){let i=t.material;return i.defaultAttributeValues.color=o===1?[1,1,1]:[.5,.5,.5],!0}};var Fc=class{async create(o){let{width:t,secondRowVisible:i,mapSideOffset:n,baseplateHeight:r,frontTextSize:a,secondRowTextSize:s}=o,l=5,d=Math.sqrt(2*Math.pow(n,2))/(Math.sqrt(2)-1)-1;d<l&&(l=d);let c=new hs,h=i?s*1.5:0,p=t+a+h;c.absarc(t-l,l,l,Math.PI*1.5,Math.PI*2,!1),c.absarc(t-l,p-l,l,0,Math.PI*.5,!1),c.absarc(l,p-l,l,Math.PI*.5,Math.PI,!1),c.absarc(l,l,l,Math.PI,Math.PI*1.5,!1);let u=new $n(c,{depth:r,bevelEnabled:!1});return u.translate(-t/2,-t/2-a-h,-r),u}};var Pc=class extends xt{constructor(o=new Fc){super("Baseplate",new Lc),this.createBaseplateGeometryStrategy=o}async init(o){this.createBaseplateGeometryStrategy.create(o).then(i=>{this.geometry=i});let t=new Su;return t.copy(o.defaultMaterial),t.polygonOffset=!0,t.polygonOffsetUnits=1,t.polygonOffsetFactor=.1,this.material=t,this.updateColor(o.numberOfColors),new Promise(i=>{i(this)})}changeSize(o){this.boundingBoxCalculated=!1,this.createBaseplateGeometryStrategy.create(o).then(t=>{this.geometry=t})}};var qo=class{execute(o,t){let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var To=class extends xt{constructor(o,t){super(o,new qo),this.alignment=t}changeRelativeSize(o){let t=this.getWidth();this.boundingBoxCalculated=!1;let i=o.secondRowVisible,n=i?(o.frontTextSize+o.secondRowTextSize)/o.frontTextSize:1;this.scale.x=n,this.scale.y=n;let r=i?-1:1,a=this.alignment==="left"?-1:1;this.translateY(r*o.secondRowTextSize);let s=i?t/this.getWidth():this.getWidth()/t;this.translateX(2*s*a*r)}};var Nc=class extends To{constructor(o,t){super(o,"left"),this.filePath=t}async init(o){let t=new Yt,i=o.frontTextSize*o.width/200;this.geometry=await t.create(o,{filePath:this.filePath,size:i,side:"front"});let n=-o.width/2+i/2+o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}setColor(o){this.material.color.set(o)}rotate(){this.geometry.rotateZ(Math.PI/2)}flip(){this.geometry.rotateY(Math.PI)}changeSize(o,t){this.position.x-=(o.width-t)/2}};var Bc=class extends To{constructor(o){super(o,"right")}async init(o,t=new Yt){let i=o.frontTextSize*o.width/250;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo.svg",size:i,side:"front"});let n=o.width/2-i/2-o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}changeSize(o,t){this.position.x+=(o.width-t)/2}};var Vc=class extends Qt{constructor(o,t,i){let n=i.frontText;n||(n="FrontText");let r={font:t,side:"front",text:n,xPosition:0,yPosition:i.frontTextSize/2,textSize:i.frontTextSize,align:"center"};super(o,new qo,0,!0,r),this.name="Front Text"}};var Wc=class extends Qt{constructor(o,t,i){let n={font:t,text:i.secondRowText,side:"front",xPosition:0,yPosition:-i.secondRowTextSize,textSize:i.secondRowTextSize,align:"center"};super(o,new qo,0,!1,n)}};var Oc=class extends xt{constructor(o){let t=new et;super("FrontPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("FrontText",new Vc("FrontText",this.font,o)),this.childrenMeshes.set("SecondRowText",new Wc("SecondRowText",this.font,o)),this.childrenMeshes.set("FrontMWLogo",new Bc("FrontMWLogo")),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.position.y=-o.width/2-o.mapSideOffset/2,this}async addCustomLogo(o,t){this.childrenMeshes.has("CustomLogo")&&this.removeCustomLogo();let i=await new Nc("CustomLogo",o).init(t);this.add(i),this.childrenMeshes.set(i.name,i)}rotateCustomLogo(){this.childrenMeshes.get("CustomLogo").rotate()}flipCustomLogo(){this.childrenMeshes.get("CustomLogo").flip()}removeCustomLogo(){this.remove(this.childrenMeshes.get("CustomLogo")),this.childrenMeshes.delete("CustomLogo")}updateCustomLogoColor(o){this.childrenMeshes.get("CustomLogo").setColor(o)}async updateFrontText(o,t){let i=this.childrenMeshes.get("FrontText");i.updateTextGeometryOptions(o),await i.updateText(t)}changeSize(o,t){this.position.y-=(o.width-t)/2;for(let i of this.childrenMeshes.values())i instanceof To&&i.isGeneralSizeChangeMesh()&&i.changeSize(o,t)}async updateSecondRowText(o,t){let i=this.childrenMeshes.get("SecondRowText");i.updateTextGeometryOptions(o),await i.updateText(t)}updateSecondRowVisibility(o){let t=this.childrenMeshes.get("FrontMWLogo"),i=this.childrenMeshes.get("SecondRowText"),n=this.childrenMeshes.get("CustomLogo");i.setManualVisibility(o.secondRowVisible),t.changeRelativeSize(o),n?.changeRelativeSize(o)}getChildrenMeshes(){return this.childrenMeshes}};var zc=class extends It{constructor(){super("Map",new et,1,!1)}async init(o){this.material=o.originalMapMesh.clone().material,this.originalColors=o.originalMapMesh.geometry.attributes.color;let t=o.originalMapMesh.geometry.clone();return this.addBottomFaces(t),t.computeBoundingBox(),t.rotateX(Math.PI/2),this.updateMapGeometry(o,t),t.computeBoundingBox(),t.rotateZ(-Math.PI/2),this.geometry=t,this}updateMapGeometry(o,t){let i=o.width-2*o.mapSideOffset,n=t.boundingBox.max.x,r=i/n;return t.scale(r,r,r),t.translate(-i/2,i/2,0),this.updateMapColors(this.originalColors,t,o.numberOfColors),t}updateMapColors(o,t,i){let n=[];for(let r=0;r<o.count;r++){let a=o.getX(r),s=o.getY(r),l=o.getZ(r),d;a===l&&a===s&&s===l?d=i===1?[1,1,1]:[.5,.5,.5]:a>.75&&s>.75?d=i<4?[1,1,1]:[1,1,0]:a>.45&&s<.1?d=i<4?[1,1,1]:[1,0,0]:a<5&&s>.6?d=i<4?[1,1,1]:[0,1,0]:(console.error("Unknown color"),d=[1,1,1]),n.push(...d)}t.setAttribute("color",new Fo(n,3))}addBottomFaces(o){let t=o.index;if(!t)return;let i=24,n=6,r=8,a=t.count/Xu,s=new Uint32Array(t.count+a*n);s.set(new Uint32Array(t.array.buffer,t.array.byteOffset,t.count));let l=t.count;for(let d=0;d<a;d++){let c=d*i+r;s[l++]=c,s[l++]=c+2,s[l++]=c+1,s[l++]=c,s[l++]=c+3,s[l++]=c+2}o.setIndex(new ro(s,1))}async changeSize(o,t){let i=(o.width-2*o.mapSideOffset)/(t-2*o.mapSideOffset);this.geometry.scale(i,i,i)}updateColor(o){this.updateMapColors(this.originalColors,this.geometry,o)}};var $c=class{constructor(o,t=new Oc(new fa(Ym)),i=new Ac(new fa(Ym)),n=new Pc,r=new zc){this.geometryOptions=o,this.frontPrintContainerMesh=t,this.backPrintContainerMesh=i,this.baseplateMesh=n,this.mapMesh=r,this.printMesh=new lt,this.printMesh.name="PrintMesh"}async initialize(){this.baseplateMesh=await this.baseplateMesh.init(this.geometryOptions),this.printMesh.add(this.baseplateMesh),this.mapMesh=await this.mapMesh.init(this.geometryOptions),this.printMesh.add(this.mapMesh),this.frontPrintContainerMesh=await this.frontPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.frontPrintContainerMesh),this.backPrintContainerMesh=await this.backPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.backPrintContainerMesh),this.calculateCurrentSize()}getThreeMesh(){return this.printMesh}getMapMesh(){return this.mapMesh}getSize(){return this.currentSize}async updateSize(o){this.geometryOptions.width=o;let t=this.currentSize.x;return await Promise.all([...this.printMesh.children].map(async i=>{i instanceof xt&&i.isGeneralSizeChangeMesh()&&i.changeSize(this.geometryOptions,t)})),this.calculateCurrentSize(),this.backPrintContainerMesh.isQRCodeVisible()}updateNumberOfColors(o){this.geometryOptions.numberOfColors=o;for(let t of this.printMesh.children)t instanceof xt&&t.updateColor(o)}async addCustomLogo(o){this.frontPrintContainerMesh.addCustomLogo(o,this.geometryOptions)}rotateCustomLogo(){this.frontPrintContainerMesh.rotateCustomLogo()}flipCustomLogo(){this.frontPrintContainerMesh.flipCustomLogo()}removeCustomLogo(){this.frontPrintContainerMesh.removeCustomLogo()}updateCustomLogoColor(o){this.frontPrintContainerMesh.updateCustomLogoColor(o)}updateFrontText(o){this.frontPrintContainerMesh.updateFrontText(o,this.geometryOptions)}updateSecondRowVisibility(o){this.geometryOptions.secondRowVisible!==o&&(this.geometryOptions.secondRowVisible=o,this.frontPrintContainerMesh.updateSecondRowVisibility(this.geometryOptions),this.baseplateMesh.changeSize(this.geometryOptions))}async updateSecondRowText(o){await this.frontPrintContainerMesh.updateSecondRowText(o,this.geometryOptions)}calculateCurrentSize(){let o=this.baseplateMesh.getWidth(),t=this.baseplateMesh.getDepth(),i=this.baseplateMesh.getHeight()+this.mapMesh.getHeight();this.currentSize=new Qe(o,t,i)}async updateQrCodeText(o){await this.backPrintContainerMesh.updateQrCodeText(o,this.geometryOptions)}updateQrCodeVisibility(o){this.backPrintContainerMesh.updateQrCodeVisibility(o)}};function Sh(e,o,t,i,n){let r=e.x,a=e.y,s=e.z,l=r,d=a-t;o.geometry.boundingBox||o.geometry.computeBoundingBox();let c=o.geometry.boundingBox.max.z-o.geometry.boundingBox.min.z,h=(s-i)*o.geometry.boundingBox.max.x/c+2*n;return Math.min(l,d,h)}var Rt=Uint8Array,jt=Uint16Array,kh=Int32Array,qh=new Rt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Th=new Rt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),gx=new Rt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yx=function(e,o){for(var t=new jt(31),i=0;i<31;++i)t[i]=o+=1<<e[i-1];for(var n=new kh(t[30]),i=1;i<30;++i)for(var r=t[i];r<t[i+1];++r)n[r]=r-t[i]<<5|i;return{b:t,r:n}},Cx=yx(qh,2),CC=Cx.b,Ch=Cx.r;CC[28]=258,Ch[258]=28;var Mx=yx(Th,0),Gee=Mx.b,bx=Mx.r,Mh=new jt(32768);for(Ke=0;Ke<32768;++Ke)ji=(Ke&43690)>>1|(Ke&21845)<<1,ji=(ji&52428)>>2|(ji&13107)<<2,ji=(ji&61680)>>4|(ji&3855)<<4,Mh[Ke]=((ji&65280)>>8|(ji&255)<<8)>>1;var ji,Ke,ka=function(e,o,t){for(var i=e.length,n=0,r=new jt(o);n<i;++n)e[n]&&++r[e[n]-1];var a=new jt(o);for(n=1;n<o;++n)a[n]=a[n-1]+r[n-1]<<1;var s;if(t){s=new jt(1<<o);var l=15-o;for(n=0;n<i;++n)if(e[n])for(var d=n<<4|e[n],c=o-e[n],h=a[e[n]-1]++<<c,p=h|(1<<c)-1;h<=p;++h)s[Mh[h]>>l]=d}else for(s=new jt(i),n=0;n<i;++n)e[n]&&(s[n]=Mh[a[e[n]-1]++]>>15-e[n]);return s},ln=new Rt(288);for(Ke=0;Ke<144;++Ke)ln[Ke]=8;var Ke;for(Ke=144;Ke<256;++Ke)ln[Ke]=9;var Ke;for(Ke=256;Ke<280;++Ke)ln[Ke]=7;var Ke;for(Ke=280;Ke<288;++Ke)ln[Ke]=8;var Ke,jc=new Rt(32);for(Ke=0;Ke<32;++Ke)jc[Ke]=5;var Ke,MC=ka(ln,9,0);var _C=ka(jc,5,0);var _x=function(e){return(e+7)/8|0},Ex=function(e,o,t){return(o==null||o<0)&&(o=0),(t==null||t>e.length)&&(t=e.length),new Rt(e.subarray(o,t))};var EC=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Hc=function(e,o,t){var i=new Error(o||EC[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,Hc),!t)throw i;return i};var Hi=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8},_a=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8,e[i+2]|=t>>16},yh=function(e,o){for(var t=[],i=0;i<e.length;++i)e[i]&&t.push({s:i,f:e[i]});var n=t.length,r=t.slice();if(!n)return{t:qx,l:0};if(n==1){var a=new Rt(t[0].s+1);return a[t[0].s]=1,{t:a,l:1}}t.sort(function(G,Z){return G.f-Z.f}),t.push({s:-1,f:25001});var s=t[0],l=t[1],d=0,c=1,h=2;for(t[0]={s:-1,f:s.f+l.f,l:s,r:l};c!=n-1;)s=t[t[d].f<t[h].f?d++:h++],l=t[d!=c&&t[d].f<t[h].f?d++:h++],t[c++]={s:-1,f:s.f+l.f,l:s,r:l};for(var p=r[0].s,i=1;i<n;++i)r[i].s>p&&(p=r[i].s);var u=new jt(p+1),k=_h(t[c-1],u,0);if(k>o){var i=0,E=0,N=k-o,j=1<<N;for(r.sort(function(Z,ie){return u[ie.s]-u[Z.s]||Z.f-ie.f});i<n;++i){var ee=r[i].s;if(u[ee]>o)E+=j-(1<<k-u[ee]),u[ee]=o;else break}for(E>>=N;E>0;){var B=r[i].s;u[B]<o?E-=1<<o-u[B]++-1:++i}for(;i>=0&&E;--i){var H=r[i].s;u[H]==o&&(--u[H],++E)}k=o}return{t:new Rt(u),l:k}},_h=function(e,o,t){return e.s==-1?Math.max(_h(e.l,o,t+1),_h(e.r,o,t+1)):o[e.s]=t},vx=function(e){for(var o=e.length;o&&!e[--o];);for(var t=new jt(++o),i=0,n=e[0],r=1,a=function(l){t[i++]=l},s=1;s<=o;++s)if(e[s]==n&&s!=o)++r;else{if(!n&&r>2){for(;r>138;r-=138)a(32754);r>2&&(a(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(a(n),--r;r>6;r-=6)a(8304);r>2&&(a(r-3<<5|8208),r=0)}for(;r--;)a(n);r=1,n=e[s]}return{c:t.subarray(0,i),n:o}},Ea=function(e,o){for(var t=0,i=0;i<o.length;++i)t+=e[i]*o[i];return t},kx=function(e,o,t){var i=t.length,n=_x(o+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var r=0;r<i;++r)e[n+r+4]=t[r];return(n+4+i)*8},xx=function(e,o,t,i,n,r,a,s,l,d,c){Hi(o,c++,t),++n[256];for(var h=yh(n,15),p=h.t,u=h.l,k=yh(r,15),E=k.t,N=k.l,j=vx(p),ee=j.c,B=j.n,H=vx(E),G=H.c,Z=H.n,ie=new jt(19),oe=0;oe<ee.length;++oe)++ie[ee[oe]&31];for(var oe=0;oe<G.length;++oe)++ie[G[oe]&31];for(var ne=yh(ie,7),Me=ne.t,He=ne.l,U=19;U>4&&!Me[gx[U-1]];--U);var De=d+5<<3,_e=Ea(n,ln)+Ea(r,jc)+a,Ve=Ea(n,p)+Ea(r,E)+a+14+3*U+Ea(ie,Me)+2*ie[16]+3*ie[17]+7*ie[18];if(l>=0&&De<=_e&&De<=Ve)return kx(o,c,e.subarray(l,l+d));var We,ge,J,Ue;if(Hi(o,c,1+(Ve<_e)),c+=2,Ve<_e){We=ka(p,u,0),ge=p,J=ka(E,N,0),Ue=E;var Be=ka(Me,He,0);Hi(o,c,B-257),Hi(o,c+5,Z-1),Hi(o,c+10,U-4),c+=14;for(var oe=0;oe<U;++oe)Hi(o,c+3*oe,Me[gx[oe]]);c+=3*U;for(var dt=[ee,G],$t=0;$t<2;++$t)for(var di=dt[$t],oe=0;oe<di.length;++oe){var A=di[oe]&31;Hi(o,c,Be[A]),c+=Me[A],A>15&&(Hi(o,c,di[oe]>>5&127),c+=di[oe]>>12)}}else We=MC,ge=ln,J=_C,Ue=jc;for(var oe=0;oe<s;++oe){var C=i[oe];if(C>255){var A=C>>18&31;_a(o,c,We[A+257]),c+=ge[A+257],A>7&&(Hi(o,c,C>>23&31),c+=qh[A]);var x=C&31;_a(o,c,J[x]),c+=Ue[x],x>3&&(_a(o,c,C>>5&8191),c+=Th[x])}else _a(o,c,We[C]),c+=ge[C]}return _a(o,c,We[256]),c+ge[256]},kC=new kh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),qx=new Rt(0),qC=function(e,o,t,i,n,r){var a=r.z||e.length,s=new Rt(i+a+5*(1+Math.ceil(a/7e3))+n),l=s.subarray(i,s.length-n),d=r.l,c=(r.r||0)&7;if(o){c&&(l[0]=r.r>>3);for(var h=kC[o-1],p=h>>13,u=h&8191,k=(1<<t)-1,E=r.p||new jt(32768),N=r.h||new jt(k+1),j=Math.ceil(t/3),ee=2*j,B=function(Y){return(e[Y]^e[Y+1]<<j^e[Y+2]<<ee)&k},H=new kh(25e3),G=new jt(288),Z=new jt(32),ie=0,oe=0,ne=r.i||0,Me=0,He=r.w||0,U=0;ne+2<a;++ne){var De=B(ne),_e=ne&32767,Ve=N[De];if(E[_e]=Ve,N[De]=_e,He<=ne){var We=a-ne;if((ie>7e3||Me>24576)&&(We>423||!d)){c=xx(e,l,0,H,G,Z,oe,Me,U,ne-U,c),Me=ie=oe=0,U=ne;for(var ge=0;ge<286;++ge)G[ge]=0;for(var ge=0;ge<30;++ge)Z[ge]=0}var J=2,Ue=0,Be=u,dt=_e-Ve&32767;if(We>2&&De==B(ne-dt))for(var $t=Math.min(p,We)-1,di=Math.min(32767,ne),A=Math.min(258,We);dt<=di&&--Be&&_e!=Ve;){if(e[ne+J]==e[ne+J-dt]){for(var C=0;C<A&&e[ne+C]==e[ne+C-dt];++C);if(C>J){if(J=C,Ue=dt,C>$t)break;for(var x=Math.min(dt,C-2),g=0,ge=0;ge<x;++ge){var Q=ne-dt+ge&32767,de=E[Q],V=Q-de&32767;V>g&&(g=V,Ve=Q)}}}_e=Ve,Ve=E[_e],dt+=_e-Ve&32767}if(Ue){H[Me++]=268435456|Ch[J]<<18|bx[Ue];var ce=Ch[J]&31,pe=bx[Ue]&31;oe+=qh[ce]+Th[pe],++G[257+ce],++Z[pe],He=ne+J,++ie}else H[Me++]=e[ne],++G[e[ne]]}}for(ne=Math.max(ne,He);ne<a;++ne)H[Me++]=e[ne],++G[e[ne]];c=xx(e,l,d,H,G,Z,oe,Me,U,ne-U,c),d||(r.r=c&7|l[c/8|0]<<3,c-=7,r.h=N,r.p=E,r.i=ne,r.w=He)}else{for(var ne=r.w||0;ne<a+d;ne+=65535){var fe=ne+65535;fe>=a&&(l[c/8|0]=d,fe=a),c=kx(l,c+1,e.subarray(ne,fe))}r.i=a}return Ex(s,0,i+_x(c)+n)},TC=(function(){for(var e=new Int32Array(256),o=0;o<256;++o){for(var t=o,i=9;--i;)t=(t&1&&-306674912)^t>>>1;e[o]=t}return e})(),IC=function(){var e=-1;return{p:function(o){for(var t=e,i=0;i<o.length;++i)t=TC[t&255^o[i]]^t>>>8;e=t},d:function(){return~e}}};var RC=function(e,o,t,i,n){if(!n&&(n={l:1},o.dictionary)){var r=o.dictionary.subarray(-32768),a=new Rt(r.length+e.length);a.set(r),a.set(e,r.length),e=a,n.w=r.length}return qC(e,o.level==null?6:o.level,o.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+o.mem,t,i,n)},Tx=function(e,o){var t={};for(var i in e)t[i]=e[i];for(var i in o)t[i]=o[i];return t};var _t=function(e,o,t){for(;t;++o)e[o]=t,t>>>=8};function DC(e,o){return RC(e,o||{},0,0)}var Ix=function(e,o,t,i){for(var n in e){var r=e[n],a=o+n,s=i;Array.isArray(r)&&(s=Tx(i,r[1]),r=r[0]),ArrayBuffer.isView(r)?t[a]=[r,s]:(t[a+="/"]=[new Rt(0),s],Ix(r,a,t,i))}},wx=typeof TextEncoder<"u"&&new TextEncoder,AC=typeof TextDecoder<"u"&&new TextDecoder,LC=0;try{AC.decode(qx,{stream:!0}),LC=1}catch{}function cn(e,o){if(o){for(var t=new Rt(e.length),i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}if(wx)return wx.encode(e);for(var n=e.length,r=new Rt(e.length+(e.length>>1)),a=0,s=function(c){r[a++]=c},i=0;i<n;++i){if(a+5>r.length){var l=new Rt(a+8+(n-i<<1));l.set(r),r=l}var d=e.charCodeAt(i);d<128||o?s(d):d<2048?(s(192|d>>6),s(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++i)&1023,s(240|d>>18),s(128|d>>12&63),s(128|d>>6&63),s(128|d&63)):(s(224|d>>12),s(128|d>>6&63),s(128|d&63))}return Ex(r,0,a)}var Eh=function(e){var o=0;if(e)for(var t in e){var i=e[t].length;i>65535&&Hc(9),o+=i+4}return o},Sx=function(e,o,t,i,n,r,a,s){var l=i.length,d=t.extra,c=s&&s.length,h=Eh(d);_t(e,o,a!=null?33639248:67324752),o+=4,a!=null&&(e[o++]=20,e[o++]=t.os),e[o]=20,o+=2,e[o++]=t.flag<<1|(r<0&&8),e[o++]=n&&8,e[o++]=t.compression&255,e[o++]=t.compression>>8;var p=new Date(t.mtime==null?Date.now():t.mtime),u=p.getFullYear()-1980;if((u<0||u>119)&&Hc(10),_t(e,o,u<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),o+=4,r!=-1&&(_t(e,o,t.crc),_t(e,o+4,r<0?-r-2:r),_t(e,o+8,t.size)),_t(e,o+12,l),_t(e,o+14,h),o+=16,a!=null&&(_t(e,o,c),_t(e,o+6,t.attrs),_t(e,o+10,a),o+=14),e.set(i,o),o+=l,h)for(var k in d){var E=d[k],N=E.length;_t(e,o,+k),_t(e,o+2,N),e.set(E,o+4),o+=4+N}return c&&(e.set(s,o),o+=c),o},FC=function(e,o,t,i,n){_t(e,o,101010256),_t(e,o+8,t),_t(e,o+10,t),_t(e,o+12,i),_t(e,o+16,n)};function Rx(e,o){o||(o={});var t={},i=[];Ix(e,"",t,o);var n=0,r=0;for(var a in t){var s=t[a],l=s[0],d=s[1],c=d.level==0?0:8,h=cn(a),p=h.length,u=d.comment,k=u&&cn(u),E=k&&k.length,N=Eh(d.extra);p>65535&&Hc(11);var j=c?DC(l,d):l,ee=j.length,B=IC();B.p(l),i.push(Tx(d,{size:l.length,crc:B.d(),c:j,f:h,m:k,u:p!=a.length||k&&u.length!=E,o:n,compression:c})),n+=30+p+N+ee,r+=76+2*(p+N)+(E||0)+ee}for(var H=new Rt(r+22),G=n,Z=r-n,ie=0;ie<i.length;++ie){var h=i[ie];Sx(H,h.o,h,h.f,h.u,h.c.length);var oe=30+h.f.length+Eh(h.extra);H.set(h.c,h.o+oe),Sx(H,n,h,h.f,h.u,h.c.length,h.o,h.m),n+=16+oe+(h.m?h.m.length:0)}return FC(H,n,i.length,Z,G),H}function Dx(e,o){let t=PC(),i=NC(e),n=BC(o),r=VC();return t+i+n+r}function PC(){return`<?xml version="1.0" encoding="UTF-8"?>
3496
+ `}async createColoredBackTextChildren(o){let t=this.metricDescriptionBlockOptions,i=[],n=["Value ranges:",`${t.nodeMetricData.minValue} - ${t.colorRange.from-1}`,"/",`${t.colorRange.from} - ${t.colorRange.to-1}`,"/",`${t.colorRange.to} - ${t.nodeMetricData.maxValue}`],r=[new et,new bc,new et,new gc,new et,new fc],a=.05;for(let s=0;s<n.length;s+=1){let l=`ColorMetricLastLine${s}`,d={font:this.font,text:n[s],side:"back",xPosition:a,yPosition:-.045,align:"left"},c=await new Qt(l,r[s],200,!0,d).init(o);this.updateColor(o.numberOfColors),i.push(c),s!==n.length-1&&(a+=c.getWidth()+.03)}return i}};var xc=class extends xt{constructor(o,t){super(o,new et),this.font=t}async init(o){let{areaIcon:t,areaIconScale:i}=this.createAreaAttributes(),{heightIcon:n,heightIconScale:r}=this.createHeightAttributes(),{colorIcon:a,colorIconScale:s}=this.createColorAttributes(),l=await new on({name:"HeigthMetricBlock",title:o.heightMetricTitle,iconFilename:n,iconScale:r,nodeMetricData:o.heightMetricData},this.font,.05).init(o);this.add(l);let d=await new on({name:"AreaMetricBlock",title:o.areaMetricTitle,iconFilename:t,iconScale:i,nodeMetricData:o.areaMetricData},this.font,-.1).init(o);this.add(d);let c=await new vc({name:"ColorMetricBlock",title:o.colorMetricTitle,iconFilename:a,iconScale:s,nodeMetricData:o.colorMetricData,colorRange:o.colorRange},this.font,-.25).init(o);return this.add(c),this.centerMetricsMeshInXDirection(),this}centerMetricsMeshInXDirection(){let o={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};this.traverse(t=>{if(t instanceof st&&t.visible){t.geometry.computeBoundingBox();let{min:i,max:n}=t.geometry.boundingBox;o.min=Math.min(o.min,i.x),o.max=Math.max(o.max,n.x)}}),this.position.x=(o.max-o.min)/2}createColorAttributes(){return{colorIcon:"color_icon_for_3D_print.svg",colorIconScale:.075}}createHeightAttributes(){return{heightIcon:"height_icon_for_3D_print.svg",heightIconScale:.09}}createAreaAttributes(){return{areaIcon:"area_icon_for_3D_print.svg",areaIconScale:.075}}};var fx=Ia(ux());var Rc=class extends It{constructor(o){super(o,new et,0,!1)}async init(o){this.geometry=await this.create(o);let t=.45,i=.45,n=-o.baseplateHeight+o.printHeight/2;return this.position.set(t,i,n),this.updateColor(o.numberOfColors),this}async changeText(o){this.geometry=await this.create(o)}async create(o){if(!o.qrCodeText||o.qrCodeText.length===0)return new Gt;let t=document.createElement("canvas");await fx.toCanvas(t,o.qrCodeText,{errorCorrectionLevel:"H"});let n=t.getContext("2d").getImageData(0,0,t.width,t.height),r=[],a=.6/n.width;for(let s=0;s<n.height;s+=4)for(let l=0;l<n.width;l+=4){let d=(s*n.width+l)*4;if(n.data[d]!==0){let c=new ao(a,a,o.printHeight);c.translate(-l/4*a,-s/4*a,0),r.push(c)}}return this.updateMinWidth(a),Co(r)}updateMinWidth(o){this.minWidth=.6/o}};var Dc=class extends xt{constructor(o){let t=new et;super("BackPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("BackMWLogo",new hc("BackMWLogo")),this.childrenMeshes.set("BackBelowLogoText",new dc("BackBelowLogoText",this.font)),this.childrenMeshes.set("QrCode",new Rc("QrCode")),this.childrenMeshes.set("CodeChartaLogo",new pc("CodeChartaLogo")),this.childrenMeshes.set("CodeChartaText",new uc("CodeChartaText",this.font)),this.childrenMeshes.set("MetricDescriptionsContainer",new xc("MetricDescriptionsContainer",this.font)),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.changeSize(o,1),this}changeSize(o,t){let i=o.width/t;this.scale.set(this.scale.x*i,this.scale.y*i,this.scale.z),this.traverse(n=>{n instanceof It&&n.setCurrentWidth(o.width)})}isQRCodeVisible(){return this.childrenMeshes.get("QrCode").visible}async updateQrCodeText(o,t){t.qrCodeText=o,await this.childrenMeshes.get("QrCode").changeText(t)}updateQrCodeVisibility(o){this.childrenMeshes.get("QrCode").setManualVisibility(o)}getChildrenMeshes(){return this.childrenMeshes}};var Ac=class{execute(o,t){let i=t.material;return i.defaultAttributeValues.color=o===1?[1,1,1]:[.5,.5,.5],!0}};var Lc=class{async create(o){let{width:t,secondRowVisible:i,mapSideOffset:n,baseplateHeight:r,frontTextSize:a,secondRowTextSize:s}=o,l=5,d=Math.sqrt(2*Math.pow(n,2))/(Math.sqrt(2)-1)-1;d<l&&(l=d);let c=new ms,h=i?s*1.5:0,p=t+a+h;c.absarc(t-l,l,l,Math.PI*1.5,Math.PI*2,!1),c.absarc(t-l,p-l,l,0,Math.PI*.5,!1),c.absarc(l,p-l,l,Math.PI*.5,Math.PI,!1),c.absarc(l,l,l,Math.PI,Math.PI*1.5,!1);let u=new On(c,{depth:r,bevelEnabled:!1});return u.translate(-t/2,-t/2-a-h,-r),u}};var Fc=class extends xt{constructor(o=new Lc){super("Baseplate",new Ac),this.createBaseplateGeometryStrategy=o}async init(o){this.createBaseplateGeometryStrategy.create(o).then(i=>{this.geometry=i});let t=new Su;return t.copy(o.defaultMaterial),t.polygonOffset=!0,t.polygonOffsetUnits=1,t.polygonOffsetFactor=.1,this.material=t,this.updateColor(o.numberOfColors),new Promise(i=>{i(this)})}changeSize(o){this.boundingBoxCalculated=!1,this.createBaseplateGeometryStrategy.create(o).then(t=>{this.geometry=t})}};var qo=class{execute(o,t){let i;return o<4?i=[1,1,1]:o===4?i=[1,1,0]:i=[1,1,1],t.material.color.setRGB(i[0],i[1],i[2]),!0}};var To=class extends xt{constructor(o,t){super(o,new qo),this.alignment=t}changeRelativeSize(o){let t=this.getWidth();this.boundingBoxCalculated=!1;let i=o.secondRowVisible,n=i?(o.frontTextSize+o.secondRowTextSize)/o.frontTextSize:1;this.scale.x=n,this.scale.y=n;let r=i?-1:1,a=this.alignment==="left"?-1:1;this.translateY(r*o.secondRowTextSize);let s=i?t/this.getWidth():this.getWidth()/t;this.translateX(2*s*a*r)}};var Pc=class extends To{constructor(o,t){super(o,"left"),this.filePath=t}async init(o){let t=new Yt,i=o.frontTextSize*o.width/200;this.geometry=await t.create(o,{filePath:this.filePath,size:i,side:"front"});let n=-o.width/2+i/2+o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}setColor(o){this.material.color.set(o)}rotate(){this.geometry.rotateZ(Math.PI/2)}flip(){this.geometry.rotateY(Math.PI)}changeSize(o,t){this.position.x-=(o.width-t)/2}};var Nc=class extends To{constructor(o){super(o,"right")}async init(o,t=new Yt){let i=o.frontTextSize*o.width/250;this.geometry=await t.create(o,{filePath:"./codeCharta/assets/mw_logo.svg",size:i,side:"front"});let n=o.width/2-i/2-o.mapSideOffset/2,r=i/2,a=o.printHeight/2;return this.position.set(n,r,a),o.secondRowVisible&&this.changeRelativeSize(o),this.updateColor(o.numberOfColors),this}changeSize(o,t){this.position.x+=(o.width-t)/2}};var Bc=class extends Qt{constructor(o,t,i){let n=i.frontText;n||(n="FrontText");let r={font:t,side:"front",text:n,xPosition:0,yPosition:i.frontTextSize/2,textSize:i.frontTextSize,align:"center"};super(o,new qo,0,!0,r),this.name="Front Text"}};var Vc=class extends Qt{constructor(o,t,i){let n={font:t,text:i.secondRowText,side:"front",xPosition:0,yPosition:-i.secondRowTextSize,textSize:i.secondRowTextSize,align:"center"};super(o,new qo,0,!1,n)}};var Wc=class extends xt{constructor(o){let t=new et;super("FrontPrintContainer",t),this.font=o}async init(o){return this.childrenMeshes=new Map,this.childrenMeshes.set("FrontText",new Bc("FrontText",this.font,o)),this.childrenMeshes.set("SecondRowText",new Vc("SecondRowText",this.font,o)),this.childrenMeshes.set("FrontMWLogo",new Nc("FrontMWLogo")),await Promise.all([...this.childrenMeshes.values()].map(async t=>{await t.init(o),this.add(t)})),this.position.y=-o.width/2-o.mapSideOffset/2,this}async addCustomLogo(o,t){this.childrenMeshes.has("CustomLogo")&&this.removeCustomLogo();let i=await new Pc("CustomLogo",o).init(t);this.add(i),this.childrenMeshes.set(i.name,i)}rotateCustomLogo(){this.childrenMeshes.get("CustomLogo").rotate()}flipCustomLogo(){this.childrenMeshes.get("CustomLogo").flip()}removeCustomLogo(){this.remove(this.childrenMeshes.get("CustomLogo")),this.childrenMeshes.delete("CustomLogo")}updateCustomLogoColor(o){this.childrenMeshes.get("CustomLogo").setColor(o)}async updateFrontText(o,t){let i=this.childrenMeshes.get("FrontText");i.updateTextGeometryOptions(o),await i.updateText(t)}changeSize(o,t){this.position.y-=(o.width-t)/2;for(let i of this.childrenMeshes.values())i instanceof To&&i.isGeneralSizeChangeMesh()&&i.changeSize(o,t)}async updateSecondRowText(o,t){let i=this.childrenMeshes.get("SecondRowText");i.updateTextGeometryOptions(o),await i.updateText(t)}updateSecondRowVisibility(o){let t=this.childrenMeshes.get("FrontMWLogo"),i=this.childrenMeshes.get("SecondRowText"),n=this.childrenMeshes.get("CustomLogo");i.setManualVisibility(o.secondRowVisible),t.changeRelativeSize(o),n?.changeRelativeSize(o)}getChildrenMeshes(){return this.childrenMeshes}};var Oc=class extends It{constructor(){super("Map",new et,1,!1)}async init(o){this.material=o.originalMapMesh.clone().material,this.originalColors=o.originalMapMesh.geometry.attributes.color;let t=o.originalMapMesh.geometry.clone();return this.addBottomFaces(t),t.computeBoundingBox(),t.rotateX(Math.PI/2),this.updateMapGeometry(o,t),t.computeBoundingBox(),t.rotateZ(-Math.PI/2),this.geometry=t,this}updateMapGeometry(o,t){let i=o.width-2*o.mapSideOffset,n=t.boundingBox.max.x,r=i/n;return t.scale(r,r,r),t.translate(-i/2,i/2,0),this.updateMapColors(this.originalColors,t,o.numberOfColors),t}updateMapColors(o,t,i){let n=[];for(let r=0;r<o.count;r++){let a=o.getX(r),s=o.getY(r),l=o.getZ(r),d;a===l&&a===s&&s===l?d=i===1?[1,1,1]:[.5,.5,.5]:a>.75&&s>.75?d=i<4?[1,1,1]:[1,1,0]:a>.45&&s<.1?d=i<4?[1,1,1]:[1,0,0]:a<5&&s>.6?d=i<4?[1,1,1]:[0,1,0]:(console.error("Unknown color"),d=[1,1,1]),n.push(...d)}t.setAttribute("color",new Fo(n,3))}addBottomFaces(o){let t=o.index;if(!t)return;let i=24,n=6,r=8,a=t.count/Xu,s=new Uint32Array(t.count+a*n);s.set(new Uint32Array(t.array.buffer,t.array.byteOffset,t.count));let l=t.count;for(let d=0;d<a;d++){let c=d*i+r;s[l++]=c,s[l++]=c+2,s[l++]=c+1,s[l++]=c,s[l++]=c+3,s[l++]=c+2}o.setIndex(new ro(s,1))}async changeSize(o,t){let i=(o.width-2*o.mapSideOffset)/(t-2*o.mapSideOffset);this.geometry.scale(i,i,i)}updateColor(o){this.updateMapColors(this.originalColors,this.geometry,o)}};var zc=class{constructor(o,t=new Wc(new pa(Qm)),i=new Dc(new pa(Qm)),n=new Fc,r=new Oc){this.geometryOptions=o,this.frontPrintContainerMesh=t,this.backPrintContainerMesh=i,this.baseplateMesh=n,this.mapMesh=r,this.printMesh=new st,this.printMesh.name="PrintMesh"}async initialize(){this.baseplateMesh=await this.baseplateMesh.init(this.geometryOptions),this.printMesh.add(this.baseplateMesh),this.mapMesh=await this.mapMesh.init(this.geometryOptions),this.printMesh.add(this.mapMesh),this.frontPrintContainerMesh=await this.frontPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.frontPrintContainerMesh),this.backPrintContainerMesh=await this.backPrintContainerMesh.init(this.geometryOptions),this.printMesh.add(this.backPrintContainerMesh),this.calculateCurrentSize()}getThreeMesh(){return this.printMesh}getMapMesh(){return this.mapMesh}getSize(){return this.currentSize}async updateSize(o){this.geometryOptions.width=o;let t=this.currentSize.x;return await Promise.all([...this.printMesh.children].map(async i=>{i instanceof xt&&i.isGeneralSizeChangeMesh()&&i.changeSize(this.geometryOptions,t)})),this.calculateCurrentSize(),this.backPrintContainerMesh.isQRCodeVisible()}updateNumberOfColors(o){this.geometryOptions.numberOfColors=o;for(let t of this.printMesh.children)t instanceof xt&&t.updateColor(o)}async addCustomLogo(o){this.frontPrintContainerMesh.addCustomLogo(o,this.geometryOptions)}rotateCustomLogo(){this.frontPrintContainerMesh.rotateCustomLogo()}flipCustomLogo(){this.frontPrintContainerMesh.flipCustomLogo()}removeCustomLogo(){this.frontPrintContainerMesh.removeCustomLogo()}updateCustomLogoColor(o){this.frontPrintContainerMesh.updateCustomLogoColor(o)}updateFrontText(o){this.frontPrintContainerMesh.updateFrontText(o,this.geometryOptions)}updateSecondRowVisibility(o){this.geometryOptions.secondRowVisible!==o&&(this.geometryOptions.secondRowVisible=o,this.frontPrintContainerMesh.updateSecondRowVisibility(this.geometryOptions),this.baseplateMesh.changeSize(this.geometryOptions))}async updateSecondRowText(o){await this.frontPrintContainerMesh.updateSecondRowText(o,this.geometryOptions)}calculateCurrentSize(){let o=this.baseplateMesh.getWidth(),t=this.baseplateMesh.getDepth(),i=this.baseplateMesh.getHeight()+this.mapMesh.getHeight();this.currentSize=new Qe(o,t,i)}async updateQrCodeText(o){await this.backPrintContainerMesh.updateQrCodeText(o,this.geometryOptions)}updateQrCodeVisibility(o){this.backPrintContainerMesh.updateQrCodeVisibility(o)}};function wh(e,o,t,i,n){let r=e.x,a=e.y,s=e.z,l=r,d=a-t;o.geometry.boundingBox||o.geometry.computeBoundingBox();let c=o.geometry.boundingBox.max.z-o.geometry.boundingBox.min.z,h=(s-i)*o.geometry.boundingBox.max.x/c+2*n;return Math.min(l,d,h)}var Rt=Uint8Array,jt=Uint16Array,Eh=Int32Array,kh=new Rt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),qh=new Rt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),gx=new Rt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yx=function(e,o){for(var t=new jt(31),i=0;i<31;++i)t[i]=o+=1<<e[i-1];for(var n=new Eh(t[30]),i=1;i<30;++i)for(var r=t[i];r<t[i+1];++r)n[r]=r-t[i]<<5|i;return{b:t,r:n}},Cx=yx(kh,2),CC=Cx.b,yh=Cx.r;CC[28]=258,yh[258]=28;var Mx=yx(qh,0),Uee=Mx.b,bx=Mx.r,Ch=new jt(32768);for(Ke=0;Ke<32768;++Ke)$i=(Ke&43690)>>1|(Ke&21845)<<1,$i=($i&52428)>>2|($i&13107)<<2,$i=($i&61680)>>4|($i&3855)<<4,Ch[Ke]=(($i&65280)>>8|($i&255)<<8)>>1;var $i,Ke,_a=function(e,o,t){for(var i=e.length,n=0,r=new jt(o);n<i;++n)e[n]&&++r[e[n]-1];var a=new jt(o);for(n=1;n<o;++n)a[n]=a[n-1]+r[n-1]<<1;var s;if(t){s=new jt(1<<o);var l=15-o;for(n=0;n<i;++n)if(e[n])for(var d=n<<4|e[n],c=o-e[n],h=a[e[n]-1]++<<c,p=h|(1<<c)-1;h<=p;++h)s[Ch[h]>>l]=d}else for(s=new jt(i),n=0;n<i;++n)e[n]&&(s[n]=Ch[a[e[n]-1]++]>>15-e[n]);return s},ln=new Rt(288);for(Ke=0;Ke<144;++Ke)ln[Ke]=8;var Ke;for(Ke=144;Ke<256;++Ke)ln[Ke]=9;var Ke;for(Ke=256;Ke<280;++Ke)ln[Ke]=7;var Ke;for(Ke=280;Ke<288;++Ke)ln[Ke]=8;var Ke,$c=new Rt(32);for(Ke=0;Ke<32;++Ke)$c[Ke]=5;var Ke,MC=_a(ln,9,0);var _C=_a($c,5,0);var _x=function(e){return(e+7)/8|0},Ex=function(e,o,t){return(o==null||o<0)&&(o=0),(t==null||t>e.length)&&(t=e.length),new Rt(e.subarray(o,t))};var EC=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],jc=function(e,o,t){var i=new Error(o||EC[e]);if(i.code=e,Error.captureStackTrace&&Error.captureStackTrace(i,jc),!t)throw i;return i};var ji=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8},Ca=function(e,o,t){t<<=o&7;var i=o/8|0;e[i]|=t,e[i+1]|=t>>8,e[i+2]|=t>>16},Sh=function(e,o){for(var t=[],i=0;i<e.length;++i)e[i]&&t.push({s:i,f:e[i]});var n=t.length,r=t.slice();if(!n)return{t:qx,l:0};if(n==1){var a=new Rt(t[0].s+1);return a[t[0].s]=1,{t:a,l:1}}t.sort(function(G,Z){return G.f-Z.f}),t.push({s:-1,f:25001});var s=t[0],l=t[1],d=0,c=1,h=2;for(t[0]={s:-1,f:s.f+l.f,l:s,r:l};c!=n-1;)s=t[t[d].f<t[h].f?d++:h++],l=t[d!=c&&t[d].f<t[h].f?d++:h++],t[c++]={s:-1,f:s.f+l.f,l:s,r:l};for(var p=r[0].s,i=1;i<n;++i)r[i].s>p&&(p=r[i].s);var u=new jt(p+1),k=Mh(t[c-1],u,0);if(k>o){var i=0,E=0,N=k-o,j=1<<N;for(r.sort(function(Z,ie){return u[ie.s]-u[Z.s]||Z.f-ie.f});i<n;++i){var ee=r[i].s;if(u[ee]>o)E+=j-(1<<k-u[ee]),u[ee]=o;else break}for(E>>=N;E>0;){var B=r[i].s;u[B]<o?E-=1<<o-u[B]++-1:++i}for(;i>=0&&E;--i){var H=r[i].s;u[H]==o&&(--u[H],++E)}k=o}return{t:new Rt(u),l:k}},Mh=function(e,o,t){return e.s==-1?Math.max(Mh(e.l,o,t+1),Mh(e.r,o,t+1)):o[e.s]=t},vx=function(e){for(var o=e.length;o&&!e[--o];);for(var t=new jt(++o),i=0,n=e[0],r=1,a=function(l){t[i++]=l},s=1;s<=o;++s)if(e[s]==n&&s!=o)++r;else{if(!n&&r>2){for(;r>138;r-=138)a(32754);r>2&&(a(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(a(n),--r;r>6;r-=6)a(8304);r>2&&(a(r-3<<5|8208),r=0)}for(;r--;)a(n);r=1,n=e[s]}return{c:t.subarray(0,i),n:o}},Ma=function(e,o){for(var t=0,i=0;i<o.length;++i)t+=e[i]*o[i];return t},kx=function(e,o,t){var i=t.length,n=_x(o+2);e[n]=i&255,e[n+1]=i>>8,e[n+2]=e[n]^255,e[n+3]=e[n+1]^255;for(var r=0;r<i;++r)e[n+r+4]=t[r];return(n+4+i)*8},xx=function(e,o,t,i,n,r,a,s,l,d,c){ji(o,c++,t),++n[256];for(var h=Sh(n,15),p=h.t,u=h.l,k=Sh(r,15),E=k.t,N=k.l,j=vx(p),ee=j.c,B=j.n,H=vx(E),G=H.c,Z=H.n,ie=new jt(19),oe=0;oe<ee.length;++oe)++ie[ee[oe]&31];for(var oe=0;oe<G.length;++oe)++ie[G[oe]&31];for(var ne=Sh(ie,7),Me=ne.t,He=ne.l,U=19;U>4&&!Me[gx[U-1]];--U);var De=d+5<<3,_e=Ma(n,ln)+Ma(r,$c)+a,Ve=Ma(n,p)+Ma(r,E)+a+14+3*U+Ma(ie,Me)+2*ie[16]+3*ie[17]+7*ie[18];if(l>=0&&De<=_e&&De<=Ve)return kx(o,c,e.subarray(l,l+d));var We,ge,J,Ue;if(ji(o,c,1+(Ve<_e)),c+=2,Ve<_e){We=_a(p,u,0),ge=p,J=_a(E,N,0),Ue=E;var Be=_a(Me,He,0);ji(o,c,B-257),ji(o,c+5,Z-1),ji(o,c+10,U-4),c+=14;for(var oe=0;oe<U;++oe)ji(o,c+3*oe,Me[gx[oe]]);c+=3*U;for(var dt=[ee,G],$t=0;$t<2;++$t)for(var di=dt[$t],oe=0;oe<di.length;++oe){var A=di[oe]&31;ji(o,c,Be[A]),c+=Me[A],A>15&&(ji(o,c,di[oe]>>5&127),c+=di[oe]>>12)}}else We=MC,ge=ln,J=_C,Ue=$c;for(var oe=0;oe<s;++oe){var C=i[oe];if(C>255){var A=C>>18&31;Ca(o,c,We[A+257]),c+=ge[A+257],A>7&&(ji(o,c,C>>23&31),c+=kh[A]);var x=C&31;Ca(o,c,J[x]),c+=Ue[x],x>3&&(Ca(o,c,C>>5&8191),c+=qh[x])}else Ca(o,c,We[C]),c+=ge[C]}return Ca(o,c,We[256]),c+ge[256]},kC=new Eh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),qx=new Rt(0),qC=function(e,o,t,i,n,r){var a=r.z||e.length,s=new Rt(i+a+5*(1+Math.ceil(a/7e3))+n),l=s.subarray(i,s.length-n),d=r.l,c=(r.r||0)&7;if(o){c&&(l[0]=r.r>>3);for(var h=kC[o-1],p=h>>13,u=h&8191,k=(1<<t)-1,E=r.p||new jt(32768),N=r.h||new jt(k+1),j=Math.ceil(t/3),ee=2*j,B=function(Y){return(e[Y]^e[Y+1]<<j^e[Y+2]<<ee)&k},H=new Eh(25e3),G=new jt(288),Z=new jt(32),ie=0,oe=0,ne=r.i||0,Me=0,He=r.w||0,U=0;ne+2<a;++ne){var De=B(ne),_e=ne&32767,Ve=N[De];if(E[_e]=Ve,N[De]=_e,He<=ne){var We=a-ne;if((ie>7e3||Me>24576)&&(We>423||!d)){c=xx(e,l,0,H,G,Z,oe,Me,U,ne-U,c),Me=ie=oe=0,U=ne;for(var ge=0;ge<286;++ge)G[ge]=0;for(var ge=0;ge<30;++ge)Z[ge]=0}var J=2,Ue=0,Be=u,dt=_e-Ve&32767;if(We>2&&De==B(ne-dt))for(var $t=Math.min(p,We)-1,di=Math.min(32767,ne),A=Math.min(258,We);dt<=di&&--Be&&_e!=Ve;){if(e[ne+J]==e[ne+J-dt]){for(var C=0;C<A&&e[ne+C]==e[ne+C-dt];++C);if(C>J){if(J=C,Ue=dt,C>$t)break;for(var x=Math.min(dt,C-2),g=0,ge=0;ge<x;++ge){var Q=ne-dt+ge&32767,de=E[Q],V=Q-de&32767;V>g&&(g=V,Ve=Q)}}}_e=Ve,Ve=E[_e],dt+=_e-Ve&32767}if(Ue){H[Me++]=268435456|yh[J]<<18|bx[Ue];var ce=yh[J]&31,pe=bx[Ue]&31;oe+=kh[ce]+qh[pe],++G[257+ce],++Z[pe],He=ne+J,++ie}else H[Me++]=e[ne],++G[e[ne]]}}for(ne=Math.max(ne,He);ne<a;++ne)H[Me++]=e[ne],++G[e[ne]];c=xx(e,l,d,H,G,Z,oe,Me,U,ne-U,c),d||(r.r=c&7|l[c/8|0]<<3,c-=7,r.h=N,r.p=E,r.i=ne,r.w=He)}else{for(var ne=r.w||0;ne<a+d;ne+=65535){var fe=ne+65535;fe>=a&&(l[c/8|0]=d,fe=a),c=kx(l,c+1,e.subarray(ne,fe))}r.i=a}return Ex(s,0,i+_x(c)+n)},TC=(function(){for(var e=new Int32Array(256),o=0;o<256;++o){for(var t=o,i=9;--i;)t=(t&1&&-306674912)^t>>>1;e[o]=t}return e})(),IC=function(){var e=-1;return{p:function(o){for(var t=e,i=0;i<o.length;++i)t=TC[t&255^o[i]]^t>>>8;e=t},d:function(){return~e}}};var RC=function(e,o,t,i,n){if(!n&&(n={l:1},o.dictionary)){var r=o.dictionary.subarray(-32768),a=new Rt(r.length+e.length);a.set(r),a.set(e,r.length),e=a,n.w=r.length}return qC(e,o.level==null?6:o.level,o.mem==null?n.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+o.mem,t,i,n)},Tx=function(e,o){var t={};for(var i in e)t[i]=e[i];for(var i in o)t[i]=o[i];return t};var _t=function(e,o,t){for(;t;++o)e[o]=t,t>>>=8};function DC(e,o){return RC(e,o||{},0,0)}var Ix=function(e,o,t,i){for(var n in e){var r=e[n],a=o+n,s=i;Array.isArray(r)&&(s=Tx(i,r[1]),r=r[0]),ArrayBuffer.isView(r)?t[a]=[r,s]:(t[a+="/"]=[new Rt(0),s],Ix(r,a,t,i))}},wx=typeof TextEncoder<"u"&&new TextEncoder,AC=typeof TextDecoder<"u"&&new TextDecoder,LC=0;try{AC.decode(qx,{stream:!0}),LC=1}catch{}function cn(e,o){if(o){for(var t=new Rt(e.length),i=0;i<e.length;++i)t[i]=e.charCodeAt(i);return t}if(wx)return wx.encode(e);for(var n=e.length,r=new Rt(e.length+(e.length>>1)),a=0,s=function(c){r[a++]=c},i=0;i<n;++i){if(a+5>r.length){var l=new Rt(a+8+(n-i<<1));l.set(r),r=l}var d=e.charCodeAt(i);d<128||o?s(d):d<2048?(s(192|d>>6),s(128|d&63)):d>55295&&d<57344?(d=65536+(d&1047552)|e.charCodeAt(++i)&1023,s(240|d>>18),s(128|d>>12&63),s(128|d>>6&63),s(128|d&63)):(s(224|d>>12),s(128|d>>6&63),s(128|d&63))}return Ex(r,0,a)}var _h=function(e){var o=0;if(e)for(var t in e){var i=e[t].length;i>65535&&jc(9),o+=i+4}return o},Sx=function(e,o,t,i,n,r,a,s){var l=i.length,d=t.extra,c=s&&s.length,h=_h(d);_t(e,o,a!=null?33639248:67324752),o+=4,a!=null&&(e[o++]=20,e[o++]=t.os),e[o]=20,o+=2,e[o++]=t.flag<<1|(r<0&&8),e[o++]=n&&8,e[o++]=t.compression&255,e[o++]=t.compression>>8;var p=new Date(t.mtime==null?Date.now():t.mtime),u=p.getFullYear()-1980;if((u<0||u>119)&&jc(10),_t(e,o,u<<25|p.getMonth()+1<<21|p.getDate()<<16|p.getHours()<<11|p.getMinutes()<<5|p.getSeconds()>>1),o+=4,r!=-1&&(_t(e,o,t.crc),_t(e,o+4,r<0?-r-2:r),_t(e,o+8,t.size)),_t(e,o+12,l),_t(e,o+14,h),o+=16,a!=null&&(_t(e,o,c),_t(e,o+6,t.attrs),_t(e,o+10,a),o+=14),e.set(i,o),o+=l,h)for(var k in d){var E=d[k],N=E.length;_t(e,o,+k),_t(e,o+2,N),e.set(E,o+4),o+=4+N}return c&&(e.set(s,o),o+=c),o},FC=function(e,o,t,i,n){_t(e,o,101010256),_t(e,o+8,t),_t(e,o+10,t),_t(e,o+12,i),_t(e,o+16,n)};function Rx(e,o){o||(o={});var t={},i=[];Ix(e,"",t,o);var n=0,r=0;for(var a in t){var s=t[a],l=s[0],d=s[1],c=d.level==0?0:8,h=cn(a),p=h.length,u=d.comment,k=u&&cn(u),E=k&&k.length,N=_h(d.extra);p>65535&&jc(11);var j=c?DC(l,d):l,ee=j.length,B=IC();B.p(l),i.push(Tx(d,{size:l.length,crc:B.d(),c:j,f:h,m:k,u:p!=a.length||k&&u.length!=E,o:n,compression:c})),n+=30+p+N+ee,r+=76+2*(p+N)+(E||0)+ee}for(var H=new Rt(r+22),G=n,Z=r-n,ie=0;ie<i.length;++ie){var h=i[ie];Sx(H,h.o,h,h.f,h.u,h.c.length);var oe=30+h.f.length+_h(h.extra);H.set(h.c,h.o+oe),Sx(H,n,h,h.f,h.u,h.c.length,h.o,h.m),n+=16+oe+(h.m?h.m.length:0)}return FC(H,n,i.length,Z,G),H}function Dx(e,o){let t=PC(),i=NC(e),n=BC(o),r=VC();return t+i+n+r}function PC(){return`<?xml version="1.0" encoding="UTF-8"?>
3489
3497
  <model unit="millimeter" xml:lang="en-US" xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02" xmlns:slic3rpe="http://schemas.slic3r.org/3mf/2017/06">
3490
3498
  <metadata name="Application">PrusaSlicer-2.7.2</metadata>
3491
3499
  <resources>
@@ -3521,6 +3529,6 @@ ${this.metricDescriptionBlockOptions.title}
3521
3529
  </Types>`}function Fx(){return`<?xml version="1.0" encoding="UTF-8"?>
3522
3530
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
3523
3531
  <Relationship Target="/3D/3dmodel.model" Id="rel-1" Type="http://schemas.microsoft.com/3dmanufacturing/2013/01/3dmodel"/>
3524
- </Relationships>`}async function Nx(e){let{vertices:o,triangles:t,volumes:i}=$C(e),n=Dx(o,t),r=Ax(i),a=Lx(),s=Fx(),l=!0,d={"3D":{"3dmodel.model":cn(n,l)},_rels:{".rels":cn(s,l)},Metadata:{"Slic3r_PE_model.config":cn(r,l)},"[Content_Types].xml":cn(a,l)};return Rx(d,{comment:"created by CodeCharta"}).buffer}function $C(e){let o=[],t=[],i=[],n=new Map,r=new Map,a=1;for(let s of e.children)Bx(s,o,t,n,a,r,i);return{vertices:o,triangles:t,volumes:i}}function Bx(e,o,t,i,n,r,a,s=void 0){if(!e.visible)return;for(let c of e.children){let h=e.matrix;s&&(h=s.clone().multiply(e.matrix)),Bx(c,o,t,i,n,r,a,h)}let l=jC(e),d=new Map;for(let[c,h]of l.entries()){let p=t.length;HC(o,i,d,h,e,s),UC(e.geometry,t,d,h),GC(e,c,p,t.length-1,a,n,r),n++}}function jC(e){let o=new Map;if(e.geometry.attributes.color)for(let t=0;t<e.geometry.attributes.color.count;t++){let i=Px(e.geometry.attributes.color,t);o.has(i)?o.get(i).push(t):o.set(i,[t])}else if(e.geometry.attributes.position){let t=e.material,i;if(t.color)i=t.color.getHexString();else if(t.isShaderMaterial){let r=t.defaultAttributeValues.color;i=Px(r,0)}let n=Array.from({length:e.geometry.attributes.position.count},(r,a)=>a);o.set(i,n)}return o}function HC(e,o,t,i,n,r){let a=n.geometry.attributes.position;for(let s of i){let l=new Qe(a.getX(s),a.getY(s),a.getZ(s));l.applyMatrix4(n.matrix),r&&l.applyMatrix4(r);let d=`<vertex x="${l.x}" y="${l.y}" z="${l.z}"/>`;o.has(d)?t.set(s,o.get(d)):(e.push(d),o.set(d,e.length-1),t.set(s,e.length-1))}}function UC(e,o,t,i){if(e.index){let n=e.index;for(let r=0;r<n.count;r+=3){let a=n.getX(r),s=n.getY(r),l=n.getZ(r);if(i.includes(a)&&i.includes(s)&&i.includes(l)){let d=`<triangle v1="${t.get(a)}" v2="${t.get(s)}" v3="${t.get(l)}" />`;o.push(d)}}}else for(let n=0;n<t.size;n+=3){let r=`<triangle v1="${t.get(n)}" v2="${t.get(n+1)}" v3="${t.get(n+2)}" />`;o.push(r)}}function GC(e,o,t,i,n,r,a){a.has(o)||a.set(o,a.size+1);let s=a.get(o),l=e.name==="Map"?`${e.name} 0x${o}`:e.name,d={id:r,name:l,color:o,extruder:s,firstTriangleId:t,lastTriangleId:i};n.push(d)}function Px(e,o){return(e instanceof ro?[e.getX(o),e.getY(o),e.getZ(o)]:[e[o],e[o+1],e[o+2]]).map(i=>Math.round(i*255).toString(16).padStart(2,"0")).join("")}var Vx=(()=>{class e{constructor(){this.isPrintMeshLoaded=$.required(),this.download3MF=Ce(),this.downloadSTL=Ce()}handleDownload3MF(){this.download3MF.emit()}handleDownloadSTL(){this.downloadSTL.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-export-actions"]],inputs:{isPrintMeshLoaded:[1,"isPrintMeshLoaded"]},outputs:{download3MF:"download3MF",downloadSTL:"downloadSTL"},decls:7,vars:2,consts:[[1,"flex","gap-2"],["title","Download 3MF Button",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-download"],["title","Download STL Button",1,"btn","btn-outline",3,"click","disabled"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.handleDownload3MF()}),ue(2,"i",2),f(3," Download 3MF "),y(),w(4,"button",3),K("click",function(){return n.handleDownloadSTL()}),ue(5,"i",2),f(6," Download minimal STL "),y()()),i&2&&(m(),le("disabled",!n.isPrintMeshLoaded()),m(3),le("disabled",!n.isPrintMeshLoaded()))},encapsulation:2,changeDetection:0})}}return e})();var Wx=(()=>{class e{constructor(){this.frontText=$(""),this.textChanged=Ce()}handleInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-front-text-input"]],inputs:{frontText:[1,"frontText"]},outputs:{textChanged:"textChanged"},decls:5,vars:1,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["type","text","placeholder","CodeCharta","data-testid","frontText",1,"input","input-bordered","w-full",3,"input","value"]],template:function(i,n){i&1&&(w(0,"label",0)(1,"div",1)(2,"span",2),f(3,"Bottom center label text"),y()(),w(4,"input",3),K("input",function(a){return n.handleInput(a)}),y()()),i&2&&(m(4),le("value",n.frontText()))},encapsulation:2,changeDetection:0})}}return e})();var XC=["fileInput"];function KC(e,o){if(e&1){let t=xe();v(0,"div",5)(1,"button",6),W("click",function(){ae(t);let n=D();return se(n.handleRemoveLogo())}),F(2,"i",7),f(3," Remove "),b(),v(4,"button",8),W("click",function(){ae(t);let n=D();return se(n.handleRotateLogo())}),F(5,"i",9),f(6," Rotate "),b(),v(7,"button",10),W("click",function(){ae(t);let n=D();return se(n.handleFlipLogo())}),F(8,"i",11),f(9," Flip "),b()(),v(10,"div",12)(11,"cc-inline-color-picker",13),W("colorChange",function(n){ae(t);let r=D();return se(r.handleColorChange(n))}),b(),v(12,"span",14),f(13,"Color"),b()()}if(e&2){let t=D();m(11),L("hexColor",t.logoColor())}}var Ox=(()=>{class e{constructor(){this.fileInput=je.required("fileInput"),this.isFileSelected=$.required(),this.logoColor=$("#ffffff"),this.fileSelected=Ce(),this.logoRemoved=Ce(),this.logoRotated=Ce(),this.logoFlipped=Ce(),this.colorChanged=Ce()}handleFileSelected(t){let n=t.target.files?.[0];n&&this.fileSelected.emit(n)}handleRemoveLogo(){this.fileInput().nativeElement.value="",this.logoRemoved.emit()}handleRotateLogo(){this.logoRotated.emit()}handleFlipLogo(){this.logoFlipped.emit()}handleColorChange(t){this.colorChanged.emit(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-logo-upload"]],viewQuery:function(i,n){i&1&&it(n.fileInput,XC,5),i&2&&ot()},inputs:{isFileSelected:[1,"isFileSelected"],logoColor:[1,"logoColor"]},outputs:{fileSelected:"fileSelected",logoRemoved:"logoRemoved",logoRotated:"logoRotated",logoFlipped:"logoFlipped",colorChanged:"colorChanged"},decls:7,vars:1,consts:[["fileInput",""],[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","file","accept",".svg",1,"file-input","file-input-bordered","file-input-sm","w-full",3,"change"],[1,"flex","flex-wrap","gap-2","mt-2"],["title","Remove Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-times"],["title","Rotate Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-rotate-right"],["title","Flip Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-arrows-h"],[1,"flex","items-center","gap-2","mt-2"],["ariaLabel","Logo color",3,"colorChange","hexColor"],[1,"text-sm"]],template:function(i,n){i&1&&(v(0,"div",1)(1,"div",2)(2,"h3",3),f(3,"Bottom left logo (SVG)"),b(),v(4,"input",4,0),W("change",function(a){return n.handleFileSelected(a)}),b(),O(6,KC,14,1),b()()),i&2&&(m(6),z(n.isFileSelected()?6:-1))},dependencies:[ho],encapsulation:2,changeDetection:0})}}return e})();var QC=(e,o)=>o.name;function YC(e,o){if(e&1&&(w(0,"option",4),f(1),y()),e&2){let t=o.$implicit,i=D();le("selected",t.name===i.selectedPrinter().name),m(),Zh(" ",t.name," (",t.x/10,"\xD7",t.y/10,"\xD7",t.z/10,"cm, ",t.numberOfColors," colors) ")}}var Ih=[{name:"Prusa MK3S (single color)",x:245,y:205,z:205,numberOfColors:1},{name:"BambuLab A1 + AMS Lite",x:251,y:251,z:251,numberOfColors:4},{name:"Prusa XL (5 colors)",x:355,y:335,z:355,numberOfColors:5}],zx=(()=>{class e{constructor(){this.selectedPrinter=$.required(),this.printerChanged=Ce(),this.printers=Ih}handlePrinterChange(t){let i=t.target,n=this.printers[i.selectedIndex];this.printerChanged.emit(n)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-printer-preset-selection"]],inputs:{selectedPrinter:[1,"selectedPrinter"]},outputs:{printerChanged:"printerChanged"},decls:7,vars:0,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["data-testid","selectPrinter",1,"select","select-bordered","w-full",3,"change"],["data-testid","selectedPrinter",3,"selected"]],template:function(i,n){i&1&&(w(0,"label",0)(1,"div",1)(2,"span",2),f(3,"Printer preset"),y()(),w(4,"select",3),K("change",function(a){return n.handlePrinterChange(a)}),Ae(5,YC,2,6,"option",4,QC),y()()),i&2&&(m(5),Le(n.printers))},encapsulation:2,changeDetection:0})}}return e})();function ZC(e,o){if(e&1){let t=xe();w(0,"input",7),K("input",function(n){ae(t);let r=D();return se(r.handleTextInput(n))}),y()}if(e&2){let t=D();le("value",t.currentText())}}var $x=(()=>{class e{constructor(){this.isVisible=$.required(),this.currentText=$(""),this.visibilityChanged=Ce(),this.textChanged=Ce()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-qr-code-settings"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","qrCodeToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1)(2,"h3",2),f(3,"QR-Code"),y(),w(4,"label",3)(5,"input",4),K("change",function(a){return n.handleToggleChange(a)}),y(),w(6,"span",5),f(7,"Show QR-Code"),y()(),O(8,ZC,1,1,"input",6),y()()),i&2&&(m(5),le("checked",n.isVisible()),m(3),z(n.isVisible()?8:-1))},encapsulation:2,changeDetection:0})}}return e})();var jx=(()=>{class e{constructor(){this.currentSize=$.required(),this.wantedWidth=$.required(),this.maxWidth=$.required(),this.selectedPrinter=$.required(),this.widthChanged=Ce()}handleSliderChange(t){let i=t.target;this.widthChanged.emit(Number(i.value))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scale-slider"]],inputs:{currentSize:[1,"currentSize"],wantedWidth:[1,"wantedWidth"],maxWidth:[1,"maxWidth"],selectedPrinter:[1,"selectedPrinter"]},outputs:{widthChanged:"widthChanged"},decls:12,vars:9,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","range","data-testid","onScaleChange",1,"range","range-primary","range-sm",3,"change","min","max","value"],["data-testid","printSizeOverview",1,"text-sm","mt-2"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1)(2,"h3",2),f(3,"Scale"),y(),w(4,"input",3),K("change",function(a){return n.handleSliderChange(a)}),y(),w(5,"div",4)(6,"div"),f(7),y(),w(8,"div"),f(9),y(),w(10,"div"),f(11),y()()()()),i&2&&(m(4),le("min",100)("max",n.maxWidth())("value",n.wantedWidth()),m(3),Yi("Width: ",(n.currentSize().x/10).toFixed(1),"cm (max. ",(n.selectedPrinter().x/10).toFixed(1),")"),m(2),Yi("Depth: ",(n.currentSize().y/10).toFixed(1),"cm (max. ",(n.selectedPrinter().y/10).toFixed(1),")"),m(2),Yi("Height: ",(n.currentSize().z/10).toFixed(1),"cm (max. ",(n.selectedPrinter().z/10).toFixed(1),")"))},encapsulation:2,changeDetection:0})}}return e})();function JC(e,o){if(e&1){let t=xe();w(0,"input",7),K("input",function(n){ae(t);let r=D();return se(r.handleTextInput(n))}),y()}if(e&2){let t=D();le("value",t.currentText())}}var Hx=(()=>{class e{constructor(){this.isVisible=$.required(),this.currentText=$(""),this.visibilityChanged=Ce(),this.textChanged=Ce()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-second-row-text-input"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","secondRowToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1)(2,"h3",2),f(3,"Second row center text"),y(),w(4,"label",3)(5,"input",4),K("change",function(a){return n.handleToggleChange(a)}),y(),w(6,"span",5),f(7,"Show second row text"),y()(),O(8,JC,1,1,"input",6),y()()),i&2&&(m(5),le("checked",n.isVisible()),m(3),z(n.isVisible()?8:-1))},encapsulation:2,changeDetection:0})}}return e})();var Ux=(()=>{class e{constructor(t,i,n,r,a){this.mapStateReadWindow=t,this.metricsLensSourceReadWindow=i,this.sharedViewReadWindow=n,this.fileStoreReadWindow=r,this.ccStateSnapshot=a}getAreaMetric(){return this.mapStateReadWindow.getAreaMetric()}getHeightMetric(){return this.mapStateReadWindow.getHeightMetric()}getColorMetric(){return this.mapStateReadWindow.getColorMetric()}getColorRange(){return this.mapStateReadWindow.getColorRange()}getAttributeDescriptors(){return this.metricsLensSourceReadWindow.getAttributeDescriptors()}getNodeMetricData(){return so(this.ccStateSnapshot.get())}getBlacklist(){return this.sharedViewReadWindow.getBlacklist()}getFiles(){return this.fileStoreReadWindow.getFiles()}getAccumulatedFileName(){return Et(this.ccStateSnapshot.get()).unifiedFileMeta?.fileName}static{this.\u0275fac=function(i){return new(i||e)(M(ve),M(xs),M(Bt),M(Te),M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var tM=["dialog"],iM=["rendererContainer"],Rh=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.dialog=je.required("dialog"),this.rendererContainer=je.required("rendererContainer"),this.closed=Ce(),this.currentSize=be(new Qe),this.isPrintMeshLoaded=be(!1),this.frontText=be(""),this.logoColor=be("#ffffff"),this.isFileSelected=be(!1),this.secondRowVisible=be(!1),this.secondRowText=be(new Date().toLocaleDateString()),this.qrCodeVisible=be(!1),this.qrCodeText=be("maibornwolff.de/service/it-sanierung"),this.selectedPrinter=be(Ih[2]),this.maxWidth=be(0),this.wantedWidth=be(0),this.layerHeight=.2,this.frontTextSize=8,this.secondRowTextSize=6,this.frontPrintDepth=.6,this.mapSideOffset=10,this.baseplateHeight=1,this.logoSize=10,this.primaryShaderMaterialIndex=0,this.exportMesh=this.threeSceneService.getMapMesh().toExportMesh();let n=Sh(new Qe(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.maxWidth.set(n),this.wantedWidth.set(n),this.currentSize.update(a=>(a.x=n,a)),this.currentNumberOfColors=this.selectedPrinter().numberOfColors,this.areaMetric=this.stateAccessStore.getAreaMetric(),this.heightMetric=this.stateAccessStore.getHeightMetric(),this.colorMetric=this.stateAccessStore.getColorMetric();let r=this.stateAccessStore.getNodeMetricData();this.nodeMetricData=r.filter(a=>a.name===this.areaMetric||a.name===this.heightMetric||a.name===this.colorMetric)}async ngAfterViewInit(){let t=this.dialog().nativeElement;t.addEventListener("close",()=>this.closed.emit()),t.showModal(),await this.createScene(),this.isPrintMeshLoaded.set(!0)}close(){this.dialog().nativeElement.close()}handleScaleChange(t){this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize())}handleFrontTextChange(t){this.frontText.set(t),this.previewMesh.updateFrontText(t)}handleFileSelected(t){this.isFileSelected.set(!0);let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{this.previewMesh.addCustomLogo(i.result)}}handleRotateLogo(){this.previewMesh.rotateCustomLogo()}handleFlipLogo(){this.previewMesh.flipCustomLogo()}handleRemoveLogo(){this.isFileSelected.set(!1),this.previewMesh.removeCustomLogo()}handlePrinterChange(t){this.selectedPrinter.set(t);let i=t.numberOfColors;this.currentNumberOfColors!==i&&(this.previewMesh.updateNumberOfColors(i),this.currentNumberOfColors=i),this.makeMapMaxSize(),this.updateCameraPosition(this.printPreviewScene.getObjectByName("camera"))}handleLogoColorChange(t){this.logoColor.set(t),this.previewMesh.updateCustomLogoColor(t)}handleQrCodeTextChange(t){this.qrCodeText.set(t),this.previewMesh.updateQrCodeText(t),this.previewMesh.updateQrCodeVisibility(this.qrCodeVisible())}handleQrCodeVisibilityChange(t){this.qrCodeVisible.set(t),this.previewMesh.updateQrCodeVisibility(t)}handleSecondRowTextChange(t){this.secondRowText.set(t),this.previewMesh.updateSecondRowText(t),this.previewMesh.updateSecondRowVisibility(this.secondRowVisible())}handleSecondRowVisibilityChange(t){this.secondRowVisible.set(t),this.previewMesh.updateSecondRowVisibility(t)}async createScene(){let t=new cs;t.name="printPreviewScene",this.printPreviewScene=t,t.background=new On(15527388);let i=this.threeSceneService.scene.clone().children[3];i.name="lights",t.add(i);let n=new ls(45,1.15,50,2e5);n.name="camera",n.up=new Qe(0,0,1),t.add(n),this.initRenderer(t,n),this.previewMesh=new $c(this.initGeometryOptions()),await this.previewMesh.initialize(),this.currentSize.set(this.previewMesh.getSize()),t.add(this.previewMesh.getThreeMesh()),this.updateCameraPosition(n)}initRenderer(t,i){let n=this.getGL(),r=this.rendererContainer().nativeElement,a=r.offsetWidth||600,s=r.offsetHeight||450;n.setSize(a,s,!0),r.appendChild(n.domElement);let l=new Cs(i,n.domElement),d=function(){requestAnimationFrame(d),l.update(),n.render(t,i)};d()}getGL(){return new fs}updateCameraPosition(t){let i=this.currentSize();t.position.set(-i.x*.2,-i.y*1.2,i.z*3)}async handleDownload3MF(){let t=await Nx(this.printPreviewScene.getObjectByName("PrintMesh"));this.downloadFile(t,"3mf")}makeMapMaxSize(){let t=Sh(new Qe(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize()),this.maxWidth.set(this.currentSize().x)}handleDownloadSTL(){let t=new cc().parse(this.previewMesh.getMapMesh(),{binary:!0});this.downloadFile(t,"stl")}initGeometryOptions(){let t=this.stateAccessStore.getAttributeDescriptors(),i=hr,n=t[this.areaMetric]?.title||i.get(this.areaMetric),r=t[this.heightMetric]?.title||i.get(this.heightMetric),a=t[this.colorMetric]?.title||i.get(this.colorMetric);return{originalMapMesh:this.exportMesh,width:this.wantedWidth(),areaMetricTitle:n,areaMetricData:this.nodeMetricData.find(s=>s.name===this.areaMetric),heightMetricTitle:r,heightMetricData:this.nodeMetricData.find(s=>s.name===this.heightMetric),colorMetricTitle:a,colorMetricData:this.nodeMetricData.find(s=>s.name===this.colorMetric),colorRange:this.stateAccessStore.getColorRange(),frontText:this.frontText(),secondRowText:this.secondRowText(),secondRowVisible:this.secondRowVisible(),qrCodeText:this.qrCodeText(),defaultMaterial:this.exportMesh.material[this.primaryShaderMaterialIndex].clone(),numberOfColors:this.currentNumberOfColors,layerHeight:this.layerHeight,frontTextSize:this.frontTextSize,secondRowTextSize:this.secondRowTextSize,printHeight:this.frontPrintDepth,mapSideOffset:this.mapSideOffset,baseplateHeight:this.baseplateHeight,logoSize:this.logoSize}}downloadFile(t,i){let n=this.stateAccessStore.getFiles(),r=this.stateAccessStore.getAccumulatedFileName(),a=`${bs.getNewFileName(r,Ai(n))}.${i}`;Cr.downloadData(t,a)}static{this.\u0275fac=function(i){return new(i||e)(te(Ux),te(ft))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-export-3D-map-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialog,tM,5)(n.rendererContainer,iM,5),i&2&&ot(2)},outputs:{closed:"closed"},decls:27,vars:13,consts:[["dialog",""],["rendererContainer",""],[1,"modal"],[1,"modal-box","max-w-6xl","w-11/12"],[1,"text-2xl","font-bold","mb-6"],[1,"flex","gap-6"],[1,"flex","flex-col","gap-4","w-1/3","min-w-72"],[3,"printerChanged","selectedPrinter"],[3,"widthChanged","currentSize","wantedWidth","maxWidth","selectedPrinter"],[3,"textChanged","frontText"],[3,"visibilityChanged","textChanged","isVisible","currentText"],[3,"fileSelected","logoRemoved","logoRotated","logoFlipped","colorChanged","isFileSelected","logoColor"],[1,"flex-1"],[1,"card","bg-base-200","h-full"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"w-full","min-h-96"],[1,"modal-action"],[3,"download3MF","downloadSTL","isPrintMeshLoaded"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"]],template:function(i,n){i&1&&(v(0,"dialog",2,0)(2,"div",3)(3,"h2",4),f(4,"3D Print CodeCharta Map"),b(),v(5,"div",5)(6,"div",6)(7,"cc-printer-preset-selection",7),W("printerChanged",function(a){return n.handlePrinterChange(a)}),b(),v(8,"cc-scale-slider",8),W("widthChanged",function(a){return n.handleScaleChange(a)}),b(),v(9,"cc-front-text-input",9),W("textChanged",function(a){return n.handleFrontTextChange(a)}),b(),v(10,"cc-second-row-text-input",10),W("visibilityChanged",function(a){return n.handleSecondRowVisibilityChange(a)})("textChanged",function(a){return n.handleSecondRowTextChange(a)}),b(),v(11,"cc-qr-code-settings",10),W("visibilityChanged",function(a){return n.handleQrCodeVisibilityChange(a)})("textChanged",function(a){return n.handleQrCodeTextChange(a)}),b(),v(12,"cc-logo-upload",11),W("fileSelected",function(a){return n.handleFileSelected(a)})("logoRemoved",function(){return n.handleRemoveLogo()})("logoRotated",function(){return n.handleRotateLogo()})("logoFlipped",function(){return n.handleFlipLogo()})("colorChanged",function(a){return n.handleLogoColorChange(a)}),b()(),v(13,"div",12)(14,"div",13)(15,"div",14)(16,"h3",15),f(17,"Preview"),b(),F(18,"div",16,1),b()()()(),v(20,"div",17)(21,"cc-export-actions",18),W("download3MF",function(){return n.handleDownload3MF()})("downloadSTL",function(){return n.handleDownloadSTL()}),b(),v(22,"button",19),W("click",function(){return n.close()}),f(23,"Close"),b()()(),v(24,"form",20)(25,"button"),f(26,"close"),b()()()),i&2&&(m(7),L("selectedPrinter",n.selectedPrinter()),m(),L("currentSize",n.currentSize())("wantedWidth",n.wantedWidth())("maxWidth",n.maxWidth())("selectedPrinter",n.selectedPrinter()),m(),L("frontText",n.frontText()),m(),L("isVisible",n.secondRowVisible())("currentText",n.secondRowText()),m(),L("isVisible",n.qrCodeVisible())("currentText",n.qrCodeText()),m(),L("isFileSelected",n.isFileSelected())("logoColor",n.logoColor()),m(9),L("isPrintMeshLoaded",n.isPrintMeshLoaded()))},dependencies:[zx,jx,Wx,Hx,$x,Ox,Vx],encapsulation:2,changeDetection:0})}}return e})();var Gx=(()=>{class e{constructor(t,i){this.store=t,this.mapStateReadWindow=i,this.colorMode$=this.store.select(Xp)}getColorMode(){return this.mapStateReadWindow.getColorMode()}setAbsoluteColorMode(){this.store.dispatch(oo({value:Do.absolute}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(ve))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var qa=(()=>{class e{constructor(){this.colorModeStore=q(Gx),this.errorDialogService=q(Ga),this.activeViewStore=q(rr),this.viewReadinessStore=q(or),this.threeRendererService=q(kt),this.router=q(un),this.dialogOpen=be(!1),this.isDialogOpen=this.dialogOpen.asReadonly()}requestExport(){if(this.activeViewStore.currentView()!=="metrics"){this.errorDialogService.open(this.buildSwitchToMetricsViewDialog());return}if(this.colorModeStore.getColorMode()===Do.absolute){this.dialogOpen.set(!0);return}this.errorDialogService.open(this.buildWrongColorModeDialog())}closeDialog(){this.dialogOpen.set(!1)}buildSwitchToMetricsViewDialog(){return{title:"3D export needs the Metric view",message:'<p>The 3D export builds on the rendered map, so it only works in the <strong>Metric view</strong>.<br><i class="fa fa-info-circle"></i> Use "Switch and continue" to open the Metric view and go straight to the export.<p>',resolveErrorData:{buttonText:"Switch and continue",onResolveErrorClick:()=>{this.switchToMetricsViewAndExport()}},dismissButtonText:"Stay here"}}async switchToMetricsViewAndExport(){await this.router.navigateByUrl(ki.metrics)&&this.viewReadinessStore.isStale$("metrics").pipe(Re(i=>!i),ut(1)).subscribe(()=>this.requestExport())}buildWrongColorModeDialog(){return{title:"Map could not be exported",message:'<p>3D map can only be exported when <strong>color mode</strong> is set to <strong>absolute</strong>.<br><i class="fa fa-info-circle"></i> You can change this under Color Metric Options or use "Change and continue" to directly change the color mode and continue.<p>',resolveErrorData:{buttonText:"Change and continue",onResolveErrorClick:()=>this.recolorTheMapAndExportIt()}}}recolorTheMapAndExportIt(){this.threeRendererService.afterRender$.pipe(ut(1)).subscribe(()=>this.dialogOpen.set(!0)),this.colorModeStore.setAbsoluteColorMode()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ir=(()=>{class e{transform(t){return bs.withoutCCExtension(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=Ki({name:"removeExtension",type:e,pure:!0})}}return e})();var Xx=(e,o)=>o.fileMeta.fileName;function oM(e,o){if(e&1){let t=xe();w(0,"li",9)(1,"button",10),K("click",function(){let n=ae(t).$implicit,r=D(2);return se(r.handleReferenceChange(n))}),w(2,"span",11),f(3),at(4,"removeExtension"),y()()()}if(e&2){let t=o.$implicit,i=D(2);m(),Ne("bg-base-200",i.isReferenceSelected(t))("font-bold",i.isReferenceSelected(t)),m(2),qe(fi(4,5,t.fileMeta.fileName))}}function nM(e,o){if(e&1&&(w(0,"div",5)(1,"ul",8),Ae(2,oM,5,7,"li",9,Xx),y()()),e&2){let t=D();m(2),Le(t.referenceOptions())}}function rM(e,o){if(e&1){let t=xe();w(0,"li",9)(1,"button",10),K("click",function(){let n=ae(t).$implicit,r=D(2);return se(r.handleComparisonChange(n))}),w(2,"span",11),f(3),at(4,"removeExtension"),y()()()}if(e&2){let t=o.$implicit,i=D(2);m(),Ne("bg-base-200",i.isComparisonSelected(t))("font-bold",i.isComparisonSelected(t)),m(2),qe(fi(4,5,t.fileMeta.fileName))}}function aM(e,o){if(e&1&&(w(0,"div",5)(1,"ul",8),Ae(2,rM,5,7,"li",9,Xx),y()()),e&2){let t=D();m(2),Le(t.comparisonOptions())}}var Kx=(()=>{class e{constructor(){this.fileStoreReadWindow=q(Te),this.navBarWriteStore=q(mr),this.elementRef=q(Lt),this.fileStates=R(this.fileStoreReadWindow.files$,{requireSync:!0}),this.referenceFile=R(this.fileStoreReadWindow.referenceFile$,{requireSync:!0}),this.openDropdown=be("none"),this.referenceLabel=X(()=>{let t=this.referenceFile();return t?this.withoutExtension(t.fileMeta.fileName):"select reference file"}),this.comparisonFile=X(()=>this.fileStates().find(t=>t.selectedAs===ii.Comparison)?.file),this.comparisonLabel=X(()=>{let t=this.comparisonFile();return t?this.withoutExtension(t.fileMeta.fileName):"select comparison file"}),this.referenceOptions=X(()=>this.fileStates().map(t=>t.file)),this.comparisonOptions=X(()=>this.fileStates().filter(t=>t.selectedAs!==ii.Reference).map(t=>t.file)),this.swapDisabled=X(()=>this.comparisonFile()===void 0)}handleDocumentClick(t){this.openDropdown()!=="none"&&t.target instanceof Node&&!this.elementRef.nativeElement.contains(t.target)&&this.openDropdown.set("none")}toggleDropdown(t){this.openDropdown.update(i=>i===t?"none":t)}handleReferenceChange(t){this.navBarWriteStore.setDeltaReference(t),this.openDropdown.set("none")}handleComparisonChange(t){this.navBarWriteStore.setDeltaComparison(t),this.openDropdown.set("none")}handleSwap(){this.swapDisabled()||this.navBarWriteStore.switchReferenceAndComparison()}isReferenceSelected(t){return this.referenceFile()?.fileMeta.fileName===t.fileMeta.fileName}isComparisonSelected(t){return this.comparisonFile()?.fileMeta.fileName===t.fileMeta.fileName}withoutExtension(t){return new Ir().transform(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-delta-selector"]],hostBindings:function(i,n){i&1&&W("click",function(a){return n.handleDocumentClick(a)},Ro)},decls:15,vars:9,consts:[[1,"flex","items-center","gap-1"],[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[12rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[12rem]","w-max","max-w-[24rem]","z-[70]","p-1"],["type","button","title","Switch reference and comparison file",1,"btn","btn-ghost","btn-sm","btn-square",3,"click","disabled"],[1,"fa","fa-arrows-h"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],["type","button",1,"flex","items-center","gap-2","w-full","text-left","rounded-md","px-2","py-1","hover:bg-base-200",3,"click"],[1,"flex-1","whitespace-nowrap"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1)(2,"button",2),K("click",function(){return n.toggleDropdown("reference")}),w(3,"span",3),f(4),y(),ue(5,"i",4),y(),O(6,nM,4,0,"div",5),y(),w(7,"button",6),K("click",function(){return n.handleSwap()}),ue(8,"i",7),y(),w(9,"div",1)(10,"button",2),K("click",function(){return n.toggleDropdown("comparison")}),w(11,"span",3),f(12),y(),ue(13,"i",4),y(),O(14,aM,4,0,"div",5),y()()),i&2&&(m(),Ne("dropdown-open",n.openDropdown()==="reference"),m(3),qe(n.referenceLabel()),m(2),z(n.openDropdown()==="reference"?6:-1),m(),le("disabled",n.swapDisabled()),m(2),Ne("dropdown-open",n.openDropdown()==="comparison"),m(3),qe(n.comparisonLabel()),m(2),z(n.openDropdown()==="comparison"?14:-1))},dependencies:[Ir],encapsulation:2,changeDetection:0})}}return e})();var sM=(e,o)=>o.file.fileMeta.fileName;function lM(e,o){e&1&&ue(0,"i",16)}function cM(e,o){e&1&&ue(0,"i",17)}function dM(e,o){if(e&1){let t=xe();w(0,"li",8)(1,"label",12)(2,"input",13),K("change",function(n){let r=ae(t).$implicit,a=D(2);return se(a.handleCheckboxChange(r.file,n.target.checked))}),y(),w(3,"span",14),f(4),at(5,"removeExtension"),y(),w(6,"button",15),K("click",function(n){let r=ae(t).$implicit,a=D(2);return se(a.handleRemoveFileToggle(r.file,n))}),O(7,lM,1,0,"i",16)(8,cM,1,0,"i",17),y()()()}if(e&2){let t=o.$implicit,i=D(2);m(2),le("checked",i.isFileSelected(t.file))("disabled",t.isRemoved),m(),Ne("line-through",t.isRemoved),m(),he(" ",fi(5,7,t.file.fileMeta.fileName)," "),m(2),le("title",t.isRemoved?"Undo remove map":"Remove map"),m(),z(t.isRemoved?7:8)}}function mM(e,o){if(e&1){let t=xe();w(0,"div",4)(1,"div",5)(2,"button",6),K("click",function(){ae(t);let n=D();return se(n.handleSelectAll())}),f(3,"All"),y(),w(4,"button",6),K("click",function(){ae(t);let n=D();return se(n.handleSelectNone())}),f(5,"None"),y(),w(6,"button",6),K("click",function(){ae(t);let n=D();return se(n.handleSelectInvert())}),f(7,"Invert"),y()(),w(8,"ul",7),Ae(9,dM,9,9,"li",8,sM),y(),w(11,"div",9)(12,"span",10)(13,"button",11),K("click",function(){ae(t);let n=D();return se(n.handleApply())}),f(14," Apply "),y()()()()}if(e&2){let t=D();m(9),Le(t.filesInUI()),m(3),Ne("tooltip-disabled",!t.applyButtonState().disabled),rt("data-tip",t.applyButtonState().tooltip||null),m(),le("disabled",t.applyButtonState().disabled)}}var Qx=(()=>{class e{constructor(){this.fileStoreReadWindow=q(Te),this.navBarWriteStore=q(mr),this.elementRef=q(Lt),this.filesInStore=R(this.fileStoreReadWindow.files$,{requireSync:!0}),this.isOpen=be(!1),this.filesInUI=be([]),this.selectedFilesInUI=be([]),this.triggerLabel=X(()=>{let t=this.selectedFilesInStore();return t.length===0?"Select map":t.length===1?this.withoutExtension(t[0].fileMeta.fileName):`${this.withoutExtension(t[0].fileMeta.fileName)} +${t.length-1}`}),this.applyButtonState=X(()=>this.selectedFilesInUI().length===0?{disabled:!0,tooltip:"Select at least one map"}:this.uiSelectionDiffersFromStore()?{disabled:!1,tooltip:""}:{disabled:!0,tooltip:"No changes to apply"}),this.syncFromStore(this.filesInStore())}handleDocumentClick(t){if(!this.isOpen())return;let i=t.target;this.elementRef.nativeElement.contains(i)||this.closeWithoutApplying()}toggleOpen(){this.isOpen()?this.closeWithoutApplying():(this.syncFromStore(this.filesInStore()),this.isOpen.set(!0))}handleCheckboxChange(t,i){let n=this.selectedFilesInUI();i?(n.includes(t)||this.selectedFilesInUI.set([...n,t]),this.filesInUI.update(r=>r.map(a=>a.file===t?{file:a.file,isRemoved:!1}:a))):this.selectedFilesInUI.set(n.filter(r=>r!==t))}handleRemoveFileToggle(t,i){i.stopPropagation(),i.preventDefault(),this.filesInUI.update(n=>n.map(r=>r.file.fileMeta.fileName===t.fileMeta.fileName?{file:r.file,isRemoved:!r.isRemoved}:r)),this.selectedFilesInUI.update(n=>n.filter(r=>r.fileMeta.fileName!==t.fileMeta.fileName))}handleSelectAll(){this.selectedFilesInUI.set(this.filesInUI().filter(t=>!t.isRemoved).map(t=>t.file))}handleSelectNone(){this.selectedFilesInUI.set([])}handleSelectInvert(){let t=this.filesInUI().filter(n=>!n.isRemoved);if(t.length===0)return;let i=this.selectedFilesInUI();i.length===0?this.selectedFilesInUI.set(t.map(n=>n.file)):i.length===t.length?this.selectedFilesInUI.set([]):this.selectedFilesInUI.set(t.filter(n=>!i.includes(n.file)).map(n=>n.file))}handleApply(){let t=this.filesInUI().filter(i=>i.isRemoved).map(i=>i.file.fileMeta.fileName);this.navBarWriteStore.setStandard(this.selectedFilesInUI()),this.navBarWriteStore.removeFiles(t),this.isOpen.set(!1)}closeWithoutApplying(){this.syncFromStore(this.filesInStore()),this.isOpen.set(!1)}syncFromStore(t){this.filesInUI.set(t.map(i=>({file:i.file,isRemoved:!1}))),this.selectedFilesInUI.set(t.filter(i=>i.selectedAs===ii.Partial).map(i=>i.file))}selectedFilesInStore(){return this.filesInStore().filter(t=>t.selectedAs===ii.Partial).map(t=>t.file)}uiSelectionDiffersFromStore(){if(this.filesInUI().some(n=>n.isRemoved))return!0;let t=this.selectedFilesInStore(),i=this.selectedFilesInUI();return i.length!==t.length?!0:!i.every(n=>t.includes(n))}withoutExtension(t){return new Ir().transform(t)}isFileSelected(t){return this.selectedFilesInUI().includes(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-map-selector"]],hostBindings:function(i,n){i&1&&W("click",function(a){return n.handleDocumentClick(a)},Ro)},decls:6,vars:4,consts:[[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[14rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[14rem]","w-max","max-w-[32rem]","z-[70]","p-2"],[1,"flex","items-center","gap-1","px-1","pb-2","border-b","border-base-200"],["type","button",1,"btn","btn-ghost","btn-xs","flex-1",3,"click"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],[1,"flex","justify-end","mt-2"],[1,"tooltip"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],[1,"flex","items-center","gap-2","w-full","cursor-pointer","rounded-md","px-2","py-1","hover:bg-base-200"],["type","checkbox",1,"checkbox","checkbox-xs","shrink-0",3,"change","checked","disabled"],[1,"flex-1","whitespace-nowrap"],["type","button",1,"btn","btn-ghost","btn-xs","btn-square","shrink-0",3,"click","title"],[1,"fa","fa-undo"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.toggleOpen()}),w(2,"span",2),f(3),y(),ue(4,"i",3),y(),O(5,mM,15,4,"div",4),y()),i&2&&(Ne("dropdown-open",n.isOpen()),m(3),qe(n.triggerLabel()),m(2),z(n.isOpen()?5:-1))},dependencies:[Ir],encapsulation:2,changeDetection:0})}}return e})();var Yx=()=>{let e=document.createElement("INPUT");return e.setAttribute("type","file"),e.setAttribute("accept",".json,.gz"),e.setAttribute("multiple",""),e.style.display="none",document.body.appendChild(e),e};var ew=Da(ww());var Rr="base";function tw(e){let{gameObjectPositions:o,cycles:t=[]}=JSON.parse(e),i={checksum:"",data:{projectName:"GameObjects",fileChecksum:"",apiVersion:"1.3",nodes:[]}},n=[{name:Rr,type:Ft.FOLDER,attributes:{},children:[]}];hM(o);let r=o.find(s=>s.name==="root"),a=xM(r.scale);o.push(a);for(let s of o){let l=s.name.split(".");l[0]!==Rr&&iw(l,n[0].children,Rr,s,o,r)}return i.data.nodes=n,i.data.edges=t.map(s=>bM(s)),i.data.attributeTypes=vM(),i.checksum=(0,ew.default)(JSON.stringify(i.data)),i}function hM(e){for(let o of e)o.name.startsWith("root")||(o.name=o.name.startsWith(".")?`root${o.name}`:`root.${o.name}`)}function iw(e,o,t,i,n,r){if(e.length===0)return;let[a]=e,s={name:a,type:Zx(e)?Ft.FILE:Ft.FOLDER,attributes:{}};Zx(e)?s=uM(a,s,i):s.children=[],pM(o,a)?s=o.find(c=>c.name===a):o.push(s);let l=n.find(c=>c.name===t);s.fixedPosition=fM(s,l,i,r.name);let d=t===Rr?s.name:`${t}.${s.name}`;iw(e.slice(1),s.children,d,i,n,r)}function Zx(e){return e.length===1}function pM(e,o){return e.some(t=>t.name===o)}function uM(e,o,t){let i=Ee({},o);return i.attributes={height:t.scale.y},{name:e,type:Ft.FOLDER,attributes:{},children:[i]}}function fM(e,o,t,i){let n;if(e.type===Ft.FOLDER){let r=o.position.x-o.scale.x/2,a=o.position.z-o.scale.z/2,s=t.position.x-t.scale.x/2,l=t.position.z-t.scale.z/2,d=Uc((s-r)/o.scale.x*100,2),c=Uc((l-a)/o.scale.z*100,2),h=Uc(t.scale.z/o.scale.z*100,2),p=Uc(t.scale.x/o.scale.x*100,2);n={left:c,top:d,width:h,height:p}}return e.name===i&&(n=gM(n)),n}function Uc(e,o){let t=Math.pow(10,o);return Math.round(e*t)/t}function gM(e){let o=Ee({},e);return o.top=Math.floor(50-o.height/2),o.left=Math.floor(50-o.width/2),o}function Jx(e){let o=e.replaceAll(".","/"),i=e.split(".").slice(-1);return`/${Rr}/${o}/${i}`}function bM(e){return{fromNodeName:Jx(e.from),toNodeName:Jx(e.to),attributes:{coupling:100}}}function vM(){return{edges:{coupling:yp.relative}}}function xM(e){let o=Math.max(e.x,e.z);return{name:Rr,position:{x:0,y:0,z:0},scale:{x:o,y:0,z:o}}}var nw=Da(Sw());var ow={$id:"http://example.com/example.json",$schema:"http://json-schema.org/draft-07/schema",default:{},description:"This is the JSON Schema for the GameObjectsPositions structure",examples:[{gameObjectPositions:[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}},{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.TryCatchFinallyTest",position:{x:66,y:22.5,z:177.5},scale:{x:1,y:13,z:1}}],cycles:[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}]}],required:["gameObjectPositions"],title:"The root schema",type:"object",properties:{gameObjectPositions:{$id:"#/properties/gameObjectPositions",type:"array",title:"The gameObjectPositions schema",description:"Defines the position and scale of GameObjects",default:[],examples:[[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}},{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.SwitchCaseTest",position:{x:65,y:22,z:181},scale:{x:2,y:12,z:2}}]],additionalItems:!0,items:{$id:"#/properties/gameObjectPositions/items",anyOf:[{$id:"#/properties/gameObjectPositions/items/anyOf/0",type:"object",title:"The first anyOf schema",description:"Defines the properties of a GameObject",default:{},examples:[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}}],required:["name","position","scale"],properties:{name:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/name",type:"string",title:"The name schema",description:"An explanation about the purpose of this instance.",default:"",examples:["root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest"]},position:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position",type:"object",title:"The position schema",description:"The position in absolute values",default:{},examples:[{x:69,y:18.5,z:228.5}],required:["x","y","z"],properties:{x:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/x",type:"number",title:"The x schema",description:"x position",default:0,examples:[69]},y:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/y",type:"number",title:"The y schema",description:"y position",default:0,examples:[18.5]},z:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/z",type:"number",title:"The z schema",description:"z position",default:0,examples:[228.5]}},additionalProperties:!0},scale:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale",type:"object",title:"The scale schema",description:"The scale of GameObjects",default:{},examples:[{x:9,y:5,z:9}],required:["x","y","z"],properties:{x:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/x",type:"number",title:"The x schema",description:"x scale",default:0,examples:[9]},y:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/y",type:"number",title:"The y schema",description:"y scale",default:0,examples:[5]},z:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/z",type:"number",title:"The z schema",description:"z scale",default:0,examples:[9]}},additionalProperties:!0}},additionalProperties:!0}]}},cycles:{$id:"#/properties/cycles",type:"array",title:"The cycles schema",description:"Defines the cycles between GameObjects",default:[],examples:[[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}]],additionalItems:!0,items:{$id:"#/properties/cycles/items",anyOf:[{$id:"#/properties/cycles/items/anyOf/0",type:"object",title:"The first anyOf schema",description:"A cycle between two GameObjects",default:{},examples:[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}],required:["from","to"],properties:{from:{$id:"#/properties/cycles/items/anyOf/0/properties/from",type:"string",title:"The from schema",description:"from GameObject",default:"",examples:["root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser"]},to:{$id:"#/properties/cycles/items/anyOf/0/properties/to",type:"string",title:"The to schema",description:"to GameObject",default:"",examples:["root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"]}},additionalProperties:!0}]}}},additionalProperties:!0};function rw(e){return new nw.default({allErrors:!0,strict:!1}).validate(ow,JSON.parse(e))}var aw=e=>{let o=[];for(let t of e)o.push(SM(t));return o},SM=async e=>new Promise(o=>{let t=e.name.endsWith(".gz"),i=new FileReader;t?i.readAsArrayBuffer(e):i.readAsText(e,"utf8");let n;i.onload=r=>{let a=r.target.result.toString();n=t?zp(r.target.result,{to:"string"}):a,a.includes("gameObjectPositions")&&rw(a)&&(n=JSON.stringify(tw(a)))},i.onloadend=()=>{o(n)}});var sw=(()=>{class e{constructor(t){this.loadFilesUseCase=t}uploadFiles(){let t=Yx();t.addEventListener("change",()=>{this.uploadFilesOnEvent(t),t.remove()}),t.addEventListener("cancel",()=>t.remove()),t.click()}async uploadFilesOnEvent(t){if(!t.files||t.files.length===0)return;let i=t.files;await this.loadFilesUseCase.loadFromUpload(()=>this.readNameDataPairs(i))}async readNameDataPairs(t){return(await Promise.all(aw(t))).map((n,r)=>({fileName:t[r].name,fileSize:t[r].size,content:Tp(n)}))}static{this.\u0275fac=function(i){return new(i||e)(M(Fs))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var lw=(()=>{class e{constructor(){this.uploadFilesService=q(sw)}uploadFiles(){this.uploadFilesService.uploadFiles()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-nav-bar-folder-button"]],decls:2,vars:0,consts:[["type","button","title","Load cc.json files",1,"btn","btn-ghost","btn-square",3,"click"],[1,"fa","fa-folder-open","text-lg"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.uploadFiles()}),ue(1,"i",1),y())},encapsulation:2,changeDetection:0})}}return e})();var cw=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-nav-bar-logo"]],decls:2,vars:0,consts:[["href","https://codecharta.com/","target","_blank","rel","noopener noreferrer","title","CodeCharta website",1,"flex","items-center","px-2"],["src","codeCharta/assets/codecharta_logo.svg","alt","CodeCharta",1,"h-8","w-auto"]],template:function(i,n){i&1&&(w(0,"a",0),ue(1,"img",1),y())},encapsulation:2,changeDetection:0})}}return e})();var CM=["configDialog"],dw=(()=>{class e{constructor(){this.dialog=je.required("configDialog")}showSettings(){this.dialog().open()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-settings-button"]],viewQuery:function(i,n){i&1&&it(n.dialog,CM,5),i&2&&ot()},decls:4,vars:0,consts:[["configDialog",""],["type","button","title","Global Configuration",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(v(0,"button",1),W("click",function(){return n.showSettings()}),f(1,` Settings
3525
- `),b(),F(2,"cc-global-configuration-dialog",null,0))},dependencies:[Hf],encapsulation:2,changeDetection:0})}}return e})();var mw=(()=>{class e{constructor(){this.store=q(me),this.isDomainViewAvailable=R(this.store.select(Qf),{initialValue:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function MM(e,o){e&1&&ue(0,"span",2)}function _M(e,o){e&1&&ue(0,"span",2)}var hw=(()=>{class e{constructor(){this.fileStoreReadWindow=q(Te),this.fileSelectionModeService=q(il),this.router=q(un),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0})}selectExplore(){this.showMetricsView(),this.isDeltaState()&&this.fileSelectionModeService.toggle()}selectCompare(){this.showMetricsView(),this.isDeltaState()||this.fileSelectionModeService.toggle()}showMetricsView(){this.router.navigateByUrl(ki.metrics)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-mode-toggle"]],decls:7,vars:8,consts:[["role","tablist",1,"flex","items-center","gap-1"],["type","button","role","tab",1,"btn","btn-ghost","btn-sm","relative",3,"click"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.selectExplore()}),f(2," Explore "),O(3,MM,1,0,"span",2),y(),w(4,"button",1),K("click",function(){return n.selectCompare()}),f(5," Compare "),O(6,_M,1,0,"span",2),y()()),i&2&&(m(),Ne("font-bold",!n.isDeltaState()),rt("aria-selected",!n.isDeltaState()),m(2),z(n.isDeltaState()?-1:3),m(),Ne("font-bold",n.isDeltaState()),rt("aria-selected",n.isDeltaState()),m(2),z(n.isDeltaState()?6:-1))},encapsulation:2,changeDetection:0})}}return e})();var pw=(()=>{class e{constructor(){this.export3DMapDialogStore=q(qa)}export3DMap(){this.export3DMapDialogStore.requestExport()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-print-3d-button"]],decls:2,vars:0,consts:[["type","button","title","Download 3MF code file",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.export3DMap()}),f(1,` 3D Print
3526
- `),y())},encapsulation:2,changeDetection:0})}}return e})();function EM(e,o){e&1&&F(0,"cc-mode-toggle")(1,"cc-print-3d-button")}function kM(e,o){e&1&&F(0,"span",3)}function qM(e,o){if(e&1&&(v(0,"a",2,0),f(2," Explore "),O(3,kM,1,0,"span",3),b()),e&2){let t=Lr(1),i=D();L("routerLink",i.routeLinks.domain),m(3),z(t.isActive?3:-1)}}var TM={metrics:"Metric modes",domain:"Domain modes"},uw=(()=>{class e{constructor(){this.view=$.required(),this.routeLinks=ki,this.groupLabel=X(()=>TM[this.view()])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-view-mode-bar"]],hostAttrs:[1,"block"],inputs:{view:[1,"view"]},decls:3,vars:2,consts:[["domainExplore","routerLinkActive"],[1,"flex","items-center","justify-center","gap-1","py-0.5","border-0","m-0","px-0","min-w-0"],["routerLinkActive","font-bold","data-testid","view-mode-domain-explore",1,"btn","btn-ghost","btn-sm","relative",3,"routerLink"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(v(0,"fieldset",1),O(1,EM,2,0)(2,qM,4,2,"a",2),b()),i&2&&(rt("aria-label",n.groupLabel()),m(),z(n.view()==="metrics"?1:2))},dependencies:[hw,pw,za,$a],encapsulation:2,changeDetection:0})}}return e})();var IM=()=>({exact:!0});function RM(e,o){e&1&&F(0,"span",5)}function DM(e,o){e&1&&F(0,"span",5)}function AM(e,o){if(e&1){let t=xe();v(0,"a",9,1),W("mouseenter",function(){ae(t);let n=D();return se(n.openModeBar("domain"))})("focusin",function(){ae(t);let n=D();return se(n.openModeBar("domain"))}),f(2," Domain "),O(3,DM,1,0,"span",5),b()}if(e&2){let t=Lr(1),i=D();Ne("font-bold",t.isActive),L("routerLink",i.routeLinks.domain),m(3),z(t.isActive?3:-1)}}function LM(e,o){if(e&1){let t=xe();v(0,"div",10),W("mouseenter",function(){ae(t);let n=D();return se(n.cancelPendingClose())})("mouseleave",function(){ae(t);let n=D();return se(n.scheduleClosingModeBar())}),F(1,"cc-view-mode-bar",11),b()}e&2&&(m(),L("view",o))}function FM(e,o){if(e&1){let t=xe();v(0,"span",12),W("mouseenter",function(){ae(t);let n=D();return se(n.openModeBar(n.activeView()))}),Io(),v(1,"svg",13),F(2,"path",14),b()()}}var PM=200,fw=(()=>{class e{constructor(){this.readStore=q(mw),this.hostElement=q(Lt),this.isDomainViewAvailable=this.readStore.isDomainViewAvailable,this.activeView=R(q(rr).activeView$,{requireSync:!0}),this.routeLinks=ki,this.previewedView=be(null),this.pendingClose=null,q(dn).onDestroy(()=>this.cancelPendingClose())}openModeBar(t){this.cancelPendingClose(),this.previewedView.set(t)}cancelPendingClose(){this.pendingClose!==null&&(clearTimeout(this.pendingClose),this.pendingClose=null)}scheduleClosingModeBar(){this.cancelPendingClose(),this.pendingClose=setTimeout(()=>this.closeModeBar(),PM)}closeModeBarWhenFocusLeaves(t){let i=t.relatedTarget;(!(i instanceof Node)||!this.hostElement.nativeElement.contains(i))&&this.closeModeBar()}closeModeBar(){this.cancelPendingClose(),this.previewedView.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-view-switcher"]],hostAttrs:[1,"contents"],decls:9,vars:8,consts:[["metricsTab","routerLinkActive"],["domainTab","routerLinkActive"],[1,"flex","items-center",3,"click","mouseleave","focusout"],["aria-label","View","data-testid","view-switcher",1,"flex","items-center","gap-1"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the 3D metrics map","data-testid","view-switcher-metrics",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink","routerLinkActiveOptions"],[1,"cc-current-underline"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the domain-language word cloud","data-testid","view-switcher-domain",1,"btn","btn-ghost","btn-sm","relative",3,"font-bold","routerLink"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the domain-language word cloud","data-testid","view-switcher-domain",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md",3,"mouseenter","mouseleave"],[3,"view"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70",3,"mouseenter"],["viewBox","0 0 10 6","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"block","h-1.5","w-2.5"],["d","M1 1 5 5 9 1"]],template:function(i,n){if(i&1&&(v(0,"div",2),W("click",function(){return n.closeModeBar()})("mouseleave",function(){return n.scheduleClosingModeBar()})("focusout",function(a){return n.closeModeBarWhenFocusLeaves(a)}),v(1,"nav",3)(2,"a",4,0),W("mouseenter",function(){return n.openModeBar("metrics")})("focusin",function(){return n.openModeBar("metrics")}),f(4," Metric "),O(5,RM,1,0,"span",5),b(),O(6,AM,4,4,"a",6),b(),O(7,LM,2,1,"div",7)(8,FM,3,0,"span",8),b()),i&2){let r,a=Lr(3);m(2),Ne("font-bold",a.isActive),L("routerLink",n.routeLinks.metrics)("routerLinkActiveOptions",ep(7,IM)),m(3),z(a.isActive?5:-1),m(),z(n.isDomainViewAvailable()?6:-1),m(),z((r=n.previewedView())?7:8,r)}},dependencies:[za,$a,uw],encapsulation:2,changeDetection:0})}}return e})();function NM(e,o){e&1&&F(0,"cc-delta-selector")}function BM(e,o){e&1&&F(0,"cc-map-selector")}function VM(e,o){if(e&1){let t=xe();v(0,"cc-export-3D-map-dialog",5),W("closed",function(){ae(t);let n=D();return se(n.closeExportDialog())}),b()}}var Dh=(()=>{class e{constructor(){this.fileStoreReadWindow=q(Te),this.export3DMapDialogStore=q(qa),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.isExportDialogOpen=this.export3DMapDialogStore.isDialogOpen}closeExportDialog(){this.export3DMapDialogStore.closeDialog()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-nav-bar"]],features:[Zi([{provide:Rs,useValue:"--cc-bars-height"}]),Qi([Ds])],decls:12,vars:2,consts:[[1,"navbar","relative","bg-base-100","border-b","border-base-300","min-h-12","px-2"],[1,"navbar-start","gap-1"],[1,"divider","divider-horizontal","mx-0"],[1,"navbar-center","self-stretch"],[1,"navbar-end"],[3,"closed"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"div",1),F(2,"cc-nav-bar-logo")(3,"div",2)(4,"cc-nav-bar-folder-button"),O(5,NM,1,0,"cc-delta-selector")(6,BM,1,0,"cc-map-selector"),b(),v(7,"div",3),F(8,"cc-view-switcher"),b(),v(9,"div",4),F(10,"cc-settings-button"),b()(),O(11,VM,1,0,"cc-export-3D-map-dialog")),i&2&&(m(5),z(n.isDeltaState()?5:6),m(6),z(n.isExportDialogOpen()?11:-1))},dependencies:[Rh,cw,lw,Qx,Kx,dw,fw],encapsulation:2,changeDetection:0})}}return e})();function WM(e,o){e&1&&(v(0,"div"),F(1,"cc-nav-bar")(2,"router-outlet")(3,"cc-changelog-dialog"),b())}var gw=(()=>{class e{constructor(t){this.loadFilesUseCase=t,this.isInitialized=be(!1)}ngOnInit(){this.loadFilesUseCase.loadOnBoot().catch(()=>{}).finally(()=>{this.isInitialized.set(!0)})}static{this.\u0275fac=function(i){return new(i||e)(te(Fs))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-code-charta"]],decls:3,vars:1,template:function(i,n){i&1&&(F(0,"cc-error-dialog")(1,"cc-toast"),O(2,WM,4,0,"div")),i&2&&(m(2),z(n.isInitialized()?2:-1))},dependencies:[Dh,yd,hf,Of,hp],encapsulation:2,changeDetection:0})}}return e})();lp(gw,tt(Ee({},Qm),{providers:[tp(),...Qm.providers]}));
3532
+ </Relationships>`}async function Nx(e){let{vertices:o,triangles:t,volumes:i}=$C(e),n=Dx(o,t),r=Ax(i),a=Lx(),s=Fx(),l=!0,d={"3D":{"3dmodel.model":cn(n,l)},_rels:{".rels":cn(s,l)},Metadata:{"Slic3r_PE_model.config":cn(r,l)},"[Content_Types].xml":cn(a,l)};return Rx(d,{comment:"created by CodeCharta"}).buffer}function $C(e){let o=[],t=[],i=[],n=new Map,r=new Map,a=1;for(let s of e.children)Bx(s,o,t,n,a,r,i);return{vertices:o,triangles:t,volumes:i}}function Bx(e,o,t,i,n,r,a,s=void 0){if(!e.visible)return;for(let c of e.children){let h=e.matrix;s&&(h=s.clone().multiply(e.matrix)),Bx(c,o,t,i,n,r,a,h)}let l=jC(e),d=new Map;for(let[c,h]of l.entries()){let p=t.length;HC(o,i,d,h,e,s),UC(e.geometry,t,d,h),GC(e,c,p,t.length-1,a,n,r),n++}}function jC(e){let o=new Map;if(e.geometry.attributes.color)for(let t=0;t<e.geometry.attributes.color.count;t++){let i=Px(e.geometry.attributes.color,t);o.has(i)?o.get(i).push(t):o.set(i,[t])}else if(e.geometry.attributes.position){let t=e.material,i;if(t.color)i=t.color.getHexString();else if(t.isShaderMaterial){let r=t.defaultAttributeValues.color;i=Px(r,0)}let n=Array.from({length:e.geometry.attributes.position.count},(r,a)=>a);o.set(i,n)}return o}function HC(e,o,t,i,n,r){let a=n.geometry.attributes.position;for(let s of i){let l=new Qe(a.getX(s),a.getY(s),a.getZ(s));l.applyMatrix4(n.matrix),r&&l.applyMatrix4(r);let d=`<vertex x="${l.x}" y="${l.y}" z="${l.z}"/>`;o.has(d)?t.set(s,o.get(d)):(e.push(d),o.set(d,e.length-1),t.set(s,e.length-1))}}function UC(e,o,t,i){if(e.index){let n=e.index;for(let r=0;r<n.count;r+=3){let a=n.getX(r),s=n.getY(r),l=n.getZ(r);if(i.includes(a)&&i.includes(s)&&i.includes(l)){let d=`<triangle v1="${t.get(a)}" v2="${t.get(s)}" v3="${t.get(l)}" />`;o.push(d)}}}else for(let n=0;n<t.size;n+=3){let r=`<triangle v1="${t.get(n)}" v2="${t.get(n+1)}" v3="${t.get(n+2)}" />`;o.push(r)}}function GC(e,o,t,i,n,r,a){a.has(o)||a.set(o,a.size+1);let s=a.get(o),l=e.name==="Map"?`${e.name} 0x${o}`:e.name,d={id:r,name:l,color:o,extruder:s,firstTriangleId:t,lastTriangleId:i};n.push(d)}function Px(e,o){return(e instanceof ro?[e.getX(o),e.getY(o),e.getZ(o)]:[e[o],e[o+1],e[o+2]]).map(i=>Math.round(i*255).toString(16).padStart(2,"0")).join("")}var Vx=(()=>{class e{constructor(){this.isPrintMeshLoaded=$.required(),this.download3MF=Ce(),this.downloadSTL=Ce()}handleDownload3MF(){this.download3MF.emit()}handleDownloadSTL(){this.downloadSTL.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-export-actions"]],inputs:{isPrintMeshLoaded:[1,"isPrintMeshLoaded"]},outputs:{download3MF:"download3MF",downloadSTL:"downloadSTL"},decls:7,vars:2,consts:[[1,"flex","gap-2"],["title","Download 3MF Button",1,"btn","btn-primary",3,"click","disabled"],[1,"fa","fa-download"],["title","Download STL Button",1,"btn","btn-outline",3,"click","disabled"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.handleDownload3MF()}),ue(2,"i",2),f(3," Download 3MF "),y(),w(4,"button",3),K("click",function(){return n.handleDownloadSTL()}),ue(5,"i",2),f(6," Download minimal STL "),y()()),i&2&&(m(),le("disabled",!n.isPrintMeshLoaded()),m(3),le("disabled",!n.isPrintMeshLoaded()))},encapsulation:2,changeDetection:0})}}return e})();var Wx=(()=>{class e{constructor(){this.frontText=$(""),this.textChanged=Ce()}handleInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-front-text-input"]],inputs:{frontText:[1,"frontText"]},outputs:{textChanged:"textChanged"},decls:5,vars:1,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["type","text","placeholder","CodeCharta","data-testid","frontText",1,"input","input-bordered","w-full",3,"input","value"]],template:function(i,n){i&1&&(w(0,"label",0)(1,"div",1)(2,"span",2),f(3,"Bottom center label text"),y()(),w(4,"input",3),K("input",function(a){return n.handleInput(a)}),y()()),i&2&&(m(4),le("value",n.frontText()))},encapsulation:2,changeDetection:0})}}return e})();var XC=["fileInput"];function KC(e,o){if(e&1){let t=xe();v(0,"div",5)(1,"button",6),W("click",function(){ae(t);let n=D();return se(n.handleRemoveLogo())}),F(2,"i",7),f(3," Remove "),b(),v(4,"button",8),W("click",function(){ae(t);let n=D();return se(n.handleRotateLogo())}),F(5,"i",9),f(6," Rotate "),b(),v(7,"button",10),W("click",function(){ae(t);let n=D();return se(n.handleFlipLogo())}),F(8,"i",11),f(9," Flip "),b()(),v(10,"div",12)(11,"cc-inline-color-picker",13),W("colorChange",function(n){ae(t);let r=D();return se(r.handleColorChange(n))}),b(),v(12,"span",14),f(13,"Color"),b()()}if(e&2){let t=D();m(11),L("hexColor",t.logoColor())}}var Ox=(()=>{class e{constructor(){this.fileInput=je.required("fileInput"),this.isFileSelected=$.required(),this.logoColor=$("#ffffff"),this.fileSelected=Ce(),this.logoRemoved=Ce(),this.logoRotated=Ce(),this.logoFlipped=Ce(),this.colorChanged=Ce()}handleFileSelected(t){let n=t.target.files?.[0];n&&this.fileSelected.emit(n)}handleRemoveLogo(){this.fileInput().nativeElement.value="",this.logoRemoved.emit()}handleRotateLogo(){this.logoRotated.emit()}handleFlipLogo(){this.logoFlipped.emit()}handleColorChange(t){this.colorChanged.emit(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-logo-upload"]],viewQuery:function(i,n){i&1&&it(n.fileInput,XC,5),i&2&&ot()},inputs:{isFileSelected:[1,"isFileSelected"],logoColor:[1,"logoColor"]},outputs:{fileSelected:"fileSelected",logoRemoved:"logoRemoved",logoRotated:"logoRotated",logoFlipped:"logoFlipped",colorChanged:"colorChanged"},decls:7,vars:1,consts:[["fileInput",""],[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","file","accept",".svg",1,"file-input","file-input-bordered","file-input-sm","w-full",3,"change"],[1,"flex","flex-wrap","gap-2","mt-2"],["title","Remove Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-times"],["title","Rotate Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-rotate-right"],["title","Flip Logo",1,"btn","btn-sm","btn-ghost",3,"click"],[1,"fa","fa-arrows-h"],[1,"flex","items-center","gap-2","mt-2"],["ariaLabel","Logo color",3,"colorChange","hexColor"],[1,"text-sm"]],template:function(i,n){i&1&&(v(0,"div",1)(1,"div",2)(2,"h3",3),f(3,"Bottom left logo (SVG)"),b(),v(4,"input",4,0),W("change",function(a){return n.handleFileSelected(a)}),b(),O(6,KC,14,1),b()()),i&2&&(m(6),z(n.isFileSelected()?6:-1))},dependencies:[ho],encapsulation:2,changeDetection:0})}}return e})();var QC=(e,o)=>o.name;function YC(e,o){if(e&1&&(w(0,"option",4),f(1),y()),e&2){let t=o.$implicit,i=D();le("selected",t.name===i.selectedPrinter().name),m(),Yh(" ",t.name," (",t.x/10,"\xD7",t.y/10,"\xD7",t.z/10,"cm, ",t.numberOfColors," colors) ")}}var Th=[{name:"Prusa MK3S (single color)",x:245,y:205,z:205,numberOfColors:1},{name:"BambuLab A1 + AMS Lite",x:251,y:251,z:251,numberOfColors:4},{name:"Prusa XL (5 colors)",x:355,y:335,z:355,numberOfColors:5}],zx=(()=>{class e{constructor(){this.selectedPrinter=$.required(),this.printerChanged=Ce(),this.printers=Th}handlePrinterChange(t){let i=t.target,n=this.printers[i.selectedIndex];this.printerChanged.emit(n)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-printer-preset-selection"]],inputs:{selectedPrinter:[1,"selectedPrinter"]},outputs:{printerChanged:"printerChanged"},decls:7,vars:0,consts:[[1,"form-control","w-full"],[1,"label"],[1,"label-text","font-medium"],["data-testid","selectPrinter",1,"select","select-bordered","w-full",3,"change"],["data-testid","selectedPrinter",3,"selected"]],template:function(i,n){i&1&&(w(0,"label",0)(1,"div",1)(2,"span",2),f(3,"Printer preset"),y()(),w(4,"select",3),K("change",function(a){return n.handlePrinterChange(a)}),Ae(5,YC,2,6,"option",4,QC),y()()),i&2&&(m(5),Le(n.printers))},encapsulation:2,changeDetection:0})}}return e})();function ZC(e,o){if(e&1){let t=xe();w(0,"input",7),K("input",function(n){ae(t);let r=D();return se(r.handleTextInput(n))}),y()}if(e&2){let t=D();le("value",t.currentText())}}var $x=(()=>{class e{constructor(){this.isVisible=$.required(),this.currentText=$(""),this.visibilityChanged=Ce(),this.textChanged=Ce()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-qr-code-settings"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","qrCodeToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","placeholder","URL for QR code","data-testid","qrCodeText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1)(2,"h3",2),f(3,"QR-Code"),y(),w(4,"label",3)(5,"input",4),K("change",function(a){return n.handleToggleChange(a)}),y(),w(6,"span",5),f(7,"Show QR-Code"),y()(),O(8,ZC,1,1,"input",6),y()()),i&2&&(m(5),le("checked",n.isVisible()),m(3),z(n.isVisible()?8:-1))},encapsulation:2,changeDetection:0})}}return e})();var jx=(()=>{class e{constructor(){this.currentSize=$.required(),this.wantedWidth=$.required(),this.maxWidth=$.required(),this.selectedPrinter=$.required(),this.widthChanged=Ce()}handleSliderChange(t){let i=t.target;this.widthChanged.emit(Number(i.value))}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-scale-slider"]],inputs:{currentSize:[1,"currentSize"],wantedWidth:[1,"wantedWidth"],maxWidth:[1,"maxWidth"],selectedPrinter:[1,"selectedPrinter"]},outputs:{widthChanged:"widthChanged"},decls:12,vars:9,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],["type","range","data-testid","onScaleChange",1,"range","range-primary","range-sm",3,"change","min","max","value"],["data-testid","printSizeOverview",1,"text-sm","mt-2"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1)(2,"h3",2),f(3,"Scale"),y(),w(4,"input",3),K("change",function(a){return n.handleSliderChange(a)}),y(),w(5,"div",4)(6,"div"),f(7),y(),w(8,"div"),f(9),y(),w(10,"div"),f(11),y()()()()),i&2&&(m(4),le("min",100)("max",n.maxWidth())("value",n.wantedWidth()),m(3),Qi("Width: ",(n.currentSize().x/10).toFixed(1),"cm (max. ",(n.selectedPrinter().x/10).toFixed(1),")"),m(2),Qi("Depth: ",(n.currentSize().y/10).toFixed(1),"cm (max. ",(n.selectedPrinter().y/10).toFixed(1),")"),m(2),Qi("Height: ",(n.currentSize().z/10).toFixed(1),"cm (max. ",(n.selectedPrinter().z/10).toFixed(1),")"))},encapsulation:2,changeDetection:0})}}return e})();function JC(e,o){if(e&1){let t=xe();w(0,"input",7),K("input",function(n){ae(t);let r=D();return se(r.handleTextInput(n))}),y()}if(e&2){let t=D();le("value",t.currentText())}}var Hx=(()=>{class e{constructor(){this.isVisible=$.required(),this.currentText=$(""),this.visibilityChanged=Ce(),this.textChanged=Ce()}handleToggleChange(t){let i=t.target;this.visibilityChanged.emit(i.checked)}handleTextInput(t){let i=t.target;this.textChanged.emit(i.value)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-second-row-text-input"]],inputs:{isVisible:[1,"isVisible"],currentText:[1,"currentText"]},outputs:{visibilityChanged:"visibilityChanged",textChanged:"textChanged"},decls:9,vars:2,consts:[[1,"card","bg-base-200"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"label","cursor-pointer","justify-start","gap-4"],["type","checkbox","data-testid","secondRowToggle",1,"toggle","toggle-primary","toggle-sm",3,"change","checked"],[1,"label-text"],["type","text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"value"],["type","text","data-testid","secondRowText",1,"input","input-bordered","input-sm","w-full",3,"input","value"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1)(2,"h3",2),f(3,"Second row center text"),y(),w(4,"label",3)(5,"input",4),K("change",function(a){return n.handleToggleChange(a)}),y(),w(6,"span",5),f(7,"Show second row text"),y()(),O(8,JC,1,1,"input",6),y()()),i&2&&(m(5),le("checked",n.isVisible()),m(3),z(n.isVisible()?8:-1))},encapsulation:2,changeDetection:0})}}return e})();var Ux=(()=>{class e{constructor(t,i,n,r,a){this.mapStateReadWindow=t,this.metricsLensSourceReadWindow=i,this.sharedViewReadWindow=n,this.fileStoreReadWindow=r,this.ccStateSnapshot=a}getAreaMetric(){return this.mapStateReadWindow.getAreaMetric()}getHeightMetric(){return this.mapStateReadWindow.getHeightMetric()}getColorMetric(){return this.mapStateReadWindow.getColorMetric()}getColorRange(){return this.mapStateReadWindow.getColorRange()}getAttributeDescriptors(){return this.metricsLensSourceReadWindow.getAttributeDescriptors()}getNodeMetricData(){return so(this.ccStateSnapshot.get())}getBlacklist(){return this.sharedViewReadWindow.getBlacklist()}getFiles(){return this.fileStoreReadWindow.getFiles()}getAccumulatedFileName(){return Et(this.ccStateSnapshot.get()).unifiedFileMeta?.fileName}static{this.\u0275fac=function(i){return new(i||e)(M(ve),M(vs),M(Bt),M(Te),M(Vt))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var tM=["dialog"],iM=["rendererContainer"],Ih=(()=>{class e{constructor(t,i){this.stateAccessStore=t,this.threeSceneService=i,this.dialog=je.required("dialog"),this.rendererContainer=je.required("rendererContainer"),this.closed=Ce(),this.currentSize=be(new Qe),this.isPrintMeshLoaded=be(!1),this.frontText=be(""),this.logoColor=be("#ffffff"),this.isFileSelected=be(!1),this.secondRowVisible=be(!1),this.secondRowText=be(new Date().toLocaleDateString()),this.qrCodeVisible=be(!1),this.qrCodeText=be("maibornwolff.de/service/it-sanierung"),this.selectedPrinter=be(Th[2]),this.maxWidth=be(0),this.wantedWidth=be(0),this.layerHeight=.2,this.frontTextSize=8,this.secondRowTextSize=6,this.frontPrintDepth=.6,this.mapSideOffset=10,this.baseplateHeight=1,this.logoSize=10,this.primaryShaderMaterialIndex=0,this.exportMesh=this.threeSceneService.getMapMesh().toExportMesh();let n=wh(new Qe(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.maxWidth.set(n),this.wantedWidth.set(n),this.currentSize.update(a=>(a.x=n,a)),this.currentNumberOfColors=this.selectedPrinter().numberOfColors,this.areaMetric=this.stateAccessStore.getAreaMetric(),this.heightMetric=this.stateAccessStore.getHeightMetric(),this.colorMetric=this.stateAccessStore.getColorMetric();let r=this.stateAccessStore.getNodeMetricData();this.nodeMetricData=r.filter(a=>a.name===this.areaMetric||a.name===this.heightMetric||a.name===this.colorMetric)}async ngAfterViewInit(){let t=this.dialog().nativeElement;t.addEventListener("close",()=>this.closed.emit()),t.showModal(),await this.createScene(),this.isPrintMeshLoaded.set(!0)}close(){this.dialog().nativeElement.close()}handleScaleChange(t){this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize())}handleFrontTextChange(t){this.frontText.set(t),this.previewMesh.updateFrontText(t)}handleFileSelected(t){this.isFileSelected.set(!0);let i=new FileReader;i.readAsDataURL(t),i.onload=()=>{this.previewMesh.addCustomLogo(i.result)}}handleRotateLogo(){this.previewMesh.rotateCustomLogo()}handleFlipLogo(){this.previewMesh.flipCustomLogo()}handleRemoveLogo(){this.isFileSelected.set(!1),this.previewMesh.removeCustomLogo()}handlePrinterChange(t){this.selectedPrinter.set(t);let i=t.numberOfColors;this.currentNumberOfColors!==i&&(this.previewMesh.updateNumberOfColors(i),this.currentNumberOfColors=i),this.makeMapMaxSize(),this.updateCameraPosition(this.printPreviewScene.getObjectByName("camera"))}handleLogoColorChange(t){this.logoColor.set(t),this.previewMesh.updateCustomLogoColor(t)}handleQrCodeTextChange(t){this.qrCodeText.set(t),this.previewMesh.updateQrCodeText(t),this.previewMesh.updateQrCodeVisibility(this.qrCodeVisible())}handleQrCodeVisibilityChange(t){this.qrCodeVisible.set(t),this.previewMesh.updateQrCodeVisibility(t)}handleSecondRowTextChange(t){this.secondRowText.set(t),this.previewMesh.updateSecondRowText(t),this.previewMesh.updateSecondRowVisibility(this.secondRowVisible())}handleSecondRowVisibilityChange(t){this.secondRowVisible.set(t),this.previewMesh.updateSecondRowVisibility(t)}async createScene(){let t=new ls;t.name="printPreviewScene",this.printPreviewScene=t,t.background=new Vn(15527388);let i=this.threeSceneService.scene.clone().children[3];i.name="lights",t.add(i);let n=new ss(45,1.15,50,2e5);n.name="camera",n.up=new Qe(0,0,1),t.add(n),this.initRenderer(t,n),this.previewMesh=new zc(this.initGeometryOptions()),await this.previewMesh.initialize(),this.currentSize.set(this.previewMesh.getSize()),t.add(this.previewMesh.getThreeMesh()),this.updateCameraPosition(n)}initRenderer(t,i){let n=this.getGL(),r=this.rendererContainer().nativeElement,a=r.offsetWidth||600,s=r.offsetHeight||450;n.setSize(a,s,!0),r.appendChild(n.domElement);let l=new ys(i,n.domElement),d=function(){requestAnimationFrame(d),l.update(),n.render(t,i)};d()}getGL(){return new us}updateCameraPosition(t){let i=this.currentSize();t.position.set(-i.x*.2,-i.y*1.2,i.z*3)}async handleDownload3MF(){let t=await Nx(this.printPreviewScene.getObjectByName("PrintMesh"));this.downloadFile(t,"3mf")}makeMapMaxSize(){let t=wh(new Qe(this.selectedPrinter().x,this.selectedPrinter().y,this.selectedPrinter().z),this.exportMesh,this.frontTextSize,this.baseplateHeight,this.mapSideOffset);this.wantedWidth.set(t),this.previewMesh.updateSize(t).then(i=>{this.qrCodeVisible.set(i)}),this.currentSize.set(this.previewMesh.getSize()),this.maxWidth.set(this.currentSize().x)}handleDownloadSTL(){let t=new lc().parse(this.previewMesh.getMapMesh(),{binary:!0});this.downloadFile(t,"stl")}initGeometryOptions(){let t=this.stateAccessStore.getAttributeDescriptors(),i=dr,n=t[this.areaMetric]?.title||i.get(this.areaMetric),r=t[this.heightMetric]?.title||i.get(this.heightMetric),a=t[this.colorMetric]?.title||i.get(this.colorMetric);return{originalMapMesh:this.exportMesh,width:this.wantedWidth(),areaMetricTitle:n,areaMetricData:this.nodeMetricData.find(s=>s.name===this.areaMetric),heightMetricTitle:r,heightMetricData:this.nodeMetricData.find(s=>s.name===this.heightMetric),colorMetricTitle:a,colorMetricData:this.nodeMetricData.find(s=>s.name===this.colorMetric),colorRange:this.stateAccessStore.getColorRange(),frontText:this.frontText(),secondRowText:this.secondRowText(),secondRowVisible:this.secondRowVisible(),qrCodeText:this.qrCodeText(),defaultMaterial:this.exportMesh.material[this.primaryShaderMaterialIndex].clone(),numberOfColors:this.currentNumberOfColors,layerHeight:this.layerHeight,frontTextSize:this.frontTextSize,secondRowTextSize:this.secondRowTextSize,printHeight:this.frontPrintDepth,mapSideOffset:this.mapSideOffset,baseplateHeight:this.baseplateHeight,logoSize:this.logoSize}}downloadFile(t,i){let n=this.stateAccessStore.getFiles(),r=this.stateAccessStore.getAccumulatedFileName(),a=`${gs.getNewFileName(r,Di(n))}.${i}`;Sr.downloadData(t,a)}static{this.\u0275fac=function(i){return new(i||e)(te(Ux),te(ft))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-export-3D-map-dialog"]],viewQuery:function(i,n){i&1&&it(n.dialog,tM,5)(n.rendererContainer,iM,5),i&2&&ot(2)},outputs:{closed:"closed"},decls:27,vars:13,consts:[["dialog",""],["rendererContainer",""],[1,"modal"],[1,"modal-box","max-w-6xl","w-11/12"],[1,"text-2xl","font-bold","mb-6"],[1,"flex","gap-6"],[1,"flex","flex-col","gap-4","w-1/3","min-w-72"],[3,"printerChanged","selectedPrinter"],[3,"widthChanged","currentSize","wantedWidth","maxWidth","selectedPrinter"],[3,"textChanged","frontText"],[3,"visibilityChanged","textChanged","isVisible","currentText"],[3,"fileSelected","logoRemoved","logoRotated","logoFlipped","colorChanged","isFileSelected","logoColor"],[1,"flex-1"],[1,"card","bg-base-200","h-full"],[1,"card-body","p-4"],[1,"card-title","text-sm"],[1,"w-full","min-h-96"],[1,"modal-action"],[3,"download3MF","downloadSTL","isPrintMeshLoaded"],[1,"btn",3,"click"],["method","dialog",1,"modal-backdrop"]],template:function(i,n){i&1&&(v(0,"dialog",2,0)(2,"div",3)(3,"h2",4),f(4,"3D Print CodeCharta Map"),b(),v(5,"div",5)(6,"div",6)(7,"cc-printer-preset-selection",7),W("printerChanged",function(a){return n.handlePrinterChange(a)}),b(),v(8,"cc-scale-slider",8),W("widthChanged",function(a){return n.handleScaleChange(a)}),b(),v(9,"cc-front-text-input",9),W("textChanged",function(a){return n.handleFrontTextChange(a)}),b(),v(10,"cc-second-row-text-input",10),W("visibilityChanged",function(a){return n.handleSecondRowVisibilityChange(a)})("textChanged",function(a){return n.handleSecondRowTextChange(a)}),b(),v(11,"cc-qr-code-settings",10),W("visibilityChanged",function(a){return n.handleQrCodeVisibilityChange(a)})("textChanged",function(a){return n.handleQrCodeTextChange(a)}),b(),v(12,"cc-logo-upload",11),W("fileSelected",function(a){return n.handleFileSelected(a)})("logoRemoved",function(){return n.handleRemoveLogo()})("logoRotated",function(){return n.handleRotateLogo()})("logoFlipped",function(){return n.handleFlipLogo()})("colorChanged",function(a){return n.handleLogoColorChange(a)}),b()(),v(13,"div",12)(14,"div",13)(15,"div",14)(16,"h3",15),f(17,"Preview"),b(),F(18,"div",16,1),b()()()(),v(20,"div",17)(21,"cc-export-actions",18),W("download3MF",function(){return n.handleDownload3MF()})("downloadSTL",function(){return n.handleDownloadSTL()}),b(),v(22,"button",19),W("click",function(){return n.close()}),f(23,"Close"),b()()(),v(24,"form",20)(25,"button"),f(26,"close"),b()()()),i&2&&(m(7),L("selectedPrinter",n.selectedPrinter()),m(),L("currentSize",n.currentSize())("wantedWidth",n.wantedWidth())("maxWidth",n.maxWidth())("selectedPrinter",n.selectedPrinter()),m(),L("frontText",n.frontText()),m(),L("isVisible",n.secondRowVisible())("currentText",n.secondRowText()),m(),L("isVisible",n.qrCodeVisible())("currentText",n.qrCodeText()),m(),L("isFileSelected",n.isFileSelected())("logoColor",n.logoColor()),m(9),L("isPrintMeshLoaded",n.isPrintMeshLoaded()))},dependencies:[zx,jx,Wx,Hx,$x,Ox,Vx],encapsulation:2,changeDetection:0})}}return e})();var Gx=(()=>{class e{constructor(t,i){this.store=t,this.mapStateReadWindow=i,this.colorMode$=this.store.select(Gp)}getColorMode(){return this.mapStateReadWindow.getColorMode()}setAbsoluteColorMode(){this.store.dispatch(io({value:Do.absolute}))}static{this.\u0275fac=function(i){return new(i||e)(M(me),M(ve))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Ea=(()=>{class e{constructor(){this.colorModeStore=q(Gx),this.errorDialogService=q(Ha),this.activeViewStore=q(or),this.viewReadinessStore=q(tr),this.threeRendererService=q(kt),this.router=q(un),this.dialogOpen=be(!1),this.isDialogOpen=this.dialogOpen.asReadonly()}requestExport(){if(this.activeViewStore.currentView()!=="metrics"){this.errorDialogService.open(this.buildSwitchToMetricsViewDialog());return}if(this.colorModeStore.getColorMode()===Do.absolute){this.dialogOpen.set(!0);return}this.errorDialogService.open(this.buildWrongColorModeDialog())}closeDialog(){this.dialogOpen.set(!1)}buildSwitchToMetricsViewDialog(){return{title:"3D export needs the Metric view",message:'<p>The 3D export builds on the rendered map, so it only works in the <strong>Metric view</strong>.<br><i class="fa fa-info-circle"></i> Use "Switch and continue" to open the Metric view and go straight to the export.<p>',resolveErrorData:{buttonText:"Switch and continue",onResolveErrorClick:()=>{this.switchToMetricsViewAndExport()}},dismissButtonText:"Stay here"}}async switchToMetricsViewAndExport(){await this.router.navigateByUrl(Ei.metrics)&&this.viewReadinessStore.isStale$("metrics").pipe(Re(i=>!i),ut(1)).subscribe(()=>this.requestExport())}buildWrongColorModeDialog(){return{title:"Map could not be exported",message:'<p>3D map can only be exported when <strong>color mode</strong> is set to <strong>absolute</strong>.<br><i class="fa fa-info-circle"></i> You can change this under Color Metric Options or use "Change and continue" to directly change the color mode and continue.<p>',resolveErrorData:{buttonText:"Change and continue",onResolveErrorClick:()=>this.recolorTheMapAndExportIt()}}}recolorTheMapAndExportIt(){this.threeRendererService.afterRender$.pipe(ut(1)).subscribe(()=>this.dialogOpen.set(!0)),this.colorModeStore.setAbsoluteColorMode()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var qr=(()=>{class e{transform(t){return gs.withoutCCExtension(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=Xi({name:"removeExtension",type:e,pure:!0})}}return e})();var Xx=(e,o)=>o.fileMeta.fileName;function oM(e,o){if(e&1){let t=xe();w(0,"li",9)(1,"button",10),K("click",function(){let n=ae(t).$implicit,r=D(2);return se(r.handleReferenceChange(n))}),w(2,"span",11),f(3),at(4,"removeExtension"),y()()()}if(e&2){let t=o.$implicit,i=D(2);m(),Ne("bg-base-200",i.isReferenceSelected(t))("font-bold",i.isReferenceSelected(t)),m(2),qe(fi(4,5,t.fileMeta.fileName))}}function nM(e,o){if(e&1&&(w(0,"div",5)(1,"ul",8),Ae(2,oM,5,7,"li",9,Xx),y()()),e&2){let t=D();m(2),Le(t.referenceOptions())}}function rM(e,o){if(e&1){let t=xe();w(0,"li",9)(1,"button",10),K("click",function(){let n=ae(t).$implicit,r=D(2);return se(r.handleComparisonChange(n))}),w(2,"span",11),f(3),at(4,"removeExtension"),y()()()}if(e&2){let t=o.$implicit,i=D(2);m(),Ne("bg-base-200",i.isComparisonSelected(t))("font-bold",i.isComparisonSelected(t)),m(2),qe(fi(4,5,t.fileMeta.fileName))}}function aM(e,o){if(e&1&&(w(0,"div",5)(1,"ul",8),Ae(2,rM,5,7,"li",9,Xx),y()()),e&2){let t=D();m(2),Le(t.comparisonOptions())}}var Kx=(()=>{class e{constructor(){this.fileStoreReadWindow=q(Te),this.navBarWriteStore=q(cr),this.elementRef=q(Lt),this.fileStates=R(this.fileStoreReadWindow.files$,{requireSync:!0}),this.referenceFile=R(this.fileStoreReadWindow.referenceFile$,{requireSync:!0}),this.openDropdown=be("none"),this.referenceLabel=X(()=>{let t=this.referenceFile();return t?this.withoutExtension(t.fileMeta.fileName):"select reference file"}),this.comparisonFile=X(()=>this.fileStates().find(t=>t.selectedAs===ii.Comparison)?.file),this.comparisonLabel=X(()=>{let t=this.comparisonFile();return t?this.withoutExtension(t.fileMeta.fileName):"select comparison file"}),this.referenceOptions=X(()=>this.fileStates().map(t=>t.file)),this.comparisonOptions=X(()=>this.fileStates().filter(t=>t.selectedAs!==ii.Reference).map(t=>t.file)),this.swapDisabled=X(()=>this.comparisonFile()===void 0)}handleDocumentClick(t){this.openDropdown()!=="none"&&t.target instanceof Node&&!this.elementRef.nativeElement.contains(t.target)&&this.openDropdown.set("none")}toggleDropdown(t){this.openDropdown.update(i=>i===t?"none":t)}handleReferenceChange(t){this.navBarWriteStore.setDeltaReference(t),this.openDropdown.set("none")}handleComparisonChange(t){this.navBarWriteStore.setDeltaComparison(t),this.openDropdown.set("none")}handleSwap(){this.swapDisabled()||this.navBarWriteStore.switchReferenceAndComparison()}isReferenceSelected(t){return this.referenceFile()?.fileMeta.fileName===t.fileMeta.fileName}isComparisonSelected(t){return this.comparisonFile()?.fileMeta.fileName===t.fileMeta.fileName}withoutExtension(t){return new qr().transform(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-delta-selector"]],hostBindings:function(i,n){i&1&&W("click",function(a){return n.handleDocumentClick(a)},Ro)},decls:15,vars:9,consts:[[1,"flex","items-center","gap-1"],[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[12rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[12rem]","w-max","max-w-[24rem]","z-[70]","p-1"],["type","button","title","Switch reference and comparison file",1,"btn","btn-ghost","btn-sm","btn-square",3,"click","disabled"],[1,"fa","fa-arrows-h"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],["type","button",1,"flex","items-center","gap-2","w-full","text-left","rounded-md","px-2","py-1","hover:bg-base-200",3,"click"],[1,"flex-1","whitespace-nowrap"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"div",1)(2,"button",2),K("click",function(){return n.toggleDropdown("reference")}),w(3,"span",3),f(4),y(),ue(5,"i",4),y(),O(6,nM,4,0,"div",5),y(),w(7,"button",6),K("click",function(){return n.handleSwap()}),ue(8,"i",7),y(),w(9,"div",1)(10,"button",2),K("click",function(){return n.toggleDropdown("comparison")}),w(11,"span",3),f(12),y(),ue(13,"i",4),y(),O(14,aM,4,0,"div",5),y()()),i&2&&(m(),Ne("dropdown-open",n.openDropdown()==="reference"),m(3),qe(n.referenceLabel()),m(2),z(n.openDropdown()==="reference"?6:-1),m(),le("disabled",n.swapDisabled()),m(2),Ne("dropdown-open",n.openDropdown()==="comparison"),m(3),qe(n.comparisonLabel()),m(2),z(n.openDropdown()==="comparison"?14:-1))},dependencies:[qr],encapsulation:2,changeDetection:0})}}return e})();var sM=(e,o)=>o.file.fileMeta.fileName;function lM(e,o){e&1&&ue(0,"i",16)}function cM(e,o){e&1&&ue(0,"i",17)}function dM(e,o){if(e&1){let t=xe();w(0,"li",8)(1,"label",12)(2,"input",13),K("change",function(n){let r=ae(t).$implicit,a=D(2);return se(a.handleCheckboxChange(r.file,n.target.checked))}),y(),w(3,"span",14),f(4),at(5,"removeExtension"),y(),w(6,"button",15),K("click",function(n){let r=ae(t).$implicit,a=D(2);return se(a.handleRemoveFileToggle(r.file,n))}),O(7,lM,1,0,"i",16)(8,cM,1,0,"i",17),y()()()}if(e&2){let t=o.$implicit,i=D(2);m(2),le("checked",i.isFileSelected(t.file))("disabled",t.isRemoved),m(),Ne("line-through",t.isRemoved),m(),he(" ",fi(5,7,t.file.fileMeta.fileName)," "),m(2),le("title",t.isRemoved?"Undo remove map":"Remove map"),m(),z(t.isRemoved?7:8)}}function mM(e,o){if(e&1){let t=xe();w(0,"div",4)(1,"div",5)(2,"button",6),K("click",function(){ae(t);let n=D();return se(n.handleSelectAll())}),f(3,"All"),y(),w(4,"button",6),K("click",function(){ae(t);let n=D();return se(n.handleSelectNone())}),f(5,"None"),y(),w(6,"button",6),K("click",function(){ae(t);let n=D();return se(n.handleSelectInvert())}),f(7,"Invert"),y()(),w(8,"ul",7),Ae(9,dM,9,9,"li",8,sM),y(),w(11,"div",9)(12,"span",10)(13,"button",11),K("click",function(){ae(t);let n=D();return se(n.handleApply())}),f(14," Apply "),y()()()()}if(e&2){let t=D();m(9),Le(t.filesInUI()),m(3),Ne("tooltip-disabled",!t.applyButtonState().disabled),rt("data-tip",t.applyButtonState().tooltip||null),m(),le("disabled",t.applyButtonState().disabled)}}var Qx=(()=>{class e{constructor(){this.fileStoreReadWindow=q(Te),this.navBarWriteStore=q(cr),this.elementRef=q(Lt),this.filesInStore=R(this.fileStoreReadWindow.files$,{requireSync:!0}),this.isOpen=be(!1),this.filesInUI=be([]),this.selectedFilesInUI=be([]),this.triggerLabel=X(()=>{let t=this.selectedFilesInStore();return t.length===0?"Select map":t.length===1?this.withoutExtension(t[0].fileMeta.fileName):`${this.withoutExtension(t[0].fileMeta.fileName)} +${t.length-1}`}),this.applyButtonState=X(()=>this.selectedFilesInUI().length===0?{disabled:!0,tooltip:"Select at least one map"}:this.uiSelectionDiffersFromStore()?{disabled:!1,tooltip:""}:{disabled:!0,tooltip:"No changes to apply"}),this.syncFromStore(this.filesInStore())}handleDocumentClick(t){if(!this.isOpen())return;let i=t.target;this.elementRef.nativeElement.contains(i)||this.closeWithoutApplying()}toggleOpen(){this.isOpen()?this.closeWithoutApplying():(this.syncFromStore(this.filesInStore()),this.isOpen.set(!0))}handleCheckboxChange(t,i){let n=this.selectedFilesInUI();i?(n.includes(t)||this.selectedFilesInUI.set([...n,t]),this.filesInUI.update(r=>r.map(a=>a.file===t?{file:a.file,isRemoved:!1}:a))):this.selectedFilesInUI.set(n.filter(r=>r!==t))}handleRemoveFileToggle(t,i){i.stopPropagation(),i.preventDefault(),this.filesInUI.update(n=>n.map(r=>r.file.fileMeta.fileName===t.fileMeta.fileName?{file:r.file,isRemoved:!r.isRemoved}:r)),this.selectedFilesInUI.update(n=>n.filter(r=>r.fileMeta.fileName!==t.fileMeta.fileName))}handleSelectAll(){this.selectedFilesInUI.set(this.filesInUI().filter(t=>!t.isRemoved).map(t=>t.file))}handleSelectNone(){this.selectedFilesInUI.set([])}handleSelectInvert(){let t=this.filesInUI().filter(n=>!n.isRemoved);if(t.length===0)return;let i=this.selectedFilesInUI();i.length===0?this.selectedFilesInUI.set(t.map(n=>n.file)):i.length===t.length?this.selectedFilesInUI.set([]):this.selectedFilesInUI.set(t.filter(n=>!i.includes(n.file)).map(n=>n.file))}handleApply(){let t=this.filesInUI().filter(i=>i.isRemoved).map(i=>i.file.fileMeta.fileName);this.navBarWriteStore.setStandard(this.selectedFilesInUI()),this.navBarWriteStore.removeFiles(t),this.isOpen.set(!1)}closeWithoutApplying(){this.syncFromStore(this.filesInStore()),this.isOpen.set(!1)}syncFromStore(t){this.filesInUI.set(t.map(i=>({file:i.file,isRemoved:!1}))),this.selectedFilesInUI.set(t.filter(i=>i.selectedAs===ii.Partial).map(i=>i.file))}selectedFilesInStore(){return this.filesInStore().filter(t=>t.selectedAs===ii.Partial).map(t=>t.file)}uiSelectionDiffersFromStore(){if(this.filesInUI().some(n=>n.isRemoved))return!0;let t=this.selectedFilesInStore(),i=this.selectedFilesInUI();return i.length!==t.length?!0:!i.every(n=>t.includes(n))}withoutExtension(t){return new qr().transform(t)}isFileSelected(t){return this.selectedFilesInUI().includes(t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-map-selector"]],hostBindings:function(i,n){i&1&&W("click",function(a){return n.handleDocumentClick(a)},Ro)},decls:6,vars:4,consts:[[1,"dropdown"],["type","button",1,"btn","btn-ghost","btn-sm","justify-between","min-w-[14rem]",3,"click"],[1,"truncate"],[1,"fa","fa-caret-down","ml-2"],[1,"dropdown-content","bg-base-100","rounded-box","border","border-base-300","shadow-md","mt-1","min-w-[14rem]","w-max","max-w-[32rem]","z-[70]","p-2"],[1,"flex","items-center","gap-1","px-1","pb-2","border-b","border-base-200"],["type","button",1,"btn","btn-ghost","btn-xs","flex-1",3,"click"],[1,"flex","flex-col","gap-0.5","p-0","m-0","list-none","max-h-72","overflow-y-auto"],[1,"w-full"],[1,"flex","justify-end","mt-2"],[1,"tooltip"],["type","button",1,"btn","btn-primary","btn-sm",3,"click","disabled"],[1,"flex","items-center","gap-2","w-full","cursor-pointer","rounded-md","px-2","py-1","hover:bg-base-200"],["type","checkbox",1,"checkbox","checkbox-xs","shrink-0",3,"change","checked","disabled"],[1,"flex-1","whitespace-nowrap"],["type","button",1,"btn","btn-ghost","btn-xs","btn-square","shrink-0",3,"click","title"],[1,"fa","fa-undo"],[1,"fa","fa-trash"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.toggleOpen()}),w(2,"span",2),f(3),y(),ue(4,"i",3),y(),O(5,mM,15,4,"div",4),y()),i&2&&(Ne("dropdown-open",n.isOpen()),m(3),qe(n.triggerLabel()),m(2),z(n.isOpen()?5:-1))},dependencies:[qr],encapsulation:2,changeDetection:0})}}return e})();var Yx=()=>{let e=document.createElement("INPUT");return e.setAttribute("type","file"),e.setAttribute("accept",".json,.gz"),e.setAttribute("multiple",""),e.style.display="none",document.body.appendChild(e),e};var ew=Ia(ww());var Tr="base";function tw(e){let{gameObjectPositions:o,cycles:t=[]}=JSON.parse(e),i={checksum:"",data:{projectName:"GameObjects",fileChecksum:"",apiVersion:"1.3",nodes:[]}},n=[{name:Tr,type:Ft.FOLDER,attributes:{},children:[]}];hM(o);let r=o.find(s=>s.name==="root"),a=xM(r.scale);o.push(a);for(let s of o){let l=s.name.split(".");l[0]!==Tr&&iw(l,n[0].children,Tr,s,o,r)}return i.data.nodes=n,i.data.edges=t.map(s=>bM(s)),i.data.attributeTypes=vM(),i.checksum=(0,ew.default)(JSON.stringify(i.data)),i}function hM(e){for(let o of e)o.name.startsWith("root")||(o.name=o.name.startsWith(".")?`root${o.name}`:`root.${o.name}`)}function iw(e,o,t,i,n,r){if(e.length===0)return;let[a]=e,s={name:a,type:Zx(e)?Ft.FILE:Ft.FOLDER,attributes:{}};Zx(e)?s=uM(a,s,i):s.children=[],pM(o,a)?s=o.find(c=>c.name===a):o.push(s);let l=n.find(c=>c.name===t);s.fixedPosition=fM(s,l,i,r.name);let d=t===Tr?s.name:`${t}.${s.name}`;iw(e.slice(1),s.children,d,i,n,r)}function Zx(e){return e.length===1}function pM(e,o){return e.some(t=>t.name===o)}function uM(e,o,t){let i=Ee({},o);return i.attributes={height:t.scale.y},{name:e,type:Ft.FOLDER,attributes:{},children:[i]}}function fM(e,o,t,i){let n;if(e.type===Ft.FOLDER){let r=o.position.x-o.scale.x/2,a=o.position.z-o.scale.z/2,s=t.position.x-t.scale.x/2,l=t.position.z-t.scale.z/2,d=Hc((s-r)/o.scale.x*100,2),c=Hc((l-a)/o.scale.z*100,2),h=Hc(t.scale.z/o.scale.z*100,2),p=Hc(t.scale.x/o.scale.x*100,2);n={left:c,top:d,width:h,height:p}}return e.name===i&&(n=gM(n)),n}function Hc(e,o){let t=Math.pow(10,o);return Math.round(e*t)/t}function gM(e){let o=Ee({},e);return o.top=Math.floor(50-o.height/2),o.left=Math.floor(50-o.width/2),o}function Jx(e){let o=e.replaceAll(".","/"),i=e.split(".").slice(-1);return`/${Tr}/${o}/${i}`}function bM(e){return{fromNodeName:Jx(e.from),toNodeName:Jx(e.to),attributes:{coupling:100}}}function vM(){return{edges:{coupling:Sp.relative}}}function xM(e){let o=Math.max(e.x,e.z);return{name:Tr,position:{x:0,y:0,z:0},scale:{x:o,y:0,z:o}}}var nw=Ia(Sw());var ow={$id:"http://example.com/example.json",$schema:"http://json-schema.org/draft-07/schema",default:{},description:"This is the JSON Schema for the GameObjectsPositions structure",examples:[{gameObjectPositions:[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}},{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.TryCatchFinallyTest",position:{x:66,y:22.5,z:177.5},scale:{x:1,y:13,z:1}}],cycles:[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}]}],required:["gameObjectPositions"],title:"The root schema",type:"object",properties:{gameObjectPositions:{$id:"#/properties/gameObjectPositions",type:"array",title:"The gameObjectPositions schema",description:"Defines the position and scale of GameObjects",default:[],examples:[[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}},{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.SwitchCaseTest",position:{x:65,y:22,z:181},scale:{x:2,y:12,z:2}}]],additionalItems:!0,items:{$id:"#/properties/gameObjectPositions/items",anyOf:[{$id:"#/properties/gameObjectPositions/items/anyOf/0",type:"object",title:"The first anyOf schema",description:"Defines the properties of a GameObject",default:{},examples:[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}}],required:["name","position","scale"],properties:{name:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/name",type:"string",title:"The name schema",description:"An explanation about the purpose of this instance.",default:"",examples:["root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest"]},position:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position",type:"object",title:"The position schema",description:"The position in absolute values",default:{},examples:[{x:69,y:18.5,z:228.5}],required:["x","y","z"],properties:{x:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/x",type:"number",title:"The x schema",description:"x position",default:0,examples:[69]},y:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/y",type:"number",title:"The y schema",description:"y position",default:0,examples:[18.5]},z:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/z",type:"number",title:"The z schema",description:"z position",default:0,examples:[228.5]}},additionalProperties:!0},scale:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale",type:"object",title:"The scale schema",description:"The scale of GameObjects",default:{},examples:[{x:9,y:5,z:9}],required:["x","y","z"],properties:{x:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/x",type:"number",title:"The x schema",description:"x scale",default:0,examples:[9]},y:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/y",type:"number",title:"The y schema",description:"y scale",default:0,examples:[5]},z:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/z",type:"number",title:"The z schema",description:"z scale",default:0,examples:[9]}},additionalProperties:!0}},additionalProperties:!0}]}},cycles:{$id:"#/properties/cycles",type:"array",title:"The cycles schema",description:"Defines the cycles between GameObjects",default:[],examples:[[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}]],additionalItems:!0,items:{$id:"#/properties/cycles/items",anyOf:[{$id:"#/properties/cycles/items/anyOf/0",type:"object",title:"The first anyOf schema",description:"A cycle between two GameObjects",default:{},examples:[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}],required:["from","to"],properties:{from:{$id:"#/properties/cycles/items/anyOf/0/properties/from",type:"string",title:"The from schema",description:"from GameObject",default:"",examples:["root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser"]},to:{$id:"#/properties/cycles/items/anyOf/0/properties/to",type:"string",title:"The to schema",description:"to GameObject",default:"",examples:["root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"]}},additionalProperties:!0}]}}},additionalProperties:!0};function rw(e){return new nw.default({allErrors:!0,strict:!1}).validate(ow,JSON.parse(e))}var aw=e=>{let o=[];for(let t of e)o.push(SM(t));return o},SM=async e=>new Promise(o=>{let t=e.name.endsWith(".gz"),i=new FileReader;t?i.readAsArrayBuffer(e):i.readAsText(e,"utf8");let n;i.onload=r=>{let a=r.target.result.toString();n=t?Op(r.target.result,{to:"string"}):a,a.includes("gameObjectPositions")&&rw(a)&&(n=JSON.stringify(tw(a)))},i.onloadend=()=>{o(n)}});var sw=(()=>{class e{constructor(t){this.loadFilesUseCase=t}uploadFiles(){let t=Yx();t.addEventListener("change",()=>{this.uploadFilesOnEvent(t),t.remove()}),t.addEventListener("cancel",()=>t.remove()),t.click()}async uploadFilesOnEvent(t){if(!t.files||t.files.length===0)return;let i=t.files;await this.loadFilesUseCase.loadFromUpload(()=>this.readNameDataPairs(i))}async readNameDataPairs(t){return(await Promise.all(aw(t))).map((n,r)=>({fileName:t[r].name,fileSize:t[r].size,content:qp(n)}))}static{this.\u0275fac=function(i){return new(i||e)(M(Ls))}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var lw=(()=>{class e{constructor(){this.uploadFilesService=q(sw)}uploadFiles(){this.uploadFilesService.uploadFiles()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-nav-bar-folder-button"]],decls:2,vars:0,consts:[["type","button","title","Load cc.json files",1,"btn","btn-ghost","btn-square",3,"click"],[1,"fa","fa-folder-open","text-lg"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.uploadFiles()}),ue(1,"i",1),y())},encapsulation:2,changeDetection:0})}}return e})();var cw=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-nav-bar-logo"]],decls:2,vars:0,consts:[["href","https://codecharta.com/","target","_blank","rel","noopener noreferrer","title","CodeCharta website",1,"flex","items-center","px-2"],["src","codeCharta/assets/codecharta_logo.svg","alt","CodeCharta",1,"h-8","w-auto"]],template:function(i,n){i&1&&(w(0,"a",0),ue(1,"img",1),y())},encapsulation:2,changeDetection:0})}}return e})();var CM=["configDialog"],dw=(()=>{class e{constructor(){this.dialog=je.required("configDialog")}showSettings(){this.dialog().open()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-settings-button"]],viewQuery:function(i,n){i&1&&it(n.dialog,CM,5),i&2&&ot()},decls:4,vars:0,consts:[["configDialog",""],["type","button","title","Global Configuration",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(v(0,"button",1),W("click",function(){return n.showSettings()}),f(1,` Settings
3533
+ `),b(),F(2,"cc-global-configuration-dialog",null,0))},dependencies:[Hf],encapsulation:2,changeDetection:0})}}return e})();var mw=(()=>{class e{constructor(){this.store=q(me),this.isDomainViewAvailable=R(this.store.select(Qf),{initialValue:!1})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=P({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function MM(e,o){e&1&&ue(0,"span",2)}function _M(e,o){e&1&&ue(0,"span",2)}var hw=(()=>{class e{constructor(){this.fileStoreReadWindow=q(Te),this.fileSelectionModeService=q(tl),this.router=q(un),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0})}selectExplore(){this.showMetricsView(),this.isDeltaState()&&this.fileSelectionModeService.toggle()}selectCompare(){this.showMetricsView(),this.isDeltaState()||this.fileSelectionModeService.toggle()}showMetricsView(){this.router.navigateByUrl(Ei.metrics)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-mode-toggle"]],decls:7,vars:8,consts:[["role","tablist",1,"flex","items-center","gap-1"],["type","button","role","tab",1,"btn","btn-ghost","btn-sm","relative",3,"click"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(w(0,"div",0)(1,"button",1),K("click",function(){return n.selectExplore()}),f(2," Explore "),O(3,MM,1,0,"span",2),y(),w(4,"button",1),K("click",function(){return n.selectCompare()}),f(5," Compare "),O(6,_M,1,0,"span",2),y()()),i&2&&(m(),Ne("font-bold",!n.isDeltaState()),rt("aria-selected",!n.isDeltaState()),m(2),z(n.isDeltaState()?-1:3),m(),Ne("font-bold",n.isDeltaState()),rt("aria-selected",n.isDeltaState()),m(2),z(n.isDeltaState()?6:-1))},encapsulation:2,changeDetection:0})}}return e})();var pw=(()=>{class e{constructor(){this.export3DMapDialogStore=q(Ea)}export3DMap(){this.export3DMapDialogStore.requestExport()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-print-3d-button"]],decls:2,vars:0,consts:[["type","button","title","Download 3MF code file",1,"btn","btn-ghost","btn-sm",3,"click"]],template:function(i,n){i&1&&(w(0,"button",0),K("click",function(){return n.export3DMap()}),f(1,` 3D Print
3534
+ `),y())},encapsulation:2,changeDetection:0})}}return e})();function EM(e,o){e&1&&F(0,"cc-mode-toggle")(1,"cc-print-3d-button")}function kM(e,o){e&1&&F(0,"span",3)}function qM(e,o){if(e&1&&(v(0,"a",2,0),f(2," Explore "),O(3,kM,1,0,"span",3),b()),e&2){let t=Dr(1),i=D();L("routerLink",i.routeLinks.domain),m(3),z(t.isActive?3:-1)}}var TM={metrics:"Metric modes",domain:"Domain modes"},uw=(()=>{class e{constructor(){this.view=$.required(),this.routeLinks=Ei,this.groupLabel=X(()=>TM[this.view()])}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-view-mode-bar"]],hostAttrs:[1,"block"],inputs:{view:[1,"view"]},decls:3,vars:2,consts:[["domainExplore","routerLinkActive"],[1,"flex","items-center","justify-center","gap-1","py-0.5","border-0","m-0","px-0","min-w-0"],["routerLinkActive","font-bold","data-testid","view-mode-domain-explore",1,"btn","btn-ghost","btn-sm","relative",3,"routerLink"],[1,"cc-current-underline"]],template:function(i,n){i&1&&(v(0,"fieldset",1),O(1,EM,2,0)(2,qM,4,2,"a",2),b()),i&2&&(rt("aria-label",n.groupLabel()),m(),z(n.view()==="metrics"?1:2))},dependencies:[hw,pw,Wa,Oa],encapsulation:2,changeDetection:0})}}return e})();var IM=()=>({exact:!0});function RM(e,o){e&1&&F(0,"span",5)}function DM(e,o){e&1&&F(0,"span",5)}function AM(e,o){if(e&1){let t=xe();v(0,"a",9,1),W("mouseenter",function(){ae(t);let n=D();return se(n.openModeBar("domain"))})("focusin",function(){ae(t);let n=D();return se(n.openModeBar("domain"))}),f(2," Domain "),O(3,DM,1,0,"span",5),b()}if(e&2){let t=Dr(1),i=D();Ne("font-bold",t.isActive),L("routerLink",i.routeLinks.domain),m(3),z(t.isActive?3:-1)}}function LM(e,o){if(e&1){let t=xe();v(0,"div",10),W("mouseenter",function(){ae(t);let n=D();return se(n.cancelPendingClose())})("mouseleave",function(){ae(t);let n=D();return se(n.scheduleClosingModeBar())}),F(1,"cc-view-mode-bar",11),b()}e&2&&(m(),L("view",o))}function FM(e,o){if(e&1){let t=xe();v(0,"span",12),W("mouseenter",function(){ae(t);let n=D();return se(n.openModeBar(n.activeView()))}),Io(),v(1,"svg",13),F(2,"path",14),b()()}}var PM=200,fw=(()=>{class e{constructor(){this.readStore=q(mw),this.hostElement=q(Lt),this.isDomainViewAvailable=this.readStore.isDomainViewAvailable,this.activeView=R(q(or).activeView$,{requireSync:!0}),this.routeLinks=Ei,this.previewedView=be(null),this.pendingClose=null,q(dn).onDestroy(()=>this.cancelPendingClose())}openModeBar(t){this.cancelPendingClose(),this.previewedView.set(t)}cancelPendingClose(){this.pendingClose!==null&&(clearTimeout(this.pendingClose),this.pendingClose=null)}scheduleClosingModeBar(){this.cancelPendingClose(),this.pendingClose=setTimeout(()=>this.closeModeBar(),PM)}closeModeBarWhenFocusLeaves(t){let i=t.relatedTarget;(!(i instanceof Node)||!this.hostElement.nativeElement.contains(i))&&this.closeModeBar()}closeModeBar(){this.cancelPendingClose(),this.previewedView.set(null)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-view-switcher"]],hostAttrs:[1,"contents"],decls:9,vars:8,consts:[["metricsTab","routerLinkActive"],["domainTab","routerLinkActive"],[1,"flex","items-center",3,"click","mouseleave","focusout"],["aria-label","View","data-testid","view-switcher",1,"flex","items-center","gap-1"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the 3D metrics map","data-testid","view-switcher-metrics",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink","routerLinkActiveOptions"],[1,"cc-current-underline"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the domain-language word cloud","data-testid","view-switcher-domain",1,"btn","btn-ghost","btn-sm","relative",3,"font-bold","routerLink"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70"],["routerLinkActive","","ariaCurrentWhenActive","page","title","Show the domain-language word cloud","data-testid","view-switcher-domain",1,"btn","btn-ghost","btn-sm","relative",3,"mouseenter","focusin","routerLink"],["data-testid","view-mode-bar-overlay",1,"absolute","inset-x-0","top-full","z-[70]","border-b","border-base-300","bg-base-100","shadow-md",3,"mouseenter","mouseleave"],[3,"view"],["aria-hidden","true","data-testid","view-mode-bar-handle",1,"absolute","left-1/2","top-full","z-[70]","mt-px","flex","-translate-x-1/2","cursor-pointer","items-center","rounded-b-md","border","border-t-0","border-base-300","bg-base-100","px-2.5","pb-1","pt-0.5","text-base-content/40","shadow-sm","hover:text-base-content/70",3,"mouseenter"],["viewBox","0 0 10 6","fill","none","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round",1,"block","h-1.5","w-2.5"],["d","M1 1 5 5 9 1"]],template:function(i,n){if(i&1&&(v(0,"div",2),W("click",function(){return n.closeModeBar()})("mouseleave",function(){return n.scheduleClosingModeBar()})("focusout",function(a){return n.closeModeBarWhenFocusLeaves(a)}),v(1,"nav",3)(2,"a",4,0),W("mouseenter",function(){return n.openModeBar("metrics")})("focusin",function(){return n.openModeBar("metrics")}),f(4," Metric "),O(5,RM,1,0,"span",5),b(),O(6,AM,4,4,"a",6),b(),O(7,LM,2,1,"div",7)(8,FM,3,0,"span",8),b()),i&2){let r,a=Dr(3);m(2),Ne("font-bold",a.isActive),L("routerLink",n.routeLinks.metrics)("routerLinkActiveOptions",Jh(7,IM)),m(3),z(a.isActive?5:-1),m(),z(n.isDomainViewAvailable()?6:-1),m(),z((r=n.previewedView())?7:8,r)}},dependencies:[Wa,Oa,uw],encapsulation:2,changeDetection:0})}}return e})();function NM(e,o){e&1&&F(0,"cc-delta-selector")}function BM(e,o){e&1&&F(0,"cc-map-selector")}function VM(e,o){if(e&1){let t=xe();v(0,"cc-export-3D-map-dialog",5),W("closed",function(){ae(t);let n=D();return se(n.closeExportDialog())}),b()}}var Rh=(()=>{class e{constructor(){this.fileStoreReadWindow=q(Te),this.export3DMapDialogStore=q(Ea),this.isDeltaState=R(this.fileStoreReadWindow.isDeltaState$,{requireSync:!0}),this.isExportDialogOpen=this.export3DMapDialogStore.isDialogOpen}closeExportDialog(){this.export3DMapDialogStore.closeDialog()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=_({type:e,selectors:[["cc-nav-bar"]],features:[Yi([{provide:Is,useValue:"--cc-bars-height"}]),Ki([Rs])],decls:12,vars:2,consts:[[1,"navbar","relative","bg-base-100","border-b","border-base-300","min-h-12","px-2"],[1,"navbar-start","gap-1"],[1,"divider","divider-horizontal","mx-0"],[1,"navbar-center","self-stretch"],[1,"navbar-end"],[3,"closed"]],template:function(i,n){i&1&&(v(0,"div",0)(1,"div",1),F(2,"cc-nav-bar-logo")(3,"div",2)(4,"cc-nav-bar-folder-button"),O(5,NM,1,0,"cc-delta-selector")(6,BM,1,0,"cc-map-selector"),b(),v(7,"div",3),F(8,"cc-view-switcher"),b(),v(9,"div",4),F(10,"cc-settings-button"),b()(),O(11,VM,1,0,"cc-export-3D-map-dialog")),i&2&&(m(5),z(n.isDeltaState()?5:6),m(6),z(n.isExportDialogOpen()?11:-1))},dependencies:[Ih,cw,lw,Qx,Kx,dw,fw],encapsulation:2,changeDetection:0})}}return e})();function WM(e,o){e&1&&(v(0,"div"),F(1,"cc-nav-bar")(2,"router-outlet")(3,"cc-changelog-dialog"),b())}var gw=(()=>{class e{constructor(t){this.loadFilesUseCase=t,this.isInitialized=be(!1)}ngOnInit(){this.loadFilesUseCase.loadOnBoot().catch(()=>{}).finally(()=>{this.isInitialized.set(!0)})}static{this.\u0275fac=function(i){return new(i||e)(te(Ls))}}static{this.\u0275cmp=_({type:e,selectors:[["cc-code-charta"]],decls:3,vars:1,template:function(i,n){i&1&&(F(0,"cc-error-dialog")(1,"cc-toast"),O(2,WM,4,0,"div")),i&2&&(m(2),z(n.isInitialized()?2:-1))},dependencies:[Rh,Sd,hf,Of,mp],encapsulation:2,changeDetection:0})}}return e})();sp(gw,tt(Ee({},Km),{providers:[ep(),...Km.providers]}));