From e1ecc9ae0ddb024cedf92aa9ef40d86526bcaeb5 Mon Sep 17 00:00:00 2001 From: volterra79 Date: Wed, 12 Feb 2025 16:48:26 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- g3w-admin/client/static/client/app.min.js | 6 +++--- g3w-admin/client/static/client/app.min.js.map | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/g3w-admin/client/static/client/app.min.js b/g3w-admin/client/static/client/app.min.js index 732f35470..a35b327cc 100644 --- a/g3w-admin/client/static/client/app.min.js +++ b/g3w-admin/client/static/client/app.min.js @@ -4,7 +4,7 @@ of digits after the zone letter and two 100km letters - front half for easting meters, second half for northing meters`+_;var Re=_e/2,Be=0,$e=0,Xe,Ze,mt,St,It;return Re>0&&(Xe=1e5/Math.pow(10,Re),Ze=_.substring(D,D+Re),Be=parseFloat(Ze)*Xe,mt=_.substring(D+Re),$e=parseFloat(mt)*Xe),St=Be+ce,It=$e+Ie,{easting:St,northing:It,zoneLetter:j,zoneNumber:B,accuracy:Xe}}function Co(_,x){for(var C=ie.charCodeAt(x-1),R=1e5,T=!1;C!==_.charCodeAt(0);){if(C++,C===fe&&C++,C===Le&&C++,C>Ge){if(T)throw"Bad character: "+_;C=we,T=!0}R+=1e5}return R}function yl(_,x){if(_>"V")throw"MGRSPoint given invalid Northing "+_;for(var C=xe.charCodeAt(x-1),R=0,T=!1;C!==_.charCodeAt(0);){if(C++,C===fe&&C++,C===Le&&C++,C>Fe){if(T)throw"Bad character: "+_;C=we,T=!0}R+=1e5}return R}function Is(_){var x;switch(_){case"C":x=11e5;break;case"D":x=2e6;break;case"E":x=28e5;break;case"F":x=37e5;break;case"G":x=46e5;break;case"H":x=55e5;break;case"J":x=64e5;break;case"K":x=73e5;break;case"L":x=82e5;break;case"M":x=91e5;break;case"N":x=0;break;case"P":x=8e5;break;case"Q":x=17e5;break;case"R":x=26e5;break;case"S":x=35e5;break;case"T":x=44e5;break;case"U":x=53e5;break;case"V":x=62e5;break;case"W":x=7e6;break;case"X":x=79e5;break;default:x=-1}if(x>=0)return x;throw"Invalid zone letter: "+_}function Ws(_,x,C){if(!(this instanceof Ws))return new Ws(_,x,C);if(Array.isArray(_))this.x=_[0],this.y=_[1],this.z=_[2]||0;else if(typeof _=="object")this.x=_.x,this.y=_.y,this.z=_.z||0;else if(typeof _=="string"&&typeof x>"u"){var R=_.split(",");this.x=parseFloat(R[0],10),this.y=parseFloat(R[1],10),this.z=parseFloat(R[2],10)||0}else this.x=_,this.y=x,this.z=C||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ws.fromMGRS=function(_){return new Ws(wt(_))},Ws.prototype.toMGRS=function(_){return Ye([this.x,this.y],_)};var Bd=1,Ud=.25,vl=.046875,Io=.01953125,ks=.01068115234375,Nc=.75,Rc=.46875,Xi=.013020833333333334,ay=.007120768229166667,Sa=.3645833333333333,Zi=.005696614583333333,ly=.3076171875,bl=function(_){var x=[];x[0]=Bd-_*(Ud+_*(vl+_*(Io+_*ks))),x[1]=_*(Nc-_*(vl+_*(Io+_*ks)));var C=_*_;return x[2]=C*(Rc-_*(Xi+_*ay)),C*=_,x[3]=C*(Sa-_*Zi),x[4]=C*_*ly,x},Tt=function(_,x,C,R){return C*=x,x*=x,R[0]*_-C*(R[1]+x*(R[2]+x*(R[3]+x*R[4])))},dr=20,xl=function(_,x,C){for(var R=1/(1-x),T=_,D=dr;D;--D){var B=Math.sin(T),j=1-x*B*B;if(j=(Tt(T,B,Math.cos(T),C)-_)*(j*Math.sqrt(j))*R,T-=j,Math.abs(j)w?Math.tan(C):0,Xe=Math.pow($e,2),Ze=Math.pow(Xe,2);T=1-this.es*Math.pow(j,2),Ie=Ie/Math.sqrt(T);var mt=Tt(C,j,ne,this.en);D=this.a*(this.k0*Ie*(1+_e/6*(1-Xe+Re+_e/20*(5-18*Xe+Ze+14*Re-58*Xe*Re+_e/42*(61+179*Ze-Ze*Xe-479*Xe)))))+this.x0,B=this.a*(this.k0*(mt-this.ml0+j*R*Ie/2*(1+_e/12*(5-Xe+9*Re+4*Be+_e/30*(61+Ze-58*Xe+270*Re-330*Xe*Re+_e/56*(1385+543*Ze-Ze*Xe-3111*Xe))))))+this.y0}else{var ce=ne*Math.sin(R);if(Math.abs(Math.abs(ce)-1)=1){if(ce-1>w)return 93;B=0}else B=Math.acos(B);C<0&&(B=-B),B=this.a*this.k0*(B-this.lat0)+this.y0}return _.x=D,_.y=B,_}function tn(_){var x,C,R,T,D=(_.x-this.x0)*(1/this.a),B=(_.y-this.y0)*(1/this.a);if(this.es)if(x=this.ml0+B/this.k0,C=xl(x,this.es,this.en),Math.abs(C)w?Math.tan(C):0,$e=this.ep2*Math.pow(Re,2),Xe=Math.pow($e,2),Ze=Math.pow(Be,2),mt=Math.pow(Ze,2);x=1-this.es*Math.pow(_e,2);var St=D*Math.sqrt(x)/this.k0,It=Math.pow(St,2);x=x*Be,R=C-x*It/(1-this.es)*.5*(1-It/12*(5+3*Ze-9*$e*Ze+$e-4*Xe-It/30*(61+90*Ze-252*$e*Ze+45*mt+46*$e-It/56*(1385+3633*Ze+4095*mt+1574*mt*Ze)))),T=ke(this.long0+St*(1-It/6*(1+2*Ze+$e-It/20*(5+28*Ze+24*mt+8*$e*Ze+6*$e-It/42*(61+662*Ze+1320*mt+720*mt*Ze))))/Re)}else R=d*Me(B),T=0;else{var j=Math.exp(D/this.k0),ne=.5*(j-1/j),ce=this.lat0+B/this.k0,Ie=Math.cos(ce);x=Math.sqrt((1-Math.pow(Ie,2))/(1+Math.pow(ne,2))),R=Math.asin(x),B<0&&(R=-R),ne===0&&Ie===0?T=0:T=ke(Math.atan2(ne,Ie)+this.long0)}return _.x=T,_.y=R,_}var Zr=["Fast_Transverse_Mercator","Fast Transverse Mercator"],Ea={init:cy,forward:Ip,inverse:tn,names:Zr},Vd=function(_){var x=Math.exp(_);return x=(x-1/x)/2,x},_n=function(_,x){_=Math.abs(_),x=Math.abs(x);var C=Math.max(_,x),R=Math.min(_,x)/(C||1);return C*Math.sqrt(1+Math.pow(R,2))},Wd=function(_){var x=1+_,C=x-1;return C===0?_:_*Math.log(x)/C},Mc=function(_){var x=Math.abs(_);return x=Wd(x*(1+x/(_n(1,x)+1))),_<0?-x:x},wl=function(_,x){for(var C=2*Math.cos(2*x),R=_.length-1,T=_[R],D=0,B;--R>=0;)B=-D+C*T+_[R],D=T,T=B;return x+B*Math.sin(2*x)},uy=function(_,x){for(var C=2*Math.cos(x),R=_.length-1,T=_[R],D=0,B;--R>=0;)B=-D+C*T+_[R],D=T,T=B;return Math.sin(x)*B},Kr=function(_){var x=Math.exp(_);return x=(x+1/x)/2,x},Ac=function(_,x,C){for(var R=Math.sin(x),T=Math.cos(x),D=Vd(C),B=Kr(C),j=2*T*B,ne=-2*R*D,ce=_.length-1,Ie=_[ce],_e=0,Re=0,Be=0,$e,Xe;--ce>=0;)$e=Re,Xe=_e,Re=Ie,_e=Be,Ie=-$e+j*Re-ne*_e+_[ce],Be=-Xe+ne*Re+j*_e;return j=R*B,ne=T*D,[j*Ie-ne*Be,j*Be+ne*Ie]};function Sl(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Ea.init.apply(this),this.forward=Ea.forward,this.inverse=Ea.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var _=this.es/(1+Math.sqrt(1-this.es)),x=_/(2-_),C=x;this.cgb[0]=x*(2+x*(-2/3+x*(-2+x*(116/45+x*(26/45+x*(-2854/675)))))),this.cbg[0]=x*(-2+x*(2/3+x*(4/3+x*(-82/45+x*(32/45+x*(4642/4725)))))),C=C*x,this.cgb[1]=C*(7/3+x*(-8/5+x*(-227/45+x*(2704/315+x*(2323/945))))),this.cbg[1]=C*(5/3+x*(-16/15+x*(-13/9+x*(904/315+x*(-1522/945))))),C=C*x,this.cgb[2]=C*(56/15+x*(-136/35+x*(-1262/105+x*(73814/2835)))),this.cbg[2]=C*(-26/15+x*(34/21+x*(8/5+x*(-12686/2835)))),C=C*x,this.cgb[3]=C*(4279/630+x*(-332/35+x*(-399572/14175))),this.cbg[3]=C*(1237/630+x*(-12/5+x*(-24832/14175))),C=C*x,this.cgb[4]=C*(4174/315+x*(-144838/6237)),this.cbg[4]=C*(-734/315+x*(109598/31185)),C=C*x,this.cgb[5]=C*(601676/22275),this.cbg[5]=C*(444337/155925),C=Math.pow(x,2),this.Qn=this.k0/(1+x)*(1+C*(1/4+C*(1/64+C/256))),this.utg[0]=x*(-.5+x*(2/3+x*(-37/96+x*(1/360+x*(81/512+x*(-96199/604800)))))),this.gtu[0]=x*(.5+x*(-2/3+x*(5/16+x*(41/180+x*(-127/288+x*(7891/37800)))))),this.utg[1]=C*(-1/48+x*(-1/15+x*(437/1440+x*(-46/105+x*(1118711/3870720))))),this.gtu[1]=C*(13/48+x*(-3/5+x*(557/1440+x*(281/630+x*(-1983433/1935360))))),C=C*x,this.utg[2]=C*(-17/480+x*(37/840+x*(209/4480+x*(-5569/90720)))),this.gtu[2]=C*(61/240+x*(-103/140+x*(15061/26880+x*(167603/181440)))),C=C*x,this.utg[3]=C*(-4397/161280+x*(11/504+x*(830251/7257600))),this.gtu[3]=C*(49561/161280+x*(-179/168+x*(6601661/7257600))),C=C*x,this.utg[4]=C*(-4583/161280+x*(108847/3991680)),this.gtu[4]=C*(34729/80640+x*(-3418889/1995840)),C=C*x,this.utg[5]=C*(-20648693/638668800),this.gtu[5]=C*(212378941/319334400);var R=wl(this.cbg,this.lat0);this.Zb=-this.Qn*(R+uy(this.gtu,2*R))}function Ki(_){var x=ke(_.x-this.long0),C=_.y;C=wl(this.cbg,C);var R=Math.sin(C),T=Math.cos(C),D=Math.sin(x),B=Math.cos(x);C=Math.atan2(R,B*T),x=Math.atan2(D*T,_n(R,T*B)),x=Mc(Math.tan(x));var j=Ac(this.gtu,2*C,2*x);C=C+j[0],x=x+j[1];var ne,ce;return Math.abs(x)<=2.623395162778?(ne=this.a*(this.Qn*x)+this.x0,ce=this.a*(this.Qn*C+this.Zb)+this.y0):(ne=1/0,ce=1/0),_.x=ne,_.y=ce,_}function El(_){var x=(_.x-this.x0)*(1/this.a),C=(_.y-this.y0)*(1/this.a);C=(C-this.Zb)/this.Qn,x=x/this.Qn;var R,T;if(Math.abs(x)<=2.623395162778){var D=Ac(this.utg,2*C,2*x);C=C+D[0],x=x+D[1],x=Math.atan(Vd(x));var B=Math.sin(C),j=Math.cos(C),ne=Math.sin(x),ce=Math.cos(x);C=Math.atan2(B*ce,_n(ne,ce*j)),x=Math.atan2(ne,ce*j),R=ke(x+this.long0),T=wl(this.cgb,C)}else R=1/0,T=1/0;return _.x=R,_.y=T,_}var kp=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"],_i={init:Sl,forward:Ki,inverse:El,names:kp},dy=function(_,x){if(_===void 0){if(_=Math.floor((ke(x)+Math.PI)*30/Math.PI)+1,_<0)return 0;if(_>60)return 60}return _},Lp="etmerc";function Tp(){var _=dy(this.zone,this.long0);if(_===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(_)-183)*E,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,_i.init.apply(this),this.forward=_i.forward,this.inverse=_i.inverse}var hy=["Universal Transverse Mercator System","utm"],Np={init:Tp,names:hy,dependsOn:Lp},Ca=function(_,x){return Math.pow((1-_)/(1+_),x)},Rp=20;function Oi(){var _=Math.sin(this.lat0),x=Math.cos(this.lat0);x*=x,this.rc=Math.sqrt(1-this.es)/(1-this.es*_*_),this.C=Math.sqrt(1+this.es*x*x/(1-this.es)),this.phic0=Math.asin(_/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+O)/(Math.pow(Math.tan(.5*this.lat0+O),this.C)*Ca(this.e*_,this.ratexp))}function Ln(_){var x=_.x,C=_.y;return _.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*C+O),this.C)*Ca(this.e*Math.sin(C),this.ratexp))-d,_.x=this.C*x,_}function yi(_){for(var x=1e-14,C=_.x/this.C,R=_.y,T=Math.pow(Math.tan(.5*R+O)/this.K,1/this.C),D=Rp;D>0&&(R=2*Math.atan(T*Ca(this.e*Math.sin(_.y),-.5*this.e))-d,!(Math.abs(R-_.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=w&&Math.abs(Math.cos(this.lat_ts))>w&&(this.k0=.5*this.cons*Oe(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Pe(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=Oe(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-d,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function ko(_){var x=_.x,C=_.y,R=Math.sin(C),T=Math.cos(C),D,B,j,ne,ce,Ie,_e=ke(x-this.long0);return Math.abs(Math.abs(x-this.long0)-Math.PI)<=w&&Math.abs(C+this.lat0)<=w?(_.x=NaN,_.y=NaN,_):this.sphere?(D=2*this.k0/(1+this.sinlat0*R+this.coslat0*T*Math.cos(_e)),_.x=this.a*D*T*Math.sin(_e)+this.x0,_.y=this.a*D*(this.coslat0*R-this.sinlat0*T*Math.cos(_e))+this.y0,_):(B=2*Math.atan(this.ssfn_(C,R,this.e))-d,ne=Math.cos(B),j=Math.sin(B),Math.abs(this.coslat0)<=w?(ce=Pe(this.e,C*this.con,this.con*R),Ie=2*this.a*this.k0*ce/this.cons,_.x=this.x0+Ie*Math.sin(x-this.long0),_.y=this.y0-this.con*Ie*Math.cos(x-this.long0),_):(Math.abs(this.sinlat0)0?x=ke(this.long0+Math.atan2(_.x,-1*_.y)):x=ke(this.long0+Math.atan2(_.x,_.y)):x=ke(this.long0+Math.atan2(_.x*Math.sin(j),B*this.coslat0*Math.cos(j)-_.y*this.sinlat0*Math.sin(j))),_.x=x,_.y=C,_)}else if(Math.abs(this.coslat0)<=w){if(B<=w)return C=this.lat0,x=this.long0,_.x=x,_.y=C,_;_.x*=this.con,_.y*=this.con,R=B*this.cons/(2*this.a*this.k0),C=this.con*De(this.e,R),x=this.con*ke(this.con*this.long0+Math.atan2(_.x,-1*_.y))}else T=2*Math.atan(B*this.cosX0/(2*this.a*this.k0*this.ms1)),x=this.long0,B<=w?D=this.X0:(D=Math.asin(Math.cos(T)*this.sinX0+_.y*Math.sin(T)*this.cosX0/B),x=ke(this.long0+Math.atan2(_.x*Math.sin(T),B*this.cosX0*Math.cos(T)-_.y*this.sinX0*Math.sin(T)))),C=-1*De(this.e,Math.tan(.5*(d+D)));return _.x=x,_.y=C,_}var Ia=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)","Polar_Stereographic"],Yd={init:Dc,forward:ko,inverse:jc,names:Ia,ssfn_:Fc};function qc(){var _=this.lat0;this.lambda0=this.long0;var x=Math.sin(_),C=this.a,R=this.rf,T=1/R,D=2*T-Math.pow(T,2),B=this.e=Math.sqrt(D);this.R=this.k0*C*Math.sqrt(1-D)/(1-D*Math.pow(x,2)),this.alpha=Math.sqrt(1+D/(1-D)*Math.pow(Math.cos(_),4)),this.b0=Math.asin(x/this.alpha);var j=Math.log(Math.tan(Math.PI/4+this.b0/2)),ne=Math.log(Math.tan(Math.PI/4+_/2)),ce=Math.log((1+B*x)/(1-B*x));this.K=j-this.alpha*ne+this.alpha*B/2*ce}function zc(_){var x=Math.log(Math.tan(Math.PI/4-_.y/2)),C=this.e/2*Math.log((1+this.e*Math.sin(_.y))/(1-this.e*Math.sin(_.y))),R=-this.alpha*(x+C)+this.K,T=2*(Math.atan(Math.exp(R))-Math.PI/4),D=this.alpha*(_.x-this.lambda0),B=Math.atan(Math.sin(D)/(Math.sin(this.b0)*Math.tan(T)+Math.cos(this.b0)*Math.cos(D))),j=Math.asin(Math.cos(this.b0)*Math.sin(T)-Math.sin(this.b0)*Math.cos(T)*Math.cos(D));return _.y=this.R/2*Math.log((1+Math.sin(j))/(1-Math.sin(j)))+this.y0,_.x=this.R*B+this.x0,_}function Xd(_){for(var x=_.x-this.x0,C=_.y-this.y0,R=x/this.R,T=2*(Math.atan(Math.exp(C/this.R))-Math.PI/4),D=Math.asin(Math.cos(this.b0)*Math.sin(T)+Math.sin(this.b0)*Math.cos(T)*Math.cos(R)),B=Math.atan(Math.sin(R)/(Math.cos(this.b0)*Math.cos(R)-Math.sin(this.b0)*Math.tan(T))),j=this.lambda0+B/this.alpha,ne=0,ce=D,Ie=-1e3,_e=0;Math.abs(ce-Ie)>1e-7;){if(++_e>20)return;ne=1/this.alpha*(Math.log(Math.tan(Math.PI/4+D/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(ce))/2)),Ie=ce,ce=2*Math.atan(Math.exp(ne))-Math.PI/2}return _.x=j,_.y=ce,_}var Zd=["somerc"],Kd={init:qc,forward:zc,inverse:Xd,names:Zd},qe=1e-7;function Gc(_){var x=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],C=typeof _.PROJECTION=="object"?Object.keys(_.PROJECTION)[0]:_.PROJECTION;return"no_uoff"in _||"no_off"in _||x.indexOf(C)!==-1}function Lo(){var _,x,C,R,T,D,B,j,ne,ce,Ie=0,_e,Re=0,Be=0,$e=0,Xe=0,Ze=0,mt=0;this.no_off=Gc(this),this.no_rot="no_rot"in this;var St=!1;"alpha"in this&&(St=!0);var It=!1;if("rectified_grid_angle"in this&&(It=!0),St&&(mt=this.alpha),It&&(Ie=this.rectified_grid_angle*E),St||It)Re=this.longc;else if(Be=this.long1,Xe=this.lat1,$e=this.long2,Ze=this.lat2,Math.abs(Xe-Ze)<=qe||(_=Math.abs(Xe))<=qe||Math.abs(_-d)<=qe||Math.abs(Math.abs(this.lat0)-d)<=qe||Math.abs(Math.abs(Ze)-d)<=qe)throw new Error;var Jt=1-this.es;x=Math.sqrt(Jt),Math.abs(this.lat0)>w?(j=Math.sin(this.lat0),C=Math.cos(this.lat0),_=1-this.es*j*j,this.B=C*C,this.B=Math.sqrt(1+this.es*this.B*this.B/Jt),this.A=this.B*this.k0*x/_,R=this.B*x/(C*Math.sqrt(_)),T=R*R-1,T<=0?T=0:(T=Math.sqrt(T),this.lat0<0&&(T=-T)),this.E=T+=R,this.E*=Math.pow(Pe(this.e,this.lat0,j),this.B)):(this.B=1/x,this.A=this.k0,this.E=R=T=1),St||It?(St?(_e=Math.asin(Math.sin(mt)/R),It||(Ie=mt)):(_e=Ie,mt=Math.asin(R*Math.sin(_e))),this.lam0=Re-Math.asin(.5*(T-1/T)*Math.tan(_e))/this.B):(D=Math.pow(Pe(this.e,Xe,Math.sin(Xe)),this.B),B=Math.pow(Pe(this.e,Ze,Math.sin(Ze)),this.B),T=this.E/D,ne=(B-D)/(B+D),ce=this.E*this.E,ce=(ce-B*D)/(ce+B*D),_=Be-$e,_<-Math.pi?$e-=H:_>Math.pi&&($e+=H),this.lam0=ke(.5*(Be+$e)-Math.atan(ce*Math.tan(.5*this.B*(Be-$e))/ne)/this.B),_e=Math.atan(2*Math.sin(this.B*ke(Be-this.lam0))/(T-1/T)),Ie=mt=Math.asin(R*Math.sin(_e))),this.singam=Math.sin(_e),this.cosgam=Math.cos(_e),this.sinrot=Math.sin(Ie),this.cosrot=Math.cos(Ie),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(R*R-1)/Math.cos(mt))),this.lat0<0&&(this.u_0=-this.u_0)),T=.5*_e,this.v_pole_n=this.ArB*Math.log(Math.tan(O-T)),this.v_pole_s=this.ArB*Math.log(Math.tan(O+T))}function Qd(_){var x={},C,R,T,D,B,j,ne,ce;if(_.x=_.x-this.lam0,Math.abs(Math.abs(_.y)-d)>w){if(B=this.E/Math.pow(Pe(this.e,_.y,Math.sin(_.y)),this.B),j=1/B,C=.5*(B-j),R=.5*(B+j),D=Math.sin(this.B*_.x),T=(C*this.singam-D*this.cosgam)/R,Math.abs(Math.abs(T)-1)0?this.v_pole_n:this.v_pole_s,ne=this.ArB*_.y;return this.no_rot?(x.x=ne,x.y=ce):(ne-=this.u_0,x.x=ce*this.cosrot+ne*this.sinrot,x.y=ne*this.cosrot-ce*this.sinrot),x.x=this.a*x.x+this.x0,x.y=this.a*x.y+this.y0,x}function Jd(_){var x,C,R,T,D,B,j,ne={};if(_.x=(_.x-this.x0)*(1/this.a),_.y=(_.y-this.y0)*(1/this.a),this.no_rot?(C=_.y,x=_.x):(C=_.x*this.cosrot-_.y*this.sinrot,x=_.y*this.cosrot+_.x*this.sinrot+this.u_0),R=Math.exp(-this.BrA*C),T=.5*(R-1/R),D=.5*(R+1/R),B=Math.sin(this.BrA*x),j=(B*this.cosgam+T*this.singam)/D,Math.abs(Math.abs(j)-1)w?this.ns=Math.log(R/j)/Math.log(T/ne):this.ns=x,isNaN(this.ns)&&(this.ns=x),this.f0=R/(this.ns*Math.pow(T,this.ns)),this.rh=this.a*this.f0*Math.pow(ce,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function Rr(_){var x=_.x,C=_.y;Math.abs(2*Math.abs(C)-Math.PI)<=w&&(C=Me(C)*(d-2*w));var R=Math.abs(Math.abs(C)-d),T,D;if(R>w)T=Pe(this.e,C,Math.sin(C)),D=this.a*this.f0*Math.pow(T,this.ns);else{if(R=C*this.ns,R<=0)return null;D=0}var B=this.ns*ke(x-this.long0);return _.x=this.k0*(D*Math.sin(B))+this.x0,_.y=this.k0*(this.rh-D*Math.cos(B))+this.y0,_}function $c(_){var x,C,R,T,D,B=(_.x-this.x0)/this.k0,j=this.rh-(_.y-this.y0)/this.k0;this.ns>0?(x=Math.sqrt(B*B+j*j),C=1):(x=-Math.sqrt(B*B+j*j),C=-1);var ne=0;if(x!==0&&(ne=Math.atan2(C*B,C*j)),x!==0||this.ns>0){if(C=1/this.ns,R=Math.pow(x/(this.a*this.f0),C),T=De(this.e,R),T===-9999)return null}else T=-d;return D=ke(ne/this.ns+this.long0),_.x=D,_.y=T,_}var Ii=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"],vn={init:Cl,forward:Rr,inverse:$c,names:Ii};function Ap(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function ka(_){var x,C,R,T,D,B,j,ne=_.x,ce=_.y,Ie=ke(ne-this.long0);return x=Math.pow((1+this.e*Math.sin(ce))/(1-this.e*Math.sin(ce)),this.alfa*this.e/2),C=2*(Math.atan(this.k*Math.pow(Math.tan(ce/2+this.s45),this.alfa)/x)-this.s45),R=-Ie*this.alfa,T=Math.asin(Math.cos(this.ad)*Math.sin(C)+Math.sin(this.ad)*Math.cos(C)*Math.cos(R)),D=Math.asin(Math.cos(C)*Math.sin(R)/Math.cos(T)),B=this.n*D,j=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(T/2+this.s45),this.n),_.y=j*Math.cos(B)/1,_.x=j*Math.sin(B)/1,this.czech||(_.y*=-1,_.x*=-1),_}function Bc(_){var x,C,R,T,D,B,j,ne,ce=_.x;_.x=_.y,_.y=ce,this.czech||(_.y*=-1,_.x*=-1),B=Math.sqrt(_.x*_.x+_.y*_.y),D=Math.atan2(_.y,_.x),T=D/Math.sin(this.s0),R=2*(Math.atan(Math.pow(this.ro0/B,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),x=Math.asin(Math.cos(this.ad)*Math.sin(R)-Math.sin(this.ad)*Math.cos(R)*Math.cos(T)),C=Math.asin(Math.cos(R)*Math.sin(T)/Math.cos(x)),_.x=this.long0-C/this.alfa,j=x,ne=0;var Ie=0;do _.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(x/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(j))/(1-this.e*Math.sin(j)),this.e/2))-this.s45),Math.abs(j-_.y)<1e-10&&(ne=1),j=_.y,Ie+=1;while(ne===0&&Ie<15);return Ie>=15?null:_}var th=["Krovak","krovak"],Jr={init:Ap,forward:ka,inverse:Bc,names:th},ci=function(_,x,C,R,T){return _*T-x*Math.sin(2*T)+C*Math.sin(4*T)-R*Math.sin(6*T)},Ls=function(_){return 1-.25*_*(1+_/16*(3+1.25*_))},Hs=function(_){return .375*_*(1+.25*_*(1+.46875*_))},To=function(_){return .05859375*_*_*(1+.75*_)},Ys=function(_){return _*_*_*(35/3072)},es=function(_,x,C){var R=x*C;return _/Math.sqrt(1-R*R)},Mr=function(_){return Math.abs(_)1e-7?(C=_*x,(1-_*_)*(x/(1-C*C)-.5/_*Math.log((1-C)/(1+C)))):2*x},Vc=1,rh=2,sh=3,Or=4;function Wc(){var _=Math.abs(this.lat0);if(Math.abs(_-d)0){var x;switch(this.qp=Ar(this.e,1),this.mmf=.5/(1-this.es),this.apa=Pr(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),x=Math.sin(this.lat0),this.sinb1=Ar(this.e,x)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*x*x)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function oh(_){var x,C,R,T,D,B,j,ne,ce,Ie,_e=_.x,Re=_.y;if(_e=ke(_e-this.long0),this.sphere){if(D=Math.sin(Re),Ie=Math.cos(Re),R=Math.cos(_e),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(C=this.mode===this.EQUIT?1+Ie*R:1+this.sinph0*D+this.cosph0*Ie*R,C<=w)return null;C=Math.sqrt(2/C),x=C*Ie*Math.sin(_e),C*=this.mode===this.EQUIT?D:this.cosph0*D-this.sinph0*Ie*R}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(R=-R),Math.abs(Re+this.lat0)=0?(x=(ce=Math.sqrt(B))*T,C=R*(this.mode===this.S_POLE?ce:-ce)):x=C=0;break}}return _.x=this.a*x+this.x0,_.y=this.a*C+this.y0,_}function ah(_){_.x-=this.x0,_.y-=this.y0;var x=_.x/this.a,C=_.y/this.a,R,T,D,B,j,ne,ce;if(this.sphere){var Ie=0,_e,Re=0;if(_e=Math.sqrt(x*x+C*C),T=_e*.5,T>1)return null;switch(T=2*Math.asin(T),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(Re=Math.sin(T),Ie=Math.cos(T)),this.mode){case this.EQUIT:T=Math.abs(_e)<=w?0:Math.asin(C*Re/_e),x*=Re,C=Ie*_e;break;case this.OBLIQ:T=Math.abs(_e)<=w?this.lat0:Math.asin(Ie*this.sinph0+C*Re*this.cosph0/_e),x*=Re*this.cosph0,C=(Ie-Math.sin(T)*this.sinph0)*_e;break;case this.N_POLE:C=-C,T=d-T;break;case this.S_POLE:T-=d;break}R=C===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(x,C)}else{if(ce=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(x/=this.dd,C*=this.dd,ne=Math.sqrt(x*x+C*C),ne1&&(_=_>1?1:-1),Math.asin(_)};function lh(){Math.abs(this.lat1+this.lat2)w?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function ei(_){var x=_.x,C=_.y;this.sin_phi=Math.sin(C),this.cos_phi=Math.cos(C);var R=Ar(this.e3,this.sin_phi),T=this.a*Math.sqrt(this.c-this.ns0*R)/this.ns0,D=this.ns0*ke(x-this.long0),B=T*Math.sin(D)+this.x0,j=this.rh-T*Math.cos(D)+this.y0;return _.x=B,_.y=j,_}function Op(_){var x,C,R,T,D,B;return _.x-=this.x0,_.y=this.rh-_.y+this.y0,this.ns0>=0?(x=Math.sqrt(_.x*_.x+_.y*_.y),R=1):(x=-Math.sqrt(_.x*_.x+_.y*_.y),R=-1),T=0,x!==0&&(T=Math.atan2(R*_.x,R*_.y)),R=x*this.ns0/this.a,this.sphere?B=Math.asin((this.c-R*R)/(2*this.ns0)):(C=(this.c-R*R)/this.ns0,B=this.phi1z(this.e3,C)),D=ke(T/this.ns0+this.long0),_.x=D,_.y=B,_}function Pp(_,x){var C,R,T,D,B,j=ts(.5*x);if(_0||Math.abs(B)<=w?(j=this.x0+this.a*D*C*Math.sin(R)/B,ne=this.y0+this.a*D*(this.cos_p14*x-this.sin_p14*C*T)/B):(j=this.x0+this.infinity_dist*C*Math.sin(R),ne=this.y0+this.infinity_dist*(this.cos_p14*x-this.sin_p14*C*T)),_.x=j,_.y=ne,_}function ki(_){var x,C,R,T,D,B;return _.x=(_.x-this.x0)/this.a,_.y=(_.y-this.y0)/this.a,_.x/=this.k0,_.y/=this.k0,(x=Math.sqrt(_.x*_.x+_.y*_.y))?(T=Math.atan2(x,this.rc),C=Math.sin(T),R=Math.cos(T),B=ts(R*this.sin_p14+_.y*C*this.cos_p14/x),D=Math.atan2(_.x*C,x*this.cos_p14*R-_.y*this.sin_p14*C),D=ke(this.long0+D)):(B=this.phic0,D=0),_.x=D,_.y=B,_}var Xc=["gnom"],Ll={init:Zs,forward:ch,inverse:ki,names:Xc},py=function(_,x){var C=1-(1-_*_)/(2*_)*Math.log((1-_)/(1+_));if(Math.abs(Math.abs(x)-C)<1e-6)return x<0?-1*d:d;for(var R=Math.asin(.5*x),T,D,B,j,ne=0;ne<30;ne++)if(D=Math.sin(R),B=Math.cos(R),j=_*D,T=Math.pow(1-j*j,2)/(2*B)*(x/(1-_*_)-D/(1-j*j)+.5/_*Math.log((1-j)/(1+j))),R+=T,Math.abs(T)<=1e-10)return R;return NaN};function Ro(){this.sphere||(this.k0=Oe(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function uh(_){var x=_.x,C=_.y,R,T,D=ke(x-this.long0);if(this.sphere)R=this.x0+this.a*D*Math.cos(this.lat_ts),T=this.y0+this.a*Math.sin(C)/Math.cos(this.lat_ts);else{var B=Ar(this.e,Math.sin(C));R=this.x0+this.a*this.k0*D,T=this.y0+this.a*B*.5/this.k0}return _.x=R,_.y=T,_}function ns(_){_.x-=this.x0,_.y-=this.y0;var x,C;return this.sphere?(x=ke(this.long0+_.x/this.a/Math.cos(this.lat_ts)),C=Math.asin(_.y/this.a*Math.cos(this.lat_ts))):(C=py(this.e,2*_.y*this.k0/this.a),x=ke(this.long0+_.x/(this.a*this.k0))),_.x=x,_.y=C,_}var dh=["cea"],Fi={init:Ro,forward:uh,inverse:ns,names:dh};function Ks(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function ct(_){var x=_.x,C=_.y,R=ke(x-this.long0),T=Mr(C-this.lat0);return _.x=this.x0+this.a*R*this.rc,_.y=this.y0+this.a*T,_}function Qs(_){var x=_.x,C=_.y;return _.x=ke(this.long0+(x-this.x0)/(this.a*this.rc)),_.y=Mr(this.lat0+(C-this.y0)/this.a),_}var Qi=["Equirectangular","Equidistant_Cylindrical","eqc"],Tl={init:Ks,forward:ct,inverse:Qs,names:Qi},Ra=20;function my(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ls(this.es),this.e1=Hs(this.es),this.e2=To(this.es),this.e3=Ys(this.es),this.ml0=this.a*ci(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Ts(_){var x=_.x,C=_.y,R,T,D,B=ke(x-this.long0);if(D=B*Math.sin(C),this.sphere)Math.abs(C)<=w?(R=this.a*B,T=-1*this.a*this.lat0):(R=this.a*Math.sin(D)/Math.tan(C),T=this.a*(Mr(C-this.lat0)+(1-Math.cos(D))/Math.tan(C)));else if(Math.abs(C)<=w)R=this.a*B,T=-1*this.ml0;else{var j=es(this.a,this.e,Math.sin(C))/Math.tan(C);R=j*Math.sin(D),T=this.a*ci(this.e0,this.e1,this.e2,this.e3,C)-this.ml0+j*(1-Math.cos(D))}return _.x=R+this.x0,_.y=T+this.y0,_}function Ma(_){var x,C,R,T,D,B,j,ne,ce;if(R=_.x-this.x0,T=_.y-this.y0,this.sphere)if(Math.abs(T+this.a*this.lat0)<=w)x=ke(R/this.a+this.long0),C=0;else{B=this.lat0+T/this.a,j=R*R/this.a/this.a+B*B,ne=B;var Ie;for(D=Ra;D;--D)if(Ie=Math.tan(ne),ce=-1*(B*(ne*Ie+1)-ne-.5*(ne*ne+j)*Ie)/((ne-B)/Ie-1),ne+=ce,Math.abs(ce)<=w){C=ne;break}x=ke(this.long0+Math.asin(R*Math.tan(ne)/this.a)/Math.sin(C))}else if(Math.abs(T+this.ml0)<=w)C=0,x=ke(this.long0+R/this.a);else{B=(this.ml0+T)/this.a,j=R*R/this.a/this.a+B*B,ne=B;var _e,Re,Be,$e,Xe;for(D=Ra;D;--D)if(Xe=this.e*Math.sin(ne),_e=Math.sqrt(1-Xe*Xe)*Math.tan(ne),Re=this.a*ci(this.e0,this.e1,this.e2,this.e3,ne),Be=this.e0-2*this.e1*Math.cos(2*ne)+4*this.e2*Math.cos(4*ne)-6*this.e3*Math.cos(6*ne),$e=Re/this.a,ce=(B*(_e*$e+1)-$e-.5*_e*($e*$e+j))/(this.es*Math.sin(2*ne)*($e*$e+j-2*B*$e)/(4*_e)+(B-$e)*(_e*Be-2/Math.sin(2*ne))-Be),ne-=ce,Math.abs(ce)<=w){C=ne;break}_e=Math.sqrt(1-this.es*Math.pow(Math.sin(C),2))*Math.tan(C),x=ke(this.long0+Math.asin(R*_e/this.a)/Math.sin(C))}return _.x=x,_.y=C,_}var Ns=["Polyconic","poly"],Nl={init:my,forward:Ts,inverse:Ma,names:Ns};function is(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function Rs(_){var x,C=_.x,R=_.y,T=R-this.lat0,D=C-this.long0,B=T/m*1e-5,j=D,ne=1,ce=0;for(x=1;x<=10;x++)ne=ne*B,ce=ce+this.A[x]*ne;var Ie=ce,_e=j,Re=1,Be=0,$e,Xe,Ze=0,mt=0;for(x=1;x<=6;x++)$e=Re*Ie-Be*_e,Xe=Be*Ie+Re*_e,Re=$e,Be=Xe,Ze=Ze+this.B_re[x]*Re-this.B_im[x]*Be,mt=mt+this.B_im[x]*Re+this.B_re[x]*Be;return _.x=mt*this.a+this.x0,_.y=Ze*this.a+this.y0,_}function jp(_){var x,C=_.x,R=_.y,T=C-this.x0,D=R-this.y0,B=D/this.a,j=T/this.a,ne=1,ce=0,Ie,_e,Re=0,Be=0;for(x=1;x<=6;x++)Ie=ne*B-ce*j,_e=ce*B+ne*j,ne=Ie,ce=_e,Re=Re+this.C_re[x]*ne-this.C_im[x]*ce,Be=Be+this.C_im[x]*ne+this.C_re[x]*ce;for(var $e=0;$e.999999999999&&(C=.999999999999),x=Math.asin(C);var R=ke(this.long0+_.x/(.900316316158*this.a*Math.cos(x)));R<-Math.PI&&(R=-Math.PI),R>Math.PI&&(R=Math.PI),C=(2*x+Math.sin(2*x))/Math.PI,Math.abs(C)>1&&(C=1);var T=Math.asin(C);return _.x=R,_.y=T,_}var by=["Mollweide","moll"],fh={init:yy,forward:Qc,inverse:vy,names:by};function Jc(){Math.abs(this.lat1+this.lat2)=0?(C=Math.sqrt(_.x*_.x+_.y*_.y),x=1):(C=-Math.sqrt(_.x*_.x+_.y*_.y),x=-1);var D=0;if(C!==0&&(D=Math.atan2(x*_.x,x*_.y)),this.sphere)return T=ke(this.long0+D/this.ns),R=Mr(this.g-C/this.a),_.x=T,_.y=R,_;var B=this.g-C/this.a;return R=No(B,this.e0,this.e1,this.e2,this.e3),T=ke(this.long0+D/this.ns),_.x=T,_.y=R,_}var xy=["Equidistant_Conic","eqdc"],Js={init:Jc,forward:Oo,inverse:eu,names:xy};function Ol(){this.R=this.a}function tu(_){var x=_.x,C=_.y,R=ke(x-this.long0),T,D;Math.abs(C)<=w&&(T=this.x0+this.R*R,D=this.y0);var B=ts(2*Math.abs(C/Math.PI));(Math.abs(R)<=w||Math.abs(Math.abs(C)-d)<=w)&&(T=this.x0,C>=0?D=this.y0+Math.PI*this.R*Math.tan(.5*B):D=this.y0+Math.PI*this.R*-Math.tan(.5*B));var j=.5*Math.abs(Math.PI/R-R/Math.PI),ne=j*j,ce=Math.sin(B),Ie=Math.cos(B),_e=Ie/(ce+Ie-1),Re=_e*_e,Be=_e*(2/ce-1),$e=Be*Be,Xe=Math.PI*this.R*(j*(_e-$e)+Math.sqrt(ne*(_e-$e)*(_e-$e)-($e+ne)*(Re-$e)))/($e+ne);R<0&&(Xe=-Xe),T=this.x0+Xe;var Ze=ne+_e;return Xe=Math.PI*this.R*(Be*Ze-j*Math.sqrt(($e+ne)*(ne+1)-Ze*Ze))/($e+ne),C>=0?D=this.y0+Xe:D=this.y0-Xe,_.x=T,_.y=D,_}function wy(_){var x,C,R,T,D,B,j,ne,ce,Ie,_e,Re,Be;return _.x-=this.x0,_.y-=this.y0,_e=Math.PI*this.R,R=_.x/_e,T=_.y/_e,D=R*R+T*T,B=-Math.abs(T)*(1+D),j=B-2*T*T+R*R,ne=-2*B+1+2*T*T+D*D,Be=T*T/ne+(2*j*j*j/ne/ne/ne-9*B*j/ne/ne)/27,ce=(B-j*j/3/ne)/ne,Ie=2*Math.sqrt(-ce/3),_e=3*Be/ce/Ie,Math.abs(_e)>1&&(_e>=0?_e=1:_e=-1),Re=Math.acos(_e)/3,_.y>=0?C=(-Ie*Math.cos(Re+Math.PI/3)-j/3/ne)*Math.PI:C=-(-Ie*Math.cos(Re+Math.PI/3)-j/3/ne)*Math.PI,Math.abs(R)2*d*this.a?void 0:(C=x/this.a,R=Math.sin(C),T=Math.cos(C),D=this.long0,Math.abs(x)<=w?B=this.lat0:(B=ts(T*this.sin_p12+_.y*R*this.cos_p12/x),j=Math.abs(this.lat0)-d,Math.abs(j)<=w?this.lat0>=0?D=ke(this.long0+Math.atan2(_.x,-_.y)):D=ke(this.long0-Math.atan2(-_.x,_.y)):D=ke(this.long0+Math.atan2(_.x*R,x*this.cos_p12*T-_.y*this.sin_p12*R))),_.x=D,_.y=B,_)):(ne=Ls(this.es),ce=Hs(this.es),Ie=To(this.es),_e=Ys(this.es),Math.abs(this.sin_p12-1)<=w?(Re=this.a*ci(ne,ce,Ie,_e,d),x=Math.sqrt(_.x*_.x+_.y*_.y),Be=Re-x,B=No(Be/this.a,ne,ce,Ie,_e),D=ke(this.long0+Math.atan2(_.x,-1*_.y)),_.x=D,_.y=B,_):Math.abs(this.sin_p12+1)<=w?(Re=this.a*ci(ne,ce,Ie,_e,d),x=Math.sqrt(_.x*_.x+_.y*_.y),Be=x-Re,B=No(Be/this.a,ne,ce,Ie,_e),D=ke(this.long0+Math.atan2(_.x,_.y)),_.x=D,_.y=B,_):(x=Math.sqrt(_.x*_.x+_.y*_.y),Ze=Math.atan2(_.x,_.y),$e=es(this.a,this.e,this.sin_p12),mt=Math.cos(Ze),St=this.e*this.cos_p12*mt,It=-St*St/(1-this.es),Jt=3*this.es*(1-It)*this.sin_p12*this.cos_p12*mt/(1-this.es),Xt=x/$e,Zt=Xt-It*(1+It)*Math.pow(Xt,3)/6-Jt*(1+3*It)*Math.pow(Xt,4)/24,ti=1-It*Zt*Zt/2-Xt*Zt*Zt*Zt/6,Xe=Math.asin(this.sin_p12*Math.cos(Zt)+this.cos_p12*Math.sin(Zt)*mt),D=ke(this.long0+Math.asin(Math.sin(Ze)*Math.sin(Zt)/Math.cos(Xe))),ln=Math.sin(Xe),B=Math.atan2((ln-this.es*ti*this.sin_p12)*Math.tan(Xe),ln*(1-this.es)),_.x=D,_.y=B,_))}var Cy=["Azimuthal_Equidistant","aeqd"],Iy={init:Oa,forward:Sy,inverse:Ey,names:Cy};function qp(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function hr(_){var x,C,R,T,D,B,j,ne,ce=_.x,Ie=_.y;return R=ke(ce-this.long0),x=Math.sin(Ie),C=Math.cos(Ie),T=Math.cos(R),B=this.sin_p14*x+this.cos_p14*C*T,D=1,(B>0||Math.abs(B)<=w)&&(j=this.a*D*C*Math.sin(R),ne=this.y0+this.a*D*(this.cos_p14*x-this.sin_p14*C*T)),_.x=j,_.y=ne,_}function rs(_){var x,C,R,T,D,B,j;return _.x-=this.x0,_.y-=this.y0,x=Math.sqrt(_.x*_.x+_.y*_.y),C=ts(x/this.a),R=Math.sin(C),T=Math.cos(C),B=this.long0,Math.abs(x)<=w?(j=this.lat0,_.x=B,_.y=j,_):(j=ts(T*this.sin_p14+_.y*R*this.cos_p14/x),D=Math.abs(this.lat0)-d,Math.abs(D)<=w?(this.lat0>=0?B=ke(this.long0+Math.atan2(_.x,-_.y)):B=ke(this.long0-Math.atan2(-_.x,_.y)),_.x=B,_.y=j,_):(B=ke(this.long0+Math.atan2(_.x*R,x*this.cos_p14*T-_.y*this.sin_p14*R)),_.x=B,_.y=j,_))}var Dl=["ortho"],ky={init:qp,forward:hr,inverse:rs,names:Dl},Tn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Pt={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Ly(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=d-O/2?this.face=Tn.TOP:this.lat0<=-(d-O/2)?this.face=Tn.BOTTOM:Math.abs(this.long0)<=O?this.face=Tn.FRONT:Math.abs(this.long0)<=d+O?this.face=this.long0>0?Tn.RIGHT:Tn.LEFT:this.face=Tn.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function Po(_){var x={x:0,y:0},C,R,T,D,B,j,ne={value:0};if(_.x-=this.long0,this.es!==0?C=Math.atan(this.one_minus_f_squared*Math.tan(_.y)):C=_.y,R=_.x,this.face===Tn.TOP)D=d-C,R>=O&&R<=d+O?(ne.value=Pt.AREA_0,T=R-d):R>d+O||R<=-(d+O)?(ne.value=Pt.AREA_1,T=R>0?R-X:R+X):R>-(d+O)&&R<=-O?(ne.value=Pt.AREA_2,T=R+d):(ne.value=Pt.AREA_3,T=R);else if(this.face===Tn.BOTTOM)D=d+C,R>=O&&R<=d+O?(ne.value=Pt.AREA_0,T=-R+d):R=-O?(ne.value=Pt.AREA_1,T=-R):R<-O&&R>=-(d+O)?(ne.value=Pt.AREA_2,T=-R-d):(ne.value=Pt.AREA_3,T=R>0?-R+X:-R-X);else{var ce,Ie,_e,Re,Be,$e,Xe;this.face===Tn.RIGHT?R=dn(R,+d):this.face===Tn.BACK?R=dn(R,+X):this.face===Tn.LEFT&&(R=dn(R,-d)),Re=Math.sin(C),Be=Math.cos(C),$e=Math.sin(R),Xe=Math.cos(R),ce=Be*Xe,Ie=Be*$e,_e=Re,this.face===Tn.FRONT?(D=Math.acos(ce),T=iu(D,_e,Ie,ne)):this.face===Tn.RIGHT?(D=Math.acos(Ie),T=iu(D,_e,-ce,ne)):this.face===Tn.BACK?(D=Math.acos(-ce),T=iu(D,_e,-Ie,ne)):this.face===Tn.LEFT?(D=Math.acos(-Ie),T=iu(D,_e,ce,ne)):(D=T=0,ne.value=Pt.AREA_0)}return j=Math.atan(12/X*(T+Math.acos(Math.sin(T)*Math.cos(O))-d)),B=Math.sqrt((1-Math.cos(D))/(Math.cos(j)*Math.cos(j))/(1-Math.cos(Math.atan(1/Math.cos(T))))),ne.value===Pt.AREA_1?j+=d:ne.value===Pt.AREA_2?j+=X:ne.value===Pt.AREA_3&&(j+=1.5*X),x.x=B*Math.cos(j),x.y=B*Math.sin(j),x.x=x.x*this.a+this.x0,x.y=x.y*this.a+this.y0,_.x=x.x,_.y=x.y,_}function nu(_){var x={lam:0,phi:0},C,R,T,D,B,j,ne,ce,Ie,_e={value:0};if(_.x=(_.x-this.x0)/this.a,_.y=(_.y-this.y0)/this.a,R=Math.atan(Math.sqrt(_.x*_.x+_.y*_.y)),C=Math.atan2(_.y,_.x),_.x>=0&&_.x>=Math.abs(_.y)?_e.value=Pt.AREA_0:_.y>=0&&_.y>=Math.abs(_.x)?(_e.value=Pt.AREA_1,C-=d):_.x<0&&-_.x>=Math.abs(_.y)?(_e.value=Pt.AREA_2,C=C<0?C+X:C-X):(_e.value=Pt.AREA_3,C+=d),Ie=X/12*Math.tan(C),B=Math.sin(Ie)/(Math.cos(Ie)-1/Math.sqrt(2)),j=Math.atan(B),T=Math.cos(C),D=Math.tan(R),ne=1-T*T*D*D*(1-Math.cos(Math.atan(1/Math.cos(j)))),ne<-1?ne=-1:ne>1&&(ne=1),this.face===Tn.TOP)ce=Math.acos(ne),x.phi=d-ce,_e.value===Pt.AREA_0?x.lam=j+d:_e.value===Pt.AREA_1?x.lam=j<0?j+X:j-X:_e.value===Pt.AREA_2?x.lam=j-d:x.lam=j;else if(this.face===Tn.BOTTOM)ce=Math.acos(ne),x.phi=ce-d,_e.value===Pt.AREA_0?x.lam=-j+d:_e.value===Pt.AREA_1?x.lam=-j:_e.value===Pt.AREA_2?x.lam=-j-d:x.lam=j<0?-j-X:-j+X;else{var Re,Be,$e;Re=ne,Ie=Re*Re,Ie>=1?$e=0:$e=Math.sqrt(1-Ie)*Math.sin(j),Ie+=$e*$e,Ie>=1?Be=0:Be=Math.sqrt(1-Ie),_e.value===Pt.AREA_1?(Ie=Be,Be=-$e,$e=Ie):_e.value===Pt.AREA_2?(Be=-Be,$e=-$e):_e.value===Pt.AREA_3&&(Ie=Be,Be=$e,$e=-Ie),this.face===Tn.RIGHT?(Ie=Re,Re=-Be,Be=Ie):this.face===Tn.BACK?(Re=-Re,Be=-Be):this.face===Tn.LEFT&&(Ie=Re,Re=Be,Be=-Ie),x.phi=Math.acos(-$e)-d,x.lam=Math.atan2(Be,Re),this.face===Tn.RIGHT?x.lam=dn(x.lam,-d):this.face===Tn.BACK?x.lam=dn(x.lam,-X):this.face===Tn.LEFT&&(x.lam=dn(x.lam,+d))}if(this.es!==0){var Xe,Ze,mt;Xe=x.phi<0?1:0,Ze=Math.tan(x.phi),mt=this.b/Math.sqrt(Ze*Ze+this.one_minus_f_squared),x.phi=Math.atan(Math.sqrt(this.a*this.a-mt*mt)/(this.one_minus_f*mt)),Xe&&(x.phi=-x.phi)}return x.lam+=this.long0,_.x=x.lam,_.y=x.phi,_}function iu(_,x,C,R){var T;return _O&&T<=d+O?(R.value=Pt.AREA_1,T-=d):T>d+O||T<=-(d+O)?(R.value=Pt.AREA_2,T=T>=0?T-X:T+X):(R.value=Pt.AREA_3,T+=d)),T}function dn(_,x){var C=_+x;return C<-X?C+=H:C>+X&&(C-=H),C}var ru=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],As={init:Ly,forward:Po,inverse:nu,names:ru},ph=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Fo=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ss=.8487,er=1.3523,jl=I/5,eo=1/jl,to=18,Fr=function(_,x){return _[0]+x*(_[1]+x*(_[2]+x*_[3]))},mh=function(_,x){return _[1]+x*(2*_[2]+x*3*_[3])};function su(_,x,C,R){for(var T=x;R;--R){var D=_(T);if(T-=D,Math.abs(D)=to&&(R=to-1),C=I*(C-eo*R);var T={x:Fr(ph[R],C)*x,y:Fr(Fo[R],C)};return _.y<0&&(T.y=-T.y),T.x=T.x*this.a*ss+this.x0,T.y=T.y*this.a*er+this.y0,T}function gh(_){var x={x:(_.x-this.x0)/(this.a*ss),y:Math.abs(_.y-this.y0)/(this.a*er)};if(x.y>=1)x.x/=ph[to][0],x.y=_.y<0?-d:d;else{var C=Math.floor(x.y*to);for(C<0?C=0:C>=to&&(C=to-1);;)if(Fo[C][0]>x.y)--C;else if(Fo[C+1][0]<=x.y)++C;else break;var R=Fo[C],T=5*(x.y-R[0])/(Fo[C+1][0]-R[0]);T=su(function(D){return(Fr(R,D)-x.y)/mh(R,D)},T,w,100),x.x/=Fr(ph[C],T),x.y=(5*C+T)*E,_.y<0&&(x.y=-x.y)}return x.x=ke(x.x+this.long0),x}var _h=["Robinson","robin"],yh={init:ou,forward:zp,inverse:gh,names:_h};function no(){this.name="geocent"}function Ty(_){var x=En(_,this.es,this.a);return x}function Ny(_){var x=Kt(_,this.es,this.a,this.b);return x}var Ry=["Geocentric","geocentric","geocent","Geocent"],au={init:no,forward:Ty,inverse:Ny,names:Ry},ui={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},io={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function My(){if(Object.keys(io).forEach(function(C){if(typeof this[C]>"u")this[C]=io[C].def;else{if(io[C].num&&isNaN(this[C]))throw new Error("Invalid parameter value, must be numeric "+C+" = "+this[C]);io[C].num&&(this[C]=parseFloat(this[C]))}io[C].degrees&&(this[C]=this[C]*E)}.bind(this)),Math.abs(Math.abs(this.lat0)-d)1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var _=this.tilt,x=this.azi;this.cg=Math.cos(x),this.sg=Math.sin(x),this.cw=Math.cos(_),this.sw=Math.sin(_)}function vh(_){_.x-=this.long0;var x=Math.sin(_.y),C=Math.cos(_.y),R=Math.cos(_.x),T,D;switch(this.mode){case ui.OBLIQ:D=this.sinph0*x+this.cosph0*C*R;break;case ui.EQUIT:D=C*R;break;case ui.S_POLE:D=-x;break;case ui.N_POLE:D=x;break}switch(D=this.pn1/(this.p-D),T=D*C*Math.sin(_.x),this.mode){case ui.OBLIQ:D*=this.cosph0*x-this.sinph0*C*R;break;case ui.EQUIT:D*=x;break;case ui.N_POLE:D*=-(C*R);break;case ui.S_POLE:D*=C*R;break}var B,j;return B=D*this.cg+T*this.sg,j=1/(B*this.sw*this.h1+this.cw),T=(T*this.cg-D*this.sg)*this.cw*j,D=B*j,_.x=T*this.a,_.y=D*this.a,_}function Gp(_){_.x/=this.a,_.y/=this.a;var x={x:_.x,y:_.y},C,R,T;T=1/(this.pn1-_.y*this.sw),C=this.pn1*_.x*T,R=this.pn1*_.y*this.cw*T,_.x=C*this.cg+R*this.sg,_.y=R*this.cg-C*this.sg;var D=_n(_.x,_.y);if(Math.abs(D)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var _=1-this.es,x=1/_;this.radius_p=Math.sqrt(_),this.radius_p2=_,this.radius_p_inv2=x,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function Mt(_){var x=_.x,C=_.y,R,T,D,B;if(x=x-this.long0,this.shape==="ellipse"){C=Math.atan(this.radius_p2*Math.tan(C));var j=this.radius_p/_n(this.radius_p*Math.cos(C),Math.sin(C));if(T=j*Math.cos(x)*Math.cos(C),D=j*Math.sin(x)*Math.cos(C),B=j*Math.sin(C),(this.radius_g-T)*T-D*D-B*B*this.radius_p_inv2<0)return _.x=Number.NaN,_.y=Number.NaN,_;R=this.radius_g-T,this.flip_axis?(_.x=this.radius_g_1*Math.atan(D/_n(B,R)),_.y=this.radius_g_1*Math.atan(B/R)):(_.x=this.radius_g_1*Math.atan(D/R),_.y=this.radius_g_1*Math.atan(B/_n(D,R)))}else this.shape==="sphere"&&(R=Math.cos(C),T=Math.cos(x)*R,D=Math.sin(x)*R,B=Math.sin(C),R=this.radius_g-T,this.flip_axis?(_.x=this.radius_g_1*Math.atan(D/_n(B,R)),_.y=this.radius_g_1*Math.atan(B/R)):(_.x=this.radius_g_1*Math.atan(D/R),_.y=this.radius_g_1*Math.atan(B/_n(D,R))));return _.x=_.x*this.a,_.y=_.y*this.a,_}function tr(_){var x=-1,C=0,R=0,T,D,B,j;if(_.x=_.x/this.a,_.y=_.y/this.a,this.shape==="ellipse"){this.flip_axis?(R=Math.tan(_.y/this.radius_g_1),C=Math.tan(_.x/this.radius_g_1)*_n(1,R)):(C=Math.tan(_.x/this.radius_g_1),R=Math.tan(_.y/this.radius_g_1)*_n(1,C));var ne=R/this.radius_p;if(T=C*C+ne*ne+x*x,D=2*this.radius_g*x,B=D*D-4*T*this.C,B<0)return _.x=Number.NaN,_.y=Number.NaN,_;j=(-D-Math.sqrt(B))/(2*T),x=this.radius_g+j*x,C*=j,R*=j,_.x=Math.atan2(C,x),_.y=Math.atan(R*Math.cos(_.x)/x),_.y=Math.atan(this.radius_p_inv2*Math.tan(_.y))}else if(this.shape==="sphere"){if(this.flip_axis?(R=Math.tan(_.y/this.radius_g_1),C=Math.tan(_.x/this.radius_g_1)*Math.sqrt(1+R*R)):(C=Math.tan(_.x/this.radius_g_1),R=Math.tan(_.y/this.radius_g_1)*Math.sqrt(1+C*C)),T=C*C+R*R+x*x,D=2*this.radius_g*x,B=D*D-4*T*this.C,B<0)return _.x=Number.NaN,_.y=Number.NaN,_;j=(-D-Math.sqrt(B))/(2*T),x=this.radius_g+j*x,C*=j,R*=j,_.x=Math.atan2(C,x),_.y=Math.atan(R*Math.cos(_.x)/x)}return _.x=_.x+this.long0,_}var Os=["Geostationary Satellite View","Geostationary_Satellite","geos"],cu={init:xh,forward:Mt,inverse:tr,names:Os},ro=1.340264,Do=-.081106,di=893e-6,fr=.003796,jo=Math.sqrt(3)/2;function Ay(){this.es=0,this.long0=this.long0!==void 0?this.long0:0}function uu(_){var x=ke(_.x-this.long0),C=_.y,R=Math.asin(jo*Math.sin(C)),T=R*R,D=T*T*T;return _.x=x*Math.cos(R)/(jo*(ro+3*Do*T+D*(7*di+9*fr*T))),_.y=R*(ro+Do*T+D*(di+fr*T)),_.x=this.a*_.x+this.x0,_.y=this.a*_.y+this.y0,_}function du(_){_.x=(_.x-this.x0)/this.a,_.y=(_.y-this.y0)/this.a;var x=1e-9,C=12,R=_.y,T,D,B,j,ne,ce;for(ce=0;ce=d?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=Pa,this.forward=Oy)}function Eh(_){var x=ke(_.x-(this.long0||0)),C=_.y,R,T,D;return R=this.am1+this.m1-Tt(C,T=Math.sin(C),D=Math.cos(C),this.en),T=D*x/(R*Math.sqrt(1-this.es*T*T)),_.x=R*Math.sin(T),_.y=this.am1-R*Math.cos(T),_.x=this.a*_.x+(this.x0||0),_.y=this.a*_.y+(this.y0||0),_}function an(_){_.x=(_.x-(this.x0||0))/this.a,_.y=(_.y-(this.y0||0))/this.a;var x,C,R,T;if(C=_n(_.x,_.y=this.am1-_.y),T=xl(this.am1+this.m1-C,this.es,this.en),(x=Math.abs(T))qo?(_.x=T*Math.sin(R=x*Math.cos(C)/T),_.y=this.cphi1-T*Math.cos(R)):_.x=_.y=0,_.x=this.a*_.x+(this.x0||0),_.y=this.a*_.y+(this.y0||0),_}function Pa(_){_.x=(_.x-(this.x0||0))/this.a,_.y=(_.y-(this.y0||0))/this.a;var x,C,R=_n(_.x,_.y=this.cphi1-_.y);if(C=this.cphi1+this.phi1-R,Math.abs(C)>d)throw new Error;return Math.abs(Math.abs(C)-d)<=qo?x=0:x=R*Math.atan2(_.x,_.y)/Math.cos(C),_.x=ke(x+(this.long0||0)),_.y=Mr(C),_}var hu=["bonne","Bonne (Werner lat_1=90)"],nr={init:Sh,names:hu},os=function(_){_.Proj.projections.add(Ea),_.Proj.projections.add(_i),_.Proj.projections.add(Np),_.Proj.projections.add(Qt),_.Proj.projections.add(Yd),_.Proj.projections.add(Kd),_.Proj.projections.add(Jn),_.Proj.projections.add(vn),_.Proj.projections.add(Jr),_.Proj.projections.add(La),_.Proj.projections.add(kl),_.Proj.projections.add(Dp),_.Proj.projections.add(Ll),_.Proj.projections.add(Fi),_.Proj.projections.add(Tl),_.Proj.projections.add(Nl),_.Proj.projections.add(Ml),_.Proj.projections.add(Aa),_.Proj.projections.add(hh),_.Proj.projections.add(fh),_.Proj.projections.add(Js),_.Proj.projections.add(Fl),_.Proj.projections.add(Iy),_.Proj.projections.add(ky),_.Proj.projections.add(As),_.Proj.projections.add(yh),_.Proj.projections.add(au),_.Proj.projections.add(lu),_.Proj.projections.add(cu),_.Proj.projections.add(ql),_.Proj.projections.add(nr)};return Y.defaultDatum="WGS84",Y.Proj=Yi,Y.WGS84=new Y.Proj("WGS84"),Y.Point=Ws,Y.toPoint=xa,Y.defs=nt,Y.nadgrid=Tr,Y.transform=Xr,Y.mgrs=Ve,Y.version="2.15.0",os(Y),Y})});function ut(){return`${++ZP}_${Date.now()}`}var ZP,bn=W(()=>{ZP=0});function Hl({geometryType:e,color:n="rgb(255,255,0)",fill:i=!0}={}){switch(e){case"LineString":case"MultiLineString":return new ol.style.Style({stroke:new ol.style.Stroke({color:n,width:4})});case"Point":case"MultiPoint":return new ol.style.Style({image:new ol.style.Circle({radius:6,fill:i&&new ol.style.Fill({color:n}),stroke:!i&&new ol.style.Stroke({color:n,width:4})}),zIndex:1/0});case"MultiPolygon":case"Polygon":return new ol.style.Style({stroke:new ol.style.Stroke({color:n,width:4}),fill:i&&new ol.style.Fill({color:ol.color.asString([...ol.color.asArray(n)].splice(0,3).concat(.25))})});default:return console.warn("invalid geometry type",e),null}}var tv=W(()=>{});function uo(e=[]){return(Array.isArray(e)?e:Object.keys(e)).filter(n=>!oo.includes(n))}var bu=W(()=>{Nt()});var vS=Qe((yS,nv)=>{(function(e){if(typeof yS=="object"&&typeof nv<"u")nv.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.localforage=e()}})(function(){var e,n,i;return function r(o,u,c){function f(d,v){if(!u[d]){if(!o[d]){var y=typeof so=="function"&&so;if(!v&&y)return y(d,!0);if(p)return p(d,!0);var S=new Error("Cannot find module '"+d+"'");throw S.code="MODULE_NOT_FOUND",S}var w=u[d]={exports:{}};o[d][0].call(w.exports,function(E){var I=o[d][1][E];return f(I||E)},w,w.exports,r,o,u,c)}return u[d].exports}for(var p=typeof so=="function"&&so,m=0;m"u"&&r(3);var y=Promise;function S(Y,he){he&&Y.then(function(ie){he(null,ie)},function(ie){he(ie)})}function w(Y,he,ie){typeof he=="function"&&Y.then(he),typeof ie=="function"&&Y.catch(ie)}function E(Y){return typeof Y!="string"&&(console.warn(Y+" used as a key, but it is not a string."),Y=String(Y)),Y}function I(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var O="local-forage-detect-blob-support",H=void 0,X={},re=Object.prototype.toString,z="readonly",Z="readwrite";function te(Y){for(var he=Y.length,ie=new ArrayBuffer(he),xe=new Uint8Array(ie),we=0;we=43)}}).catch(function(){return!1})}function ve(Y){return typeof H=="boolean"?y.resolve(H):ee(Y).then(function(he){return H=he,H})}function F(Y){var he=X[Y.name],ie={};ie.promise=new y(function(xe,we){ie.resolve=xe,ie.reject=we}),he.deferredOperations.push(ie),he.dbReady?he.dbReady=he.dbReady.then(function(){return ie.promise}):he.dbReady=ie.promise}function ge(Y){var he=X[Y.name],ie=he.deferredOperations.pop();if(ie)return ie.resolve(),ie.promise}function L(Y,he){var ie=X[Y.name],xe=ie.deferredOperations.pop();if(xe)return xe.reject(he),xe.promise}function se(Y,he){return new y(function(ie,xe){if(X[Y.name]=X[Y.name]||ze(),Y.db)if(he)F(Y),Y.db.close();else return ie(Y.db);var we=[Y.name];he&&we.push(Y.version);var fe=m.open.apply(m,we);he&&(fe.onupgradeneeded=function(Le){var Fe=fe.result;try{Fe.createObjectStore(Y.storeName),Le.oldVersion<=1&&Fe.createObjectStore(O)}catch(Ge){if(Ge.name==="ConstraintError")console.warn('The database "'+Y.name+'" has been upgraded from version '+Le.oldVersion+" to version "+Le.newVersion+', but the storage "'+Y.storeName+'" already exists.');else throw Ge}}),fe.onerror=function(Le){Le.preventDefault(),xe(fe.error)},fe.onsuccess=function(){var Le=fe.result;Le.onversionchange=function(Fe){Fe.target.close()},ie(Le),ge(Y)}})}function le(Y){return se(Y,!1)}function de(Y){return se(Y,!0)}function Ke(Y,he){if(!Y.db)return!0;var ie=!Y.db.objectStoreNames.contains(Y.storeName),xe=Y.versionY.db.version;if(xe&&(Y.version!==he&&console.warn('The database "'+Y.name+`" can't be downgraded from version `+Y.db.version+" to version "+Y.version+"."),Y.version=Y.db.version),we||ie){if(ie){var fe=Y.db.version+1;fe>Y.version&&(Y.version=fe)}return!0}return!1}function Te(Y){return new y(function(he,ie){var xe=new FileReader;xe.onerror=ie,xe.onloadend=function(we){var fe=btoa(we.target.result||"");he({__local_forage_encoded_blob:!0,data:fe,type:Y.type})},xe.readAsBinaryString(Y)})}function We(Y){var he=te(atob(Y.data));return v([he],{type:Y.type})}function Q(Y){return Y&&Y.__local_forage_encoded_blob}function me(Y){var he=this,ie=he._initReady().then(function(){var xe=X[he._dbInfo.name];if(xe&&xe.dbReady)return xe.dbReady});return w(ie,Y,Y),ie}function je(Y){F(Y);for(var he=X[Y.name],ie=he.forages,xe=0;xe0&&(!Y.db||fe.name==="InvalidStateError"||fe.name==="NotFoundError"))return y.resolve().then(function(){if(!Y.db||fe.name==="NotFoundError"&&!Y.db.objectStoreNames.contains(Y.storeName)&&Y.version<=Y.db.version)return Y.db&&(Y.version=Y.db.version+1),de(Y)}).then(function(){return je(Y).then(function(){Se(Y,he,ie,xe-1)})}).catch(ie);ie(fe)}}function ze(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function Je(Y){var he=this,ie={db:null};if(Y)for(var xe in Y)ie[xe]=Y[xe];var we=X[ie.name];we||(we=ze(),X[ie.name]=we),we.forages.push(he),he._initReady||(he._initReady=he.ready,he.ready=me);var fe=[];function Le(){return y.resolve()}for(var Fe=0;Fe>4,Ye[we++]=(Le&15)<<4|Fe>>2,Ye[we++]=(Fe&3)<<6|Ge&63;return Ve}function cr(Y){var he=new Uint8Array(Y),ie="",xe;for(xe=0;xe>2],ie+=P[(he[xe]&3)<<4|he[xe+1]>>4],ie+=P[(he[xe+1]&15)<<2|he[xe+2]>>6],ie+=P[he[xe+2]&63];return he.length%3===2?ie=ie.substring(0,ie.length-1)+"=":he.length%3===1&&(ie=ie.substring(0,ie.length-2)+"=="),ie}function $t(Y,he){var ie="";if(Y&&(ie=On.call(Y)),Y&&(ie==="[object ArrayBuffer]"||Y.buffer&&On.call(Y.buffer)==="[object ArrayBuffer]")){var xe,we=be;Y instanceof ArrayBuffer?(xe=Y,we+=Ne):(xe=Y.buffer,ie==="[object Int8Array]"?we+=Me:ie==="[object Uint8Array]"?we+=ke:ie==="[object Uint8ClampedArray]"?we+=Pe:ie==="[object Int16Array]"?we+=De:ie==="[object Uint16Array]"?we+=Ft:ie==="[object Int32Array]"?we+=Ct:ie==="[object Uint32Array]"?we+=ft:ie==="[object Float32Array]"?we+=Sn:ie==="[object Float64Array]"?we+=xt:he(new Error("Failed to get type for BinaryArray"))),he(we+cr(xe))}else if(ie==="[object Blob]"){var fe=new FileReader;fe.onload=function(){var Le=G+Y.type+"~"+cr(this.result);he(be+Oe+Le)},fe.readAsArrayBuffer(Y)}else try{he(JSON.stringify(Y))}catch(Le){console.error("Couldn't convert value into a JSON string: ",Y),he(null,Le)}}function li(Y){if(Y.substring(0,ue)!==be)return JSON.parse(Y);var he=Y.substring(Hr),ie=Y.substring(ue,Hr),xe;if(ie===Oe&&ae.test(he)){var we=he.match(ae);xe=we[1],he=he.substring(we[0].length)}var fe=Mi(he);switch(ie){case Ne:return fe;case Oe:return v([fe],{type:xe});case Me:return new Int8Array(fe);case ke:return new Uint8Array(fe);case Pe:return new Uint8ClampedArray(fe);case De:return new Int16Array(fe);case Ft:return new Uint16Array(fe);case Ct:return new Int32Array(fe);case ft:return new Uint32Array(fe);case Sn:return new Float32Array(fe);case xt:return new Float64Array(fe);default:throw new Error("Unkown type: "+ie)}}var pn={serialize:$t,deserialize:li,stringToBuffer:Mi,bufferToString:cr};function ws(Y,he,ie,xe){Y.executeSql("CREATE TABLE IF NOT EXISTS "+he.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],ie,xe)}function Dt(Y){var he=this,ie={db:null};if(Y)for(var xe in Y)ie[xe]=typeof Y[xe]!="string"?Y[xe].toString():Y[xe];var we=new y(function(fe,Le){try{ie.db=openDatabase(ie.name,String(ie.version),ie.description,ie.size)}catch(Fe){return Le(Fe)}ie.db.transaction(function(Fe){ws(Fe,ie,function(){he._dbInfo=ie,fe()},function(Ge,Ve){Le(Ve)})},Le)});return ie.serializer=pn,we}function $n(Y,he,ie,xe,we,fe){Y.executeSql(ie,xe,we,function(Le,Fe){Fe.code===Fe.SYNTAX_ERR?Le.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[he.storeName],function(Ge,Ve){Ve.rows.length?fe(Ge,Fe):ws(Ge,he,function(){Ge.executeSql(ie,xe,we,fe)},fe)},fe):fe(Le,Fe)},fe)}function Bt(Y,he){var ie=this;Y=E(Y);var xe=new y(function(we,fe){ie.ready().then(function(){var Le=ie._dbInfo;Le.db.transaction(function(Fe){$n(Fe,Le,"SELECT * FROM "+Le.storeName+" WHERE key = ? LIMIT 1",[Y],function(Ge,Ve){var Ye=Ve.rows.length?Ve.rows.item(0).value:null;Ye&&(Ye=Le.serializer.deserialize(Ye)),we(Ye)},function(Ge,Ve){fe(Ve)})})}).catch(fe)});return S(xe,he),xe}function pt(Y,he){var ie=this,xe=new y(function(we,fe){ie.ready().then(function(){var Le=ie._dbInfo;Le.db.transaction(function(Fe){$n(Fe,Le,"SELECT * FROM "+Le.storeName,[],function(Ge,Ve){for(var Ye=Ve.rows,at=Ye.length,wt=0;wt0){Le(jt.apply(we,[Y,Ge,ie,xe-1]));return}Fe(wt)}})})}).catch(Fe)});return S(fe,ie),fe}function ml(Y,he,ie){return jt.apply(this,[Y,he,ie,1])}function Dd(Y,he){var ie=this;Y=E(Y);var xe=new y(function(we,fe){ie.ready().then(function(){var Le=ie._dbInfo;Le.db.transaction(function(Fe){$n(Fe,Le,"DELETE FROM "+Le.storeName+" WHERE key = ?",[Y],function(){we()},function(Ge,Ve){fe(Ve)})})}).catch(fe)});return S(xe,he),xe}function ba(Y){var he=this,ie=new y(function(xe,we){he.ready().then(function(){var fe=he._dbInfo;fe.db.transaction(function(Le){$n(Le,fe,"DELETE FROM "+fe.storeName,[],function(){xe()},function(Fe,Ge){we(Ge)})})}).catch(we)});return S(ie,Y),ie}function jd(Y){var he=this,ie=new y(function(xe,we){he.ready().then(function(){var fe=he._dbInfo;fe.db.transaction(function(Le){$n(Le,fe,"SELECT COUNT(key) as c FROM "+fe.storeName,[],function(Fe,Ge){var Ve=Ge.rows.item(0).c;xe(Ve)},function(Fe,Ge){we(Ge)})})}).catch(we)});return S(ie,Y),ie}function gl(Y,he){var ie=this,xe=new y(function(we,fe){ie.ready().then(function(){var Le=ie._dbInfo;Le.db.transaction(function(Fe){$n(Fe,Le,"SELECT key FROM "+Le.storeName+" WHERE id = ? LIMIT 1",[Y+1],function(Ge,Ve){var Ye=Ve.rows.length?Ve.rows.item(0).key:null;we(Ye)},function(Ge,Ve){fe(Ve)})})}).catch(fe)});return S(xe,he),xe}function Cc(Y){var he=this,ie=new y(function(xe,we){he.ready().then(function(){var fe=he._dbInfo;fe.db.transaction(function(Le){$n(Le,fe,"SELECT key FROM "+fe.storeName,[],function(Fe,Ge){for(var Ve=[],Ye=0;Ye '__WebKitDatabaseInfoTable__'",[],function(we,fe){for(var Le=[],Fe=0;Fe0}function _l(Y){var he=this,ie={};if(Y)for(var xe in Y)ie[xe]=Y[xe];return ie.keyPrefix=Ai(Y,he._defaultConfig),zd()?(he._dbInfo=ie,ie.serializer=pn,y.resolve()):y.reject()}function kc(Y){var he=this,ie=he.ready().then(function(){for(var xe=he._dbInfo.keyPrefix,we=localStorage.length-1;we>=0;we--){var fe=localStorage.key(we);fe.indexOf(xe)===0&&localStorage.removeItem(fe)}});return S(ie,Y),ie}function So(Y,he){var ie=this;Y=E(Y);var xe=ie.ready().then(function(){var we=ie._dbInfo,fe=localStorage.getItem(we.keyPrefix+Y);return fe&&(fe=we.serializer.deserialize(fe)),fe});return S(xe,he),xe}function Lc(Y,he){var ie=this,xe=ie.ready().then(function(){for(var we=ie._dbInfo,fe=we.keyPrefix,Le=fe.length,Fe=localStorage.length,Ge=1,Ve=0;Ve=0;Le--){var Fe=localStorage.key(Le);Fe.indexOf(fe)===0&&localStorage.removeItem(Fe)}}):we=y.reject("Invalid arguments"),S(we,he),we}var dt={_driver:"localStorageWrapper",_initStorage:_l,_support:Ic(),iterate:Lc,getItem:So,setItem:Kt,removeItem:En,clear:kc,length:Tc,key:Gd,keys:Yi,dropInstance:Fn},K=function(he,ie){return he===ie||typeof he=="number"&&typeof ie=="number"&&isNaN(he)&&isNaN(ie)},Ut=function(he,ie){for(var xe=he.length,we=0;we"u"?"undefined":c(ie))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var xe in ie){if(xe==="storeName"&&(ie[xe]=ie[xe].replace(/\W/g,"_")),xe==="version"&&typeof ie[xe]!="number")return new Error("Database version must be a number.");this._config[xe]=ie[xe]}return"driver"in ie&&ie.driver?this.setDriver(this._config.driver):!0}else return typeof ie=="string"?this._config[ie]:this._config},Y.prototype.defineDriver=function(ie,xe,we){var fe=new y(function(Le,Fe){try{var Ge=ie._driver,Ve=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!ie._driver){Fe(Ve);return}for(var Ye=Ss.concat("_initStorage"),at=0,wt=Ye.length;at{Yn();iv={},gr=Object.assign(new Et,{setters:{registerPlugin(e){iv[e.name]=iv[e.name]||e}},getPlugin(e){return iv[e]}})});function Yl(e){if(typeof e=="number")return`EPSG:${e}`;if(e=e.replace(/[^\d\.\-]/g,""),e!=="")return`EPSG:${parseInt(e)}`}var um=W(()=>{});var dm,Zn,ho=W(()=>{um();dm=hn(Zy()),Zn={get(e={}){let n=ol.proj.get(e.epsg);if(!n){e.proj4&&dm.default.defs(e.epsg,e.proj4);let i={code:e.epsg,extent:e.extent,axisOrientation:e.axisinverted?"neu":"enu",units:e.geographic?"degrees":"m"};n=new ol.proj.Projection(i),n.getAxisOrientation=()=>i.axisOrientation,ol.proj.addProjection(n),ol.proj.proj4.register(dm.default)}return n},async registerProjection(e){let n=ol.proj.get(e)||void 0;if(!n){let{result:i,data:r}=await(await fetch(`/crs/${e.split(":")[1]}/`)).json();if(i)return r.epsg=Yl(r.epsg),n=this.get(r),ol.proj.proj4.register(dm.default),n}return n}}});function js(e,n="m"){return Math.round(e*Mh[n]*Go)}var wu=W(()=>{Nt()});function za(e,n="m"){return 1/((e>=1?1/e:e)*Mh[n]*Go)}var jh=W(()=>{Nt()});function Su({filter:e=""}){return e=bS.reduce((n,[i,r])=>n.replace(new RegExp(`\\s+${r}\\s+`,"g"),`${r}`).replace(new RegExp(`'${r}`,"g"),`${r}`).replace(new RegExp(`${r}'`,"g"),`${r}`),e).replace(/'$/g,"").replace(/"/g,""),e=bS.reduce((n,[i,r])=>n.replace(new RegExp(r,"g"),["AND","OR"].includes(r)?`|${i},`:`|${i}|`),e).split("|").map((n,i)=>(i+1)%3===0?encodeURIComponent(n):n).join("|"),e}var bS,hm=W(()=>{Nt();bS=Object.entries(Nh)});function sn(e){return e instanceof Promise?e:!e||!e.then?(console.trace(e),Promise.reject("not a promise")):new Promise((n,i)=>{e.then(n).fail(i)})}function Wt(e){return e===void 0?(console.trace(),$.Deferred(n=>n.reject("not a promise")).promise()):e.always?e:$.Deferred(async n=>{try{n.resolve(await(e instanceof Promise?e:e()))}catch(i){console.trace(i),n.reject(i)}}).promise()}var _r=W(()=>{});var Ql=Qe((qh,Eu)=>{var KP=200,MS="__lodash_hash_undefined__",AS=9007199254740991,dv="[object Arguments]",QP="[object Array]",OS="[object Boolean]",PS="[object Date]",JP="[object Error]",hv="[object Function]",FS="[object GeneratorFunction]",fm="[object Map]",DS="[object Number]",fv="[object Object]",xS="[object Promise]",jS="[object RegExp]",pm="[object Set]",qS="[object String]",zS="[object Symbol]",sv="[object WeakMap]",GS="[object ArrayBuffer]",mm="[object DataView]",$S="[object Float32Array]",BS="[object Float64Array]",US="[object Int8Array]",VS="[object Int16Array]",WS="[object Int32Array]",HS="[object Uint8Array]",YS="[object Uint8ClampedArray]",XS="[object Uint16Array]",ZS="[object Uint32Array]",e3=/[\\^$.*+?()[\]{}|]/g,t3=/\w*$/,n3=/^\[object .+?Constructor\]$/,i3=/^(?:0|[1-9]\d*)$/,In={};In[dv]=In[QP]=In[GS]=In[mm]=In[OS]=In[PS]=In[$S]=In[BS]=In[US]=In[VS]=In[WS]=In[fm]=In[DS]=In[fv]=In[jS]=In[pm]=In[qS]=In[zS]=In[HS]=In[YS]=In[XS]=In[ZS]=!0;In[JP]=In[hv]=In[sv]=!1;var r3=typeof global=="object"&&global&&global.Object===Object&&global,s3=typeof self=="object"&&self&&self.Object===Object&&self,Uo=r3||s3||Function("return this")(),KS=typeof qh=="object"&&qh&&!qh.nodeType&&qh,wS=KS&&typeof Eu=="object"&&Eu&&!Eu.nodeType&&Eu,o3=wS&&wS.exports===KS;function a3(e,n){return e.set(n[0],n[1]),e}function l3(e,n){return e.add(n),e}function c3(e,n){for(var i=-1,r=e?e.length:0;++i-1}function F3(e,n){var i=this.__data__,r=ym(i,e);return r<0?i.push([e,n]):i[r][1]=n,this}Vo.prototype.clear=M3;Vo.prototype.delete=A3;Vo.prototype.get=O3;Vo.prototype.has=P3;Vo.prototype.set=F3;function Cu(e){var n=-1,i=e?e.length:0;for(this.clear();++n-1&&e%1==0&&e-1&&e%1==0&&e<=AS}function bm(e){var n=typeof e;return!!e&&(n=="object"||n=="function")}function xF(e){return!!e&&typeof e=="object"}function _v(e){return oE(e)?H3(e):J3(e)}function wF(){return[]}function SF(){return!1}Eu.exports=gF});var vv=Qe((Zne,lE)=>{lE.exports=EF;function EF(e,n){if(yv("noDeprecation"))return e;var i=!1;function r(){if(!i){if(yv("throwDeprecation"))throw new Error(n);yv("traceDeprecation")?console.trace(n):console.warn(n),i=!0}return e.apply(this,arguments)}return r}function yv(e){try{if(!global.localStorage)return!1}catch{return!1}var n=global.localStorage[e];return n==null?!1:String(n).toLowerCase()==="true"}});function xv(e,n){for(let i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}var cE,bv,zt,qs=W(()=>{Yn();gu();_r();bt();cE=hn(Ql()),bv=hn(vv());zt=class extends Et{constructor(n={}){if(n.iconConfig&&(console.warn("[G3W-CLIENT] iconConfig is deprecated"),console.trace(),n.iconColor=n.iconConfig.color,n.icon=n.iconConfig.icon,delete n.iconConfig),n.icon=U.getFontClass(n.icon)||n.icon,n.open=n.open??!1,n.mobile=n.mobile??!0,n.collapsible=n.collapsible??!0,super({setters:{setOpen(i){this.state.open=i,this._setOpen&&this._setOpen(i)},setVisible(i){this.state.visible=i,this._setVisible&&this._setVisible(i)},setLoading(i=!1){this.state.loading=i},setDisabled(i=!1){this.state.disabled=i},reload(){console.warn("[G3W-CLIENT] reloading of components will be discontinued, please update your code as soon as possible",this.getId()),this._reload&&this._reload()}}}),this._firstLayout=!0,this.internalComponent=n.internalComponent??null,this._components=[],this.id=n.id??Math.random()*1e3,this.title=n.title??"",this.state={sizes:{width:0,height:0},info:n.info??null,open:n.open??!1,visible:n.visible??!0,loading:n.loading??!1,disabled:n.disabled??!1,resizable:n.resizable??!1,closewhenshowviewportcontent:n.closewhenshowviewportcontent??!0},this.setService(n.service||this),n.internalComponent&&this.setInternalComponent(n.internalComponent),xv(this,n),this.events=n.events??{},this.events.open){let{when:i="after",cb:r=()=>{}}=this.events.open;this[`on${i}`]("setOpen",o=>r(o))}n.vueComponentObject&&this.init(n)}init(n={}){return this.vueComponent=(0,cE.default)(n.vueComponentObject),this._components=n.components||[],this.setService(n.service||this._service||qi),this._service.init&&this.init!==this._service.init&&this._service.init(n),n.template&&(this.vueComponent.template=n.template),this.setInternalComponent=function(){this.internalComponent=new(Vue.extend(this.vueComponent))({service:this._service,template:n.template,propsData:n.propsData}),this.internalComponent.state=this.getService().state},this.setInternalComponent(),this}getId(){return this.id}setId(n){this.id=n}getOpen(){return this.state.open}getVisible(){return this.state.visible}getTitle(){return this.state.title}setTitle(n){this.state.title=n}getService(){return this._service}setService(n){this._service=n}addComponent(n){this._components.push(n)}removeComponent(n){this._components.find((i,r)=>{if(i===n)return this.splice(r,1),!0})}getInternalComponent(){return this.internalComponent}setInternalComponent(n,i={}){this.internalComponent=n===void 0&&this.internalComponentClass?new this.internalComponentClass:n,(i.events||[]).forEach(r=>this.internalComponent.$on(r.name,o=>r.handler&&r.handler(o)||this[`set${r.name[0].toUpperCase()}${r.name.slice(1)}`](o))),this._service&&this._service.state&&(this.internalComponent.state=this._service.state)}mount(n,i){return Wt(new Promise(r=>{this.internalComponent||this.setInternalComponent(),i&&$(n).append(this.internalComponent.$mount().$el),i||this.internalComponent.$mount(n),this.internalComponent.$nextTick(()=>{this.emit("ready"),r(!0)}),this.emit("mount")}))}unmount(){return Wt(async()=>{this.internalComponent&&(this.state.resizable&&this.internalComponent.$off("resize-component",this.internalComponent.layout),this.state.open=!1,this.internalComponent.$destroy(!0),$(this.internalComponent.$el).remove(),this.internalComponent=null,this.emit("unmount"))})}ismount(){return this.internalComponent&&this.internalComponent.$el}layout(n,i){this.state.resizable&&this._firstLayout&&(this.internalComponent.$on("resize-component",this.internalComponent.layout),this._firstLayout=!1),this.internalComponent.$nextTick(()=>{this.internalComponent.$emit("resize-component",{width:n,height:i})}),this.emit("layout")}};Object.assign(zt.prototype,{destroy:qi,click:qi,show:qi,overwriteServiceMethods:(0,bv.default)(function(e){Object.entries(e).forEach(([n,i])=>this._service[n]=i)},"[G3W-CLIENT] Component::overwriteServiceMethods(methodsOptions) is deprecated"),extendInternalComponent:(0,bv.default)(function(e){this.vueComponent?Object.entries(e).forEach(([n,i])=>{switch(n){case"methods":this.extendInternalComponentMethods(i);break;case"components":this.extendInternalComponentComponents(i);break;case"computed":xv(this.vueComponent[n],i);break;case"data":xv(this.vueComponent[n],i);break}}):this.vueComponent=e},"[G3W-CLIENT] Component::extendInternalComponent(internalComponentOptions) is deprecated")})});var fi,Jl=W(()=>{bt();Yn();_r();fi=class extends Et{constructor(n={}){super(),this.id=n.id||null,this.title=n.title||"",this.service=n.service,n.vueComponentObject?this.internalPanel=new(Vue.extend(n.vueComponentObject))({service:this.service}):this.internalPanel=n.panel||n.internalPanel||null,n.show===!0&&this.internalPanel&&this.show()}getId(){return this.id}getTitle(){return this.title}getService(){return this.service}setService(n){this.service=n}getInternalPanel(){return this.internalPanel}setInternalPanel(n){this.internalPanel=n}show(){U.showPanel(this)}close(){U.closePanel()}mount(n){let i=this.internalPanel,r=i.$mount();return $(n).append(r.$el),r.$nextTick(()=>{i.onShow&&i.onShow()}),Wt(Promise.resolve(!0))}unmount(){let n=this.internalPanel;return n.$destroy(!0),$(n.$el).remove(),n.onClose&&n.onClose(),this.internalComponent=null,this.service&&this.service.clear&&this.service.clear(),Wt(Promise.resolve())}}});function ec(e,n){return e.reduce((i,r)=>{let o=n(r);return i[o]||(i[o]=[]),i[o].push(r),i},{})}var xm=W(()=>{});var ht,xi=W(()=>{ht={async get({url:e,params:n={},signal:i}={}){if(!e)return Promise.reject("No url");n=new URLSearchParams(JSON.parse(JSON.stringify(n||{}))).toString();let r=await(await fetch(e+(n?"?":"")+n,{signal:i})).text();try{return JSON.parse(r)}catch{return r}},async put({url:e,data:n,formdata:i=!1,contentType:r,signal:o}={}){i?(i=new FormData,Object.entries(n).forEach(([c,f])=>i.append(c,f))):r?i=typeof n=="string"?n:JSON.stringify(n||{}):i=new URLSearchParams(JSON.parse(JSON.stringify(n||{}))).toString();let u=await(await fetch(e,{method:"PUT",body:i,headers:{"Content-Type":r||"application/x-www-form-urlencoded"},signal:o})).text();try{return JSON.parse(u)}catch{return u}},async post({url:e,data:n,formdata:i=!1,contentType:r,signal:o}={}){i?(i=new FormData,Object.entries(n).forEach(([c,f])=>i.append(c,f))):r?i=typeof n=="string"?n:JSON.stringify(n||{}):i=new URLSearchParams(JSON.parse(JSON.stringify(n||{}))).toString();let u=await(await fetch(e,{method:"POST",body:i,headers:{"Content-Type":r||"application/x-www-form-urlencoded"},signal:o})).text();try{return JSON.parse(u)}catch{return u}}}});var $h=Qe((lie,Wo)=>{function wv(e){"@babel/helpers - typeof";return Wo.exports=wv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wo.exports.__esModule=!0,Wo.exports.default=Wo.exports,wv(e)}Wo.exports=wv,Wo.exports.__esModule=!0,Wo.exports.default=Wo.exports});var dE=Qe((cie,Bh)=>{var uE=$h().default;function CF(e,n){if(uE(e)!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var r=i.call(e,n||"default");if(uE(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}Bh.exports=CF,Bh.exports.__esModule=!0,Bh.exports.default=Bh.exports});var Sv=Qe((uie,Uh)=>{var IF=$h().default,kF=dE();function LF(e){var n=kF(e,"string");return IF(n)=="symbol"?n:n+""}Uh.exports=LF,Uh.exports.__esModule=!0,Uh.exports.default=Uh.exports});var hE=Qe((die,Vh)=>{var TF=Sv();function NF(e,n,i){return(n=TF(n))in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,e}Vh.exports=NF,Vh.exports.__esModule=!0,Vh.exports.default=Vh.exports});var fE=Qe((hie,Wh)=>{var RF=hE();function MF(e){for(var n=1;n{function AF(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}Hh.exports=AF,Hh.exports.__esModule=!0,Hh.exports.default=Hh.exports});var gE=Qe((pie,Yh)=>{var OF=Sv();function mE(e,n){for(var i=0;i{function FF(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Xh.exports=FF,Xh.exports.__esModule=!0,Xh.exports.default=Xh.exports});var _E=Qe((gie,Zh)=>{var DF=$h().default,jF=Ev();function qF(e,n){if(n&&(DF(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jF(e)}Zh.exports=qF,Zh.exports.__esModule=!0,Zh.exports.default=Zh.exports});var yE=Qe((_ie,Ho)=>{function Cv(e){return Ho.exports=Cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ho.exports.__esModule=!0,Ho.exports.default=Ho.exports,Cv(e)}Ho.exports=Cv,Ho.exports.__esModule=!0,Ho.exports.default=Ho.exports});var vE=Qe((yie,Yo)=>{function Iv(e,n){return Yo.exports=Iv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},Yo.exports.__esModule=!0,Yo.exports.default=Yo.exports,Iv(e,n)}Yo.exports=Iv,Yo.exports.__esModule=!0,Yo.exports.default=Yo.exports});var bE=Qe((vie,Kh)=>{var zF=vE();function GF(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&zF(e,n)}Kh.exports=GF,Kh.exports.__esModule=!0,Kh.exports.default=Kh.exports});var kv=Qe((bie,Qh)=>{function $F(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,r=Array(n);i{var BF=kv();function UF(e){if(Array.isArray(e))return BF(e)}Jh.exports=UF,Jh.exports.__esModule=!0,Jh.exports.default=Jh.exports});var wE=Qe((wie,ef)=>{function VF(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}ef.exports=VF,ef.exports.__esModule=!0,ef.exports.default=ef.exports});var Lv=Qe((Sie,tf)=>{var SE=kv();function WF(e,n){if(e){if(typeof e=="string")return SE(e,n);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?SE(e,n):void 0}}tf.exports=WF,tf.exports.__esModule=!0,tf.exports.default=tf.exports});var EE=Qe((Eie,nf)=>{function HF(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}nf.exports=HF,nf.exports.__esModule=!0,nf.exports.default=nf.exports});var CE=Qe((Cie,rf)=>{var YF=xE(),XF=wE(),ZF=Lv(),KF=EE();function QF(e){return YF(e)||XF(e)||ZF(e)||KF()}rf.exports=QF,rf.exports.__esModule=!0,rf.exports.default=rf.exports});var IE=Qe((Iie,sf)=>{function JF(e){if(Array.isArray(e))return e}sf.exports=JF,sf.exports.__esModule=!0,sf.exports.default=sf.exports});var kE=Qe((kie,of)=>{function e5(e,n){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var r,o,u,c,f=[],p=!0,m=!1;try{if(u=(i=i.call(e)).next,n===0){if(Object(i)!==i)return;p=!1}else for(;!(p=(r=u.call(i)).done)&&(f.push(r.value),f.length!==n);p=!0);}catch(d){m=!0,o=d}finally{try{if(!p&&i.return!=null&&(c=i.return(),Object(c)!==c))return}finally{if(m)throw o}}return f}}of.exports=e5,of.exports.__esModule=!0,of.exports.default=of.exports});var LE=Qe((Lie,af)=>{function t5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}af.exports=t5,af.exports.__esModule=!0,af.exports.default=af.exports});var TE=Qe((Tie,lf)=>{var n5=IE(),i5=kE(),r5=Lv(),s5=LE();function o5(e,n){return n5(e)||i5(e,n)||r5(e,n)||s5()}lf.exports=o5,lf.exports.__esModule=!0,lf.exports.default=lf.exports});var qE=Qe((Nie,jE)=>{"use strict";function fo(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var uf=fo($h()),yr=fo(fE()),Zo=fo(pE()),Ko=fo(gE()),df=fo(_E()),Em=fo(yE()),Tu=fo(Ev()),Cm=fo(bE()),a5=fo(CE()),NE=fo(TE()),l5={type:"logger",log:function(n){this.output("log",n)},warn:function(n){this.output("warn",n)},error:function(n){this.output("error",n)},output:function(n,i){var r;console&&console[n]&&(r=console)[n].apply(r,a5(i))}},c5=function(){function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Zo(this,e),this.init(n,i)}return Ko(e,[{key:"init",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=i||l5,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(i){this.debug=i}},{key:"log",value:function(){for(var i=arguments.length,r=new Array(i),o=0;o1?r-1:0),u=1;u-1?f.replace(/###/g,"."):f}function o(){return!e||typeof e=="string"}for(var u=typeof n!="string"?[].concat(n):n.split(".");u.length>1;){if(o())return{};var c=r(u.shift());!e[c]&&i&&(e[c]=new i),e=e[c]}return o()?{}:{obj:e,k:r(u.shift())}}function RE(e,n,i){var r=Rv(e,n,Object),o=r.obj,u=r.k;o[u]=i}function d5(e,n,i,r){var o=Rv(e,n,Object),u=o.obj,c=o.k;u[c]=u[c]||[],r&&(u[c]=u[c].concat(i)),r||u[c].push(i)}function Sm(e,n){var i=Rv(e,n),r=i.obj,o=i.k;if(r)return r[o]}function ME(e,n,i){var r=Sm(e,i);return r!==void 0?r:Sm(n,i)}function FE(e,n,i){for(var r in n)r in e?typeof e[r]=="string"||e[r]instanceof String||typeof n[r]=="string"||n[r]instanceof String?i&&(e[r]=n[r]):FE(e[r],n[r],i):e[r]=n[r];return e}function Lu(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var h5={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function f5(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(n){return h5[n]}):e}var p5=function(e){Cm(n,e);function n(i){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Zo(this,n),r=df(this,Em(n).call(this)),$a.call(Tu(r)),r.data=i||{},r.options=o,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r}return Ko(n,[{key:"addNamespaces",value:function(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}},{key:"removeNamespaces",value:function(r){var o=this.options.ns.indexOf(r);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(r,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,p=[r,o];return u&&typeof u!="string"&&(p=p.concat(u)),u&&typeof u=="string"&&(p=p.concat(f?u.split(f):u)),r.indexOf(".")>-1&&(p=r.split(".")),Sm(this.data,p)}},{key:"addResource",value:function(r,o,u,c){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},p=this.options.keySeparator;p===void 0&&(p=".");var m=[r,o];u&&(m=m.concat(p?u.split(p):u)),r.indexOf(".")>-1&&(m=r.split("."),c=o,o=m[1]),this.addNamespaces(o),RE(this.data,m,c),f.silent||this.emit("added",r,o,u,c)}},{key:"addResources",value:function(r,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var f in u)(typeof u[f]=="string"||Object.prototype.toString.apply(u[f])==="[object Array]")&&this.addResource(r,o,f,u[f],{silent:!0});c.silent||this.emit("added",r,o,u)}},{key:"addResourceBundle",value:function(r,o,u,c,f){var p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},m=[r,o];r.indexOf(".")>-1&&(m=r.split("."),c=u,u=o,o=m[1]),this.addNamespaces(o);var d=Sm(this.data,m)||{};c?FE(d,u,f):d=yr({},d,u),RE(this.data,m,d),p.silent||this.emit("added",r,o,u)}},{key:"removeResourceBundle",value:function(r,o){this.hasResourceBundle(r,o)&&delete this.data[r][o],this.removeNamespaces(o),this.emit("removed",r,o)}},{key:"hasResourceBundle",value:function(r,o){return this.getResource(r,o)!==void 0}},{key:"getResourceBundle",value:function(r,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?yr({},{},this.getResource(r,o)):this.getResource(r,o)}},{key:"getDataByLanguage",value:function(r){return this.data[r]}},{key:"toJSON",value:function(){return this.data}}]),n}($a),DE={processors:{},addPostProcessor:function(n){this.processors[n.name]=n},handle:function(n,i,r,o,u){var c=this;return n.forEach(function(f){c.processors[f]&&(i=c.processors[f].process(i,r,o,u))}),i}},AE={},OE=function(e){Cm(n,e);function n(i){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Zo(this,n),r=df(this,Em(n).call(this)),$a.call(Tu(r)),u5(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,Tu(r)),r.options=o,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.logger=Xo.create("translator"),r}return Ko(n,[{key:"changeLanguage",value:function(r){r&&(this.language=r)}},{key:"exists",value:function(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},u=this.resolve(r,o);return u&&u.res!==void 0}},{key:"extractFromKey",value:function(r,o){var u=o.nsSeparator||this.options.nsSeparator;u===void 0&&(u=":");var c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=o.ns||this.options.defaultNS;if(u&&r.indexOf(u)>-1){var p=r.split(u);(u!==c||u===c&&this.options.ns.indexOf(p[0])>-1)&&(f=p.shift()),r=p.join(c)}return typeof f=="string"&&(f=[f]),{key:r,namespaces:f}}},{key:"translate",value:function(r,o){var u=this;if(uf(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),r==null)return"";Array.isArray(r)||(r=[String(r)]);var c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(r[r.length-1],o),p=f.key,m=f.namespaces,d=m[m.length-1],v=o.lng||this.language,y=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(y){var S=o.nsSeparator||this.options.nsSeparator;return d+S+p}return p}var w=this.resolve(r,o),E=w&&w.res,I=w&&w.usedKey||p,O=w&&w.exactUsedKey||p,H=Object.prototype.toString.apply(E),X=["[object Number]","[object Function]","[object RegExp]"],re=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,Z=typeof E!="string"&&typeof E!="boolean"&&typeof E!="number";if(z&&E&&Z&&X.indexOf(H)<0&&!(typeof re=="string"&&H==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(I,E,o):"key '".concat(p," (").concat(this.language,")' returned an object instead of string.");if(c){var te=H==="[object Array]",ee=te?[]:{},ve=te?O:I;for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F)){var ge="".concat(ve).concat(c).concat(F);ee[F]=this.translate(ge,yr({},o,{joinArrays:!1,ns:m})),ee[F]===ge&&(ee[F]=E[F])}E=ee}}else if(z&&typeof re=="string"&&H==="[object Array]")E=E.join(re),E&&(E=this.extendTranslation(E,r,o));else{var L=!1,se=!1;if(!this.isValidLookup(E)&&o.defaultValue!==void 0){if(L=!0,o.count!==void 0){var le=this.pluralResolver.getSuffix(v,o.count);E=o["defaultValue".concat(le)]}E||(E=o.defaultValue)}this.isValidLookup(E)||(se=!0,E=p);var de=o.defaultValue&&o.defaultValue!==E&&this.options.updateMissing;if(se||L||de){this.logger.log(de?"updateKey":"missingKey",v,d,p,de?o.defaultValue:E);var Ke=[],Te=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Te&&Te[0])for(var We=0;We1&&arguments[1]!==void 0?arguments[1]:{},c,f,p,m,d;return typeof r=="string"&&(r=[r]),r.forEach(function(v){if(!o.isValidLookup(c)){var y=o.extractFromKey(v,u),S=y.key;f=S;var w=y.namespaces;o.options.fallbackNS&&(w=w.concat(o.options.fallbackNS));var E=u.count!==void 0&&typeof u.count!="string",I=u.context!==void 0&&typeof u.context=="string"&&u.context!=="",O=u.lngs?u.lngs:o.languageUtils.toResolveHierarchy(u.lng||o.language,u.fallbackLng);w.forEach(function(H){o.isValidLookup(c)||(d=H,!AE["".concat(O[0],"-").concat(H)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(d)&&(AE["".concat(O[0],"-").concat(H)]=!0,o.logger.warn('key "'.concat(f,'" for namespace "').concat(d,'" for languages "').concat(O.join(", "),`" won't get resolved as namespace was not yet loaded`),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),O.forEach(function(X){if(!o.isValidLookup(c)){m=X;var re=S,z=[re];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(z,S,X,H,u);else{var Z;E&&(Z=o.pluralResolver.getSuffix(X,u.count)),E&&I&&z.push(re+Z),I&&z.push(re+="".concat(o.options.contextSeparator).concat(u.context)),E&&z.push(re+=Z)}for(var te;te=z.pop();)o.isValidLookup(c)||(p=te,c=o.getResource(X,H,te,u))}}))})}}),{res:c,usedKey:f,exactUsedKey:p,usedLng:m,usedNS:d}}},{key:"isValidLookup",value:function(r){return r!==void 0&&!(!this.options.returnNull&&r===null)&&!(!this.options.returnEmptyString&&r==="")}},{key:"getResource",value:function(r,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(r,o,u,c):this.resourceStore.getResource(r,o,u,c)}}]),n}($a);function Nv(e){return e.charAt(0).toUpperCase()+e.slice(1)}var m5=function(){function e(n){Zo(this,e),this.options=n,this.whitelist=this.options.whitelist||!1,this.logger=Xo.create("languageUtils")}return Ko(e,[{key:"getScriptPartFromCode",value:function(i){if(!i||i.indexOf("-")<0)return null;var r=i.split("-");return r.length===2?null:(r.pop(),this.formatLanguageCode(r.join("-")))}},{key:"getLanguagePartFromCode",value:function(i){if(!i||i.indexOf("-")<0)return i;var r=i.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(i){if(typeof i=="string"&&i.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=i.split("-");return this.options.lowerCaseLng?o=o.map(function(u){return u.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nv(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nv(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=Nv(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?i.toLowerCase():i}},{key:"isWhitelisted",value:function(i){return(this.options.load==="languageOnly"||this.options.nonExplicitWhitelist)&&(i=this.getLanguagePartFromCode(i)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(i)>-1}},{key:"getFallbackCodes",value:function(i,r){if(!i)return[];if(typeof i=="string"&&(i=[i]),Object.prototype.toString.apply(i)==="[object Array]")return i;if(!r)return i.default||[];var o=i[r];return o||(o=i[this.getScriptPartFromCode(r)]),o||(o=i[this.formatLanguageCode(r)]),o||(o=i.default),o||[]}},{key:"toResolveHierarchy",value:function(i,r){var o=this,u=this.getFallbackCodes(r||this.options.fallbackLng||[],i),c=[],f=function(m){m&&(o.isWhitelisted(m)?c.push(m):o.logger.warn("rejecting non-whitelisted language code: ".concat(m)))};return typeof i=="string"&&i.indexOf("-")>-1?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(i))):typeof i=="string"&&f(this.formatLanguageCode(i)),u.forEach(function(p){c.indexOf(p)<0&&f(o.formatLanguageCode(p))}),c}}]),e}(),g5=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],_5={1:function(n){return+(n>1)},2:function(n){return+(n!=1)},3:function(n){return 0},4:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},5:function(n){return n===0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},6:function(n){return n==1?0:n>=2&&n<=4?1:2},7:function(n){return n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},8:function(n){return n==1?0:n==2?1:n!=8&&n!=11?2:3},9:function(n){return+(n>=2)},10:function(n){return n==1?0:n==2?1:n<7?2:n<11?3:4},11:function(n){return n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3},12:function(n){return+(n%10!=1||n%100==11)},13:function(n){return+(n!==0)},14:function(n){return n==1?0:n==2?1:n==3?2:3},15:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2},16:function(n){return n%10==1&&n%100!=11?0:n!==0?1:2},17:function(n){return n==1||n%10==1?0:1},18:function(n){return n==0?0:n==1?1:2},19:function(n){return n==1?0:n===0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3},20:function(n){return n==1?0:n===0||n%100>0&&n%100<20?1:2},21:function(n){return n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0},22:function(n){return n===1?0:n===2?1:(n<0||n>10)&&n%10==0?2:3}};function y5(){var e={};return g5.forEach(function(n){n.lngs.forEach(function(i){e[i]={numbers:n.nr,plurals:_5[n.fc]}})}),e}var v5=function(){function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Zo(this,e),this.languageUtils=n,this.options=i,this.logger=Xo.create("pluralResolver"),this.rules=y5()}return Ko(e,[{key:"addRule",value:function(i,r){this.rules[i]=r}},{key:"getRule",value:function(i){return this.rules[i]||this.rules[this.languageUtils.getLanguagePartFromCode(i)]}},{key:"needsPlural",value:function(i){var r=this.getRule(i);return r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(i,r){var o=this,u=[],c=this.getRule(i);return c&&c.numbers.forEach(function(f){var p=o.getSuffix(i,f);u.push("".concat(r).concat(p))}),u}},{key:"getSuffix",value:function(i,r){var o=this,u=this.getRule(i);if(u){var c=u.noAbs?u.plurals(r):u.plurals(Math.abs(r)),f=u.numbers[c];this.options.simplifyPluralSuffix&&u.numbers.length===2&&u.numbers[0]===1&&(f===2?f="plural":f===1&&(f=""));var p=function(){return o.options.prepend&&f.toString()?o.options.prepend+f.toString():f.toString()};return this.options.compatibilityJSON==="v1"?f===1?"":typeof f=="number"?"_plural_".concat(f.toString()):p():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&u.numbers.length===2&&u.numbers[0]===1?p():this.options.prepend&&c.toString()?this.options.prepend+c.toString():c.toString()}return this.logger.warn("no plural rule found for: ".concat(i)),""}}]),e}(),b5=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zo(this,e),this.logger=Xo.create("interpolator"),this.options=n,this.format=n.interpolation&&n.interpolation.format||function(i){return i},this.init(n)}return Ko(e,[{key:"init",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i.interpolation||(i.interpolation={escapeValue:!0});var r=i.interpolation;this.escape=r.escape!==void 0?r.escape:f5,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Lu(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Lu(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Lu(r.nestingPrefix):r.nestingPrefixEscaped||Lu("$t("),this.nestingSuffix=r.nestingSuffix?Lu(r.nestingSuffix):r.nestingSuffixEscaped||Lu(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var i="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(i,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(i,r,o,u){var c=this,f,p,m,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function v(I){return I.replace(/\$/g,"$$$$")}var y=function(O){if(O.indexOf(c.formatSeparator)<0)return ME(r,d,O);var H=O.split(c.formatSeparator),X=H.shift().trim(),re=H.join(c.formatSeparator).trim();return c.format(ME(r,d,X),re,o)};this.resetRegExp();var S=u&&u.missingInterpolationHandler||this.options.missingInterpolationHandler;for(m=0;f=this.regexpUnescape.exec(i);){if(p=y(f[1].trim()),p===void 0)if(typeof S=="function"){var w=S(i,f,u);p=typeof w=="string"?w:""}else this.logger.warn("missed to pass in variable ".concat(f[1]," for interpolating ").concat(i)),p="";else typeof p!="string"&&!this.useRawValueToEscape&&(p=Tv(p));if(i=i.replace(f[0],v(p)),this.regexpUnescape.lastIndex=0,m++,m>=this.maxReplaces)break}for(m=0;f=this.regexp.exec(i);){if(p=y(f[1].trim()),p===void 0)if(typeof S=="function"){var E=S(i,f,u);p=typeof E=="string"?E:""}else this.logger.warn("missed to pass in variable ".concat(f[1]," for interpolating ").concat(i)),p="";else typeof p!="string"&&!this.useRawValueToEscape&&(p=Tv(p));if(p=this.escapeValue?v(this.escape(p)):v(p),i=i.replace(f[0],p),this.regexp.lastIndex=0,m++,m>=this.maxReplaces)break}return i}},{key:"nest",value:function(i,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,c,f=yr({},o);f.applyPostProcessor=!1,delete f.defaultValue;function p(m,d){if(m.indexOf(",")<0)return m;var v=m.split(",");m=v.shift();var y=v.join(",");y=this.interpolate(y,f),y=y.replace(/'/g,'"');try{f=JSON.parse(y),d&&(f=yr({},d,f))}catch(S){this.logger.error("failed parsing options string in nesting for key ".concat(m),S)}return delete f.defaultValue,m}for(;u=this.nestingRegexp.exec(i);){if(c=r(p.call(this,u[1].trim(),f),f),c&&u[0]===i&&typeof c!="string")return c;typeof c!="string"&&(c=Tv(c)),c||(this.logger.warn("missed to resolve ".concat(u[1]," for nesting ").concat(i)),c=""),i=i.replace(u[0],c),this.regexp.lastIndex=0}return i}}]),e}();function x5(e,n){for(var i=e.indexOf(n);i!==-1;)e.splice(i,1),i=e.indexOf(n)}var w5=function(e){Cm(n,e);function n(i,r,o){var u,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Zo(this,n),u=df(this,Em(n).call(this)),$a.call(Tu(u)),u.backend=i,u.store=r,u.services=o,u.languageUtils=o.languageUtils,u.options=c,u.logger=Xo.create("backendConnector"),u.state={},u.queue=[],u.backend&&u.backend.init&&u.backend.init(o,c.backend,c),u}return Ko(n,[{key:"queueLoad",value:function(r,o,u,c){var f=this,p=[],m=[],d=[],v=[];return r.forEach(function(y){var S=!0;o.forEach(function(w){var E="".concat(y,"|").concat(w);!u.reload&&f.store.hasResourceBundle(y,w)?f.state[E]=2:f.state[E]<0||(f.state[E]===1?m.indexOf(E)<0&&m.push(E):(f.state[E]=1,S=!1,m.indexOf(E)<0&&m.push(E),p.indexOf(E)<0&&p.push(E),v.indexOf(w)<0&&v.push(w)))}),S||d.push(y)}),(p.length||m.length)&&this.queue.push({pending:m,loaded:{},errors:[],callback:c}),{toLoad:p,pending:m,toLoadLanguages:d,toLoadNamespaces:v}}},{key:"loaded",value:function(r,o,u){var c=r.split("|"),f=NE(c,2),p=f[0],m=f[1];o&&this.emit("failedLoading",p,m,o),u&&this.store.addResourceBundle(p,m,u),this.state[r]=o?-1:2;var d={};this.queue.forEach(function(v){d5(v.loaded,[p],m),x5(v.pending,r),o&&v.errors.push(o),v.pending.length===0&&!v.done&&(Object.keys(v.loaded).forEach(function(y){d[y]||(d[y]=[]),v.loaded[y].length&&v.loaded[y].forEach(function(S){d[y].indexOf(S)<0&&d[y].push(S)})}),v.done=!0,v.errors.length?v.callback(v.errors):v.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(v){return!v.done})}},{key:"read",value:function(r,o,u){var c=this,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:250,m=arguments.length>5?arguments[5]:void 0;return r.length?this.backend[u](r,o,function(d,v){if(d&&v&&f<5){setTimeout(function(){c.read.call(c,r,o,u,f+1,p*2,m)},p);return}m(d,v)}):m(null,{})}},{key:"prepareLoading",value:function(r,o){var u=this,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),f&&f();typeof r=="string"&&(r=this.languageUtils.toResolveHierarchy(r)),typeof o=="string"&&(o=[o]);var p=this.queueLoad(r,o,c,f);if(!p.toLoad.length)return p.pending.length||f(),null;p.toLoad.forEach(function(m){u.loadOne(m)})}},{key:"load",value:function(r,o,u){this.prepareLoading(r,o,{},u)}},{key:"reload",value:function(r,o,u){this.prepareLoading(r,o,{reload:!0},u)}},{key:"loadOne",value:function(r){var o=this,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",c=r.split("|"),f=NE(c,2),p=f[0],m=f[1];this.read(p,m,"read",null,null,function(d,v){d&&o.logger.warn("".concat(u,"loading namespace ").concat(m," for language ").concat(p," failed"),d),!d&&v&&o.logger.log("".concat(u,"loaded namespace ").concat(m," for language ").concat(p),v),o.loaded(r,d,v)})}},{key:"saveMissing",value:function(r,o,u,c,f){var p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(u,'" for namespace "').concat(o,'" as the namespace was not yet loaded'),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}this.backend&&this.backend.create&&this.backend.create(r,o,u,c,null,yr({},p,{isUpdate:f})),!(!r||!r[0])&&this.store.addResource(r[0],o,u,c)}}]),n}($a);function S5(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(n){var i={};if(uf(n[1])==="object"&&(i=n[1]),typeof n[1]=="string"&&(i.defaultValue=n[1]),typeof n[2]=="string"&&(i.tDescription=n[2]),uf(n[2])==="object"||uf(n[3])==="object"){var r=n[3]||n[2];Object.keys(r).forEach(function(o){i[o]=r[o]})}return i},interpolation:{escapeValue:!0,format:function(n,i,r){return n},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function PE(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function wm(){}var E5=function(e){Cm(n,e);function n(){var i,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(Zo(this,n),i=df(this,Em(n).call(this)),$a.call(Tu(i)),i.options=PE(r),i.services={},i.logger=Xo,i.modules={external:[]},o&&!i.isInitialized&&!r.isClone){if(!i.options.initImmediate)return i.init(r,o),df(i,Tu(i));setTimeout(function(){i.init(r,o)},0)}return i}return Ko(n,[{key:"init",value:function(){var r=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(u=o,o={}),this.options=yr({},S5(),this.options,PE(o)),this.format=this.options.interpolation.format,u||(u=wm);function c(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?Xo.init(c(this.modules.logger),this.options):Xo.init(null,this.options);var f=new m5(this.options);this.store=new p5(this.options.resources,this.options);var p=this.services;p.logger=Xo,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new v5(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p.interpolator=new b5(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new w5(c(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(y){for(var S=arguments.length,w=new Array(S>1?S-1:0),E=1;E1?S-1:0),E=1;E1&&arguments[1]!==void 0?arguments[1]:wm,c=u,f=typeof r=="string"?r:this.language;if(typeof r=="function"&&(c=r),!this.options.resources||this.options.partialBundledLanguages){if(f&&f.toLowerCase()==="cimode")return c();var p=[],m=function(y){if(y){var S=o.services.languageUtils.toResolveHierarchy(y);S.forEach(function(w){p.indexOf(w)<0&&p.push(w)})}};if(f)m(f);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(v){return m(v)})}this.options.preload&&this.options.preload.forEach(function(v){return m(v)}),this.services.backendConnector.load(p,this.options.ns,c)}else c(null)}},{key:"reloadResources",value:function(r,o,u){var c=cf();return r||(r=this.languages),o||(o=this.options.ns),u||(u=wm),this.services.backendConnector.reload(r,o,function(f){c.resolve(),u(f)}),c}},{key:"use",value:function(r){return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&DE.addPostProcessor(r),r.type==="3rdParty"&&this.modules.external.push(r),this}},{key:"changeLanguage",value:function(r,o){var u=this;this.isLanguageChangingTo=r;var c=cf();this.emit("languageChanging",r);var f=function(d,v){v?(u.language=v,u.languages=u.services.languageUtils.toResolveHierarchy(v),u.translator.changeLanguage(v),u.isLanguageChangingTo=void 0,u.emit("languageChanged",v),u.logger.log("languageChanged",v)):u.isLanguageChangingTo=void 0,c.resolve(function(){return u.t.apply(u,arguments)}),o&&o(d,function(){return u.t.apply(u,arguments)})},p=function(d){d&&(u.language||(u.language=d,u.languages=u.services.languageUtils.toResolveHierarchy(d)),u.translator.language||u.translator.changeLanguage(d),u.services.languageDetector&&u.services.languageDetector.cacheUserLanguage(d)),u.loadResources(d,function(v){f(v,d)})};return!r&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(p):p(r),c}},{key:"getFixedT",value:function(r,o){var u=this,c=function f(p,m){var d;if(uf(m)!=="object"){for(var v=arguments.length,y=new Array(v>2?v-2:0),S=2;S0?this.languages[0]:this.language),!r)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return o.indexOf(this.services.languageUtils.getLanguagePartFromCode(r))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;return new n(r,o)}},{key:"cloneInstance",value:function(){var r=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wm,c=yr({},this.options,o,{isClone:!0}),f=new n(c),p=["store","services","language"];return p.forEach(function(m){f[m]=r[m]}),f.translator=new OE(f.services,f.options),f.translator.on("*",function(m){for(var d=arguments.length,v=new Array(d>1?d-1:0),y=1;y{vt();Ba=qE(),I5=()=>window.initConfig.user.i18n||"en",He=e=>Ba.t(e),tc=e=>Ba.t(`plugins.${e}`),Mv=e=>{for(let n in e)for(let i in e[n])Ba.addResource(n,"translation",i,e[n][i])},Av=({name:e,config:n})=>{for(let i in n)V.i18n.plugins[i]&&(V.i18n.plugins[i].plugins[e]=n[i]);for(let i in V.i18n.plugins)for(let r in V.i18n.plugins[i])Ba.addResource(i,"translation",r,V.i18n.plugins[i][r])},zE={getAppLanguage:I5,t:He,tPlugin:tc,addI18n:Mv,addI18nPlugin:Av}});var GE,Ht,zi=W(()=>{Nt();vt();bt();xm();hf();xi();_r();cn();GE=async(e=[])=>{let n=await Promise.allSettled(e);return n.some(i=>i.status==="fulfilled")?n.filter(i=>i.status==="fulfilled").map(i=>i.value):Promise.reject(n.filter(i=>i.status==="rejected").map(i=>i.reason))},Ht={async getData(e,n={}){let{inputs:i={},outputs:r={}}=n,o=this[e](i);return r&&U.outputDataPlace(o,r),await await o},async"query:coordinates"({coordinates:e,layerIds:n=[],multilayers:i=!1,query_point_tolerance:r=ja,addExternal:o=!0,feature_count:u}={}){let c=U.getService("catalog").state.external.vector.some(p=>p.selected),f=zr({QUERYABLE:!0,SELECTED_OR_ALL:n.length===0,VISIBLE:!0,IDS:n.length?n.map(p=>p):void 0});try{return{result:!0,type:"ows",query:{coordinates:e,type:"coordinates",external:{add:(!c||n.length>0)&&f.length===1&&f[0].isSelected()?!1:o,filter:{SELECTED:c}}},data:((!c||n.length>0)&&await sn(this.getQueryLayersPromisesByCoordinates(f,{multilayers:i,feature_count:u,query_point_tolerance:r,coordinates:e}))||[]).flatMap(({data:p=[]})=>p)}}catch(p){throw console.warn(p),p}},async"query:bbox"({bbox:e,feature_count:n=V.project.state.feature_count||5,filterConfig:i={},multilayers:r=!1,condition:o={filtrable:{ows:"WFS"}},excludeSelected:u=null,addExternal:c=!0,layersFilterObject:f={SELECTED_OR_ALL:!0,FILTERABLE:!0,VISIBLE:!0}}={}){let p=U.getService("catalog").state.external.vector.some(d=>d.selected),m=p||(typeof u=="boolean"?u:!1);try{return{result:!0,type:"ows",query:{bbox:e,type:"bbox",filterConfig:i,external:{add:c,filter:{SELECTED:m}}},data:(!p&&await this.getQueryLayersPromisesByGeometry(zr(f,o),{geometry:ol.geom.Polygon.fromExtent(e),feature_count:n,filterConfig:i,multilayers:r,projection:U.getService("map").getMap().getView().getProjection()})||[]).flatMap(({data:d=[]})=>d)}}catch(d){throw console.warn(d),d}},async"query:polygon"({feature:e,feature_count:n=V.project.state.feature_count||5,filterConfig:i={},multilayers:r=!1,condition:o={filtrable:{ows:"WFS"}},layerName:u="",excludeSelected:c=null,external:f={add:!0,filter:{SELECTED:!1}},type:p="polygon"}={}){let m=e.getGeometry();try{return{result:!0,type:"ows",error:!m,query:{fid:U.getService("catalog").state.external.vector.some(d=>d.selected)?e.getId():e.get(Cn),geometry:m,layerName:u,type:p,filterConfig:i,external:f},usermessage:!m&&{type:"warning",message:`${u} - ${He("sdk.mapcontrols.querybypolygon.no_geometry")}`,messagetext:!0,autoclose:!1},data:(await this.getQueryLayersPromisesByGeometry(zr({...typeof c=="boolean"?{SELECTED:!c}:{SELECTED_OR_ALL:!0},FILTERABLE:!0,VISIBLE:!0},o),{geometry:m,multilayers:r,feature_count:n,filterConfig:i,projection:V.project.getProjection()})||[]).flatMap(({data:d=[]})=>d)}}catch(d){throw console.warn(d),d}},async"search:features"(e={layer,filter,raw:!1,queryUrl,feature_count,formatter:1,ordering,autofilter:0,page,page_sizes}){let{layer:n,...i}=e;i.filter=[].concat(i.filter),i.page_size=(i.page_sizes||[])[0];let r=[],o=[];return{data:(await Promise.allSettled([].concat(n).map((u,c)=>u.searchFeatures({...i,filter:i.filter[c]})))).filter(u=>u.status==="fulfilled").map(({value:u}={})=>{if(i.autofilter===1&&(u.data||[]).forEach(({layer:c,filtertoken:f})=>{f&&(c.state.selection.active=c.state.filter.active=!0,c.setFilterToken(f))}),i.page_sizes){let c=Math.max(...Array.isArray(i.page_sizes)?i.page_sizes:[i.page_sizes]);o.push(c<=u.count?i.page_sizes:[...i.page_sizes.filter(f=>f0)return u.data[0]}),query:{type:"search",search:i.filter,autofilter:!!i.autofilter,pagination:i.page_size&&{pages:i.page&&r.map(u=>Math.round(u/i.page_size)),current:i.page&&r.map(()=>i.page),page_sizes:o,counts:r,getData:{params:i.filter.map(u=>({...i,filter:u})),method:"searchFeatures",layers:n}}},type:"api"}},async"search:fids"({layer:e,formatter:n=0,fids:i=[]}={}){let r=[];try{r=(e&&await e.getFeatureByFids({fids:i,formatter:n})||[]).map(o=>{let u=o.properties!==void 0?o.properties:{};u[Cn]=o.id;let c=new ol.Feature(o.geometry&&new ol.geom[o.geometry.type](o.geometry.coordinates));return c.setProperties(u),c.setId(o.id),c})}catch(o){console.warn(o)}return{data:[{layer:e,features:r}],query:{type:"search"}}},async"search:layersfids"({layers:e=[],fids:n=[],formatter:i=0}={}){let r=[];try{r=(await Promise.all(e.map((o,u)=>this["search:fids"]({layer:o,fids:n[u],formatter:i})))).map(o=>o.data)}catch(o){console.warn(o)}return{data:r,query:{type:"search"}}},async"expression:expression"(e={}){try{let n=await ht.post({url:`${V.project.getUrl("vector_data")}${e.layer_id}/`,contentType:"application/json",data:JSON.stringify(e)});return n.result?n.vector.data.features||[]:Promise.reject(JSON.stringify(n.error))}catch(n){return console.warn(n),Promise.reject(n)}},async"expression:expression_eval"(e={}){try{let{result:n,value:i,error:r}=await ht.post({url:`/api/expression_eval/${V.project.getId()}/`,contentType:"application/json",data:JSON.stringify(e)});return n?i:Promise.reject(JSON.stringify(r))}catch(n){return console.warn(n),Promise.reject(n)}},async"proxy:wms"({url:e,method:n="GET",params:i={},headers:r={}}={}){n==="GET"&&(e=new URL(e),Object.keys(i).forEach(o=>e.searchParams.set(o,i[o])),e=e.toString());try{return{response:await ht.post({data:JSON.stringify({url:e,params:i,headers:r,method:n}),contentType:"application/json",url:`${window.initConfig.proxyurl}`}),data:JSON.stringify({url:e,params:i,headers:r,method:n})}}catch(o){console.warn(o)}},"proxy:data"(e={}){},getQueryLayersPromisesByCoordinates(e,{coordinates:n,feature_count:i=10,query_point_tolerance:r=ja,multilayers:o=!1,reproject:u=!0}={}){if(e.length===0)return Wt(Promise.resolve(e));let c=U.getService("map").getMap(),f=c.getSize(),p=c.getView().getProjection(),m=c.getView().getResolution();return Wt(async()=>await GE(Object.values(o?ec(e,d=>`${d.getInfoFormat()}:${d.getInfoUrl()}:${d.getMultiLayerId()}`):e).map(d=>sn([].concat(d)[0].query(o?{feature_count:i,coordinates:n,query_point_tolerance:r,mapProjection:p,size:f,resolution:m,reproject:u,layers:d}:{feature_count:i,coordinates:n,query_point_tolerance:r,mapProjection:p,size:f,resolution:m})))))},async getQueryLayersPromisesByGeometry(e,{geometry:n,projection:i,filterConfig:r={},multilayers:o=!1,feature_count:u=10}={}){if(e.length===0)return[];let c=i.getCode();return await GE(Object.values(o?ec(e,f=>`${f.getMultiLayerId()}_${f.getProjection().getCode()}`):e).map(f=>{let p=[].concat(f)[0],m=p.getProjection().getCode(),d={config:r,type:"geometry",value:c===m?n:n.clone().transform(c,m)};return sn(p.query(o?{filter:d,feature_count:u,layers:f}:{filter:d,feature_count:u,filterConfig:r}))}))}}});function zs(e,n){return new Promise((i,r)=>{let o=()=>{if(!e())return"invalid predicate";clearInterval(u),i("predicate")},u=setInterval(o,100);o(),n&&setTimeout(()=>{clearInterval(u),r("timeout")},n)})}var ff=W(()=>{});async function Im(e){return e=Yl(e),await Zn.registerProjection(e),e}var Ov,km,Pv,Fv,pf,Dv=W(()=>{Yn();bt();zi();vt();xu();ho();um();bn();ff();Ov=class{constructor(){this.pendingactions={},this.getMessage=this.getMessage.bind(this),this.eventResponseServiceHandler=this.eventResponseServiceHandler.bind(this)}async init({project:n}={}){await U.isReady(),this.services={app:new Pv,editing:new Fv};let i=n.state.layers.map(o=>({id:o.id,name:o.name})),r=Object.keys(this.services);for(let o=0;o({[p.getId()]:{features:f.writeFeatures(m)}}))}catch(p){console.warn(p),u=!1,r=p}this.postMessage({id:null,action:o,response:{result:u,data:r}})}postMessage(n={}){window.parent&&window.parent.postMessage(n,"*")}async stopPendingActions(){let n=[];return Object.keys(this.pendingactions).forEach(i=>{n.push(this.services[this.pendingactions[i].context].stop()),delete this.pendingactions[i]}),Promise.allSettled(n)}async getMessage(n){if(n&&n.data){let{id:i=ut(),single:r=!0,action:o,data:u}=n.data,[c,f]=(o||"").split(":"),p=!1,m;try{let d=this.services[c].getReady();d&&r&&await this.stopPendingActions(),d&&(this.pendingactions[i]={context:c},m=await this.services[c][f](u),p=!0)}catch(d){console.warn(d),p=!1,m=d}this.postMessage({id:i,action:o,response:{result:p,data:m}}),delete this.pendingactions[i]}}async clear(){let n=Object.keys(this.services);for(let i=0;igr.getPlugin("editing")),this.dependencyApi=gr.getPlugin("editing"),this.dependencyApi.getEditableLayersId=this.dependencyApi.getEditableLayersId||(()=>Object.keys(this.dependencyApi.getEditableLayers())),this.dependencyApi.hidePanel=this.dependencyApi.hidePanel||this.dependencyApi.hideEditingPanel,this.dependencyApi.resetDefault=this.dependencyApi.resetDefault||this.dependencyApi.resetAPIDefault,this.setReady(!0))}getDependecyApi(){return this.dependencyApi}getQgsLayerId({qgs_layer_id:n,noValue:i=this.layers.map(r=>r.id)}){return n?[].concat(n):i}async searchFeature({layer:n,feature:i}){let{data:r=[]}=await Ht.getData("search:features",{inputs:{layer:n,filter:[].concat(i.value).map(o=>`${i.field}|eq|${encodeURIComponent(o)}`).join("|OR,")},outputs:!1});return r}async findFeaturesWithGeometry({feature:n,qgs_layer_id:i=[],zoom:r=!1,highlight:o=!1}={}){let u={found:!1,features:[],qgs_layer_id:null},c=i.length,f=0;for(;!u.found&&f0&&!!d.find(v=>v.getGeometry()),!d||!u.found)throw"invalid response";u.features=d,u.qgs_layer_id=i[f],r&&await this.mapService.zoomToFeatures(d,{highlight:o})}catch(m){f++,console.warn(m)}}return u.found||this.mapService.zoomToExtent(this.mapService.project.state.initextent),u}setLayers(n=[]){this.layers=n}getLayers(){return this.layers}setReady(n=!1){this.ready=n}getReady(){return this.ready}async stop(){}clear(){}},Pv=class extends km{constructor(){super(),this.mapControls={screenshot:{control:null},changeMap:{control:null}}}init(){return new Promise(n=>{this.mapService.once("ready",()=>{this._map=this.mapService.getMap(),this._mapCrs=this.mapService.getCrs(),this.mapControls.screenshot.control=this.mapService.getMapControlByType({type:"screenshot"}),this.setReady(!0),n()})})}async results({capture:n=!0}){return U.currentoutputplace=n?"iframe":"gui",[]}async screenshot({capture:n=!0}){if(!n){this.mapControls.screenshot.control.resetOriginalOnClickEvent();return}this.mapControls.screenshot.control.overwriteOnClickEvent(async()=>{let i;try{i={result:!0,data:await this.mapService.createMapImage()}}catch(r){console.warn(r),i={result:!1,data:r}}finally{this.emit("response",{response:i,action:"app:screenshot"})}})}async getcenter(n={}){let i=this.mapService.getCenter();return n.epsg!==void 0?ol.proj.transform(i,this.mapService.getEpsg(),await Im(n.epsg)):i}async zoomtocoordinates(n={}){let{coordinates:i=[],epsg:r}=n;return i&&Array.isArray(i)&&i.length===2?(r!==void 0&&(r=await Im(r),i=ol.proj.transform(i,r,this.mapService.getEpsg())),this.mapService.zoomTo(i),i):Promise.reject(i)}async getextent(n={}){let i=this.mapService.getMapExtent();return n.epsg!==void 0?ol.proj.transformExtent(i,this.mapService.getEpsg(),await Im(n.epsg)):i}async zoomtoextent(n={}){let{extent:i=[],epsg:r}=n;return i&&Array.isArray(i)&&i.length===4?(r!==void 0?(r=Im(r),i=ol.proj.transformExtent(i,r,this.mapService.getEpsg())):this.mapService.goToBBox(i),i):Promise.reject(i)}async zoomtofeature(n={}){let{qgs_layer_id:i,feature:r,highlight:o=!1}=n;return i=this.getQgsLayerId({qgs_layer_id:i}),(await this.findFeaturesWithGeometry({qgs_layer_id:i,feature:r,zoom:!0,highlight:o})).qgs_layer_id}},Fv=class extends km{constructor(){super(),this.pluginName="editing",this.subscribevents=[],this.isRunning=!1,this.responseObject={cb:null,qgs_layer_id:null,error:null},this.config={tools:{add:{disabled:[{id:"deletefeature"},{id:"copyfeatures"},{id:"editmultiattributes"},{id:"deletePart"},{id:"splitfeature"},{id:"mergefeatures"}]},update:{disabled:[{id:"addfeature"},{id:"copyfeatures"},{id:"deletefeature"},{id:"editmultiattributes"},{id:"deletePart"},{id:"splitfeature"},{id:"mergefeatures"}]},delete:{enabled:[{id:"deletefeature",options:{active:!0}}]}}},this.subscribersHandlers={canUndo:({activeTool:n,disableToolboxes:i=[]})=>r=>{r===!1&&(this.responseObject.qgs_layer_id=null,this.responseObject.error=null),n.setEnabled(!r),i.forEach(o=>o.setEditing(!r))},canRedo:()=>{},cancelform:n=>()=>{n()},addfeature:({properties:n,toolboxes:i}={})=>r=>{Object.keys(n).forEach(c=>r.set(c,n[c]));let o,u=[];i.forEach(c=>{let f=c.getToolById("addfeature");f.isActive()?(f.setEnabled(!1),o=f):(c.setEditing(!1),u.push(c))}),this.subscribevents.find(c=>c.event!=="canUndo")&&this.addSubscribeEvents("cancelform",this.addSubscribeEvents("canUndo",{activeTool:o,disableToolboxes:u}))},closeeditingpanel:({qgs_layer_id:n})=>()=>{this.responseObject.cb({qgs_layer_id:this.responseObject.qgs_layer_id,error:this.responseObject.error}),this.stopAction({qgs_layer_id:n})}}}async startAction({toolboxes:n,resolve:i,reject:r}){this.responseObject.cb=r,this.dependencyApi.setSaveConfig({cb:{done:o=>{this.responseObject.cb=i,this.responseObject.qgs_layer_id=o.getId(),this.responseObject.error=null,this.dependencyApi.hidePanel()},error:(o,u)=>{this.responseObject.cb=r,this.responseObject.qgs_layer_id=o.getId(),this.responseObject.error=u}}}),this.dependencyApi.showPanel({toolboxes:n}),this.isRunning=!0}async stopAction(n={}){n.qgs_layer_id&&await this.stopEditing(n.qgs_layer_id)}addSubscribeEvents(n,i={}){let r=this.subscribersHandlers[n](i);return this.dependencyApi.subscribe(n,r),this.subscribevents.push({event:n,handler:r}),r}resetSubscribeEvents(){this.subscribevents.forEach(n=>{this.dependencyApi.unsubscribe(n.event,n.handler)})}add(n={}){return new Promise(async(i,r)=>{if(this.isRunning)return r();let{qgs_layer_id:o,...u}=n,{properties:c}=u,f=this.getQgsLayerId({qgs_layer_id:o,noValue:this.dependencyApi.getEditableLayersId()});await this.startAction({toolboxes:f,resolve:i,reject:r});let p=(await this.startEditing(f,{tools:this.config.tools.add,startstopediting:!1,action:"add",selected:f.length===1})).filter(m=>m.status==="fulfilled").map(m=>m.value);U.isSidebarVisible()||U.showSidebar(),p.length===1&&p[0]&&p[0].setActiveTool(p[0].getToolById("addfeature")),this.addSubscribeEvents("addfeature",{properties:c,toolboxes:p}),this.addSubscribeEvents("closeeditingpanel",{qgs_layer_id:f})})}async update(n={}){return new Promise(async(i,r)=>{if(this.isRunning)return r();let{qgs_layer_id:o,...u}=n,{feature:c}=u,f=this.getQgsLayerId({qgs_layer_id:o,noValue:this.dependencyApi.getEditableLayersId()}),p=await this.findFeaturesWithGeometry({qgs_layer_id:f,feature:c,zoom:!0,highlight:!0,selected:f.length===1});if(!p.found)return r();await this.startAction({toolboxes:[p.qgs_layer_id],resolve:i,reject:r}),await this.startEditing([p.qgs_layer_id],{feature:c,tools:this.config.tools.update,startstopediting:!1,action:"update"}),U.isSidebarVisible()||U.showSidebar(),this.addSubscribeEvents("closeeditingpanel",{qgs_layer_id:[p.qgs_layer_id]})})}delete(){}async startEditing(n=[],i={}){let{action:r="add",feature:o}=i,u={};switch(i.filter=u,r){case"add":u.nofeatures=!0;break;case"update":u.field=`${o.field}|eq|${o.value}`;break}let c=[];return n.forEach(f=>{c.push(this.dependencyApi.startEditing(f,i))}),await Promise.allSettled(c)}async stopEditing(n){let i=[];n.forEach(r=>{i.push(this.dependencyApi.stopEditing(r))}),await Promise.allSettled(i),this.clear()}stop(){return new Promise(n=>{this.dependencyApi.hidePanel(),U.hideSidebar(),this.once("clear",n)})}clear(){this.dependencyApi.resetDefault(),this.isRunning=!1,this.responseObject={cb:null,qgs_layer_id:null,error:null},this.resetSubscribeEvents(),this.emit("clear")}},pf=new Ov});function wi(e){return Object.prototype.toString.call(e).slice(8,-1)}var Qo=W(()=>{});function nc(){return window.initConfig.projects,window.initConfig.projects.filter(e=>[null,void 0].includes(e.listable)?e.id===V.project.getId()||window.initConfig.overviewproject&&e.gid===window.initConfig.overviewproject?!1:e:e.listable).sort((e,n)=>(e.title||"").localeCompare(n.title))}var Lm=W(()=>{vt()});function mf(e){let n=window.initConfig.projects.find(i=>e===i.gid);try{return`${new URL(window.initConfig.urls.baseurl)}${n.url}`}catch(i){return console.warn(i),`${location.origin}${window.initConfig.urls.baseurl}${n.url}`}}var jv=W(()=>{});var qv={};hi(qv,{default:()=>F5});function O5(e,n,i,r,o,u,c,f,p,m){let d=(typeof i=="function"?i.options:i)||{};return d.__file="SidebarItem.vue",d.render||(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),d._scopeId=r,d}var k5,L5,T5,N5,R5,M5,A5,P5,F5,zv=W(()=>{vt();k5={name:"SidebarItem",data(){let{component:e}=this.$options;return{info:e.info||{state:null,style:null,class:null},main:!0,component:e,active:!1,title:e.title||"",open:!!e.state.open,icon:e.icon,iconColor:e.iconColor,collapsible:e.collapsible!==!1,actions:e.actions,sidebar:V.gui.sidebar}},methods:{triggerAction(e,n){e.fnc(n)}},mounted(){let e=this.$options.opts||{},n=document.getElementById("g3w-sidebarcomponents");[null,void 0].includes(e.position)||e.position<0||e.position>=n.children.length?$(n).append(this.$el):Array.from(n.children).forEach((i,r)=>{(r===e.position||i.id===e.position)&&i.insertAdjacentElement(e.before||e.before===void 0?"beforebegin":"afterend",this.$el)}),this.component.mount(this.$refs["component-placeholder"]),this.component.click=({open:i=!1}={})=>{i&&V.sidebar.components.forEach(o=>{o!==this.component&&o.getOpen()&&o.click({open:!1})});let r=this.component.getInternalComponent().$el;r.classList&&r.classList.toggle("menu-open",i),r.parentNode.classList.toggle("active",i),this.component.setOpen(i)}}},L5=function(){var e=this,n=e.$createElement,i=e._self._c||n;return i("li",{directives:[{name:"show",rawName:"v-show",value:e.component.state.visible,expression:"component.state.visible"},{name:"disabled",rawName:"v-disabled",value:e.component.state.disabled,expression:"component.state.disabled"}],staticClass:"treeview sidebaritem",class:{active:e.open},attrs:{id:e.component.id}},[i("bar-loader",{attrs:{loading:e.component.state.loading}}),e._v(" "),i("a",{directives:[{name:"t-tooltip",rawName:"v-t-tooltip:right.create",value:e.sidebar.open?"":e.title,expression:"sidebar.open ? '' : title",arg:"right",modifiers:{create:!0}}],staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"},attrs:{href:"#","current-tooltip":e.sidebar.open?"":e.title}},[i("div",[e.sidebar.open?i("i",{class:e.icon,style:{color:e.iconColor}}):i("span",[i("i",{class:e.icon,style:{color:e.iconColor}})]),e._v(" "),i("span",{directives:[{name:"t",rawName:"v-t",value:e.title,expression:"title"}],staticClass:"treeview-label"})]),e._v(" "),i("div",[e.info.state?i("span",{class:e.info.class,staticStyle:{position:"absolute",right:"5px","font-weight":"bold"},style:e.info.style,attrs:{title:e.info.tooltip}},[e._v(e._s(e.info.state))]):e._e(),e._v(" "),e._l(e.actions,function(r){return i("span",{directives:[{name:"t-tooltip",rawName:"v-t-tooltip:left.create",value:r.tooltip,expression:"action.tooltip",arg:"left",modifiers:{create:!0}}],key:r.id,staticClass:"action skin-tooltip-left",class:r.class,staticStyle:{"font-weight":"bold",padding:"3px"},style:r.style,on:{click:function(o){return o.stopPropagation(),e.triggerAction(r,e.component.internalComponent)}}})})],2),e._v(" "),e.collapsible?i("i",{staticClass:"pull-right",class:e.$fa("angle-left")}):e._e()]),e._v(" "),i("div",{ref:"component-placeholder"})],1)},T5=[],N5=void 0,R5=void 0,M5=void 0,A5=!1;P5=O5({render:L5,staticRenderFns:T5},N5,k5,R5,A5,M5,!1,void 0,void 0,void 0),F5=P5});function U5(e,n,i,r,o,u,c,f,p,m){let d=(typeof i=="function"?i.options:i)||{};return d.__file="FormHeader.vue",d.render||(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),d._scopeId=r,d}var D5,j5,q5,z5,G5,$5,B5,V5,$E,BE=W(()=>{D5=Vue.extend({name:"form-header",props:{headers:{type:Array,default:[]},currentid:{type:String},update:{type:Boolean},valid:{type:Boolean}},methods:{click(e){e!==this.currentid&&this.headers.length>1&&this.$emit("clickheader",e)},resizeForm(e){this.$emit("resize-form",e)}}}),j5=function(){var e=this,n=e.$createElement,i=e._self._c||n;return i("div",{staticClass:"g3wform_header box-header with-border",staticStyle:{display:"flex","flex-direction":"column"}},[i("section",{staticClass:"g3wform_header_content"},e._l(e.headers,function(r){return i("span",{key:r.id,staticClass:"title",class:[{item_selected:e.currentid===r.id&&e.headers.length>1},[e.headers.length>1?"tabs":"one"]],staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"},style:{fontSize:e.isMobile()&&"1em !important"},on:{click:function(o){return o.stopPropagation(),e.click(r.id)}}},[r.icon?i("span",{staticStyle:{"margin-right":"5px"}},[i("i",{class:r.icon})]):e._e(),e._v(" "),i("span",{directives:[{name:"t",rawName:"v-t:pre",value:r.title,expression:"header.title",arg:"pre"}],staticClass:"g3w-long-text"},[e._v(e._s(r.name))]),e._v(" "),i(r.component,{tag:"component",attrs:{valid:e.valid,update:e.update}})],1)}),0)])},q5=[],z5=void 0,G5=void 0,$5=void 0,B5=!1;V5=U5({render:j5,staticRenderFns:q5},z5,D5,G5,B5,$5,!1,void 0,void 0,void 0),$E=V5});function J5(e,n,i,r,o,u,c,f,p,m){let d=(typeof i=="function"?i.options:i)||{};return d.__file="FormFooter.vue",d.render||(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),d._scopeId=r,d}var W5,H5,Y5,X5,Z5,K5,Q5,eD,UE,VE=W(()=>{W5=Vue.extend({name:"form-footer",props:{state:{type:Object},backToRoot:{type:Function,default:()=>{}},isRootComponent:{type:Function}},data(){return this.originalbuttons=this.state.buttons.map(e=>({...e})),{id:"footer",active:!0,show:!0}},computed:{enableSave(){return this.state.valid&&this.state.update}},methods:{exec(e){e instanceof Function?e(this.state.fields):function(){return this.state.fields}()},btnEnabled(e){let{enabled:n=!0,type:i}=e;return n&&(i!=="save"||i==="save"&&this.enableSave)},isValid(){return this.state.valid}},watch:{"state.component"(e){this.show=this.isRootComponent(e)},"state.update":{immediate:!0,handler(e){this.state.buttons.find((n,i)=>{n.eventButtons&&n.eventButtons.update&&(n.eventButtons.update[e]?this.state.buttons.splice(i,1,{...n,...n.eventButtons.update[e]}):this.state.buttons.splice(i,1,this.originalbuttons[i]))})}}},activated(){this.active=!0},deactivated(){this.active=!1}}),H5=function(){var e=this,n=e.$createElement,i=e._self._c||n;return i("div",{staticClass:"form-group g3wform_footer"},[e.show?[e._t("default",function(){return[i("div",{staticStyle:{margin:"3px","font-weight":"bold"}},[e._v(` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}af.exports=t5,af.exports.__esModule=!0,af.exports.default=af.exports});var TE=Qe((Tie,lf)=>{var n5=IE(),i5=kE(),r5=Lv(),s5=LE();function o5(e,n){return n5(e)||i5(e,n)||r5(e,n)||s5()}lf.exports=o5,lf.exports.__esModule=!0,lf.exports.default=lf.exports});var qE=Qe((Nie,jE)=>{"use strict";function fo(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var uf=fo($h()),yr=fo(fE()),Zo=fo(pE()),Ko=fo(gE()),df=fo(_E()),Em=fo(yE()),Tu=fo(Ev()),Cm=fo(bE()),a5=fo(CE()),NE=fo(TE()),l5={type:"logger",log:function(n){this.output("log",n)},warn:function(n){this.output("warn",n)},error:function(n){this.output("error",n)},output:function(n,i){var r;console&&console[n]&&(r=console)[n].apply(r,a5(i))}},c5=function(){function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Zo(this,e),this.init(n,i)}return Ko(e,[{key:"init",value:function(i){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=i||l5,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(i){this.debug=i}},{key:"log",value:function(){for(var i=arguments.length,r=new Array(i),o=0;o1?r-1:0),u=1;u-1?f.replace(/###/g,"."):f}function o(){return!e||typeof e=="string"}for(var u=typeof n!="string"?[].concat(n):n.split(".");u.length>1;){if(o())return{};var c=r(u.shift());!e[c]&&i&&(e[c]=new i),e=e[c]}return o()?{}:{obj:e,k:r(u.shift())}}function RE(e,n,i){var r=Rv(e,n,Object),o=r.obj,u=r.k;o[u]=i}function d5(e,n,i,r){var o=Rv(e,n,Object),u=o.obj,c=o.k;u[c]=u[c]||[],r&&(u[c]=u[c].concat(i)),r||u[c].push(i)}function Sm(e,n){var i=Rv(e,n),r=i.obj,o=i.k;if(r)return r[o]}function ME(e,n,i){var r=Sm(e,i);return r!==void 0?r:Sm(n,i)}function FE(e,n,i){for(var r in n)r in e?typeof e[r]=="string"||e[r]instanceof String||typeof n[r]=="string"||n[r]instanceof String?i&&(e[r]=n[r]):FE(e[r],n[r],i):e[r]=n[r];return e}function Lu(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var h5={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function f5(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(n){return h5[n]}):e}var p5=function(e){Cm(n,e);function n(i){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Zo(this,n),r=df(this,Em(n).call(this)),$a.call(Tu(r)),r.data=i||{},r.options=o,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r}return Ko(n,[{key:"addNamespaces",value:function(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}},{key:"removeNamespaces",value:function(r){var o=this.options.ns.indexOf(r);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(r,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,p=[r,o];return u&&typeof u!="string"&&(p=p.concat(u)),u&&typeof u=="string"&&(p=p.concat(f?u.split(f):u)),r.indexOf(".")>-1&&(p=r.split(".")),Sm(this.data,p)}},{key:"addResource",value:function(r,o,u,c){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},p=this.options.keySeparator;p===void 0&&(p=".");var m=[r,o];u&&(m=m.concat(p?u.split(p):u)),r.indexOf(".")>-1&&(m=r.split("."),c=o,o=m[1]),this.addNamespaces(o),RE(this.data,m,c),f.silent||this.emit("added",r,o,u,c)}},{key:"addResources",value:function(r,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var f in u)(typeof u[f]=="string"||Object.prototype.toString.apply(u[f])==="[object Array]")&&this.addResource(r,o,f,u[f],{silent:!0});c.silent||this.emit("added",r,o,u)}},{key:"addResourceBundle",value:function(r,o,u,c,f){var p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},m=[r,o];r.indexOf(".")>-1&&(m=r.split("."),c=u,u=o,o=m[1]),this.addNamespaces(o);var d=Sm(this.data,m)||{};c?FE(d,u,f):d=yr({},d,u),RE(this.data,m,d),p.silent||this.emit("added",r,o,u)}},{key:"removeResourceBundle",value:function(r,o){this.hasResourceBundle(r,o)&&delete this.data[r][o],this.removeNamespaces(o),this.emit("removed",r,o)}},{key:"hasResourceBundle",value:function(r,o){return this.getResource(r,o)!==void 0}},{key:"getResourceBundle",value:function(r,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?yr({},{},this.getResource(r,o)):this.getResource(r,o)}},{key:"getDataByLanguage",value:function(r){return this.data[r]}},{key:"toJSON",value:function(){return this.data}}]),n}($a),DE={processors:{},addPostProcessor:function(n){this.processors[n.name]=n},handle:function(n,i,r,o,u){var c=this;return n.forEach(function(f){c.processors[f]&&(i=c.processors[f].process(i,r,o,u))}),i}},AE={},OE=function(e){Cm(n,e);function n(i){var r,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Zo(this,n),r=df(this,Em(n).call(this)),$a.call(Tu(r)),u5(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,Tu(r)),r.options=o,r.options.keySeparator===void 0&&(r.options.keySeparator="."),r.logger=Xo.create("translator"),r}return Ko(n,[{key:"changeLanguage",value:function(r){r&&(this.language=r)}},{key:"exists",value:function(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},u=this.resolve(r,o);return u&&u.res!==void 0}},{key:"extractFromKey",value:function(r,o){var u=o.nsSeparator||this.options.nsSeparator;u===void 0&&(u=":");var c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=o.ns||this.options.defaultNS;if(u&&r.indexOf(u)>-1){var p=r.split(u);(u!==c||u===c&&this.options.ns.indexOf(p[0])>-1)&&(f=p.shift()),r=p.join(c)}return typeof f=="string"&&(f=[f]),{key:r,namespaces:f}}},{key:"translate",value:function(r,o){var u=this;if(uf(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),r==null)return"";Array.isArray(r)||(r=[String(r)]);var c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=this.extractFromKey(r[r.length-1],o),p=f.key,m=f.namespaces,d=m[m.length-1],v=o.lng||this.language,y=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(y){var S=o.nsSeparator||this.options.nsSeparator;return d+S+p}return p}var w=this.resolve(r,o),E=w&&w.res,I=w&&w.usedKey||p,O=w&&w.exactUsedKey||p,H=Object.prototype.toString.apply(E),X=["[object Number]","[object Function]","[object RegExp]"],re=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,Z=typeof E!="string"&&typeof E!="boolean"&&typeof E!="number";if(z&&E&&Z&&X.indexOf(H)<0&&!(typeof re=="string"&&H==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(I,E,o):"key '".concat(p," (").concat(this.language,")' returned an object instead of string.");if(c){var te=H==="[object Array]",ee=te?[]:{},ve=te?O:I;for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F)){var ge="".concat(ve).concat(c).concat(F);ee[F]=this.translate(ge,yr({},o,{joinArrays:!1,ns:m})),ee[F]===ge&&(ee[F]=E[F])}E=ee}}else if(z&&typeof re=="string"&&H==="[object Array]")E=E.join(re),E&&(E=this.extendTranslation(E,r,o));else{var L=!1,se=!1;if(!this.isValidLookup(E)&&o.defaultValue!==void 0){if(L=!0,o.count!==void 0){var le=this.pluralResolver.getSuffix(v,o.count);E=o["defaultValue".concat(le)]}E||(E=o.defaultValue)}this.isValidLookup(E)||(se=!0,E=p);var de=o.defaultValue&&o.defaultValue!==E&&this.options.updateMissing;if(se||L||de){this.logger.log(de?"updateKey":"missingKey",v,d,p,de?o.defaultValue:E);var Ke=[],Te=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Te&&Te[0])for(var We=0;We1&&arguments[1]!==void 0?arguments[1]:{},c,f,p,m,d;return typeof r=="string"&&(r=[r]),r.forEach(function(v){if(!o.isValidLookup(c)){var y=o.extractFromKey(v,u),S=y.key;f=S;var w=y.namespaces;o.options.fallbackNS&&(w=w.concat(o.options.fallbackNS));var E=u.count!==void 0&&typeof u.count!="string",I=u.context!==void 0&&typeof u.context=="string"&&u.context!=="",O=u.lngs?u.lngs:o.languageUtils.toResolveHierarchy(u.lng||o.language,u.fallbackLng);w.forEach(function(H){o.isValidLookup(c)||(d=H,!AE["".concat(O[0],"-").concat(H)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(d)&&(AE["".concat(O[0],"-").concat(H)]=!0,o.logger.warn('key "'.concat(f,'" for namespace "').concat(d,'" for languages "').concat(O.join(", "),`" won't get resolved as namespace was not yet loaded`),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),O.forEach(function(X){if(!o.isValidLookup(c)){m=X;var re=S,z=[re];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(z,S,X,H,u);else{var Z;E&&(Z=o.pluralResolver.getSuffix(X,u.count)),E&&I&&z.push(re+Z),I&&z.push(re+="".concat(o.options.contextSeparator).concat(u.context)),E&&z.push(re+=Z)}for(var te;te=z.pop();)o.isValidLookup(c)||(p=te,c=o.getResource(X,H,te,u))}}))})}}),{res:c,usedKey:f,exactUsedKey:p,usedLng:m,usedNS:d}}},{key:"isValidLookup",value:function(r){return r!==void 0&&!(!this.options.returnNull&&r===null)&&!(!this.options.returnEmptyString&&r==="")}},{key:"getResource",value:function(r,o,u){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(r,o,u,c):this.resourceStore.getResource(r,o,u,c)}}]),n}($a);function Nv(e){return e.charAt(0).toUpperCase()+e.slice(1)}var m5=function(){function e(n){Zo(this,e),this.options=n,this.whitelist=this.options.whitelist||!1,this.logger=Xo.create("languageUtils")}return Ko(e,[{key:"getScriptPartFromCode",value:function(i){if(!i||i.indexOf("-")<0)return null;var r=i.split("-");return r.length===2?null:(r.pop(),this.formatLanguageCode(r.join("-")))}},{key:"getLanguagePartFromCode",value:function(i){if(!i||i.indexOf("-")<0)return i;var r=i.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(i){if(typeof i=="string"&&i.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=i.split("-");return this.options.lowerCaseLng?o=o.map(function(u){return u.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nv(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nv(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=Nv(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?i.toLowerCase():i}},{key:"isWhitelisted",value:function(i){return(this.options.load==="languageOnly"||this.options.nonExplicitWhitelist)&&(i=this.getLanguagePartFromCode(i)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(i)>-1}},{key:"getFallbackCodes",value:function(i,r){if(!i)return[];if(typeof i=="string"&&(i=[i]),Object.prototype.toString.apply(i)==="[object Array]")return i;if(!r)return i.default||[];var o=i[r];return o||(o=i[this.getScriptPartFromCode(r)]),o||(o=i[this.formatLanguageCode(r)]),o||(o=i.default),o||[]}},{key:"toResolveHierarchy",value:function(i,r){var o=this,u=this.getFallbackCodes(r||this.options.fallbackLng||[],i),c=[],f=function(m){m&&(o.isWhitelisted(m)?c.push(m):o.logger.warn("rejecting non-whitelisted language code: ".concat(m)))};return typeof i=="string"&&i.indexOf("-")>-1?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(i))):typeof i=="string"&&f(this.formatLanguageCode(i)),u.forEach(function(p){c.indexOf(p)<0&&f(o.formatLanguageCode(p))}),c}}]),e}(),g5=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],_5={1:function(n){return+(n>1)},2:function(n){return+(n!=1)},3:function(n){return 0},4:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},5:function(n){return n===0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5},6:function(n){return n==1?0:n>=2&&n<=4?1:2},7:function(n){return n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},8:function(n){return n==1?0:n==2?1:n!=8&&n!=11?2:3},9:function(n){return+(n>=2)},10:function(n){return n==1?0:n==2?1:n<7?2:n<11?3:4},11:function(n){return n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3},12:function(n){return+(n%10!=1||n%100==11)},13:function(n){return+(n!==0)},14:function(n){return n==1?0:n==2?1:n==3?2:3},15:function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2},16:function(n){return n%10==1&&n%100!=11?0:n!==0?1:2},17:function(n){return n==1||n%10==1?0:1},18:function(n){return n==0?0:n==1?1:2},19:function(n){return n==1?0:n===0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3},20:function(n){return n==1?0:n===0||n%100>0&&n%100<20?1:2},21:function(n){return n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0},22:function(n){return n===1?0:n===2?1:(n<0||n>10)&&n%10==0?2:3}};function y5(){var e={};return g5.forEach(function(n){n.lngs.forEach(function(i){e[i]={numbers:n.nr,plurals:_5[n.fc]}})}),e}var v5=function(){function e(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Zo(this,e),this.languageUtils=n,this.options=i,this.logger=Xo.create("pluralResolver"),this.rules=y5()}return Ko(e,[{key:"addRule",value:function(i,r){this.rules[i]=r}},{key:"getRule",value:function(i){return this.rules[i]||this.rules[this.languageUtils.getLanguagePartFromCode(i)]}},{key:"needsPlural",value:function(i){var r=this.getRule(i);return r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(i,r){var o=this,u=[],c=this.getRule(i);return c&&c.numbers.forEach(function(f){var p=o.getSuffix(i,f);u.push("".concat(r).concat(p))}),u}},{key:"getSuffix",value:function(i,r){var o=this,u=this.getRule(i);if(u){var c=u.noAbs?u.plurals(r):u.plurals(Math.abs(r)),f=u.numbers[c];this.options.simplifyPluralSuffix&&u.numbers.length===2&&u.numbers[0]===1&&(f===2?f="plural":f===1&&(f=""));var p=function(){return o.options.prepend&&f.toString()?o.options.prepend+f.toString():f.toString()};return this.options.compatibilityJSON==="v1"?f===1?"":typeof f=="number"?"_plural_".concat(f.toString()):p():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&u.numbers.length===2&&u.numbers[0]===1?p():this.options.prepend&&c.toString()?this.options.prepend+c.toString():c.toString()}return this.logger.warn("no plural rule found for: ".concat(i)),""}}]),e}(),b5=function(){function e(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zo(this,e),this.logger=Xo.create("interpolator"),this.options=n,this.format=n.interpolation&&n.interpolation.format||function(i){return i},this.init(n)}return Ko(e,[{key:"init",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i.interpolation||(i.interpolation={escapeValue:!0});var r=i.interpolation;this.escape=r.escape!==void 0?r.escape:f5,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Lu(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Lu(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Lu(r.nestingPrefix):r.nestingPrefixEscaped||Lu("$t("),this.nestingSuffix=r.nestingSuffix?Lu(r.nestingSuffix):r.nestingSuffixEscaped||Lu(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var i="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(i,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(i,r,o,u){var c=this,f,p,m,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function v(I){return I.replace(/\$/g,"$$$$")}var y=function(O){if(O.indexOf(c.formatSeparator)<0)return ME(r,d,O);var H=O.split(c.formatSeparator),X=H.shift().trim(),re=H.join(c.formatSeparator).trim();return c.format(ME(r,d,X),re,o)};this.resetRegExp();var S=u&&u.missingInterpolationHandler||this.options.missingInterpolationHandler;for(m=0;f=this.regexpUnescape.exec(i);){if(p=y(f[1].trim()),p===void 0)if(typeof S=="function"){var w=S(i,f,u);p=typeof w=="string"?w:""}else this.logger.warn("missed to pass in variable ".concat(f[1]," for interpolating ").concat(i)),p="";else typeof p!="string"&&!this.useRawValueToEscape&&(p=Tv(p));if(i=i.replace(f[0],v(p)),this.regexpUnescape.lastIndex=0,m++,m>=this.maxReplaces)break}for(m=0;f=this.regexp.exec(i);){if(p=y(f[1].trim()),p===void 0)if(typeof S=="function"){var E=S(i,f,u);p=typeof E=="string"?E:""}else this.logger.warn("missed to pass in variable ".concat(f[1]," for interpolating ").concat(i)),p="";else typeof p!="string"&&!this.useRawValueToEscape&&(p=Tv(p));if(p=this.escapeValue?v(this.escape(p)):v(p),i=i.replace(f[0],p),this.regexp.lastIndex=0,m++,m>=this.maxReplaces)break}return i}},{key:"nest",value:function(i,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},u,c,f=yr({},o);f.applyPostProcessor=!1,delete f.defaultValue;function p(m,d){if(m.indexOf(",")<0)return m;var v=m.split(",");m=v.shift();var y=v.join(",");y=this.interpolate(y,f),y=y.replace(/'/g,'"');try{f=JSON.parse(y),d&&(f=yr({},d,f))}catch(S){this.logger.error("failed parsing options string in nesting for key ".concat(m),S)}return delete f.defaultValue,m}for(;u=this.nestingRegexp.exec(i);){if(c=r(p.call(this,u[1].trim(),f),f),c&&u[0]===i&&typeof c!="string")return c;typeof c!="string"&&(c=Tv(c)),c||(this.logger.warn("missed to resolve ".concat(u[1]," for nesting ").concat(i)),c=""),i=i.replace(u[0],c),this.regexp.lastIndex=0}return i}}]),e}();function x5(e,n){for(var i=e.indexOf(n);i!==-1;)e.splice(i,1),i=e.indexOf(n)}var w5=function(e){Cm(n,e);function n(i,r,o){var u,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Zo(this,n),u=df(this,Em(n).call(this)),$a.call(Tu(u)),u.backend=i,u.store=r,u.services=o,u.languageUtils=o.languageUtils,u.options=c,u.logger=Xo.create("backendConnector"),u.state={},u.queue=[],u.backend&&u.backend.init&&u.backend.init(o,c.backend,c),u}return Ko(n,[{key:"queueLoad",value:function(r,o,u,c){var f=this,p=[],m=[],d=[],v=[];return r.forEach(function(y){var S=!0;o.forEach(function(w){var E="".concat(y,"|").concat(w);!u.reload&&f.store.hasResourceBundle(y,w)?f.state[E]=2:f.state[E]<0||(f.state[E]===1?m.indexOf(E)<0&&m.push(E):(f.state[E]=1,S=!1,m.indexOf(E)<0&&m.push(E),p.indexOf(E)<0&&p.push(E),v.indexOf(w)<0&&v.push(w)))}),S||d.push(y)}),(p.length||m.length)&&this.queue.push({pending:m,loaded:{},errors:[],callback:c}),{toLoad:p,pending:m,toLoadLanguages:d,toLoadNamespaces:v}}},{key:"loaded",value:function(r,o,u){var c=r.split("|"),f=NE(c,2),p=f[0],m=f[1];o&&this.emit("failedLoading",p,m,o),u&&this.store.addResourceBundle(p,m,u),this.state[r]=o?-1:2;var d={};this.queue.forEach(function(v){d5(v.loaded,[p],m),x5(v.pending,r),o&&v.errors.push(o),v.pending.length===0&&!v.done&&(Object.keys(v.loaded).forEach(function(y){d[y]||(d[y]=[]),v.loaded[y].length&&v.loaded[y].forEach(function(S){d[y].indexOf(S)<0&&d[y].push(S)})}),v.done=!0,v.errors.length?v.callback(v.errors):v.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(v){return!v.done})}},{key:"read",value:function(r,o,u){var c=this,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:250,m=arguments.length>5?arguments[5]:void 0;return r.length?this.backend[u](r,o,function(d,v){if(d&&v&&f<5){setTimeout(function(){c.read.call(c,r,o,u,f+1,p*2,m)},p);return}m(d,v)}):m(null,{})}},{key:"prepareLoading",value:function(r,o){var u=this,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),f&&f();typeof r=="string"&&(r=this.languageUtils.toResolveHierarchy(r)),typeof o=="string"&&(o=[o]);var p=this.queueLoad(r,o,c,f);if(!p.toLoad.length)return p.pending.length||f(),null;p.toLoad.forEach(function(m){u.loadOne(m)})}},{key:"load",value:function(r,o,u){this.prepareLoading(r,o,{},u)}},{key:"reload",value:function(r,o,u){this.prepareLoading(r,o,{reload:!0},u)}},{key:"loadOne",value:function(r){var o=this,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",c=r.split("|"),f=NE(c,2),p=f[0],m=f[1];this.read(p,m,"read",null,null,function(d,v){d&&o.logger.warn("".concat(u,"loading namespace ").concat(m," for language ").concat(p," failed"),d),!d&&v&&o.logger.log("".concat(u,"loaded namespace ").concat(m," for language ").concat(p),v),o.loaded(r,d,v)})}},{key:"saveMissing",value:function(r,o,u,c,f){var p=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(u,'" for namespace "').concat(o,'" as the namespace was not yet loaded'),"This means something IS WRONG in your application setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}this.backend&&this.backend.create&&this.backend.create(r,o,u,c,null,yr({},p,{isUpdate:f})),!(!r||!r[0])&&this.store.addResource(r[0],o,u,c)}}]),n}($a);function S5(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(n){var i={};if(uf(n[1])==="object"&&(i=n[1]),typeof n[1]=="string"&&(i.defaultValue=n[1]),typeof n[2]=="string"&&(i.tDescription=n[2]),uf(n[2])==="object"||uf(n[3])==="object"){var r=n[3]||n[2];Object.keys(r).forEach(function(o){i[o]=r[o]})}return i},interpolation:{escapeValue:!0,format:function(n,i,r){return n},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function PE(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function wm(){}var E5=function(e){Cm(n,e);function n(){var i,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(Zo(this,n),i=df(this,Em(n).call(this)),$a.call(Tu(i)),i.options=PE(r),i.services={},i.logger=Xo,i.modules={external:[]},o&&!i.isInitialized&&!r.isClone){if(!i.options.initImmediate)return i.init(r,o),df(i,Tu(i));setTimeout(function(){i.init(r,o)},0)}return i}return Ko(n,[{key:"init",value:function(){var r=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(u=o,o={}),this.options=yr({},S5(),this.options,PE(o)),this.format=this.options.interpolation.format,u||(u=wm);function c(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?Xo.init(c(this.modules.logger),this.options):Xo.init(null,this.options);var f=new m5(this.options);this.store=new p5(this.options.resources,this.options);var p=this.services;p.logger=Xo,p.resourceStore=this.store,p.languageUtils=f,p.pluralResolver=new v5(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),p.interpolator=new b5(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new w5(c(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(y){for(var S=arguments.length,w=new Array(S>1?S-1:0),E=1;E1?S-1:0),E=1;E1&&arguments[1]!==void 0?arguments[1]:wm,c=u,f=typeof r=="string"?r:this.language;if(typeof r=="function"&&(c=r),!this.options.resources||this.options.partialBundledLanguages){if(f&&f.toLowerCase()==="cimode")return c();var p=[],m=function(y){if(y){var S=o.services.languageUtils.toResolveHierarchy(y);S.forEach(function(w){p.indexOf(w)<0&&p.push(w)})}};if(f)m(f);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(v){return m(v)})}this.options.preload&&this.options.preload.forEach(function(v){return m(v)}),this.services.backendConnector.load(p,this.options.ns,c)}else c(null)}},{key:"reloadResources",value:function(r,o,u){var c=cf();return r||(r=this.languages),o||(o=this.options.ns),u||(u=wm),this.services.backendConnector.reload(r,o,function(f){c.resolve(),u(f)}),c}},{key:"use",value:function(r){return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&DE.addPostProcessor(r),r.type==="3rdParty"&&this.modules.external.push(r),this}},{key:"changeLanguage",value:function(r,o){var u=this;this.isLanguageChangingTo=r;var c=cf();this.emit("languageChanging",r);var f=function(d,v){v?(u.language=v,u.languages=u.services.languageUtils.toResolveHierarchy(v),u.translator.changeLanguage(v),u.isLanguageChangingTo=void 0,u.emit("languageChanged",v),u.logger.log("languageChanged",v)):u.isLanguageChangingTo=void 0,c.resolve(function(){return u.t.apply(u,arguments)}),o&&o(d,function(){return u.t.apply(u,arguments)})},p=function(d){d&&(u.language||(u.language=d,u.languages=u.services.languageUtils.toResolveHierarchy(d)),u.translator.language||u.translator.changeLanguage(d),u.services.languageDetector&&u.services.languageDetector.cacheUserLanguage(d)),u.loadResources(d,function(v){f(v,d)})};return!r&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(p):p(r),c}},{key:"getFixedT",value:function(r,o){var u=this,c=function f(p,m){var d;if(uf(m)!=="object"){for(var v=arguments.length,y=new Array(v>2?v-2:0),S=2;S0?this.languages[0]:this.language),!r)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return o.indexOf(this.services.languageUtils.getLanguagePartFromCode(r))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;return new n(r,o)}},{key:"cloneInstance",value:function(){var r=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wm,c=yr({},this.options,o,{isClone:!0}),f=new n(c),p=["store","services","language"];return p.forEach(function(m){f[m]=r[m]}),f.translator=new OE(f.services,f.options),f.translator.on("*",function(m){for(var d=arguments.length,v=new Array(d>1?d-1:0),y=1;y{vt();Ba=qE(),I5=()=>window.initConfig.user.i18n||"en",He=e=>Ba.t(e),tc=e=>Ba.t(`plugins.${e}`),Mv=e=>{for(let n in e)for(let i in e[n])Ba.addResource(n,"translation",i,e[n][i])},Av=({name:e,config:n})=>{for(let i in n)V.i18n.plugins[i]&&(V.i18n.plugins[i].plugins[e]=n[i]);for(let i in V.i18n.plugins)for(let r in V.i18n.plugins[i])Ba.addResource(i,"translation",r,V.i18n.plugins[i][r])},zE={getAppLanguage:I5,t:He,tPlugin:tc,addI18n:Mv,addI18nPlugin:Av}});var GE,Ht,zi=W(()=>{Nt();vt();bt();xm();hf();xi();_r();cn();GE=async(e=[])=>{let n=await Promise.allSettled(e);return n.some(i=>i.status==="fulfilled")?n.filter(i=>i.status==="fulfilled").map(i=>i.value):Promise.reject(n.filter(i=>i.status==="rejected").map(i=>i.reason))},Ht={async getData(e,n={}){let{inputs:i={},outputs:r={}}=n,o=this[e](i);return r&&U.outputDataPlace(o,r),await await o},async"query:coordinates"({coordinates:e,layerIds:n=[],multilayers:i=!1,query_point_tolerance:r=ja,addExternal:o=!0,feature_count:u}={}){let c=U.getService("catalog").state.external.vector.some(p=>p.selected),f=zr({QUERYABLE:!0,SELECTED_OR_ALL:n.length===0,VISIBLE:!0,IDS:n.length?n.map(p=>p):void 0});try{return{result:!0,type:"ows",query:{coordinates:e,type:"coordinates",external:{add:(!c||n.length>0)&&f.length===1&&f[0].isSelected()?!1:o,filter:{SELECTED:c}}},data:((!c||n.length>0)&&await sn(this.getQueryLayersPromisesByCoordinates(f,{multilayers:i,feature_count:u,query_point_tolerance:r,coordinates:e}))||[]).flatMap(({data:p=[]})=>p)}}catch(p){throw console.warn(p),p}},async"query:bbox"({bbox:e,feature_count:n=V.project.state.feature_count||5,filterConfig:i={},multilayers:r=!1,condition:o={filtrable:{ows:"WFS"}},excludeSelected:u=null,addExternal:c=!0,layersFilterObject:f={SELECTED_OR_ALL:!0,FILTERABLE:!0,VISIBLE:!0}}={}){let p=U.getService("catalog").state.external.vector.some(d=>d.selected),m=p||(typeof u=="boolean"?u:!1);try{return{result:!0,type:"ows",query:{bbox:e,type:"bbox",filterConfig:i,external:{add:c,filter:{SELECTED:m}}},data:(!p&&await this.getQueryLayersPromisesByGeometry(zr(f,o),{geometry:ol.geom.Polygon.fromExtent(e),feature_count:n,filterConfig:i,multilayers:r,projection:U.getService("map").getMap().getView().getProjection()})||[]).flatMap(({data:d=[]})=>d)}}catch(d){throw console.warn(d),d}},async"query:polygon"({feature:e,feature_count:n=V.project.state.feature_count||5,filterConfig:i={},multilayers:r=!1,condition:o={filtrable:{ows:"WFS"}},layerName:u="",excludeSelected:c=null,external:f={add:!0,filter:{SELECTED:!1}},type:p="polygon"}={}){let m=e.getGeometry();try{return{result:!0,type:"ows",error:!m,query:{fid:U.getService("catalog").state.external.vector.some(d=>d.selected)?e.getId():e.get(Cn),geometry:m,layerName:u,type:p,filterConfig:i,external:f},usermessage:!m&&{type:"warning",message:`${u} - ${He("sdk.mapcontrols.querybypolygon.no_geometry")}`,messagetext:!0,autoclose:!1},data:(await this.getQueryLayersPromisesByGeometry(zr({...typeof c=="boolean"?{SELECTED:!c}:{SELECTED_OR_ALL:!0},FILTERABLE:!0,VISIBLE:!0},o),{geometry:m,multilayers:r,feature_count:n,filterConfig:i,projection:V.project.getProjection()})||[]).flatMap(({data:d=[]})=>d)}}catch(d){throw console.warn(d),d}},async"search:features"(e={layer,filter,raw:!1,queryUrl,feature_count,formatter:1,ordering,autofilter:0,page,page_sizes}){let{layer:n,...i}=e;i.filter=[].concat(i.filter),i.page_size=(i.page_sizes||[])[0];let r=[],o=[];return{data:(await Promise.allSettled([].concat(n).map((u,c)=>u.searchFeatures({...i,filter:i.filter[c]})))).filter(u=>u.status==="fulfilled").map(({value:u}={})=>{if(i.autofilter===1&&(u.data||[]).forEach(({layer:c,filtertoken:f})=>{f&&(c.state.selection.active=c.state.filter.active=!0,c.setFilterToken(f))}),i.page_sizes){let c=Math.max(...Array.isArray(i.page_sizes)?i.page_sizes:[i.page_sizes]);o.push(c<=u.count?i.page_sizes:[...i.page_sizes.filter(f=>f0)return u.data[0]}),query:{type:"search",search:i.filter,autofilter:!!i.autofilter,pagination:i.page_size&&{pages:i.page&&r.map(u=>Math.round(u/i.page_size)),current:i.page&&r.map(()=>i.page),page_sizes:o,counts:r,getData:{params:i.filter.map(u=>({...i,filter:u})),method:"searchFeatures",layers:n}}},type:"api"}},async"search:fids"({layer:e,formatter:n=0,fids:i=[]}={}){let r=[];try{r=(e&&await e.getFeatureByFids({fids:i,formatter:n})||[]).map(o=>{let u=o.properties!==void 0?o.properties:{};u[Cn]=o.id;let c=new ol.Feature(o.geometry&&new ol.geom[o.geometry.type](o.geometry.coordinates));return c.setProperties(u),c.setId(o.id),c})}catch(o){console.warn(o)}return{data:[{layer:e,features:r}],query:{type:"search"}}},async"search:layersfids"({layers:e=[],fids:n=[],formatter:i=0}={}){let r=[];try{r=(await Promise.all(e.map((o,u)=>this["search:fids"]({layer:o,fids:n[u],formatter:i})))).map(o=>o.data)}catch(o){console.warn(o)}return{data:r,query:{type:"search"}}},async"expression:expression"(e={}){try{let n=await ht.post({url:`${V.project.getUrl("vector_data")}${e.layer_id}/`,contentType:"application/json",data:JSON.stringify(e)});return n.result?n.vector.data.features||[]:Promise.reject(JSON.stringify(n.error))}catch(n){return console.warn(n),Promise.reject(n)}},async"expression:expression_eval"(e={}){try{let{result:n,value:i,error:r}=await ht.post({url:`/api/expression_eval/${V.project.getId()}/`,contentType:"application/json",data:JSON.stringify(e)});return n?i:Promise.reject(JSON.stringify(r))}catch(n){return console.warn(n),Promise.reject(n)}},async"proxy:wms"({url:e,method:n="GET",params:i={},headers:r={}}={}){n==="GET"&&(e=new URL(e),Object.keys(i).forEach(o=>e.searchParams.set(o,i[o])),e=e.toString());try{return{response:await ht.post({data:JSON.stringify({url:e,params:i,headers:r,method:n}),contentType:"application/json",url:`${window.initConfig.proxyurl}`}),data:JSON.stringify({url:e,params:i,headers:r,method:n})}}catch(o){console.warn(o)}},"proxy:data"(e={}){},getQueryLayersPromisesByCoordinates(e,{coordinates:n,feature_count:i=10,query_point_tolerance:r=ja,multilayers:o=!1,reproject:u=!0}={}){if(e.length===0)return Wt(Promise.resolve(e));let c=U.getService("map").getMap(),f=c.getSize(),p=c.getView().getProjection(),m=c.getView().getResolution();return Wt(async()=>await GE(Object.values(o?ec(e,d=>`${d.getInfoFormat()}:${d.getInfoUrl()}:${d.getMultiLayerId()}`):e).map(d=>sn([].concat(d)[0].query(o?{feature_count:i,coordinates:n,query_point_tolerance:r,mapProjection:p,size:f,resolution:m,reproject:u,layers:d}:{feature_count:i,coordinates:n,query_point_tolerance:r,mapProjection:p,size:f,resolution:m})))))},async getQueryLayersPromisesByGeometry(e,{geometry:n,projection:i,filterConfig:r={},multilayers:o=!1,feature_count:u=10}={}){if(e.length===0)return[];let c=i.getCode();return await GE(Object.values(o?ec(e,f=>`${f.getMultiLayerId()}_${f.getProjection().getCode()}`):e).map(f=>{let p=[].concat(f)[0],m=p.getProjection().getCode(),d={config:r,type:"geometry",value:c===m?n:n.clone().transform(c,m)};return sn(p.query(o?{filter:d,feature_count:u,layers:f}:{filter:d,feature_count:u,filterConfig:r}))}))}}});function zs(e,n){return new Promise((i,r)=>{let o=()=>{if(!e())return"invalid predicate";clearInterval(u),i("predicate")},u=setInterval(o,100);o(),n&&setTimeout(()=>{clearInterval(u),r("timeout")},n)})}var ff=W(()=>{});async function Im(e){return e=Yl(e),await Zn.registerProjection(e),e}var Ov,km,Pv,Fv,pf,Dv=W(()=>{Yn();bt();zi();vt();xu();ho();um();bn();ff();Ov=class{constructor(){this.pendingactions={},this.getMessage=this.getMessage.bind(this),this.eventResponseServiceHandler=this.eventResponseServiceHandler.bind(this)}async init({project:n}={}){await U.isReady(),this.services={app:new Pv,editing:new Fv};let i=n.state.layers.map(o=>({id:o.id,name:o.name})),r=Object.keys(this.services);for(let o=0;o({[p.getId()]:{features:f.writeFeatures(m)}}))}catch(p){console.warn(p),u=!1,r=p}this.postMessage({id:null,action:o,response:{result:u,data:r}})}postMessage(n={}){window.parent&&window.parent.postMessage(n,"*")}async stopPendingActions(){let n=[];return Object.keys(this.pendingactions).forEach(i=>{n.push(this.services[this.pendingactions[i].context].stop()),delete this.pendingactions[i]}),Promise.allSettled(n)}async getMessage(n){if(n&&n.data){let{id:i=ut(),single:r=!0,action:o,data:u}=n.data,[c,f]=(o||"").split(":"),p=!1,m;try{let d=this.services[c].getReady();d&&r&&await this.stopPendingActions(),d&&(this.pendingactions[i]={context:c},m=await this.services[c][f](u),p=!0)}catch(d){console.warn(d),p=!1,m=d}this.postMessage({id:i,action:o,response:{result:p,data:m}}),delete this.pendingactions[i]}}async clear(){let n=Object.keys(this.services);for(let i=0;igr.getPlugin("editing")),this.dependencyApi=gr.getPlugin("editing"),this.dependencyApi.getEditableLayersId=this.dependencyApi.getEditableLayersId||(()=>Object.keys(this.dependencyApi.getEditableLayers())),this.dependencyApi.hidePanel=this.dependencyApi.hidePanel||this.dependencyApi.hideEditingPanel,this.dependencyApi.resetDefault=this.dependencyApi.resetDefault||this.dependencyApi.resetAPIDefault,this.setReady(!0))}getDependecyApi(){return this.dependencyApi}getQgsLayerId({qgs_layer_id:n,noValue:i=this.layers.map(r=>r.id)}){return n?[].concat(n):i}async searchFeature({layer:n,feature:i}){let{data:r=[]}=await Ht.getData("search:features",{inputs:{layer:n,filter:[].concat(i.value).map(o=>`${i.field}|eq|${encodeURIComponent(o)}`).join("|OR,")},outputs:!1});return r}async findFeaturesWithGeometry({feature:n,qgs_layer_id:i=[],zoom:r=!1,highlight:o=!1}={}){let u={found:!1,features:[],qgs_layer_id:null},c=i.length,f=0;for(;!u.found&&f0&&!!d.find(v=>v.getGeometry()),!d||!u.found)throw"invalid response";u.features=d,u.qgs_layer_id=i[f],r&&await this.mapService.zoomToFeatures(d,{highlight:o})}catch(m){f++,console.warn(m)}}return u.found||this.mapService.zoomToExtent(this.mapService.project.state.initextent),u}setLayers(n=[]){this.layers=n}getLayers(){return this.layers}setReady(n=!1){this.ready=n}getReady(){return this.ready}async stop(){}clear(){}},Pv=class extends km{constructor(){super(),this.mapControls={screenshot:{control:null},changeMap:{control:null}}}init(){return new Promise(n=>{this.mapService.once("ready",()=>{this._map=this.mapService.getMap(),this._mapCrs=this.mapService.getCrs(),this.mapControls.screenshot.control=this.mapService.getMapControlByType({type:"screenshot"}),this.setReady(!0),n()})})}async results({capture:n=!0}){return U.currentoutputplace=n?"iframe":"gui",[]}async screenshot({capture:n=!0}){if(!n){this.mapControls.screenshot.control.resetOriginalOnClickEvent();return}this.mapControls.screenshot.control.overwriteOnClickEvent(i=>{let r;try{r={result:!0,data:i}}catch(o){console.warn(o),r={result:!1,data:o}}finally{this.emit("response",{response:r,action:"app:screenshot"})}})}async getcenter(n={}){let i=this.mapService.getCenter();return n.epsg!==void 0?ol.proj.transform(i,this.mapService.getEpsg(),await Im(n.epsg)):i}async zoomtocoordinates(n={}){let{coordinates:i=[],epsg:r}=n;return i&&Array.isArray(i)&&i.length===2?(r!==void 0&&(r=await Im(r),i=ol.proj.transform(i,r,this.mapService.getEpsg())),this.mapService.zoomTo(i),i):Promise.reject(i)}async getextent(n={}){let i=this.mapService.getMapExtent();return n.epsg!==void 0?ol.proj.transformExtent(i,this.mapService.getEpsg(),await Im(n.epsg)):i}async zoomtoextent(n={}){let{extent:i=[],epsg:r}=n;return i&&Array.isArray(i)&&i.length===4?(r!==void 0?(r=Im(r),i=ol.proj.transformExtent(i,r,this.mapService.getEpsg())):this.mapService.goToBBox(i),i):Promise.reject(i)}async zoomtofeature(n={}){let{qgs_layer_id:i,feature:r,highlight:o=!1}=n;return i=this.getQgsLayerId({qgs_layer_id:i}),(await this.findFeaturesWithGeometry({qgs_layer_id:i,feature:r,zoom:!0,highlight:o})).qgs_layer_id}},Fv=class extends km{constructor(){super(),this.pluginName="editing",this.subscribevents=[],this.isRunning=!1,this.responseObject={cb:null,qgs_layer_id:null,error:null},this.config={tools:{add:{disabled:[{id:"deletefeature"},{id:"copyfeatures"},{id:"editmultiattributes"},{id:"deletePart"},{id:"splitfeature"},{id:"mergefeatures"}]},update:{disabled:[{id:"addfeature"},{id:"copyfeatures"},{id:"deletefeature"},{id:"editmultiattributes"},{id:"deletePart"},{id:"splitfeature"},{id:"mergefeatures"}]},delete:{enabled:[{id:"deletefeature",options:{active:!0}}]}}},this.subscribersHandlers={canUndo:({activeTool:n,disableToolboxes:i=[]})=>r=>{r===!1&&(this.responseObject.qgs_layer_id=null,this.responseObject.error=null),n.setEnabled(!r),i.forEach(o=>o.setEditing(!r))},canRedo:()=>{},cancelform:n=>()=>{n()},addfeature:({properties:n,toolboxes:i}={})=>r=>{Object.keys(n).forEach(c=>r.set(c,n[c]));let o,u=[];i.forEach(c=>{let f=c.getToolById("addfeature");f.isActive()?(f.setEnabled(!1),o=f):(c.setEditing(!1),u.push(c))}),this.subscribevents.find(c=>c.event!=="canUndo")&&this.addSubscribeEvents("cancelform",this.addSubscribeEvents("canUndo",{activeTool:o,disableToolboxes:u}))},closeeditingpanel:({qgs_layer_id:n})=>()=>{this.responseObject.cb({qgs_layer_id:this.responseObject.qgs_layer_id,error:this.responseObject.error}),this.stopAction({qgs_layer_id:n})}}}async startAction({toolboxes:n,resolve:i,reject:r}){this.responseObject.cb=r,this.dependencyApi.setSaveConfig({cb:{done:o=>{this.responseObject.cb=i,this.responseObject.qgs_layer_id=o.getId(),this.responseObject.error=null,this.dependencyApi.hidePanel()},error:(o,u)=>{this.responseObject.cb=r,this.responseObject.qgs_layer_id=o.getId(),this.responseObject.error=u}}}),this.dependencyApi.showPanel({toolboxes:n}),this.isRunning=!0}async stopAction(n={}){n.qgs_layer_id&&await this.stopEditing(n.qgs_layer_id)}addSubscribeEvents(n,i={}){let r=this.subscribersHandlers[n](i);return this.dependencyApi.subscribe(n,r),this.subscribevents.push({event:n,handler:r}),r}resetSubscribeEvents(){this.subscribevents.forEach(n=>{this.dependencyApi.unsubscribe(n.event,n.handler)})}add(n={}){return new Promise(async(i,r)=>{if(this.isRunning)return r();let{qgs_layer_id:o,...u}=n,{properties:c}=u,f=this.getQgsLayerId({qgs_layer_id:o,noValue:this.dependencyApi.getEditableLayersId()});await this.startAction({toolboxes:f,resolve:i,reject:r});let p=(await this.startEditing(f,{tools:this.config.tools.add,startstopediting:!1,action:"add",selected:f.length===1})).filter(m=>m.status==="fulfilled").map(m=>m.value);U.isSidebarVisible()||U.showSidebar(),p.length===1&&p[0]&&p[0].setActiveTool(p[0].getToolById("addfeature")),this.addSubscribeEvents("addfeature",{properties:c,toolboxes:p}),this.addSubscribeEvents("closeeditingpanel",{qgs_layer_id:f})})}async update(n={}){return new Promise(async(i,r)=>{if(this.isRunning)return r();let{qgs_layer_id:o,...u}=n,{feature:c}=u,f=this.getQgsLayerId({qgs_layer_id:o,noValue:this.dependencyApi.getEditableLayersId()}),p=await this.findFeaturesWithGeometry({qgs_layer_id:f,feature:c,zoom:!0,highlight:!0,selected:f.length===1});if(!p.found)return r();await this.startAction({toolboxes:[p.qgs_layer_id],resolve:i,reject:r}),await this.startEditing([p.qgs_layer_id],{feature:c,tools:this.config.tools.update,startstopediting:!1,action:"update"}),U.isSidebarVisible()||U.showSidebar(),this.addSubscribeEvents("closeeditingpanel",{qgs_layer_id:[p.qgs_layer_id]})})}delete(){}async startEditing(n=[],i={}){let{action:r="add",feature:o}=i,u={};switch(i.filter=u,r){case"add":u.nofeatures=!0;break;case"update":u.field=`${o.field}|eq|${o.value}`;break}let c=[];return n.forEach(f=>{c.push(this.dependencyApi.startEditing(f,i))}),await Promise.allSettled(c)}async stopEditing(n){let i=[];n.forEach(r=>{i.push(this.dependencyApi.stopEditing(r))}),await Promise.allSettled(i),this.clear()}stop(){return new Promise(n=>{this.dependencyApi.hidePanel(),U.hideSidebar(),this.once("clear",n)})}clear(){this.dependencyApi.resetDefault(),this.isRunning=!1,this.responseObject={cb:null,qgs_layer_id:null,error:null},this.resetSubscribeEvents(),this.emit("clear")}},pf=new Ov});function wi(e){return Object.prototype.toString.call(e).slice(8,-1)}var Qo=W(()=>{});function nc(){return window.initConfig.projects,window.initConfig.projects.filter(e=>[null,void 0].includes(e.listable)?e.id===V.project.getId()||window.initConfig.overviewproject&&e.gid===window.initConfig.overviewproject?!1:e:e.listable).sort((e,n)=>(e.title||"").localeCompare(n.title))}var Lm=W(()=>{vt()});function mf(e){let n=window.initConfig.projects.find(i=>e===i.gid);try{return`${new URL(window.initConfig.urls.baseurl)}${n.url}`}catch(i){return console.warn(i),`${location.origin}${window.initConfig.urls.baseurl}${n.url}`}}var jv=W(()=>{});var qv={};hi(qv,{default:()=>F5});function O5(e,n,i,r,o,u,c,f,p,m){let d=(typeof i=="function"?i.options:i)||{};return d.__file="SidebarItem.vue",d.render||(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),d._scopeId=r,d}var k5,L5,T5,N5,R5,M5,A5,P5,F5,zv=W(()=>{vt();k5={name:"SidebarItem",data(){let{component:e}=this.$options;return{info:e.info||{state:null,style:null,class:null},main:!0,component:e,active:!1,title:e.title||"",open:!!e.state.open,icon:e.icon,iconColor:e.iconColor,collapsible:e.collapsible!==!1,actions:e.actions,sidebar:V.gui.sidebar}},methods:{triggerAction(e,n){e.fnc(n)}},mounted(){let e=this.$options.opts||{},n=document.getElementById("g3w-sidebarcomponents");[null,void 0].includes(e.position)||e.position<0||e.position>=n.children.length?$(n).append(this.$el):Array.from(n.children).forEach((i,r)=>{(r===e.position||i.id===e.position)&&i.insertAdjacentElement(e.before||e.before===void 0?"beforebegin":"afterend",this.$el)}),this.component.mount(this.$refs["component-placeholder"]),this.component.click=({open:i=!1}={})=>{i&&V.sidebar.components.forEach(o=>{o!==this.component&&o.getOpen()&&o.click({open:!1})});let r=this.component.getInternalComponent().$el;r.classList&&r.classList.toggle("menu-open",i),r.parentNode.classList.toggle("active",i),this.component.setOpen(i)}}},L5=function(){var e=this,n=e.$createElement,i=e._self._c||n;return i("li",{directives:[{name:"show",rawName:"v-show",value:e.component.state.visible,expression:"component.state.visible"},{name:"disabled",rawName:"v-disabled",value:e.component.state.disabled,expression:"component.state.disabled"}],staticClass:"treeview sidebaritem",class:{active:e.open},attrs:{id:e.component.id}},[i("bar-loader",{attrs:{loading:e.component.state.loading}}),e._v(" "),i("a",{directives:[{name:"t-tooltip",rawName:"v-t-tooltip:right.create",value:e.sidebar.open?"":e.title,expression:"sidebar.open ? '' : title",arg:"right",modifiers:{create:!0}}],staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"},attrs:{href:"#","current-tooltip":e.sidebar.open?"":e.title}},[i("div",[e.sidebar.open?i("i",{class:e.icon,style:{color:e.iconColor}}):i("span",[i("i",{class:e.icon,style:{color:e.iconColor}})]),e._v(" "),i("span",{directives:[{name:"t",rawName:"v-t",value:e.title,expression:"title"}],staticClass:"treeview-label"})]),e._v(" "),i("div",[e.info.state?i("span",{class:e.info.class,staticStyle:{position:"absolute",right:"5px","font-weight":"bold"},style:e.info.style,attrs:{title:e.info.tooltip}},[e._v(e._s(e.info.state))]):e._e(),e._v(" "),e._l(e.actions,function(r){return i("span",{directives:[{name:"t-tooltip",rawName:"v-t-tooltip:left.create",value:r.tooltip,expression:"action.tooltip",arg:"left",modifiers:{create:!0}}],key:r.id,staticClass:"action skin-tooltip-left",class:r.class,staticStyle:{"font-weight":"bold",padding:"3px"},style:r.style,on:{click:function(o){return o.stopPropagation(),e.triggerAction(r,e.component.internalComponent)}}})})],2),e._v(" "),e.collapsible?i("i",{staticClass:"pull-right",class:e.$fa("angle-left")}):e._e()]),e._v(" "),i("div",{ref:"component-placeholder"})],1)},T5=[],N5=void 0,R5=void 0,M5=void 0,A5=!1;P5=O5({render:L5,staticRenderFns:T5},N5,k5,R5,A5,M5,!1,void 0,void 0,void 0),F5=P5});function U5(e,n,i,r,o,u,c,f,p,m){let d=(typeof i=="function"?i.options:i)||{};return d.__file="FormHeader.vue",d.render||(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),d._scopeId=r,d}var D5,j5,q5,z5,G5,$5,B5,V5,$E,BE=W(()=>{D5=Vue.extend({name:"form-header",props:{headers:{type:Array,default:[]},currentid:{type:String},update:{type:Boolean},valid:{type:Boolean}},methods:{click(e){e!==this.currentid&&this.headers.length>1&&this.$emit("clickheader",e)},resizeForm(e){this.$emit("resize-form",e)}}}),j5=function(){var e=this,n=e.$createElement,i=e._self._c||n;return i("div",{staticClass:"g3wform_header box-header with-border",staticStyle:{display:"flex","flex-direction":"column"}},[i("section",{staticClass:"g3wform_header_content"},e._l(e.headers,function(r){return i("span",{key:r.id,staticClass:"title",class:[{item_selected:e.currentid===r.id&&e.headers.length>1},[e.headers.length>1?"tabs":"one"]],staticStyle:{display:"flex","justify-content":"space-between","align-items":"center"},style:{fontSize:e.isMobile()&&"1em !important"},on:{click:function(o){return o.stopPropagation(),e.click(r.id)}}},[r.icon?i("span",{staticStyle:{"margin-right":"5px"}},[i("i",{class:r.icon})]):e._e(),e._v(" "),i("span",{directives:[{name:"t",rawName:"v-t:pre",value:r.title,expression:"header.title",arg:"pre"}],staticClass:"g3w-long-text"},[e._v(e._s(r.name))]),e._v(" "),i(r.component,{tag:"component",attrs:{valid:e.valid,update:e.update}})],1)}),0)])},q5=[],z5=void 0,G5=void 0,$5=void 0,B5=!1;V5=U5({render:j5,staticRenderFns:q5},z5,D5,G5,B5,$5,!1,void 0,void 0,void 0),$E=V5});function J5(e,n,i,r,o,u,c,f,p,m){let d=(typeof i=="function"?i.options:i)||{};return d.__file="FormFooter.vue",d.render||(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),d._scopeId=r,d}var W5,H5,Y5,X5,Z5,K5,Q5,eD,UE,VE=W(()=>{W5=Vue.extend({name:"form-footer",props:{state:{type:Object},backToRoot:{type:Function,default:()=>{}},isRootComponent:{type:Function}},data(){return this.originalbuttons=this.state.buttons.map(e=>({...e})),{id:"footer",active:!0,show:!0}},computed:{enableSave(){return this.state.valid&&this.state.update}},methods:{exec(e){e instanceof Function?e(this.state.fields):function(){return this.state.fields}()},btnEnabled(e){let{enabled:n=!0,type:i}=e;return n&&(i!=="save"||i==="save"&&this.enableSave)},isValid(){return this.state.valid}},watch:{"state.component"(e){this.show=this.isRootComponent(e)},"state.update":{immediate:!0,handler(e){this.state.buttons.find((n,i)=>{n.eventButtons&&n.eventButtons.update&&(n.eventButtons.update[e]?this.state.buttons.splice(i,1,{...n,...n.eventButtons.update[e]}):this.state.buttons.splice(i,1,this.originalbuttons[i]))})}}},activated(){this.active=!0},deactivated(){this.active=!1}}),H5=function(){var e=this,n=e.$createElement,i=e._self._c||n;return i("div",{staticClass:"form-group g3wform_footer"},[e.show?[e._t("default",function(){return[i("div",{staticStyle:{margin:"3px","font-weight":"bold"}},[e._v(` * `),i("span",{directives:[{name:"t",rawName:"v-t",value:"sdk.form.footer.required_fields",expression:"'sdk.form.footer.required_fields'"}]}),e._v(" "),e.state.footer.message?i("div",{style:[e.state.footer.style]},[e._v(` `+e._s(e.state.footer.message)+` `)]):e._e()]),e._v(" "),e._l(e.state.buttons,function(r){return i("button",{directives:[{name:"disabled",rawName:"v-disabled",value:!e.btnEnabled(r),expression:"!btnEnabled(button)"},{name:"t",rawName:"v-t",value:r.title,expression:"button.title"}],key:r.id,staticClass:"btn",class:[r.class],attrs:{update:e.state.update,valid:e.state.valid},on:{click:function(o){return o.stopPropagation(),o.preventDefault(),e.exec(r.cbk)}}})})]})]:[i("button",{directives:[{name:"t",rawName:"v-t",value:"back",expression:"'back'"}],staticClass:"btn skin-button",on:{click:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"prevet",void 0,r.key,void 0)?null:(r.stopPropagation(),e.backToRoot.apply(null,arguments))}}})]],2)},Y5=[],X5=void 0,Z5=void 0,K5=void 0,Q5=!1;eD=J5({render:H5,staticRenderFns:Y5},X5,W5,Z5,Q5,K5,!1,void 0,void 0,void 0),UE=eD});function lD(e,n,i,r,o,u,c,f,p,m){let d=(typeof i=="function"?i.options:i)||{};return d.__file="Form.vue",d.render||(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),d._scopeId=r,d}var tD,nD,iD,rD,sD,oD,aD,cD,WE,HE=W(()=>{BE();VE();tD={name:"g3w-form",data(){return{state:{},switchcomponent:!1,body:{components:{before:[],after:[]}}}},components:{g3wformheader:$E,G3wFormFooter:UE},transitions:{addremovetransition:"showhide"},methods:{isRootComponent(e){return this.$options.service.isRootComponent(e)},backToRoot(){this.$options.service.setRootComponent()},handleRelation(e){this.$options.service.handleRelation(e)},disableComponent({id:e,disabled:n=!1}){this.$options.service.disableComponent({id:e,disabled:n})},resizeForm(e){this.$options.service.setCurrentFormPercentage(e)},switchComponent(e){this.switchcomponent=!0,this.$options.service.setCurrentComponentById(e)},changeInput(e){return this.$options.service.changeInput(e)},addToValidate(e){this.$options.service.addToValidate(e)},removeToValidate(e){this.$options.service.removeToValidate(e)},reloadLayout(){let e=$(this.$el).height();if(!e)return;let n=$(this.$refs.g3w_form_footer.$el),i=$(this.$refs.g3wform_body),r=n.height()?n.height()+50:50,o=e-($(this.$refs.g3wformheader.$el).height()+r);i.height(o)}},async updated(){await this.$nextTick(),this.switchcomponent&&setTimeout(()=>this.switchcomponent=!1,0)},created(){this.$options.service.getEventBus().$on("set-main-component",()=>{this.switchComponent(0)}),this.$options.service.getEventBus().$on("component-validation",({id:e,valid:n})=>{this.$options.service.setValidComponent({id:e,valid:n})}),this.$options.service.getEventBus().$on("addtovalidate",this.addToValidate),this.$options.service.getEventBus().$on("disable-component",this.disableComponent)},mounted(){this.$options.service.isValid(),this.$options.service.setReady(!0)},beforeDestroy(){this.$options.service.clearAll()}},nD=function(){var e=this,n=e.$createElement,i=e._self._c||n;return i("div",{staticClass:"g3wform_content",staticStyle:{position:"relative"}},[i("bar-loader",{attrs:{loading:e.state.loading}}),e._v(" "),i("g3wformheader",{ref:"g3wformheader",attrs:{currentid:e.state.currentheaderid,headers:e.state.headers,update:e.state.update,valid:e.state.valid},on:{"resize-form":e.resizeForm,clickheader:e.switchComponent}}),e._v(" "),i("div",{ref:"g3wform_body",staticClass:"g3wform_body"},[e._l(e.body.components.before,function(r){return i(r,{tag:"component",attrs:{fields:e.state.fields}})}),e._v(" "),i("keep-alive",[i(e.state.component,{tag:"component",attrs:{handleRelation:e.handleRelation,state:e.state},on:{"hook:activated":e.reloadLayout,addtovalidate:e.addToValidate,removetovalidate:e.removeToValidate,changeinput:e.changeInput}})],1),e._v(" "),e._l(e.body.components.after,function(r){return i(r,{tag:"component",attrs:{fields:e.state.fields}})})],2),e._v(" "),i("g3w-form-footer",{ref:"g3w_form_footer",attrs:{isRootComponent:e.isRootComponent,backToRoot:e.backToRoot,state:e.state}})],1)},iD=[],rD=void 0,sD=void 0,oD=void 0,aD=!1;cD=lD({render:nD,staticRenderFns:iD},rD,tD,sD,aD,oD,!1,void 0,void 0,void 0),WE=cD});function st(e){return Object.values(V.catalog).map(n=>n.getLayerById(e)).find(n=>n)}var Bn=W(()=>{vt()});var YE,XE=W(()=>{Bn();YE={methods:{async autocompleteRequest({layerId:e,field:n,value:i}={}){let r=[];try{r=await st(e).getFilterData({suggest:`${n}|${i}`,unique:n})}catch(o){console.warn(o)}return r.map(o=>({id:o,text:o}))}}}});function _D(e,n,i,r,o,u,c,f,p,m){let d=(typeof i=="function"?i.options:i)||{};d.__file="Field.vue",d.render||(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0,o&&(d.functional=!0)),d._scopeId=r;{let v;if(n&&(v=c?function(y){n.call(this,m(y,this.$root.$options.shadowRoot))}:function(y){n.call(this,f(y))}),v!==void 0)if(d.functional){let y=d.render;d.render=function(w,E){return v.call(E),y(w,E)}}else{let y=d.beforeCreate;d.beforeCreate=y?[].concat(y,v):[v]}}return d}function Gv(){let e=Gv.styles||(Gv.styles={}),n=typeof navigator<"u"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(r,o){if(document.querySelector('style[data-vue-ssr-id~="'+r+'"]'))return;let u=n?o.media||"default":r,c=e[u]||(e[u]={ids:[],parts:[],element:void 0});if(!c.ids.includes(r)){let f=o.source,p=c.ids.length;if(c.ids.push(r),o.map&&(f+=` @@ -398,8 +398,8 @@ ${dc(this.code(n,i))} - - `,methods:{async download(i){let r=U.getService("map");V.download=!0,i.target.disabled=!0;try{let o=this.type==="screenshot"?await r.createMapImage():await(await fetch(`/${r.project.getType()}/api/asgeotiff/${r.project.getId()}/`,{method:"POST",body:Object.entries({image:await r.createMapImage(),csrfmiddlewaretoken:r.getCookie("csrftoken"),bbox:r.getMapBBOX().toString()}).reduce((u,c)=>(u.append(c[0],c[1]),u),new FormData)})).blob();Ur(o,`map_${Date.now()}`)}catch(o){U.showUserMessage({type:o.name==="SecurityError"?"warning":"alert",message:o.name==="SecurityError"?"mapcontrols.screenshot.securityError":"mapcontrols.screenshot.error",autoclose:!1}),console.warn(o)}return V.download=!1,i.target.disabled=!1,!0}},created(){U.toggleUserMessage(!1)},beforeDestroy(){U.toggleUserMessage(!0)}}}_addLayer(n){this.layers.push(n),this.change(this.layers),n.on("change:visible",()=>this.change(this.layers))}_removeLayer(n){this.layers=this.layers.filter(i=>i!==n),this.change(this.layers)}change(n=[]){this.setVisible(this.checkVisible(n))}checkVisible(n=[]){return this.isVisible()&&!n.some(qH)}}});function C_({map:e,feature:n}={},i={}){let r=document.createElement("div");r.className="mtooltip mtooltip-measure";let o=new ol.Overlay({element:r,offset:[0,-15],positioning:"bottom-center"});return e.addOverlay(o),{tooltip:o,unbyKey:n.getGeometry().on("change",u=>{let c,f=u.target;f instanceof ol.geom.Polygon?c=f.getInteriorPoint().getCoordinates():f instanceof ol.geom.MultiPolygon?c=f.getInteriorPoints().getCoordinates()[0]:(f instanceof ol.geom.LineString||f instanceof ol.geom.MultiLineString)&&(c=f.getLastCoordinate());let p=e.getView().getProjection(),m=lo(f.getType()),d=co(f.getType()),v=Ds(f.getType()),y=p.getCode()==="EPSG:3857"||p.getUnits()==="degrees",S=[];d&&v&&(f.getPolygons()||[]).forEach(O=>O.getLinearRing().getCoordinates().forEach(H=>S.push(H))),d&&!v&&(S=f.getLinearRing().getCoordinates());let w=d&&S.length>2?new ol.geom.LineString(S):f,E=m||d&&S.length>2?y?ol.sphere.getLength(w,{projection:p.getCode()}):Ds(w.getType())?w.getLineStrings().reduce((O,H)=>O+=H.getLength(),0):w.getLength():void 0,I=d?Math.round(y?ol.sphere.getArea(f,{projection:p.getCode()}):f.getArea()):void 0;E!==void 0&&(E=V.map.unit==="nautical"?`${E*.0005399568} nm`:E>1e3?`${(Math.round(E/1e3*100)/100).toFixed(3)} km`:`${(Math.round(E*100)/100).toFixed(2)} m`),I!==void 0&&(I=V.map.unit==="nautical"?`${I*29155334959812285e-23} \u2009nmi\xB2`:I>1e6?`${(Math.round(I/1e6*100)/100).toFixed(6)} km2`:`${(Math.round(I*100)/100).toFixed(3)} m2`),r.innerHTML=(I!==void 0?`Area: ${I}
`:"")+(I!==void 0&&E!==void 0?'
':"")+(E!==void 0?E:""),o.setPosition(c)})}}var hw=W(()=>{vt();_u();yu();Fh()});function mp({map:e,tooltip:n,unbyKey:i}){e.removeOverlay(n),ol.Observable.unByKey(i)}var fw=W(()=>{});var Cd,I_,pw=W(()=>{bt();xc();hw();fw();cn();Cd=class extends ol.interaction.Draw{constructor(n){let i=new ol.style.Style({fill:new ol.style.Fill({color:"rgba(255, 255, 255, 0.2)"}),stroke:new ol.style.Stroke({color:n.drawColor||"rgba(0, 0, 0, 0.5)",lineDash:[10,10],width:3}),image:new ol.style.Circle({radius:5,stroke:new ol.style.Stroke({color:"rgba(0, 0, 0, 0.7)"}),fill:new ol.style.Fill({color:"rgba(255, 255, 255, 0.2)"})})}),r=new ol.source.Vector;super({source:r,type:n.geometryType||"LineString",style:i}),this._helpTooltip,this._measureTooltipElement,this._measureTooltip,this._featureGeometryChangelistener,this._poinOnMapMoveListener,this._helpTooltipElement,this._helpMsg=n.help,this._projection=n.projection,this.feature=n.feature,this._map=null,this._feature=null,this._layer=new ol.layer.Vector({source:r,style(){return[new ol.style.Style({stroke:new ol.style.Stroke({lineDash:[10,10],width:3}),fill:new ol.style.Fill({color:"rgba(255, 255, 255, 0.2)"})})]}}),this.set("beforeRemove",this.clear),this.set("layer",this._layer),this.on("drawstart",this._drawStart),this.on("drawend",this._drawEnd)}clear(){this._layer.getSource().clear(),this._clearMessagesAndListeners(),this._map&&(mp({map:this._map,...this.measureTooltip}),this.measureTooltip=null,this._map.removeLayer(this._layer))}_clearMessagesAndListeners(){this._feature=null,this._map&&(this._measureTooltipElement=null,this._helpTooltipElement.innerHTML="",this._helpTooltipElement.classList.add("hidden"),ol.Observable.unByKey(this._featureGeometryChangelistener),ol.Observable.unByKey(this._poinOnMapMoveListener),$(document).off("keydown",this._keyDownEventHandler))}_drawStart(n){this._map=this.getMap(),this._map.removeLayer(this._layer),this._feature=n.feature,this.feature&&this._feature.setGeometry(this.feature.getGeometry()),this._keyDownEventHandler=i=>{let r=this._feature.getGeometry();i.keyCode===46&&(r instanceof ol.geom.Polygon&&r.getCoordinates()[0].length>2?this.removeLastPoint():r instanceof ol.geom.LineString&&r.getCoordinates().length>1&&this.removeLastPoint())},$(document).on("keydown",this._keyDownEventHandler),this._layer.getSource().clear(),this._poinOnMapMoveListener=this._map.on("pointermove",i=>{i.dragging||this._feature&&this._helpMsg&&(this._helpTooltipElement.innerHTML=He(this._helpMsg),this._helpTooltip.setPosition(i.coordinate),this._helpTooltipElement.classList.remove("hidden"))}),this._helpTooltipElement&&this._helpTooltipElement.parentNode.removeChild(this._helpTooltipElement),this._helpTooltip&&this._map.removeOverlay(this._helpTooltip),this._helpTooltipElement=document.createElement("div"),this._helpTooltipElement.className="mtooltip hidden",this._helpTooltip=new ol.Overlay({element:this._helpTooltipElement,offset:[15,0],positioning:"center-left"}),this._map.addOverlay(this._helpTooltip),this.measureTooltip&&mp({...this.measureTooltip,map:this._map}),this.measureTooltip=C_({map:this._map,feature:this._feature})}_drawEnd(){this.measureTooltip.tooltip.getElement().className="mtooltip mtooltip-static",this.measureTooltip.tooltip.setOffset([0,-7]),this._clearMessagesAndListeners(),this._map.addLayer(this._layer)}},I_=class extends An{constructor(n={}){super({...n,clickmap:!0,enabled:!0,onToggled(i){this._interaction.setActive(this.isToggled()),i||this._interaction.clear(),!i&&this.interactions[this.types[0]]!==this._interaction&&(this.getMap().removeInteraction(this._interaction),this._interaction=this.interactions[this.types[0]],this.getMap().addInteraction(this._interaction))}}),this.types=[],this.interactions={},(n.types||[]).forEach(i=>this.addType(i)),this.types.length===0&&this.setVisible(!1),this.on("setMap",i=>i.map.addInteraction(this._interaction))}addType(n){this.types.push(n),this._interactionClassOptions.geometryType={area:"Polygon",length:"LineString"}[n],this.interactions[n]=new Cd(this._interactionClassOptions),this.interactions[n].setActive(!1),this._interaction||(this._interaction=this.interactions[n]),this.types.length>1&&(this.toggledTool=this.toggledTool||{__title:"sdk.mapcontrols.measures.title",__iconClass:"measure",data:()=>({types:this.types,type:this.types[0]}),template:` + + `,computed:{loading:()=>V.download},methods:{download:async i=>{let r=U.getService("map");V.download=!0;try{let o=i==="screenshot"?await r.createMapImage():await(await fetch(`/${r.project.getType()}/api/asgeotiff/${r.project.getId()}/`,{method:"POST",body:Object.entries({image:await r.createMapImage(),csrfmiddlewaretoken:r.getCookie("csrftoken"),bbox:r.getMapBBOX().toString()}).reduce((u,c)=>(u.append(c[0],c[1]),u),new FormData)})).blob();(this._onclick||Ur)(o,`map_${Date.now()}`)}catch(o){U.showUserMessage({type:o.name==="SecurityError"?"warning":"alert",message:o.name==="SecurityError"?"mapcontrols.screenshot.securityError":"mapcontrols.screenshot.error",autoclose:!1}),console.warn(o)}return V.download=!1,!0}},created(){U.toggleUserMessage(!1)},beforeDestroy(){U.toggleUserMessage(!0)}}}_addLayer(n){this.layers.push(n),this.change(this.layers),n.on("change:visible",()=>this.change(this.layers))}_removeLayer(n){this.layers=this.layers.filter(i=>i!==n),this.change(this.layers)}change(n=[]){this.setVisible(this.checkVisible(n))}checkVisible(n=[]){return this.isVisible()&&!n.some(qH)}}});function C_({map:e,feature:n}={},i={}){let r=document.createElement("div");r.className="mtooltip mtooltip-measure";let o=new ol.Overlay({element:r,offset:[0,-15],positioning:"bottom-center"});return e.addOverlay(o),{tooltip:o,unbyKey:n.getGeometry().on("change",u=>{let c,f=u.target;f instanceof ol.geom.Polygon?c=f.getInteriorPoint().getCoordinates():f instanceof ol.geom.MultiPolygon?c=f.getInteriorPoints().getCoordinates()[0]:(f instanceof ol.geom.LineString||f instanceof ol.geom.MultiLineString)&&(c=f.getLastCoordinate());let p=e.getView().getProjection(),m=lo(f.getType()),d=co(f.getType()),v=Ds(f.getType()),y=p.getCode()==="EPSG:3857"||p.getUnits()==="degrees",S=[];d&&v&&(f.getPolygons()||[]).forEach(O=>O.getLinearRing().getCoordinates().forEach(H=>S.push(H))),d&&!v&&(S=f.getLinearRing().getCoordinates());let w=d&&S.length>2?new ol.geom.LineString(S):f,E=m||d&&S.length>2?y?ol.sphere.getLength(w,{projection:p.getCode()}):Ds(w.getType())?w.getLineStrings().reduce((O,H)=>O+=H.getLength(),0):w.getLength():void 0,I=d?Math.round(y?ol.sphere.getArea(f,{projection:p.getCode()}):f.getArea()):void 0;E!==void 0&&(E=V.map.unit==="nautical"?`${E*.0005399568} nm`:E>1e3?`${(Math.round(E/1e3*100)/100).toFixed(3)} km`:`${(Math.round(E*100)/100).toFixed(2)} m`),I!==void 0&&(I=V.map.unit==="nautical"?`${I*29155334959812285e-23} \u2009nmi\xB2`:I>1e6?`${(Math.round(I/1e6*100)/100).toFixed(6)} km2`:`${(Math.round(I*100)/100).toFixed(3)} m2`),r.innerHTML=(I!==void 0?`Area: ${I}
`:"")+(I!==void 0&&E!==void 0?'
':"")+(E!==void 0?E:""),o.setPosition(c)})}}var hw=W(()=>{vt();_u();yu();Fh()});function mp({map:e,tooltip:n,unbyKey:i}){e.removeOverlay(n),ol.Observable.unByKey(i)}var fw=W(()=>{});var Cd,I_,pw=W(()=>{bt();xc();hw();fw();cn();Cd=class extends ol.interaction.Draw{constructor(n){let i=new ol.style.Style({fill:new ol.style.Fill({color:"rgba(255, 255, 255, 0.2)"}),stroke:new ol.style.Stroke({color:n.drawColor||"rgba(0, 0, 0, 0.5)",lineDash:[10,10],width:3}),image:new ol.style.Circle({radius:5,stroke:new ol.style.Stroke({color:"rgba(0, 0, 0, 0.7)"}),fill:new ol.style.Fill({color:"rgba(255, 255, 255, 0.2)"})})}),r=new ol.source.Vector;super({source:r,type:n.geometryType||"LineString",style:i}),this._helpTooltip,this._measureTooltipElement,this._measureTooltip,this._featureGeometryChangelistener,this._poinOnMapMoveListener,this._helpTooltipElement,this._helpMsg=n.help,this._projection=n.projection,this.feature=n.feature,this._map=null,this._feature=null,this._layer=new ol.layer.Vector({source:r,style(){return[new ol.style.Style({stroke:new ol.style.Stroke({lineDash:[10,10],width:3}),fill:new ol.style.Fill({color:"rgba(255, 255, 255, 0.2)"})})]}}),this.set("beforeRemove",this.clear),this.set("layer",this._layer),this.on("drawstart",this._drawStart),this.on("drawend",this._drawEnd)}clear(){this._layer.getSource().clear(),this._clearMessagesAndListeners(),this._map&&(mp({map:this._map,...this.measureTooltip}),this.measureTooltip=null,this._map.removeLayer(this._layer))}_clearMessagesAndListeners(){this._feature=null,this._map&&(this._measureTooltipElement=null,this._helpTooltipElement.innerHTML="",this._helpTooltipElement.classList.add("hidden"),ol.Observable.unByKey(this._featureGeometryChangelistener),ol.Observable.unByKey(this._poinOnMapMoveListener),$(document).off("keydown",this._keyDownEventHandler))}_drawStart(n){this._map=this.getMap(),this._map.removeLayer(this._layer),this._feature=n.feature,this.feature&&this._feature.setGeometry(this.feature.getGeometry()),this._keyDownEventHandler=i=>{let r=this._feature.getGeometry();i.keyCode===46&&(r instanceof ol.geom.Polygon&&r.getCoordinates()[0].length>2?this.removeLastPoint():r instanceof ol.geom.LineString&&r.getCoordinates().length>1&&this.removeLastPoint())},$(document).on("keydown",this._keyDownEventHandler),this._layer.getSource().clear(),this._poinOnMapMoveListener=this._map.on("pointermove",i=>{i.dragging||this._feature&&this._helpMsg&&(this._helpTooltipElement.innerHTML=He(this._helpMsg),this._helpTooltip.setPosition(i.coordinate),this._helpTooltipElement.classList.remove("hidden"))}),this._helpTooltipElement&&this._helpTooltipElement.parentNode.removeChild(this._helpTooltipElement),this._helpTooltip&&this._map.removeOverlay(this._helpTooltip),this._helpTooltipElement=document.createElement("div"),this._helpTooltipElement.className="mtooltip hidden",this._helpTooltip=new ol.Overlay({element:this._helpTooltipElement,offset:[15,0],positioning:"center-left"}),this._map.addOverlay(this._helpTooltip),this.measureTooltip&&mp({...this.measureTooltip,map:this._map}),this.measureTooltip=C_({map:this._map,feature:this._feature})}_drawEnd(){this.measureTooltip.tooltip.getElement().className="mtooltip mtooltip-static",this.measureTooltip.tooltip.setOffset([0,-7]),this._clearMessagesAndListeners(),this._map.addLayer(this._layer)}},I_=class extends An{constructor(n={}){super({...n,clickmap:!0,enabled:!0,onToggled(i){this._interaction.setActive(this.isToggled()),i||this._interaction.clear(),!i&&this.interactions[this.types[0]]!==this._interaction&&(this.getMap().removeInteraction(this._interaction),this._interaction=this.interactions[this.types[0]],this.getMap().addInteraction(this._interaction))}}),this.types=[],this.interactions={},(n.types||[]).forEach(i=>this.addType(i)),this.types.length===0&&this.setVisible(!1),this.on("setMap",i=>i.map.addInteraction(this._interaction))}addType(n){this.types.push(n),this._interactionClassOptions.geometryType={area:"Polygon",length:"LineString"}[n],this.interactions[n]=new Cd(this._interactionClassOptions),this.interactions[n].setActive(!1),this._interaction||(this._interaction=this.interactions[n]),this.types.length>1&&(this.toggledTool=this.toggledTool||{__title:"sdk.mapcontrols.measures.title",__iconClass:"measure",data:()=>({types:this.types,type:this.types[0]}),template:`