@qaecy/cue-ui 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/104.js +1 -0
- package/112.js +1 -1
- package/149.js +1 -1
- package/240.js +1 -0
- package/245.js +1 -1
- package/311.js +1 -1
- package/418.js +1 -1
- package/419.js +1 -1
- package/540.js +1 -1
- package/571.js +1 -1
- package/60.js +1 -1
- package/613.js +1 -0
- package/645.js +1 -0
- package/741.js +1 -1
- package/{544.js → 873.js} +1 -1
- package/911.js +1 -1
- package/960.js +1 -1
- package/README.md +4 -0
- package/common.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/334.js +0 -1
package/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[76],{2014(x,M,i){i.d(M,{z:()=>b});var l=i(7705),c=i(2271),u=i(5547);const g=["*"];let b=(()=>{class o{justify=(0,l.hFB)("start");size=(0,l.hFB)("l");widthStyle=(0,c.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(a){return new(a||o)};static \u0275cmp=u.VBU({type:o,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:g,decls:2,vars:4,template:function(a,d){1&a&&(u.NAR(),u.rj2(0,"div"),u.SdG(1),u.eux()),2&a&&u.xc7("justify-content",d.justify())("min-width",d.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return o})()},6034(x,M,i){i.d(M,{y:()=>f});var l=i(7705),c=i(7598),u=i(9769),g=i(5187),b=i(2271),o=i(5547);const n=["*"];let y=(()=>{class t{style=(0,l.hFB)("");gap=(0,l.hFB)("m");columns=(0,l.hFB)(1);getStyles=(0,b.EW)(()=>`\n grid-template-columns: repeat(${this.columns()}, minmax(0, 1fr));\n gap: var(--cue-grid-gap-${this.gap()});\n ${this.style()}\n `);static \u0275fac=function(v){return new(v||t)};static \u0275cmp=o.VBU({type:t,selectors:[["cue-grid"]],hostVars:2,hostBindings:function(v,m){2&v&&o.Aen(m.getStyles())},inputs:{style:[1,"style"],gap:[1,"gap"],columns:[1,"columns"]},ngContentSelectors:n,decls:1,vars:0,template:function(v,m){1&v&&(o.NAR(),o.SdG(0))},styles:["[_nghost-%COMP%]{display:grid}"]})}return t})();var a=i(2245),d=i(5381),e=i(29);const r=["*"];function h(t,p){if(1&t&&(o.j41(0,"cue-typography",2),o.EFF(1),o.k0s()),2&t){const _=o.XpG();o.R7$(),o.SpI(" ",_.label()," ")}}let f=(()=>{class t{label=(0,l.hFB)("");variant=(0,l.hFB)("default");shadow=(0,l.hFB)(!1);padded=(0,l.hFB)(!0);showCloseBtn=(0,l.hFB)(!0);position=(0,l.hFB)("top-left");clickedClose=(0,l.CGW)();margin=(0,l.hFB)("0.5rem");close(_){_.stopPropagation(),_.stopImmediatePropagation(),this.clickedClose.emit()}static \u0275fac=function(v){return new(v||t)};static \u0275cmp=o.VBU({type:t,selectors:[["cue-draggable-card"]],inputs:{label:[1,"label"],variant:[1,"variant"],shadow:[1,"shadow"],padded:[1,"padded"],showCloseBtn:[1,"showCloseBtn"],position:[1,"position"],margin:[1,"margin"]},outputs:{clickedClose:"clickedClose"},ngContentSelectors:r,decls:8,vars:14,consts:[["cdkDrag","",1,"panel",3,"variant","shadow","padded"],["justify","end"],["size","l"],[2,"width","100%"],["name","close",2,"cursor","pointer",3,"click"]],template:function(v,m){1&v&&(o.NAR(),o.j41(0,"cue-card",0)(1,"cue-typography")(2,"cue-grid")(3,"cue-flexcontainer",1),o.nVh(4,h,2,1,"cue-typography",2),o.nrm(5,"span",3),o.j41(6,"cue-svg-icon",4),o.bIt("click",function(D){return m.close(D)}),o.k0s()(),o.SdG(7),o.k0s()()()),2&v&&(o.xc7("top","top-left"===m.position()||"top-right"===m.position()?m.margin():"null")("bottom","bottom-left"===m.position()||"bottom-right"===m.position()?m.margin():"null")("left","top-left"===m.position()||"bottom-left"===m.position()?m.margin():"null")("right","top-right"===m.position()||"bottom-right"===m.position()?m.margin():"null"),o.Y8G("variant",m.variant())("shadow",m.shadow())("padded",m.padded()),o.R7$(3),o.xc7("padding",m.padded()?"0":"10px"),o.R7$(),o.vxM(m.label()&&"undefined"!==m.label()?4:-1))},dependencies:[u.MD,g.Z,y,a.Typography,d.n,e.A,c.T1],styles:[".panel[_ngcontent-%COMP%]{position:absolute;width:fit-content}"]})}return t})()},6756(x,M,i){i.d(M,{BK:()=>l,In:()=>a,Kz:()=>d,Mc:()=>r,U6:()=>u,g0:()=>h,g8:()=>g,r:()=>c,u9:()=>o});const l=["#2B5DE6","#1A2B50","#C5E045","#6FA8FF","#00C2E0","#5847EB","#008585","#4ADE80","#0F4C81","#8B5CF6","#FACC15","#FB923C","#F43F5E","#E879F9","#D97706","#334155","#64748B","#94A3B8","#C7D2FE","#F8FAFC"];function c(t){switch(t){case"primary":default:return"#2859e1";case"accent":return"#e2f552";case"tertiary":return"#ffffff"}}function u(t){switch(t){case"primary":default:return"#1744c2";case"accent":return"#b8cc3f";case"tertiary":return"#eeeeee"}}function g(t){const[p,_,v]=function b(t,p){if(void 0===t)return[];const v=window.getComputedStyle(t.nativeElement);return p.map(m=>v.getPropertyValue(m).trim()||"")}(t,["--cue-chart-text-color","--cue-chart-border-background-color","--chart-graph-edge-color"]);return{text:p,borderBackground:_,edgeColor:v}}const o={fontFamily:"Poppins, sans-serif",fontWeight:"normal",color:"#333"};function a(t){return t>=1e6?`${(t/1e6).toFixed(1)}m`:t>=1e3?`${(t/1e3).toFixed(0)}k`:t.toString()}function d(t,p,_,v){if(1===v)return t;const m=s(t),P=s(p),D=_/(v-1);return`rgb(${Math.round(m.r+(P.r-m.r)*D)}, ${Math.round(m.g+(P.g-m.g)*D)}, ${Math.round(m.b+(P.b-m.b)*D)})`}const r=(t,p)=>void 0===p?t:p.children??[];function h(t,p,_=.05,v="Other"){const m=t.reduce((C,E)=>C+f(E),0),P=[],D=[];if(t.forEach(C=>{let E,T;E=void 0===C.value&&Array.isArray(C.children)&&C.children.length>0?C.children.reduce((F,L)=>F+f(L),0):void 0!==C.value?C.value:0,Array.isArray(C.children)&&C.children.length>0&&(T=h(C.children,p,_,v));const A={...C,value:E,children:T};p&&m>0&&E/m<_?D.push(A):P.push(A)}),p&&D.length>0){const C=D.reduce((E,T)=>E+T.value,0);P.push({id:"__grouped_small__",name:v,value:C,children:D,isGroup:!0})}return P}function s(t){const p=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return p?{r:parseInt(p[1],16),g:parseInt(p[2],16),b:parseInt(p[3],16)}:{r:0,g:0,b:0}}function f(t){return"number"==typeof t.value?t.value:Array.isArray(t.children)&&t.children.length>0?t.children.reduce((p,_)=>p+f(_),0):0}},9134(x,M,i){i.d(M,{v:()=>b});var l=i(7705),c=i(6034),u=i(7517),g=i(5547);let b=(()=>{class o{title=(0,l.hFB)("Legend");layers=(0,l.hFB)([]);position=(0,l.hFB)("top-left");close=(0,l.CGW)();visibilityChange=(0,l.CGW)();layerChange=(0,l.CGW)();visibilityAll=(0,l.CGW)();static \u0275fac=function(a){return new(a||o)};static \u0275cmp=g.VBU({type:o,selectors:[["cue-color-legend-panel"]],inputs:{title:[1,"title"],layers:[1,"layers"],position:[1,"position"]},outputs:{close:"close",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:3,vars:4,consts:[[3,"clickedClose","label","padded","position"],[1,"content"],[3,"visibilityAll","layerChange","visibilityChange","layers"]],template:function(a,d){1&a&&(g.j41(0,"cue-draggable-card",0),g.bIt("clickedClose",function(){return d.close.emit()}),g.j41(1,"div",1)(2,"cue-layer-legend",2),g.bIt("visibilityAll",function(r){return d.visibilityAll.emit(r)})("layerChange",function(r){return d.layerChange.emit(r)})("visibilityChange",function(r){return d.visibilityChange.emit(r)}),g.k0s()()()),2&a&&(g.Y8G("label",d.title())("padded",!1)("position",d.position()),g.R7$(2),g.Y8G("layers",d.layers()))},dependencies:[c.y,u.P],styles:[".content[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;margin-bottom:30px;font-size:.8em;max-height:200px;max-width:180px;overflow:auto}"]})}return o})()},7517(x,M,i){i.d(M,{P:()=>h});var l=i(7705),c=i(2271),u=i(2245),g=i(1359),b=i(5381),o=i(5802),n=i(5547);const y=(s,f)=>f.category;function a(s,f){if(1&s){const t=n.RV6();n.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",2),n.bIt("checkedChange",function(){o.eBV(t);const _=n.XpG();return o.Njj(_.toggleAll())}),n.k0s()()}if(2&s){const t=n.XpG();n.R7$(),n.Y8G("checked",t.allVisible())}}function d(s,f){if(1&s&&(n.j41(0,"cue-typography",3),n.EFF(1),n.k0s()),2&s){const t=n.XpG().$implicit;n.R7$(),n.JRh(t.category)}}function e(s,f){if(1&s){const t=n.RV6();n.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",4),n.bIt("checkedChange",function(){const _=o.eBV(t).$implicit,v=n.XpG(2);return o.Njj(v.toggleSingle(_))}),n.k0s(),n.j41(2,"cue-typography",5),n.bIt("click",function(){const _=o.eBV(t).$implicit,v=n.XpG(2);return o.Njj(v.toggleSingle(_))}),n.EFF(3),n.k0s()()}if(2&s){const t=f.$implicit;n.R7$(),n.Y8G("checked",t.visible)("color",t.color),n.R7$(2),n.JRh(t.label)}}function r(s,f){if(1&s&&(n.nVh(0,d,2,1,"cue-typography",3),n.Z7z(1,e,4,3,"cue-flexcontainer",1,n.Vm6)),2&s){const t=f.$implicit;n.vxM(t.category?0:-1),n.R7$(),n.Dyx(t.items)}}let h=(()=>{class s{layers=(0,l.geq)([]);visibilityChange=(0,l.CGW)();layerChange=(0,l.CGW)();visibilityAll=(0,l.CGW)();showCheckAll=(0,c.EW)(()=>this.layers().length>1);allVisible=(0,c.EW)(()=>this.layers().every(t=>t.visible));groupedLayers=(0,c.EW)(()=>{const t=[];for(const p of this.layers()){const _=p.category,v=t.find(m=>m.category===_);v?v.items.push(p):t.push({category:_,items:[p]})}return t});toggleAll(){const t=this.allVisible(),p=this.layers().map(_=>(_.visible=!t,_));this.layers.update(()=>[...p]),this.visibilityAll.emit(t),this.emitChange()}toggleSingle(t){t.visible=!t.visible,this.layerChange.emit(t),this.layers.update(()=>[...this.layers()]),this.emitChange()}emitChange(){this.visibilityChange.emit(this.layers())}static \u0275fac=function(p){return new(p||s)};static \u0275cmp=n.VBU({type:s,selectors:[["cue-layer-legend"]],inputs:{layers:[1,"layers"]},outputs:{layers:"layersChange",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:4,vars:1,consts:[["direction","column"],["align","center","justify","start",2,"width","100%"],["size","s",3,"checkedChange","checked"],["variant","label",2,"margin-top","4px","opacity","0.6"],["size","s",3,"checkedChange","checked","color"],[2,"cursor","pointer",3,"click"]],template:function(p,_){1&p&&(n.j41(0,"cue-flexcontainer",0),n.nVh(1,a,2,1,"cue-flexcontainer",1),n.Z7z(2,r,3,1,null,null,y),n.k0s()),2&p&&(n.R7$(),n.vxM(_.showCheckAll()?1:-1),n.R7$(),n.Dyx(_.groupedLayers()))},dependencies:[b.n,u.Typography,g.S],encapsulation:2,changeDetection:0})}return s})()},4613(x,M,i){i.d(M,{Logo:()=>o});var l=i(7705),c=i(5802),u=i(5547),g=i(2271),b=i(6170);let o=(()=>{class n{size=(0,l.hFB)("m");sizeMap={xs:"40px",s:"80px",m:"160px",l:"222px"};active=(0,l.hFB)(!0,{transform:l.L39});continuous=(0,l.hFB)(!1,{transform:l.L39});isDarkMode=(0,l.geq)(!1);handleDarkModeChange(a){this.isDarkMode.set(a),-1===this.raf&&this.animate()}colorA=(0,g.EW)(()=>this.isDarkMode()?[221,246,18]:[18,28,43]);colorB=[0,202,204];paths=[];raf=-1;appearTime=0;disappearTime=0;tip=0;toe=0;mix=[0,0,0];norm=0;animate=a=>{if(void 0!==a&&(this.tip=Math.min(1,6e-4*(a-this.appearTime)),this.active()||(this.toe=Math.min(1,6e-4*(a-this.disappearTime)))),this.paths.forEach((d,e)=>{this.norm=1/this.paths.length*e,this.mix=this.mixRgb(this.colorA(),this.colorB,Math.max(0,Math.min(1,15*(this.tip-this.norm)))),d.setAttribute("stroke",this.tip*this.paths.length>e&&(this.active()||this.toe*this.paths.length<e)?this.rgbToSvg(this.mix):"transparent")}),this.tip>=1&&(this.active()||this.toe>=1))return this.continuous()?void setTimeout(()=>{this.appearTime=performance.now(),this.tip=0,this.toe=0,this.raf=requestAnimationFrame(this.animate)},500):void(this.raf=-1);this.raf=requestAnimationFrame(this.animate)};activate(){this.appearTime=performance.now(),this.animate(this.appearTime)}deactivate(){this.disappearTime=performance.now(),-1===this.raf&&this.animate(this.disappearTime)}mixChannel(a,d,e){return parseInt((a*e+d*(1-e)).toFixed())}mixRgb(a,d,e){return[this.mixChannel(a[0],d[0],e),this.mixChannel(a[1],d[1],e),this.mixChannel(a[2],d[2],e)]}rgbToSvg(a){return`rgb(${a[0]},${a[1]},${a[2]})`}constructor(){(0,c.QZP)(()=>{this.active()?this.activate():this.deactivate()}),(0,c.QZP)(()=>{this.isDarkMode(),this.animate()});const a=(0,c.WQX)(u.aKT);(0,u.mal)({read:()=>{if(this.paths.length)return;const d=a.nativeElement.querySelector("svg"),e=a.nativeElement.querySelector("#original-path");if(!e)return;const r=e.getTotalLength(),s=[];for(let f=0;f<400;f++){const t=e.getPointAtLength(r/400*f);s.push({x:parseFloat(t.x.toFixed(2)),y:parseFloat(t.y.toFixed(2))})}s.push(e.getPointAtLength(r)),s.reverse(),s.forEach((f,t)=>{if(0===t||1===t)return;const p=document.createElementNS("http://www.w3.org/2000/svg","path");p.setAttribute("d",`M${s[t-2].x},${s[t-2].y}L${s[t-1].x},${s[t-1].y}L${f.x},${f.y}`),p.setAttribute("fill","none"),p.setAttribute("stroke","transparent"),p.setAttribute("stroke-width",e?.getAttribute("stroke-width")||"1"),p.setAttribute("stroke-miterlimit",e?.getAttribute("stroke-miterlimit")||"1"),d.appendChild(p),this.paths.push(p)})}})}ngOnDestroy(){this.paths=[],cancelAnimationFrame(this.raf),this.raf=-1}static \u0275fac=function(d){return new(d||n)};static \u0275cmp=u.VBU({type:n,selectors:[["cue-logo"]],hostVars:2,hostBindings:function(d,e){2&d&&u.xc7("width",e.sizeMap[e.size()])},inputs:{size:[1,"size"],active:[1,"active"],continuous:[1,"continuous"],isDarkMode:[1,"isDarkMode"]},outputs:{isDarkMode:"isDarkModeChange"},decls:2,vars:0,consts:[["cueDarkMode","","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 221.545 86.191","width","222","height","86","overflow","visible",3,"darkModeChange"],["id","original-path","fill","none","stroke","transparent","stroke-miterlimit","10","stroke-width","12","d","M216.046 56.638s-10.561 24.201-36.192 22.991c-25.631-1.21-22.771-24.751-20.351-37.622 2.42-12.871 10.451-20.351 16.831-18.041 6.283 2.275 8.03 9.68 2.09 21.891-5.94 12.211-21.341 37.567-35.862 33.992-12.413-3.056-13.281-23.162-13.281-23.162V29.762v26.925c0 14.471-12.47 23.212-24.672 23.212s-24.672-8.301-24.672-23.212V29.829l-.006.105v13.031c0 20.416-16.55 36.966-36.966 36.966S6 63.381 6 42.966 22.55 6 42.966 6c6.91 0 13.377 1.896 18.91 5.196"]],template:function(d,e){1&d&&(c.qSk(),u.j41(0,"svg",0),u.bIt("darkModeChange",function(h){return e.handleDarkModeChange(h)}),u.nrm(1,"path",1),u.k0s())},dependencies:[b.R],styles:["[_nghost-%COMP%]{display:block}svg[_ngcontent-%COMP%]{flex:1;display:block;width:100%;height:auto}"]})}return n})()},2306(x,M,i){i.d(M,{AA:()=>g,ux:()=>b,yY:()=>u});var l=i(140),c=i(8402);class u{mapboxToken;contextMenu={showProperties:!0,showFlyTo:!0};toolbar=new g}class g{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayGeofenceDraw=!1;displayLayerToggle=!0;clearGeofenceAfterDraw=!0}class b{label;id;collection=new l.o;color;visible=!0;cluster=!0;zoomToFit=!0;category;constructor(n,y=(0,c.A)()){this.label=n,this.id=y}}},3191(x,M,i){i.d(M,{g:()=>u});var l=i(467),c=i(5802);let u=(()=>{class g{searchPage(o,n,y){return(0,l.A)(function*(){if(!y||!y.trim())return[];const a=y.toLowerCase(),d=yield o.getPage(n),e=d.getViewport({scale:1}),h=(yield d.getTextContent()).items,s=[];let f="";const t=[],p=[];for(let m=0;m<h.length;m++){const D=h[m].str??"";for(let C=0;C<D.length;C++)f+=D[C],t.push(m),p.push(C)}const _=f.toLowerCase();let v=0;for(;v<_.length;){const m=_.indexOf(a,v);if(-1===m)break;const P=m+a.length-1;v=m+1;const D=new Set;for(let O=m;O<=P;O++)D.add(t[O]);let C=1/0,E=1/0,T=-1/0,A=-1/0;for(const O of D){const U=h[O],[B,N,q,j,k,I]=U.transform,W=U.width??0,w=U.height??Math.abs(B||j||12),R=Math.sqrt(B*B+N*N)||1,S=B/R,z=N/R,Y=q/R,X=j/R,ne=[[k,I],[k+S*W,I+z*W],[k+S*W+Y*w,I+z*W+X*w],[k+Y*w,I+X*w]];for(const[oe,re]of ne){const[Z,H]=e.convertToViewportPoint(oe,re);C=Math.min(C,Z),E=Math.min(E,H),T=Math.max(T,Z),A=Math.max(A,H)}}const F=e.width,L=e.height,$=.005*F,V=.005*L,J=(E-V)/L*100,K=(T-C+2*$)/F*100,G=(A-E+2*V)/L*100;K>0&&G>0&&s.push({page:n,xywhStr:`percent:${((C-$)/F*100).toFixed(2)},${J.toFixed(2)},${K.toFixed(2)},${G.toFixed(2)}`})}return s})()}searchAll(o,n){var y=this;return(0,l.A)(function*(){if(!n||!n.trim())return[];const a=o.numPages,d=[];for(let e=1;e<=a;e++){const r=yield y.searchPage(o,e,n);d.push(...r)}return d})()}static \u0275fac=function(n){return new(n||g)};static \u0275prov=c.jDH({token:g,factory:g.\u0275fac,providedIn:"root"})}return g})()},6170(x,M,i){i.d(M,{R:()=>b});var l=i(7705),c=i(5802),u=i(2271),g=i(5547);let b=(()=>{class o{destroyRef=(0,c.WQX)(c.abz);_isDarkMode=(0,c.vPA)(this.hasDarkClass());isDarkMode=(0,u.EW)(()=>this._isDarkMode());darkModeChange=(0,l.CGW)();constructor(){const y=new MutationObserver(a=>{a.forEach(d=>{if("attributes"===d.type&&"class"===d.attributeName){const e=this.hasDarkClass();e!==this._isDarkMode()&&this._isDarkMode.set(e)}})});y.observe(document.body,{attributes:!0,attributeFilter:["class"]}),this.destroyRef.onDestroy(()=>y.disconnect()),(0,c.QZP)(()=>{this.darkModeChange.emit(this._isDarkMode()),document.documentElement.style.colorScheme=this._isDarkMode()?"dark":"light"})}hasDarkClass(){return document.body.classList.contains("dark")}toggleDarkMode(){document.body.classList.toggle("dark")}static \u0275fac=function(a){return new(a||o)};static \u0275dir=g.FsC({type:o,selectors:[["","cueDarkMode",""]],outputs:{darkModeChange:"darkModeChange"},exportAs:["darkModeDetector"]})}return o})()},140(x,M,i){i.d(M,{o:()=>l});class l{type="FeatureCollection";features=[];bbox;id;constructor(u=[]){this.features=u}addFeature(u){this.features.push(u)}removeFeature(u){return this.features.splice(u,1)[0]}getFeatureCount(){return this.features.length}clear(){this.features=[]}}},58(x,M,i){function l(e){let r=0,h=-1,s=-1;for(let f=0;f<e.length;f++)if("("===e[f])r++,1===r&&(h=f+1);else if(")"===e[f]&&(r--,0===r)){s=f;break}return-1!==h&&-1!==s?e.substring(h,s):null}i.d(M,{S:()=>a,n:()=>d});class c{x;y;z;constructor(r,h,s){this.x=r,this.y=h,this.z=s}}class u{points;constructor(r){this.points=r}}class g{lines;constructor(r){this.lines=r}}function a(e){if(e){if((e=e.trim().toUpperCase()).startsWith("POINT"))return function o(e){e=e.trim().toUpperCase();const h=l(e)?.split(" ")??[];return e.includes("POINT Z")?new c(parseFloat(h[0]),parseFloat(h[1]),parseFloat(h[2])):new c(parseFloat(h[0]),parseFloat(h[1]))}(e);if(e.startsWith("LINESTRING"))return function b(e){const r=l(e=e.trim().toUpperCase()),h=[];return r?.split(",").map(s=>s.trim().split(" ").map(f=>parseFloat(f))).map(s=>{h.push(new c(s[0],s[1],s[2]))}),new u(h)}(e);if(e.startsWith("POLYGON"))return function n(e){const r=l(e=e.trim().toUpperCase());if(!r)return new g([]);const h=r.match(/\(([^)]+)\)/g);if(!h)return new g([]);const s=h.map(f=>{const t=l(f);return t?t.split(",").map(p=>{const _=p.trim().split(" ");return _.length>=3?new c(parseFloat(_[0]),parseFloat(_[1]),parseFloat(_[2])):new c(parseFloat(_[0]),parseFloat(_[1]))}):[]});return new g(s)}(e)}}function d(e){if(e instanceof c)return{type:"Point",coordinates:void 0!==e.z?[e.x,e.y,e.z]:[e.x,e.y]};if(e instanceof u)return{type:"LineString",coordinates:e.points.map(r=>void 0!==r.z?[r.x,r.y,r.z]:[r.x,r.y])};if(e instanceof g)return{type:"Polygon",coordinates:e.lines.map(r=>r.map(h=>void 0!==h.z?[h.x,h.y,h.z]:[h.x,h.y]))};throw new Error("Unknown WKT type")}},5332(x,M,i){i.d(M,{k:()=>g});for(var c=[],u=0;u<256;++u)c.push((u+256).toString(16).slice(1));function g(n,y=0){return(c[n[y+0]]+c[n[y+1]]+c[n[y+2]]+c[n[y+3]]+"-"+c[n[y+4]]+c[n[y+5]]+"-"+c[n[y+6]]+c[n[y+7]]+"-"+c[n[y+8]]+c[n[y+9]]+"-"+c[n[y+10]]+c[n[y+11]]+c[n[y+12]]+c[n[y+13]]+c[n[y+14]]+c[n[y+15]]).toLowerCase()}},8402(x,M,i){i.d(M,{A:()=>y});const c={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var u,g=new Uint8Array(16);function b(){if(!u&&!(u=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u(g)}var o=i(5332);const y=function n(a,d,e){if(c.randomUUID&&!d&&!a)return c.randomUUID();var r=(a=a||{}).random||(a.rng||b)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,d){e=e||0;for(var h=0;h<16;++h)d[e+h]=r[h];return d}return(0,o.k)(r)}},7106(x,M,i){function l(c,u){this.v=c,this.k=u}i.d(M,{A:()=>l})},600(x,M,i){i.d(M,{A:()=>c});var l=i(7106);function c(g){return function(){return new u(g.apply(this,arguments))}}function u(g){var b,o;function n(a,d){try{var e=g[a](d),r=e.value,h=r instanceof l.A;Promise.resolve(h?r.v:r).then(function(s){if(h){var f="return"===a?"return":"next";if(!r.k||s.done)return n(f,s);s=g[f](s).value}y(e.done?"return":"normal",s)},function(s){n("throw",s)})}catch(s){y("throw",s)}}function y(a,d){switch(a){case"return":b.resolve({value:d,done:!0});break;case"throw":b.reject(d);break;default:b.resolve({value:d,done:!1})}(b=b.next)?n(b.key,b.arg):o=null}this._invoke=function(a,d){return new Promise(function(e,r){var h={key:a,arg:d,resolve:e,reject:r,next:null};o?o=o.next=h:(b=o=h,n(a,d))})},"function"!=typeof g.return&&(this.return=void 0)}u.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},u.prototype.next=function(g){return this._invoke("next",g)},u.prototype.throw=function(g){return this._invoke("throw",g)},u.prototype.return=function(g){return this._invoke("return",g)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[76],{2014(D,v,u){u.d(v,{z:()=>m});var _=u(7705),i=u(2271),l=u(5547);const s=["*"];let m=(()=>{class g{justify=(0,_.hFB)("start");size=(0,_.hFB)("l");widthStyle=(0,i.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(y){return new(y||g)};static \u0275cmp=l.VBU({type:g,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:s,decls:2,vars:4,template:function(y,p){1&y&&(l.NAR(),l.rj2(0,"div"),l.SdG(1),l.eux()),2&y&&l.xc7("justify-content",p.justify())("min-width",p.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return g})()},6756(D,v,u){u.d(v,{BK:()=>_,In:()=>y,Kz:()=>p,Mc:()=>r,U6:()=>l,g0:()=>a,g8:()=>s,r:()=>i,u9:()=>g});const _=["#2B5DE6","#1A2B50","#C5E045","#6FA8FF","#00C2E0","#5847EB","#008585","#4ADE80","#0F4C81","#8B5CF6","#FACC15","#FB923C","#F43F5E","#E879F9","#D97706","#334155","#64748B","#94A3B8","#C7D2FE","#F8FAFC"];function i(t){switch(t){case"primary":default:return"#2859e1";case"accent":return"#e2f552";case"tertiary":return"#ffffff"}}function l(t){switch(t){case"primary":default:return"#1744c2";case"accent":return"#b8cc3f";case"tertiary":return"#eeeeee"}}function s(t){const[c,d,b]=function m(t,c){if(void 0===t)return[];const b=window.getComputedStyle(t.nativeElement);return c.map(E=>b.getPropertyValue(E).trim()||"")}(t,["--cue-chart-text-color","--cue-chart-border-background-color","--chart-graph-edge-color"]);return{text:c,borderBackground:d,edgeColor:b}}const g={fontFamily:"Poppins, sans-serif",fontWeight:"normal",color:"#333"};function y(t){return t>=1e6?`${(t/1e6).toFixed(1)}m`:t>=1e3?`${(t/1e3).toFixed(0)}k`:t.toString()}function p(t,c,d,b){if(1===b)return t;const E=o(t),P=o(c),x=d/(b-1);return`rgb(${Math.round(E.r+(P.r-E.r)*x)}, ${Math.round(E.g+(P.g-E.g)*x)}, ${Math.round(E.b+(P.b-E.b)*x)})`}const r=(t,c)=>void 0===c?t:c.children??[];function a(t,c,d=.05,b="Other"){const E=t.reduce((C,M)=>C+f(M),0),P=[],x=[];if(t.forEach(C=>{let M,A;M=void 0===C.value&&Array.isArray(C.children)&&C.children.length>0?C.children.reduce((L,T)=>L+f(T),0):void 0!==C.value?C.value:0,Array.isArray(C.children)&&C.children.length>0&&(A=a(C.children,c,d,b));const F={...C,value:M,children:A};c&&E>0&&M/E<d?x.push(F):P.push(F)}),c&&x.length>0){const C=x.reduce((M,A)=>M+A.value,0);P.push({id:"__grouped_small__",name:b,value:C,children:x,isGroup:!0})}return P}function o(t){const c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return c?{r:parseInt(c[1],16),g:parseInt(c[2],16),b:parseInt(c[3],16)}:{r:0,g:0,b:0}}function f(t){return"number"==typeof t.value?t.value:Array.isArray(t.children)&&t.children.length>0?t.children.reduce((c,d)=>c+f(d),0):0}},9134(D,v,u){u.d(v,{v:()=>m});var _=u(7705),i=u(6034),l=u(7517),s=u(5547);let m=(()=>{class g{title=(0,_.hFB)("Legend");layers=(0,_.hFB)([]);position=(0,_.hFB)("top-left");close=(0,_.CGW)();visibilityChange=(0,_.CGW)();layerChange=(0,_.CGW)();visibilityAll=(0,_.CGW)();static \u0275fac=function(y){return new(y||g)};static \u0275cmp=s.VBU({type:g,selectors:[["cue-color-legend-panel"]],inputs:{title:[1,"title"],layers:[1,"layers"],position:[1,"position"]},outputs:{close:"close",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:3,vars:4,consts:[[3,"clickedClose","label","padded","position"],[1,"content"],[3,"visibilityAll","layerChange","visibilityChange","layers"]],template:function(y,p){1&y&&(s.j41(0,"cue-draggable-card",0),s.bIt("clickedClose",function(){return p.close.emit()}),s.j41(1,"div",1)(2,"cue-layer-legend",2),s.bIt("visibilityAll",function(r){return p.visibilityAll.emit(r)})("layerChange",function(r){return p.layerChange.emit(r)})("visibilityChange",function(r){return p.visibilityChange.emit(r)}),s.k0s()()()),2&y&&(s.Y8G("label",p.title())("padded",!1)("position",p.position()),s.R7$(2),s.Y8G("layers",p.layers()))},dependencies:[i.y,l.P],styles:[".content[_ngcontent-%COMP%]{padding-left:10px;padding-right:10px;margin-bottom:30px;font-size:.8em;max-height:200px;max-width:180px;overflow:auto}"]})}return g})()},7517(D,v,u){u.d(v,{P:()=>a});var _=u(7705),i=u(2271),l=u(2245),s=u(1359),m=u(5381),g=u(5802),e=u(5547);const h=(o,f)=>f.category;function y(o,f){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",2),e.bIt("checkedChange",function(){g.eBV(t);const d=e.XpG();return g.Njj(d.toggleAll())}),e.k0s()()}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("checked",t.allVisible())}}function p(o,f){if(1&o&&(e.j41(0,"cue-typography",3),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.category)}}function n(o,f){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",4),e.bIt("checkedChange",function(){const d=g.eBV(t).$implicit,b=e.XpG(2);return g.Njj(b.toggleSingle(d))}),e.k0s(),e.j41(2,"cue-typography",5),e.bIt("click",function(){const d=g.eBV(t).$implicit,b=e.XpG(2);return g.Njj(b.toggleSingle(d))}),e.EFF(3),e.k0s()()}if(2&o){const t=f.$implicit;e.R7$(),e.Y8G("checked",t.visible)("color",t.color),e.R7$(2),e.JRh(t.label)}}function r(o,f){if(1&o&&(e.nVh(0,p,2,1,"cue-typography",3),e.Z7z(1,n,4,3,"cue-flexcontainer",1,e.Vm6)),2&o){const t=f.$implicit;e.vxM(t.category?0:-1),e.R7$(),e.Dyx(t.items)}}let a=(()=>{class o{layers=(0,_.geq)([]);visibilityChange=(0,_.CGW)();layerChange=(0,_.CGW)();visibilityAll=(0,_.CGW)();showCheckAll=(0,i.EW)(()=>this.layers().length>1);allVisible=(0,i.EW)(()=>this.layers().every(t=>t.visible));groupedLayers=(0,i.EW)(()=>{const t=[];for(const c of this.layers()){const d=c.category,b=t.find(E=>E.category===d);b?b.items.push(c):t.push({category:d,items:[c]})}return t});toggleAll(){const t=this.allVisible(),c=this.layers().map(d=>(d.visible=!t,d));this.layers.update(()=>[...c]),this.visibilityAll.emit(t),this.emitChange()}toggleSingle(t){t.visible=!t.visible,this.layerChange.emit(t),this.layers.update(()=>[...this.layers()]),this.emitChange()}emitChange(){this.visibilityChange.emit(this.layers())}static \u0275fac=function(c){return new(c||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-layer-legend"]],inputs:{layers:[1,"layers"]},outputs:{layers:"layersChange",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:4,vars:1,consts:[["direction","column"],["align","center","justify","start",2,"width","100%"],["size","s",3,"checkedChange","checked"],["variant","label",2,"margin-top","4px","opacity","0.6"],["size","s",3,"checkedChange","checked","color"],[2,"cursor","pointer",3,"click"]],template:function(c,d){1&c&&(e.j41(0,"cue-flexcontainer",0),e.nVh(1,y,2,1,"cue-flexcontainer",1),e.Z7z(2,r,3,1,null,null,h),e.k0s()),2&c&&(e.R7$(),e.vxM(d.showCheckAll()?1:-1),e.R7$(),e.Dyx(d.groupedLayers()))},dependencies:[m.n,l.Typography,s.S],encapsulation:2,changeDetection:0})}return o})()},2306(D,v,u){u.d(v,{AA:()=>s,ux:()=>m,yY:()=>l});var _=u(140),i=u(8402);class l{mapboxToken;contextMenu={showProperties:!0,showFlyTo:!0};toolbar=new s}class s{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayGeofenceDraw=!1;displayLayerToggle=!0;clearGeofenceAfterDraw=!0}class m{label;id;collection=new _.o;color;visible=!0;cluster=!0;zoomToFit=!0;category;constructor(e,h=(0,i.A)()){this.label=e,this.id=h}}},140(D,v,u){u.d(v,{o:()=>_});class _{type="FeatureCollection";features=[];bbox;id;constructor(l=[]){this.features=l}addFeature(l){this.features.push(l)}removeFeature(l){return this.features.splice(l,1)[0]}getFeatureCount(){return this.features.length}clear(){this.features=[]}}},58(D,v,u){function _(n){let r=0,a=-1,o=-1;for(let f=0;f<n.length;f++)if("("===n[f])r++,1===r&&(a=f+1);else if(")"===n[f]&&(r--,0===r)){o=f;break}return-1!==a&&-1!==o?n.substring(a,o):null}u.d(v,{S:()=>y,n:()=>p});class i{x;y;z;constructor(r,a,o){this.x=r,this.y=a,this.z=o}}class l{points;constructor(r){this.points=r}}class s{lines;constructor(r){this.lines=r}}function y(n){if(n){if((n=n.trim().toUpperCase()).startsWith("POINT"))return function g(n){n=n.trim().toUpperCase();const a=_(n)?.split(" ")??[];return n.includes("POINT Z")?new i(parseFloat(a[0]),parseFloat(a[1]),parseFloat(a[2])):new i(parseFloat(a[0]),parseFloat(a[1]))}(n);if(n.startsWith("LINESTRING"))return function m(n){const r=_(n=n.trim().toUpperCase()),a=[];return r?.split(",").map(o=>o.trim().split(" ").map(f=>parseFloat(f))).map(o=>{a.push(new i(o[0],o[1],o[2]))}),new l(a)}(n);if(n.startsWith("POLYGON"))return function e(n){const r=_(n=n.trim().toUpperCase());if(!r)return new s([]);const a=r.match(/\(([^)]+)\)/g);if(!a)return new s([]);const o=a.map(f=>{const t=_(f);return t?t.split(",").map(c=>{const d=c.trim().split(" ");return d.length>=3?new i(parseFloat(d[0]),parseFloat(d[1]),parseFloat(d[2])):new i(parseFloat(d[0]),parseFloat(d[1]))}):[]});return new s(o)}(n)}}function p(n){if(n instanceof i)return{type:"Point",coordinates:void 0!==n.z?[n.x,n.y,n.z]:[n.x,n.y]};if(n instanceof l)return{type:"LineString",coordinates:n.points.map(r=>void 0!==r.z?[r.x,r.y,r.z]:[r.x,r.y])};if(n instanceof s)return{type:"Polygon",coordinates:n.lines.map(r=>r.map(a=>void 0!==a.z?[a.x,a.y,a.z]:[a.x,a.y]))};throw new Error("Unknown WKT type")}},5332(D,v,u){u.d(v,{k:()=>s});for(var i=[],l=0;l<256;++l)i.push((l+256).toString(16).slice(1));function s(e,h=0){return(i[e[h+0]]+i[e[h+1]]+i[e[h+2]]+i[e[h+3]]+"-"+i[e[h+4]]+i[e[h+5]]+"-"+i[e[h+6]]+i[e[h+7]]+"-"+i[e[h+8]]+i[e[h+9]]+"-"+i[e[h+10]]+i[e[h+11]]+i[e[h+12]]+i[e[h+13]]+i[e[h+14]]+i[e[h+15]]).toLowerCase()}},8402(D,v,u){u.d(v,{A:()=>h});const i={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var l,s=new Uint8Array(16);function m(){if(!l&&!(l=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(s)}var g=u(5332);const h=function e(y,p,n){if(i.randomUUID&&!p&&!y)return i.randomUUID();var r=(y=y||{}).random||(y.rng||m)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,p){n=n||0;for(var a=0;a<16;++a)p[n+a]=r[a];return p}return(0,g.k)(r)}},7106(D,v,u){function _(i,l){this.v=i,this.k=l}u.d(v,{A:()=>_})},600(D,v,u){u.d(v,{A:()=>i});var _=u(7106);function i(s){return function(){return new l(s.apply(this,arguments))}}function l(s){var m,g;function e(y,p){try{var n=s[y](p),r=n.value,a=r instanceof _.A;Promise.resolve(a?r.v:r).then(function(o){if(a){var f="return"===y?"return":"next";if(!r.k||o.done)return e(f,o);o=s[f](o).value}h(n.done?"return":"normal",o)},function(o){e("throw",o)})}catch(o){h("throw",o)}}function h(y,p){switch(y){case"return":m.resolve({value:p,done:!0});break;case"throw":m.reject(p);break;default:m.resolve({value:p,done:!1})}(m=m.next)?e(m.key,m.arg):g=null}this._invoke=function(y,p){return new Promise(function(n,r){var a={key:y,arg:p,resolve:n,reject:r,next:null};g?g=g.next=a:(m=g=a,e(y,p))})},"function"!=typeof s.return&&(this.return=void 0)}l.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},l.prototype.next=function(s){return this._invoke("next",s)},l.prototype.throw=function(s){return this._invoke("throw",s)},l.prototype.return=function(s){return this._invoke("return",s)}}}]);
|