@arcgis/map-components 6.0.0-next.19 → 6.0.0-next.20

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.
Files changed (102) hide show
  1. package/dist/cdn/{54252KWO.js → 4CLSMFD2.js} +1 -1
  2. package/dist/cdn/5RCFYMHK.js +2 -0
  3. package/dist/cdn/{WZL4TRBL.js → 6DDIOOI6.js} +1 -1
  4. package/dist/cdn/7FA44B44.js +2 -0
  5. package/dist/cdn/{ZJPWEZXZ.js → AXJE2SZV.js} +1 -1
  6. package/dist/cdn/{ECYWLMDD.js → CD2XIXN5.js} +1 -1
  7. package/dist/cdn/{P3AEIHWE.js → ELAKAKPE.js} +1 -1
  8. package/dist/cdn/{ODSZ7JZM.js → EVJFKABL.js} +1 -1
  9. package/dist/cdn/{HZDWPWBH.js → EWM5PERI.js} +1 -1
  10. package/dist/cdn/{AQ4GVWNJ.js → GD4XR5XA.js} +1 -1
  11. package/dist/cdn/{3LU4FSJG.js → J7VECW7F.js} +1 -1
  12. package/dist/cdn/{U3R2OX36.js → JPFLHUNR.js} +1 -1
  13. package/dist/cdn/{Z5GIFGHJ.js → KM7PWRG2.js} +1 -1
  14. package/dist/cdn/{GFYLYX2V.js → L4HKKYNC.js} +1 -1
  15. package/dist/cdn/{SAIBFBPE.js → LXLZB2JC.js} +1 -1
  16. package/dist/cdn/{77Q4KCLS.js → M2HYKS62.js} +1 -1
  17. package/dist/cdn/{35YLXOQ5.js → OBQUHPHJ.js} +1 -1
  18. package/dist/cdn/{4VNMYUM4.js → QPHKPPYM.js} +1 -1
  19. package/dist/cdn/ROHGHCK6.js +2 -0
  20. package/dist/cdn/{F72OTEK2.js → T2ONRGQX.js} +1 -1
  21. package/dist/cdn/{WC2N2XG6.js → TFXSKVB7.js} +1 -1
  22. package/dist/cdn/{NMGC3KRM.js → WV2GLDRQ.js} +1 -1
  23. package/dist/cdn/{ZS5IADYN.js → Y3S6WJN2.js} +1 -1
  24. package/dist/cdn/{NUZBBPNE.js → Z24QDG3E.js} +2 -2
  25. package/dist/cdn/ZPA5JUPD.js +2 -0
  26. package/dist/cdn/assets/feature-form-next/t9n/messages.en.json +1 -1
  27. package/dist/cdn/index.js +1 -1
  28. package/dist/chunks/attachment-utils.js +5 -5
  29. package/dist/components/arcgis-add-attachment-view/customElement.d.ts +9 -9
  30. package/dist/components/arcgis-attachment-detail-view/customElement.d.ts +9 -9
  31. package/dist/components/arcgis-attachment-preview/customElement.d.ts +9 -9
  32. package/dist/components/arcgis-attachment-thumbnail/customElement.d.ts +9 -9
  33. package/dist/components/arcgis-attachment-validation-view/customElement.d.ts +9 -9
  34. package/dist/components/arcgis-coordinate-conversion-next/customElement.js +29 -29
  35. package/dist/components/arcgis-feature-form-field/customElement.d.ts +9 -9
  36. package/dist/components/arcgis-link-chart/customElement.d.ts +7 -4
  37. package/dist/components/arcgis-map/customElement.d.ts +7 -4
  38. package/dist/components/arcgis-scene/customElement.d.ts +7 -4
  39. package/dist/components/arcgis-search/customElement.d.ts +1 -2
  40. package/dist/components/arcgis-selection-list/customElement.js +1 -1
  41. package/dist/components/arcgis-slider-scale-range/customElement.d.ts +12 -4
  42. package/dist/components/arcgis-slider-scale-range/spriteSheetsUtils.d.ts +8 -3
  43. package/dist/components/arcgis-swipe/customElement.d.ts +10 -9
  44. package/dist/components/arcgis-swipe/customElement.js +246 -46
  45. package/dist/components/arcgis-swipe/types.d.ts +3 -0
  46. package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +100 -20
  47. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +0 -1
  48. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +117 -29
  49. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +10 -10
  50. package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +56 -9
  51. package/dist/docs/api.json +1 -1
  52. package/dist/docs/docs.json +1 -1
  53. package/dist/docs/vscode.html-custom-data.json +1 -1
  54. package/dist/docs/web-types.json +1 -1
  55. package/package.json +8 -8
  56. package/dist/cdn/2U3VASQT.js +0 -2
  57. package/dist/cdn/LYYBCY4N.js +0 -2
  58. package/dist/cdn/TN6WTZA2.js +0 -2
  59. package/dist/cdn/ZGOAZB5L.js +0 -2
  60. /package/dist/cdn/{YMN2Q7CW.js → 23L5GSFN.js} +0 -0
  61. /package/dist/cdn/{MQL4JTYG.js → 33LESQ6T.js} +0 -0
  62. /package/dist/cdn/{7QUHJ4F6.js → 6LUCQLB7.js} +0 -0
  63. /package/dist/cdn/{QYMZT7OC.js → 7SDUVBEL.js} +0 -0
  64. /package/dist/cdn/{NUCXXE6V.js → AKAOYYJ7.js} +0 -0
  65. /package/dist/cdn/{37Z3E4ZM.js → BP7H6IBX.js} +0 -0
  66. /package/dist/cdn/{SYIOPNRF.js → CEVISDMV.js} +0 -0
  67. /package/dist/cdn/{TS32SDVT.js → DQDUD556.js} +0 -0
  68. /package/dist/cdn/{EIQ3BKQI.js → DQRQZK5Y.js} +0 -0
  69. /package/dist/cdn/{O2VAKVIY.js → DRD2FAEC.js} +0 -0
  70. /package/dist/cdn/{7YXE3BUX.js → DWQQDLIU.js} +0 -0
  71. /package/dist/cdn/{GXIGMIXV.js → EGD2CSA7.js} +0 -0
  72. /package/dist/cdn/{C4EAONGF.js → ENHMLZOY.js} +0 -0
  73. /package/dist/cdn/{RGECACLD.js → FIYZBOAN.js} +0 -0
  74. /package/dist/cdn/{6MRDTILE.js → GE4QV5JC.js} +0 -0
  75. /package/dist/cdn/{72FJMPJ2.js → GGUWUNUA.js} +0 -0
  76. /package/dist/cdn/{T62G5MRK.js → ITRBNYSS.js} +0 -0
  77. /package/dist/cdn/{2JLC2JV7.js → JAH2AKJ5.js} +0 -0
  78. /package/dist/cdn/{CTVCZ2FU.js → KZUUBMYO.js} +0 -0
  79. /package/dist/cdn/{LCTJF3NT.js → LFSVKJXI.js} +0 -0
  80. /package/dist/cdn/{YASANB6O.js → MGE3J5KE.js} +0 -0
  81. /package/dist/cdn/{Y7KMV2PI.js → MPIIQAQO.js} +0 -0
  82. /package/dist/cdn/{LGPNRKDT.js → ONSMVZAM.js} +0 -0
  83. /package/dist/cdn/{JZSRPSRH.js → P3ZJLVKC.js} +0 -0
  84. /package/dist/cdn/{MM4N6C4V.js → PBXO27K2.js} +0 -0
  85. /package/dist/cdn/{YRYYWFPY.js → PSD74QRS.js} +0 -0
  86. /package/dist/cdn/{7P23WI52.js → PST64E7E.js} +0 -0
  87. /package/dist/cdn/{AE26KT54.js → S5MD2X3H.js} +0 -0
  88. /package/dist/cdn/{RENVCO3U.js → SFMD5PPC.js} +0 -0
  89. /package/dist/cdn/{VNY7TNRC.js → SIIF27TS.js} +0 -0
  90. /package/dist/cdn/{EULM4L53.js → T5XVILYA.js} +0 -0
  91. /package/dist/cdn/{OLEIOWZX.js → TT57O767.js} +0 -0
  92. /package/dist/cdn/{ORS7OWLJ.js → UN65FKRA.js} +0 -0
  93. /package/dist/cdn/{LNZRHKHG.js → V3HQQ6TJ.js} +0 -0
  94. /package/dist/cdn/{EVCKANRW.js → V7OBQRSG.js} +0 -0
  95. /package/dist/cdn/{KDO2EJA3.js → VCJ6M3PX.js} +0 -0
  96. /package/dist/cdn/{5ZLCMYZU.js → VWHNYGBM.js} +0 -0
  97. /package/dist/cdn/{53PKFG2U.js → WQIIAMYV.js} +0 -0
  98. /package/dist/cdn/{YN6VG7UO.js → X5RVRRKO.js} +0 -0
  99. /package/dist/cdn/{UCHDAO3V.js → Z66I2FAE.js} +0 -0
  100. /package/dist/cdn/{XJIILB3W.js → ZO5WNVFD.js} +0 -0
  101. /package/dist/cdn/{Y4D3Q4G7.js → ZQL4CTJK.js} +0 -0
  102. /package/dist/cdn/{P3BAHG4Q.js → ZUYPKJYL.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{E as xt,F as at,K as q,P as z,R as rt,h as j}from"./HZDWPWBH.js";import{A as K,I as pt,S as Y,V as mt,f as st,h as ft,r as gt,t as nt,x as I}from"./P3AEIHWE.js";import{a as X}from"./MQL4JTYG.js";import{Q as ct,b as it,g as v,p as M,r as dt}from"./CTVCZ2FU.js";var S=class extends at{_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),s=e/Math.abs(e),i=t/Math.abs(t),n=0,a=0,h=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*h,t-=i*h,n+=s*h/2,a+=i*h/2);let l=e,d=t;if(v(l)&&v(d)){let u=Math.min(l,d)/2,p=I(this.get("cornerRadiusTL",8),u),c=I(this.get("cornerRadiusTR",8),u),m=I(this.get("cornerRadiusBR",8),u),C=I(this.get("cornerRadiusBL",8),u),_=Math.min(Math.abs(l/2),Math.abs(d/2));p=j(p,0,_),c=j(c,0,_),m=j(m,0,_),C=j(C,0,_);let g=this._display;g.moveTo(n+p*s,a),g.lineTo(n+l-c*s,a),c>0&&g.arcTo(n+l,a,n+l,a+c*i,c),g.lineTo(n+l,a+d-m*i),m>0&&g.arcTo(n+l,a+d,n+l-m*s,a+d,m),g.lineTo(n+C*s,a+d),C>0&&g.arcTo(n,a+d,n,a+d-C*i,C),g.lineTo(n,a+p*i),p>0&&g.arcTo(n,a,n+p*s,a,p),g.closePath()}}};S.className="RoundedRectangle";S.classNames=at.classNames.concat([S.className]);var F=class extends z{_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["button"]),super._afterNew(),this._setDefaultTagged("background",Y(this._settings.themeTags,["background"]),()=>S.new(this._root,{})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};F.className="Button";F.classNames=z.classNames.concat([F.className]);function Nt(r,e,t,s){let i=[];return e&&e.fontVariant?i.push(e.fontVariant):r.fontVariant&&i.push(r.fontVariant),t||(e&&e.fontWeight?i.push(e.fontWeight):r.fontWeight&&i.push(r.fontWeight)),e&&e.fontStyle?i.push(e.fontStyle):r.fontStyle&&i.push(r.fontStyle),e&&e.fontSize?(e.fontSize=Z(e.fontSize),i.push(e.fontSize)):r.fontSize&&(r.fontSize=Z(r.fontSize),i.push(r.fontSize)),r.fontFamily=="inherit"?i.push(s()):e&&e.fontFamily?i.push(e.fontFamily):r.fontFamily?i.push(r.fontFamily):i.length&&i.push("Arial"),i.join(" ")}function Z(r){return v(r)||/^\s*\d*\.?\d+\s*$/.test(r)?parseFloat(r+"")+"px":r}function At(){return/apple/i.test(navigator.vendor)}function V(r,e,t){let s=e.measureText(r),i={};if(s.actualBoundingBoxAscent==null){let a=document.createElement("div");a.innerText=r,a.style.visibility="hidden",a.style.position="absolute",a.style.top="-1000000px;",a.style.fontFamily=t.fontFamily||"",a.style.fontSize=t.fontSize+"",document.body.appendChild(a);let h=a.getBoundingClientRect();document.body.removeChild(a);let l=h.height,d=s.width;i={actualBoundingBoxAscent:l,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:d,fontBoundingBoxAscent:l,fontBoundingBoxDescent:0,width:d}}else i={actualBoundingBoxAscent:s.actualBoundingBoxAscent,actualBoundingBoxDescent:s.actualBoundingBoxDescent,actualBoundingBoxLeft:s.actualBoundingBoxLeft,actualBoundingBoxRight:s.actualBoundingBoxRight,fontBoundingBoxAscent:s.actualBoundingBoxAscent,fontBoundingBoxDescent:s.actualBoundingBoxDescent,width:s.width};let n=s.width;switch(t.textAlign){case"right":case"end":i.actualBoundingBoxLeft=n,i.actualBoundingBoxRight=0;break;case"center":i.actualBoundingBoxLeft=n/2,i.actualBoundingBoxRight=n/2;break;default:i.actualBoundingBoxLeft=0,i.actualBoundingBoxRight=n}return i}function vt(r,e,t=!1){let s=r.maxWidth,i=t?void 0:r.maxHeight;if(!v(s)&&!v(i))return 1;let n=e.right-e.left,a=e.bottom-e.top;return Math.min(s/n||1,i/a||1)}function _t(r,e,t,s,i=!1,n=!0){let a;do{if(i)t=t.slice(0,-1);else{let l=t.replace(/(?:[^,;:!?\\\/\s​]|,(?=\d))+[,;:!?\\\/\s​]*$/g,"");if((l==""||l===t)&&n)i=!0;else{if(l=="")return t;t=l}}let h=V(t,r,e);a=h.actualBoundingBoxLeft+h.actualBoundingBoxRight}while(a>s&&t!="");return t}function Mt(r,e,t,s,i){let n=t.direction=="rtl";i.lines=[];let a=t.oversizedBehavior,h=t.maxWidth,l=v(h)&&a=="truncate",d=v(h)&&(a=="wrap"||a=="wrap-no-break"),u="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",p=e.toString().replace(/\r/g,"").split(/\n/),c=!0,m=0,C=0,_=0,g;M(p,(f,E)=>{let b;for(f==""?b=[{type:"value",text:""}]:b=q.chunk(f,!1,t.ignoreFormatting);b.length>0;){let o={offsetY:_,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},$=V(u,r,t),ht=$.actualBoundingBoxAscent+$.actualBoundingBoxDescent;o.height=ht,o.ascent=$.actualBoundingBoxAscent;let w,R=t.textDecoration,G,y,P=!1,D=!0,N=[],tt;dt(b,(T,lt)=>{if(T.type=="format")if(T.text=="[/]")c||(r.restore(),c=!0),G=void 0,g=void 0,y=void 0,R=t.textDecoration,tt=void 0,w=T.text;else{c||r.restore();let x=q.getTextStyle(T.text),A=s(x);r.save(),r.font=A,g=A,w=T.text,x.textDecoration&&(R=x.textDecoration),x.fill&&(G=x.fill),x.width&&(y=it(x.width)),x.verticalAlign&&(tt=x.verticalAlign),c=!1;let W=V(u,r,t),H=W.actualBoundingBoxAscent+W.actualBoundingBoxDescent;H>o.height&&(o.height=H),W.actualBoundingBoxAscent>o.ascent&&(o.ascent=W.actualBoundingBoxAscent)}else if(T.type=="value"&&!P){let x=V(T.text,r,t),A=x.actualBoundingBoxLeft+x.actualBoundingBoxRight;if(l){i.truncated=void 0;let k=D||t.breakWords||!1,L=t.ellipsis||"",O=V(L,r,t),ut=O.actualBoundingBoxLeft+O.actualBoundingBoxRight;if(o.width+A>h){let Bt=h-o.width-ut;T.text=_t(r,t,T.text,Bt,k),T.text+=L,P=!0,i.truncated=!0}}else if(d&&o.width+A>h){let k=h-o.width,L=_t(r,t,T.text,k,!1,D&&t.oversizedBehavior!="wrap-no-break");if(L=="")return i.textVisible=!0,!1;if(!D){let O=V(K(L),r,t);if(O.actualBoundingBoxLeft+O.actualBoundingBoxRight>k)return N=b.slice(lt),w&&N.unshift({type:"format",text:w}),b=[],!1}N=b.slice(lt+1),K(L)!=K(T.text)&&(N.unshift({type:"value",text:T.text.substr(L.length)}),w&&N.unshift({type:"format",text:w})),T.text=K(L),b=[],P=!0}let W=1,H=1;if(g&&y&&y>A){let k=A/y;switch(t.textAlign){case"right":case"end":W=k;break;case"center":W=k,H=k;break;default:H=k}A=y}let et=x.actualBoundingBoxAscent+x.actualBoundingBoxDescent;et>o.height&&(o.height=et),x.actualBoundingBoxAscent>o.ascent&&(o.ascent=x.actualBoundingBoxAscent),o.width+=A,o.left+=x.actualBoundingBoxLeft/W,o.right+=x.actualBoundingBoxRight/H,o.textChunks.push({style:g,fill:G,text:T.text,width:A,height:et,left:x.actualBoundingBoxLeft,right:x.actualBoundingBoxRight,ascent:x.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:R,verticalAlign:tt}),D=!1}return!0}),t.lineHeight instanceof X?(o.height*=t.lineHeight.value,o.ascent*=t.lineHeight.value):(o.height*=t.lineHeight||1.2,o.ascent*=t.lineHeight||1.2),m<o.left&&(m=o.left),C<o.right&&(C=o.right),i.lines.push(o),_+=o.height,b=N||[]}}),c||r.restore(),M(i.lines,(f,E)=>{let b=0;M(f.textChunks,o=>{if(o.offsetX=b+o.left-f.left,o.offsetY+=f.height-f.height*(t.baselineRatio||.19),b+=o.width*(n?-1:1),o.verticalAlign)switch(o.verticalAlign){case"super":o.offsetY-=f.height/2-o.height/2;break;case"sub":o.offsetY+=o.height/2;break}})});let B={left:n?-C:-m,top:0,right:n?m:C,bottom:_};if(a!=="none"){let f=vt(t,B,a=="truncate");if(f<1)if(a=="fit")v(t.minScale)&&f<t.minScale?(i.textVisible=!1,B.left=0,B.top=0,B.right=0,B.bottom=0):(i.originalScale||(i.originalScale=i.scale),i.scale=f,i.textVisible=!0);else if(a=="hide")i.textVisible=!1,B.left=0,B.top=0,B.right=0,B.bottom=0;else{switch(t.textAlign){case"right":case"end":B.left=n?h:-h,B.right=0;break;case"center":B.left=-h/2,B.right=h/2;break;default:B.left=0,B.right=n?-h:h}i.scale=i.originalScale||1,i.originalScale=void 0,i.textVisible=!0}else i.scale=i.originalScale||1,i.originalScale=void 0,i.textVisible=!0}return B}function Pt(r,e,t,s,i){let n=t.direction=="rtl";i.textVisible=!0,i.lines=[];let a=t.oversizedBehavior,h=t.maxWidth,l=v(h)&&a=="truncate",d=t.ellipsis||"",u,p=e.toString().replace(/\r/g,"").split(/\n/),c=!0,m=0,C=0;return M(p,(_,g)=>{let B=q.chunk(_,!1,t.ignoreFormatting),f={offsetY:C,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},E,b,o;M(B,($,ht)=>{if($.type=="format"){if($.text=="[/]")c||(r.restore(),c=!0),b=void 0,E=void 0,o=void 0;else{let w=q.getTextStyle($.text),R=s(w);r.save(),r.font=R,E=R,w.fill&&(b=w.fill),w.width&&(o=it(w.width)),c=!1}l&&(u=V(d,r,t))}else if($.type=="value"){let w=$.text.match(/./ug)||[];n&&(w=pt($.text),w.reverse());for(let R=0;R<w.length;R++){let G=w[R],y=V(G,r,t),P=y.width;E&&o&&o>P&&(P=o);let D=y.actualBoundingBoxAscent+y.actualBoundingBoxDescent;if(D>f.height&&(f.height=D),y.actualBoundingBoxAscent>f.ascent&&(f.ascent=y.actualBoundingBoxAscent),m+=P,l){u||(u=V(d,r,t));let N=u.actualBoundingBoxLeft+u.actualBoundingBoxRight;if(m+N>h){f.textChunks.length==1?i.textVisible=!1:(f.width+=N,f.left+=u.actualBoundingBoxLeft,f.right+=u.actualBoundingBoxRight,f.textChunks.push({style:E,fill:b,text:d,width:N,height:D+u.actualBoundingBoxDescent,left:u.actualBoundingBoxLeft,right:u.actualBoundingBoxRight,ascent:u.actualBoundingBoxAscent,offsetX:0,offsetY:D,textDecoration:void 0}));break}}f.width+=P,f.left+=y.actualBoundingBoxLeft,f.right+=y.actualBoundingBoxRight,f.textChunks.push({style:E,fill:b,text:G,width:P,height:D+y.actualBoundingBoxDescent,left:y.actualBoundingBoxLeft,right:y.actualBoundingBoxRight,ascent:y.actualBoundingBoxAscent,offsetX:0,offsetY:D,textDecoration:void 0})}}}),t.lineHeight instanceof X?f.height*=t.lineHeight.value:f.height*=t.lineHeight||1.2,i.lines.push(f),C+=f.height}),c||r.restore(),a=="hide"&&m>h&&(i.textVisible=!1),M(i.lines,_=>{M(_.textChunks,g=>{g.offsetY+=Math.round((_.height-g.height+(_.ascent-g.ascent))/2)})}),{left:0,top:0,right:0,bottom:0}}var J=class extends rt{_afterNew(){super._afterNew();let e=this.children.push(z.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e),this._setDefaultTagged("background",["editablelabel","background"],()=>S.new(this._root,{}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new ct([this.getPrivate("input").events.on(e,t=>{}),this.events.on(e,t=>{this.set("active",!0)})]))}}_prepareChildren(){super._prepareChildren(),this._maybeInitTextarea()}_updateChildren(){if(super._updateChildren(),this.isDirty("active")){let e=this.get("active",!1);e?this._startEditing():this._stopEditing();let t=this.get("background");t&&t.set("active",e)}this._syncText(),this._syncStyle()}_maybeInitTextarea(){if(!this._isInited()){let e=this.getPrivate("input");if(e&&e.getPrivate("htmlElement")){let s=e.getPrivate("htmlElement").querySelector(".am5-editable-label");s&&(this.setPrivate("textarea",s),s.addEventListener("input",i=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",i=>this.set("active",!1)),ft("keyboardevents")&&this._disposers.push(st(s,"keydown",i=>{nt(i)=="Escape"&&this.set("active",!1)})),this._disposers.push(st(s,"keydown",i=>{nt(i)=="Enter"&&this.get("multiLine")===!1&&(i.preventDefault(),this.set("active",!1))})),this.events.dispatch("inited",{type:"inited",target:this}))}}}_isInited(){return!!this.getPrivate("textarea")}_startEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._startEditing()});return}this._text.set("opacity",0);let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.get("text","")==""&&this.set("text"," "),e.show(0),this.setTimeout(()=>{this._syncStyle(),t.focus()},100))}_stopEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._stopEditing()});return}let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.set("text",t.value),e.hide(0),this._text.set("opacity",1))}_syncStyle(){let e=this.getPrivate("input"),t=this.getPrivate("textarea"),s=e.getPrivate("htmlElement");if(t&&s){let i=window.getComputedStyle(t);M(i,c=>{t.style[c]="initial"}),t.style.color=this.get("fill",mt(0)).toCSS(this.get("fillOpacity",1)),t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="none",t.style.outline="none",t.style.padding="0",t.wrap="off",t.style.resize="none",t.style.overflow="hidden";let n=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);n>0?t.style.maxWidth=n+"px":t.style.minWidth="",t.style.height="auto",t.style.minHeight=t.scrollHeight+"px",this.get("width")&&(t.style.width=this.width()-this.get("paddingLeft",0)-this.get("paddingRight",0)+"px",t.style.minWidth="");let a=this.get("lineHeight");a?a instanceof X?t.style.lineHeight=a.value+"":v(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let h=this.get("fontFamily");h||(h=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=h;let l=this.get("fontSize");l?l=Z(l):l=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=l;let d=this.get("fontWeight");d?d=d:d=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=d;let u=this.get("fontStyle");u?u=u:u=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=u,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._frameDp||(this._frameDp=this.addDisposer(this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let c=this.get("textAlign","start");c=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):c=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=c})))}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};J.className="EditableLabel";J.classNames=rt.classNames.concat([J.className]);var Q=class extends z{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=Y(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._setDefaultTagged("background",Y(this._settings.themeTags,["main","background"]),()=>S.new(this._root,{}))}_makeButton(){return this.children.push(F.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:xt.new(this._root,{themeTags:["icon"]})._markC("themeTags")})._markC("themeTags","icon"))}_makeThumb(){return this.children.push(S.new(this._root,{themeTags:["thumb",this.get("orientation")]})._markC("themeTags"))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,s=this.thumb,i=this.get("background");i&&this._disposers.push(i.events.on("click",n=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(n.point),h=this.width(),l=this.height(),d=this.get("orientation"),u;d=="vertical"?u=(a.y-s.height()/2)/l:u=(a.x-s.width()/2)/h;let p,c;d=="vertical"?(p=u*l,c="y"):(p=u*h,c="x");let m=this.get("animationDuration",0);m>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:c,to:p,duration:m,easing:this.get("animationEasing")}))):(this.thumb._setC(c,p),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",n=>{if(!gt(n.originalEvent,this))return;let a=this.get("animationDuration",0),h=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:h}),this.animate({key:"end",to:1,duration:a,easing:h})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(s.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(s.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(s.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e._setC("x",0),t._setC("x",0),this._disposers.push(s.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",n=>this.width()/2)),this._disposers.push(e.adapters.add("x",n=>this.width()/2)),this._disposers.push(t.adapters.add("x",n=>this.width()/2)),this._disposers.push(e.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0))),this._disposers.push(t.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0)))):(e._setC("y",0),t._setC("y",0),this._disposers.push(s.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",n=>this.height()/2)),this._disposers.push(e.adapters.add("y",n=>this.height()/2)),this._disposers.push(t.adapters.add("y",n=>this.height()/2)),this._disposers.push(e.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))),this._disposers.push(t.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,s=this.get("orientation"),i=this.height(),n=this.width();s=="vertical"?(e._setC("y",i*this.get("start",0)),t._setC("y",i*this.get("end",1))):(e._setC("x",n*this.get("start",0)),t._setC("x",n*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),h=Math.round(this.get("start",0)*100),l=Math.round(this.get("end",0)*100),d,u;a?(d=a.call(this,this.get("start",0)),u=a.call(this,this.get("end",0),!0)):(d=h+"%",u=l+"%"),e._setC("ariaLabel",this._t("From %1",void 0,d)),e._setC("ariaValueNow",""+h),e._setC("ariaValueText",h+"%"),e._setC("ariaValueMin","0"),e._setC("ariaValueMax","100"),t._setC("ariaLabel",this._t("To %1",void 0,u)),t._setC("ariaValueNow",""+l),t._setC("ariaValueText",l+"%"),t._setC("ariaValueMin","0"),t._setC("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,i=this.height(),n=this.width(),a=t.x(),h=s.x(),l=t.y(),d=s.y(),u=0,p=1;this.get("orientation")=="vertical"?v(l)&&v(d)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("height",d-l),e._setC("y",l)),u=l/i,p=d/i):v(a)&&v(h)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("width",h-a),e._setC("x",a)),u=a/n,p=h/n),this.getPrivate("isBusy")&&(this.get("start")!=u||this.get("end")!=p)&&(this._setC("start",u),this._setC("end",p));let c=this.getPrivate("positionTextFunction"),m=Math.round(this.get("start",0)*100),C=Math.round(this.get("end",0)*100),_,g;c?(_=c.call(this,this.get("start",0)),g=c.call(this,this.get("end",0),!0)):(_=m+"%",g=C+"%"),e._setC("ariaLabel",this._t("From %1 to %2",void 0,_,g)),e._setC("ariaValueNow",""+m),e._setC("ariaValueText",m+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let i=e.height();t._setC("y",e.y()),s._setC("y",e.y()+i)}else{let i=e.width();t._setC("x",e.x()),s._setC("x",e.x()+i)}}};Q.className="Scrollbar";Q.classNames=z.classNames.concat([Q.className]);export{Nt as a,At as b,V as c,Mt as d,Pt as e,S as f,F as g,J as h,Q as i};
2
+ import{E as xt,F as at,K as q,P as z,R as rt,h as j}from"./EWM5PERI.js";import{A as K,I as pt,S as Y,V as mt,f as st,h as ft,r as gt,t as nt,x as I}from"./ELAKAKPE.js";import{a as X}from"./33LESQ6T.js";import{Q as ct,b as it,g as v,p as M,r as dt}from"./KZUUBMYO.js";var S=class extends at{_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),s=e/Math.abs(e),i=t/Math.abs(t),n=0,a=0,h=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*h,t-=i*h,n+=s*h/2,a+=i*h/2);let l=e,d=t;if(v(l)&&v(d)){let u=Math.min(l,d)/2,p=I(this.get("cornerRadiusTL",8),u),c=I(this.get("cornerRadiusTR",8),u),m=I(this.get("cornerRadiusBR",8),u),C=I(this.get("cornerRadiusBL",8),u),_=Math.min(Math.abs(l/2),Math.abs(d/2));p=j(p,0,_),c=j(c,0,_),m=j(m,0,_),C=j(C,0,_);let g=this._display;g.moveTo(n+p*s,a),g.lineTo(n+l-c*s,a),c>0&&g.arcTo(n+l,a,n+l,a+c*i,c),g.lineTo(n+l,a+d-m*i),m>0&&g.arcTo(n+l,a+d,n+l-m*s,a+d,m),g.lineTo(n+C*s,a+d),C>0&&g.arcTo(n,a+d,n,a+d-C*i,C),g.lineTo(n,a+p*i),p>0&&g.arcTo(n,a,n+p*s,a,p),g.closePath()}}};S.className="RoundedRectangle";S.classNames=at.classNames.concat([S.className]);var F=class extends z{_afterNew(){this._settings.themeTags=Y(this._settings.themeTags,["button"]),super._afterNew(),this._setDefaultTagged("background",Y(this._settings.themeTags,["background"]),()=>S.new(this._root,{})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};F.className="Button";F.classNames=z.classNames.concat([F.className]);function Nt(r,e,t,s){let i=[];return e&&e.fontVariant?i.push(e.fontVariant):r.fontVariant&&i.push(r.fontVariant),t||(e&&e.fontWeight?i.push(e.fontWeight):r.fontWeight&&i.push(r.fontWeight)),e&&e.fontStyle?i.push(e.fontStyle):r.fontStyle&&i.push(r.fontStyle),e&&e.fontSize?(e.fontSize=Z(e.fontSize),i.push(e.fontSize)):r.fontSize&&(r.fontSize=Z(r.fontSize),i.push(r.fontSize)),r.fontFamily=="inherit"?i.push(s()):e&&e.fontFamily?i.push(e.fontFamily):r.fontFamily?i.push(r.fontFamily):i.length&&i.push("Arial"),i.join(" ")}function Z(r){return v(r)||/^\s*\d*\.?\d+\s*$/.test(r)?parseFloat(r+"")+"px":r}function At(){return/apple/i.test(navigator.vendor)}function V(r,e,t){let s=e.measureText(r),i={};if(s.actualBoundingBoxAscent==null){let a=document.createElement("div");a.innerText=r,a.style.visibility="hidden",a.style.position="absolute",a.style.top="-1000000px;",a.style.fontFamily=t.fontFamily||"",a.style.fontSize=t.fontSize+"",document.body.appendChild(a);let h=a.getBoundingClientRect();document.body.removeChild(a);let l=h.height,d=s.width;i={actualBoundingBoxAscent:l,actualBoundingBoxDescent:0,actualBoundingBoxLeft:0,actualBoundingBoxRight:d,fontBoundingBoxAscent:l,fontBoundingBoxDescent:0,width:d}}else i={actualBoundingBoxAscent:s.actualBoundingBoxAscent,actualBoundingBoxDescent:s.actualBoundingBoxDescent,actualBoundingBoxLeft:s.actualBoundingBoxLeft,actualBoundingBoxRight:s.actualBoundingBoxRight,fontBoundingBoxAscent:s.actualBoundingBoxAscent,fontBoundingBoxDescent:s.actualBoundingBoxDescent,width:s.width};let n=s.width;switch(t.textAlign){case"right":case"end":i.actualBoundingBoxLeft=n,i.actualBoundingBoxRight=0;break;case"center":i.actualBoundingBoxLeft=n/2,i.actualBoundingBoxRight=n/2;break;default:i.actualBoundingBoxLeft=0,i.actualBoundingBoxRight=n}return i}function vt(r,e,t=!1){let s=r.maxWidth,i=t?void 0:r.maxHeight;if(!v(s)&&!v(i))return 1;let n=e.right-e.left,a=e.bottom-e.top;return Math.min(s/n||1,i/a||1)}function _t(r,e,t,s,i=!1,n=!0){let a;do{if(i)t=t.slice(0,-1);else{let l=t.replace(/(?:[^,;:!?\\\/\s​]|,(?=\d))+[,;:!?\\\/\s​]*$/g,"");if((l==""||l===t)&&n)i=!0;else{if(l=="")return t;t=l}}let h=V(t,r,e);a=h.actualBoundingBoxLeft+h.actualBoundingBoxRight}while(a>s&&t!="");return t}function Mt(r,e,t,s,i){let n=t.direction=="rtl";i.lines=[];let a=t.oversizedBehavior,h=t.maxWidth,l=v(h)&&a=="truncate",d=v(h)&&(a=="wrap"||a=="wrap-no-break"),u="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",p=e.toString().replace(/\r/g,"").split(/\n/),c=!0,m=0,C=0,_=0,g;M(p,(f,E)=>{let b;for(f==""?b=[{type:"value",text:""}]:b=q.chunk(f,!1,t.ignoreFormatting);b.length>0;){let o={offsetY:_,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},$=V(u,r,t),ht=$.actualBoundingBoxAscent+$.actualBoundingBoxDescent;o.height=ht,o.ascent=$.actualBoundingBoxAscent;let w,R=t.textDecoration,G,y,P=!1,D=!0,N=[],tt;dt(b,(T,lt)=>{if(T.type=="format")if(T.text=="[/]")c||(r.restore(),c=!0),G=void 0,g=void 0,y=void 0,R=t.textDecoration,tt=void 0,w=T.text;else{c||r.restore();let x=q.getTextStyle(T.text),A=s(x);r.save(),r.font=A,g=A,w=T.text,x.textDecoration&&(R=x.textDecoration),x.fill&&(G=x.fill),x.width&&(y=it(x.width)),x.verticalAlign&&(tt=x.verticalAlign),c=!1;let W=V(u,r,t),H=W.actualBoundingBoxAscent+W.actualBoundingBoxDescent;H>o.height&&(o.height=H),W.actualBoundingBoxAscent>o.ascent&&(o.ascent=W.actualBoundingBoxAscent)}else if(T.type=="value"&&!P){let x=V(T.text,r,t),A=x.actualBoundingBoxLeft+x.actualBoundingBoxRight;if(l){i.truncated=void 0;let k=D||t.breakWords||!1,L=t.ellipsis||"",O=V(L,r,t),ut=O.actualBoundingBoxLeft+O.actualBoundingBoxRight;if(o.width+A>h){let Bt=h-o.width-ut;T.text=_t(r,t,T.text,Bt,k),T.text+=L,P=!0,i.truncated=!0}}else if(d&&o.width+A>h){let k=h-o.width,L=_t(r,t,T.text,k,!1,D&&t.oversizedBehavior!="wrap-no-break");if(L=="")return i.textVisible=!0,!1;if(!D){let O=V(K(L),r,t);if(O.actualBoundingBoxLeft+O.actualBoundingBoxRight>k)return N=b.slice(lt),w&&N.unshift({type:"format",text:w}),b=[],!1}N=b.slice(lt+1),K(L)!=K(T.text)&&(N.unshift({type:"value",text:T.text.substr(L.length)}),w&&N.unshift({type:"format",text:w})),T.text=K(L),b=[],P=!0}let W=1,H=1;if(g&&y&&y>A){let k=A/y;switch(t.textAlign){case"right":case"end":W=k;break;case"center":W=k,H=k;break;default:H=k}A=y}let et=x.actualBoundingBoxAscent+x.actualBoundingBoxDescent;et>o.height&&(o.height=et),x.actualBoundingBoxAscent>o.ascent&&(o.ascent=x.actualBoundingBoxAscent),o.width+=A,o.left+=x.actualBoundingBoxLeft/W,o.right+=x.actualBoundingBoxRight/H,o.textChunks.push({style:g,fill:G,text:T.text,width:A,height:et,left:x.actualBoundingBoxLeft,right:x.actualBoundingBoxRight,ascent:x.actualBoundingBoxAscent,offsetX:0,offsetY:0,textDecoration:R,verticalAlign:tt}),D=!1}return!0}),t.lineHeight instanceof X?(o.height*=t.lineHeight.value,o.ascent*=t.lineHeight.value):(o.height*=t.lineHeight||1.2,o.ascent*=t.lineHeight||1.2),m<o.left&&(m=o.left),C<o.right&&(C=o.right),i.lines.push(o),_+=o.height,b=N||[]}}),c||r.restore(),M(i.lines,(f,E)=>{let b=0;M(f.textChunks,o=>{if(o.offsetX=b+o.left-f.left,o.offsetY+=f.height-f.height*(t.baselineRatio||.19),b+=o.width*(n?-1:1),o.verticalAlign)switch(o.verticalAlign){case"super":o.offsetY-=f.height/2-o.height/2;break;case"sub":o.offsetY+=o.height/2;break}})});let B={left:n?-C:-m,top:0,right:n?m:C,bottom:_};if(a!=="none"){let f=vt(t,B,a=="truncate");if(f<1)if(a=="fit")v(t.minScale)&&f<t.minScale?(i.textVisible=!1,B.left=0,B.top=0,B.right=0,B.bottom=0):(i.originalScale||(i.originalScale=i.scale),i.scale=f,i.textVisible=!0);else if(a=="hide")i.textVisible=!1,B.left=0,B.top=0,B.right=0,B.bottom=0;else{switch(t.textAlign){case"right":case"end":B.left=n?h:-h,B.right=0;break;case"center":B.left=-h/2,B.right=h/2;break;default:B.left=0,B.right=n?-h:h}i.scale=i.originalScale||1,i.originalScale=void 0,i.textVisible=!0}else i.scale=i.originalScale||1,i.originalScale=void 0,i.textVisible=!0}return B}function Pt(r,e,t,s,i){let n=t.direction=="rtl";i.textVisible=!0,i.lines=[];let a=t.oversizedBehavior,h=t.maxWidth,l=v(h)&&a=="truncate",d=t.ellipsis||"",u,p=e.toString().replace(/\r/g,"").split(/\n/),c=!0,m=0,C=0;return M(p,(_,g)=>{let B=q.chunk(_,!1,t.ignoreFormatting),f={offsetY:C,ascent:0,width:0,height:0,left:0,right:0,textChunks:[]},E,b,o;M(B,($,ht)=>{if($.type=="format"){if($.text=="[/]")c||(r.restore(),c=!0),b=void 0,E=void 0,o=void 0;else{let w=q.getTextStyle($.text),R=s(w);r.save(),r.font=R,E=R,w.fill&&(b=w.fill),w.width&&(o=it(w.width)),c=!1}l&&(u=V(d,r,t))}else if($.type=="value"){let w=$.text.match(/./ug)||[];n&&(w=pt($.text),w.reverse());for(let R=0;R<w.length;R++){let G=w[R],y=V(G,r,t),P=y.width;E&&o&&o>P&&(P=o);let D=y.actualBoundingBoxAscent+y.actualBoundingBoxDescent;if(D>f.height&&(f.height=D),y.actualBoundingBoxAscent>f.ascent&&(f.ascent=y.actualBoundingBoxAscent),m+=P,l){u||(u=V(d,r,t));let N=u.actualBoundingBoxLeft+u.actualBoundingBoxRight;if(m+N>h){f.textChunks.length==1?i.textVisible=!1:(f.width+=N,f.left+=u.actualBoundingBoxLeft,f.right+=u.actualBoundingBoxRight,f.textChunks.push({style:E,fill:b,text:d,width:N,height:D+u.actualBoundingBoxDescent,left:u.actualBoundingBoxLeft,right:u.actualBoundingBoxRight,ascent:u.actualBoundingBoxAscent,offsetX:0,offsetY:D,textDecoration:void 0}));break}}f.width+=P,f.left+=y.actualBoundingBoxLeft,f.right+=y.actualBoundingBoxRight,f.textChunks.push({style:E,fill:b,text:G,width:P,height:D+y.actualBoundingBoxDescent,left:y.actualBoundingBoxLeft,right:y.actualBoundingBoxRight,ascent:y.actualBoundingBoxAscent,offsetX:0,offsetY:D,textDecoration:void 0})}}}),t.lineHeight instanceof X?f.height*=t.lineHeight.value:f.height*=t.lineHeight||1.2,i.lines.push(f),C+=f.height}),c||r.restore(),a=="hide"&&m>h&&(i.textVisible=!1),M(i.lines,_=>{M(_.textChunks,g=>{g.offsetY+=Math.round((_.height-g.height+(_.ascent-g.ascent))/2)})}),{left:0,top:0,right:0,bottom:0}}var J=class extends rt{_afterNew(){super._afterNew();let e=this.children.push(z.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e),this._setDefaultTagged("background",["editablelabel","background"],()=>S.new(this._root,{}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new ct([this.getPrivate("input").events.on(e,t=>{}),this.events.on(e,t=>{this.set("active",!0)})]))}}_prepareChildren(){super._prepareChildren(),this._maybeInitTextarea()}_updateChildren(){if(super._updateChildren(),this.isDirty("active")){let e=this.get("active",!1);e?this._startEditing():this._stopEditing();let t=this.get("background");t&&t.set("active",e)}this._syncText(),this._syncStyle()}_maybeInitTextarea(){if(!this._isInited()){let e=this.getPrivate("input");if(e&&e.getPrivate("htmlElement")){let s=e.getPrivate("htmlElement").querySelector(".am5-editable-label");s&&(this.setPrivate("textarea",s),s.addEventListener("input",i=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",i=>this.set("active",!1)),ft("keyboardevents")&&this._disposers.push(st(s,"keydown",i=>{nt(i)=="Escape"&&this.set("active",!1)})),this._disposers.push(st(s,"keydown",i=>{nt(i)=="Enter"&&this.get("multiLine")===!1&&(i.preventDefault(),this.set("active",!1))})),this.events.dispatch("inited",{type:"inited",target:this}))}}}_isInited(){return!!this.getPrivate("textarea")}_startEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._startEditing()});return}this._text.set("opacity",0);let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.get("text","")==""&&this.set("text"," "),e.show(0),this.setTimeout(()=>{this._syncStyle(),t.focus()},100))}_stopEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._stopEditing()});return}let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.set("text",t.value),e.hide(0),this._text.set("opacity",1))}_syncStyle(){let e=this.getPrivate("input"),t=this.getPrivate("textarea"),s=e.getPrivate("htmlElement");if(t&&s){let i=window.getComputedStyle(t);M(i,c=>{t.style[c]="initial"}),t.style.color=this.get("fill",mt(0)).toCSS(this.get("fillOpacity",1)),t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="none",t.style.outline="none",t.style.padding="0",t.wrap="off",t.style.resize="none",t.style.overflow="hidden";let n=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);n>0?t.style.maxWidth=n+"px":t.style.minWidth="",t.style.height="auto",t.style.minHeight=t.scrollHeight+"px",this.get("width")&&(t.style.width=this.width()-this.get("paddingLeft",0)-this.get("paddingRight",0)+"px",t.style.minWidth="");let a=this.get("lineHeight");a?a instanceof X?t.style.lineHeight=a.value+"":v(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let h=this.get("fontFamily");h||(h=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=h;let l=this.get("fontSize");l?l=Z(l):l=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=l;let d=this.get("fontWeight");d?d=d:d=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=d;let u=this.get("fontStyle");u?u=u:u=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=u,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._frameDp||(this._frameDp=this.addDisposer(this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let c=this.get("textAlign","start");c=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):c=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=c})))}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};J.className="EditableLabel";J.classNames=rt.classNames.concat([J.className]);var Q=class extends z{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=Y(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._setDefaultTagged("background",Y(this._settings.themeTags,["main","background"]),()=>S.new(this._root,{}))}_makeButton(){return this.children.push(F.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:xt.new(this._root,{themeTags:["icon"]})._markC("themeTags")})._markC("themeTags","icon"))}_makeThumb(){return this.children.push(S.new(this._root,{themeTags:["thumb",this.get("orientation")]})._markC("themeTags"))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,s=this.thumb,i=this.get("background");i&&this._disposers.push(i.events.on("click",n=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(n.point),h=this.width(),l=this.height(),d=this.get("orientation"),u;d=="vertical"?u=(a.y-s.height()/2)/l:u=(a.x-s.width()/2)/h;let p,c;d=="vertical"?(p=u*l,c="y"):(p=u*h,c="x");let m=this.get("animationDuration",0);m>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:c,to:p,duration:m,easing:this.get("animationEasing")}))):(this.thumb._setC(c,p),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",n=>{if(!gt(n.originalEvent,this))return;let a=this.get("animationDuration",0),h=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:h}),this.animate({key:"end",to:1,duration:a,easing:h})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(s.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(s.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(s.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e._setC("x",0),t._setC("x",0),this._disposers.push(s.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",n=>this.width()/2)),this._disposers.push(e.adapters.add("x",n=>this.width()/2)),this._disposers.push(t.adapters.add("x",n=>this.width()/2)),this._disposers.push(e.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0))),this._disposers.push(t.adapters.add("y",n=>Math.max(Math.min(Number(n),this.height()),0)))):(e._setC("y",0),t._setC("y",0),this._disposers.push(s.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",n=>this.height()/2)),this._disposers.push(e.adapters.add("y",n=>this.height()/2)),this._disposers.push(t.adapters.add("y",n=>this.height()/2)),this._disposers.push(e.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))),this._disposers.push(t.adapters.add("x",n=>Math.max(Math.min(Number(n),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,s=this.get("orientation"),i=this.height(),n=this.width();s=="vertical"?(e._setC("y",i*this.get("start",0)),t._setC("y",i*this.get("end",1))):(e._setC("x",n*this.get("start",0)),t._setC("x",n*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),h=Math.round(this.get("start",0)*100),l=Math.round(this.get("end",0)*100),d,u;a?(d=a.call(this,this.get("start",0)),u=a.call(this,this.get("end",0),!0)):(d=h+"%",u=l+"%"),e._setC("ariaLabel",this._t("From %1",void 0,d)),e._setC("ariaValueNow",""+h),e._setC("ariaValueText",h+"%"),e._setC("ariaValueMin","0"),e._setC("ariaValueMax","100"),t._setC("ariaLabel",this._t("To %1",void 0,u)),t._setC("ariaValueNow",""+l),t._setC("ariaValueText",l+"%"),t._setC("ariaValueMin","0"),t._setC("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,i=this.height(),n=this.width(),a=t.x(),h=s.x(),l=t.y(),d=s.y(),u=0,p=1;this.get("orientation")=="vertical"?v(l)&&v(d)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("height",d-l),e._setC("y",l)),u=l/i,p=d/i):v(a)&&v(h)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("width",h-a),e._setC("x",a)),u=a/n,p=h/n),this.getPrivate("isBusy")&&(this.get("start")!=u||this.get("end")!=p)&&(this._setC("start",u),this._setC("end",p));let c=this.getPrivate("positionTextFunction"),m=Math.round(this.get("start",0)*100),C=Math.round(this.get("end",0)*100),_,g;c?(_=c.call(this,this.get("start",0)),g=c.call(this,this.get("end",0),!0)):(_=m+"%",g=C+"%"),e._setC("ariaLabel",this._t("From %1 to %2",void 0,_,g)),e._setC("ariaValueNow",""+m),e._setC("ariaValueText",m+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let i=e.height();t._setC("y",e.y()),s._setC("y",e.y()+i)}else{let i=e.width();t._setC("x",e.x()),s._setC("x",e.x()+i)}}};Q.className="Scrollbar";Q.classNames=z.classNames.concat([Q.className]);export{Nt as a,At as b,V as c,Mt as d,Pt as e,S as f,F as g,J as h,Q as i};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as M}from"./UZLEFNJL.js";import e from"./F4AJCUZ6.js";import"./WJQUE4DR.js";import d from"./OISNNHIG.js";import{a as U}from"./7465ANAR.js";import{a as C}from"./L5IRXOCJ.js";import c from"./KRJCOTGC.js";import b from"./U7WRQCRV.js";import{h as E}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import a from"./SBYVR52H.js";import{a as f}from"./LXME6MU5.js";import{P as z,Q as A,R as H,T as m,U as L,X as O,_ as k,a as R,b as v,x as w}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([j,y,I,{property:g,subclass:B},{watch:$},,,,K,{a:S,c:V,d:x}])=>{var X=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,h=(t,i,e,r)=>{for(var a=r>1?void 0:r?Y(i,e):i,s=t.length-1,o;s>=0;s--)(o=t[s])&&(a=(r?o(i,e,a):o(a))||a);return r&&a&&X(i,e,a),a},_={left:0,right:0,top:0,bottom:0},D={leading:Symbol("leading-clips"),trailing:Symbol("trailing-clips")};function T(t){return"clips"in t}function F(t,i){let e=10**i;return Math.round(t*e)/e}var l=class extends j{constructor(t){super(t),this._leadingClips=new Map,this._trailingClips=new Map,this.direction="horizontal",this.max=100,this.min=0,this.precision=4,this.step=.5,this.stepMultiplier=10,this.leadingLayers=new y,this.trailingLayers=new y}initialize(){this.addHandles([$(()=>[this.view,this.view?.ready,this.position,this.direction],()=>this._clipLayers(),{initial:!0}),$(()=>this.leadingLayers.toArray(),()=>this._clipLeadingLayers(),{initial:!0}),$(()=>this.trailingLayers.toArray(),()=>this._clipTrailingLayers(),{initial:!0})])}destroy(){this._removeExistingClips()}get leadingLayers(){return this._get("leadingLayers")}set leadingLayers(t){this._set("leadingLayers",t instanceof y?t:new y(t))}get position(){return 25}set position(t){let{precision:i,min:e,max:r}=this;this._set("position",F(Math.max(Math.min(t,r),e),i))}get state(){return this.view?.ready?"ready":"disabled"}get trailingLayers(){return this._get("trailingLayers")}set trailingLayers(t){this._set("trailingLayers",t instanceof y?t:new y(t))}_clipLayers(){this._clipLeadingLayers(),this._clipTrailingLayers()}_clipLeadingLayers(){this._removeClips("leading");let{leadingLayers:t}=this;t.forEach(i=>{this.addHandles(x(e=>this._clipLayer({layer:i,type:"leading"},e)),D.leading)})}_clipTrailingLayers(){this._removeClips("trailing");let{trailingLayers:t}=this;t.forEach(i=>{this.addHandles(x(e=>this._clipLayer({layer:i,type:"trailing"},e)),D.trailing)})}async _getLayerView(t){let{view:i}=this;if(!t||!i)return null;let e=await i.whenLayerView(t);return T(e)?e:null}_getVerticalClipRect(t){let{position:i}=this;return t==="leading"?{type:"rect",..._,bottom:`${100-i}%`}:t==="trailing"?{type:"rect",..._,top:`${i}%`}:null}_getHorizontalClipRect(t){let{position:i}=this;return t==="leading"?{type:"rect",..._,right:`${100-i}%`}:t==="trailing"?{type:"rect",..._,left:`${i}%`}:null}_getClipRect(t){let{direction:i}=this;return i==="vertical"?this._getVerticalClipRect(t):i==="horizontal"?this._getHorizontalClipRect(t):null}async _clipLayer(t,i){let{_leadingClips:e,_trailingClips:r,view:a}=this,{layer:s,type:o}=t,c=o==="trailing"?r:o==="leading"?e:null;try{let n=await this._getLayerView(s);if(i.aborted||this.destroyed||a!==this.view||!n||!c||!(o==="leading"?this.leadingLayers:this.trailingLayers).includes(s))return;let d=c.get(n);d&&n.clips.remove(d);let p=this._getClipRect(o);if(p){let b=n.clips.length;n.clips.add(p);let u=n.clips.at(b);u&&c.set(n,u)}}catch(n){if(i.aborted||V(n)||n instanceof I&&n.name==="view:no-layerview-for-layer")return;S(n,this.declaredClass,"Failed to clip layer")}}_removeClips(t){this.removeHandles(D[t]);let{_leadingClips:i,_trailingClips:e}=this,r=t==="trailing"?e:t==="leading"?i:null;r&&(r.forEach((a,s)=>{T(s)&&s.clips.remove(a)}),r.clear())}_removeExistingClips(){this._removeClips("leading"),this._removeClips("trailing")}};h([g()],l.prototype,"direction",2);h([g()],l.prototype,"leadingLayers",1);h([g({readOnly:!0})],l.prototype,"max",2);h([g({readOnly:!0})],l.prototype,"min",2);h([g()],l.prototype,"position",1);h([g()],l.prototype,"precision",2);h([g({readOnly:!0})],l.prototype,"state",1);h([g()],l.prototype,"step",2);h([g()],l.prototype,"stepMultiplier",2);h([g()],l.prototype,"trailingLayers",1);h([g()],l.prototype,"view",2);l=h([B("map-components.swipe.SwipeViewModel")],l);var N=R`:host{position:absolute;margin:0;background:transparent!important;padding:0;width:100%;height:100%;overflow:hidden;user-select:none;--arcgis-internal-swipe-handle-color-background: var(--calcite-color-background);--arcgis-internal-swipe-divider-color-background: var(--calcite-color-background)}.root{width:100%;height:100%;overflow:hidden;user-select:none}.root,.arcgis-ui .root{pointer-events:none!important}.container{position:absolute;z-index:1;margin:0;outline:0;border:0;padding:0;overflow:hidden;pointer-events:auto;touch-action:none;outline-color:transparent}.horizontal .container{margin-left:calc(var(--calcite-spacing-xxxl) / 2 * -1);cursor:col-resize;height:100%}.vertical .container{margin-top:calc(var(--calcite-spacing-xxxl) / 2 * -1);cursor:row-resize;width:100%}.disabled .container{cursor:default;pointer-events:none}.divider{position:absolute;background-color:var(--arcgis-internal-swipe-divider-color-background)}.horizontal .divider{top:0;left:calc(var(--calcite-spacing-xxxl) / 2);margin-left:calc(var(--calcite-border-width-lg) * .5 * -1);border-right:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);border-left:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);width:var(--calcite-border-width-lg);height:100%}.vertical .divider{top:calc(var(--calcite-spacing-xxxl) / 2);left:0;margin-top:calc(var(--calcite-border-width-lg) * .5 * -1);border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);width:100%;height:var(--calcite-border-width-lg)}.handle{display:flex;position:relative;align-items:center;justify-content:center;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);border-radius:var(--calcite-corner-radius-round);background-color:var(--arcgis-internal-swipe-handle-color-background);width:var(--calcite-spacing-xxxl);height:var(--calcite-spacing-xxxl);color:var(--calcite-color-text-3)}.handle-hidden{visibility:hidden}.vertical .handle{rotate:90deg}.handle-icon{position:relative;z-index:2}.handle-icon:before{content:"|||";color:inherit}.horizontal .handle{top:calc(50% - calc(var(--calcite-spacing-xxxl) / 2))}.vertical .handle{left:calc(50% - calc(var(--calcite-spacing-xxxl) / 2))}.container:focus .handle,.container:focus .divider{outline:inset 2px var(--calcite-color-focus, var(--calcite-color-focus, var(--calcite-color-brand)))}.container:focus .handle{outline-offset:calc(-2px*(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}`,W=K(l),P=class extends H{constructor(){super(...arguments),this._containerRef=z(),this._swiping=!1,this._positionChanged=!1,this.messages=U({}),this._pointerOffset=0,this.viewModel=W(this),this._onContainerPointerDown=i=>{i.preventDefault();let e=this._containerRef.value;e&&document.activeElement!==this.el&&e.focus(),this._swiping=!0,this._calculatePointerOffset(i)},this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.direction=this.viewModel.direction,this.disabled=!1,this.hideDivider=!1,this.hideHandle=!1,this.icon="compare",this.label=this.messages.componentLabel,this.position=this.viewModel.position,this.state=this.viewModel.state,this.arcgisPropertyChange=E()("state"),this.arcgisReady=w(),this.arcgisSwipeChange=w(),this.arcgisSwipeInput=w()}static{this.properties={view:0,autoDestroyDisabled:5,direction:3,disabled:7,endLayers:0,hideDivider:7,hideHandle:7,icon:1,label:1,leadingLayers:0,messageOverrides:0,position:9,startLayers:0,swipePosition:9,referenceElement:1,state:32,trailingLayers:0}}static{this.styles=N}get endLayers(){return this.viewModel.trailingLayers}set endLayers(i){this.viewModel.trailingLayers=i}get leadingLayers(){return this.startLayers}set leadingLayers(i){this.startLayers=i}get startLayers(){return this.viewModel.leadingLayers}set startLayers(i){this.viewModel.leadingLayers=i}get swipePosition(){return this.position}set swipePosition(i){this.position=i}get trailingLayers(){return this.endLayers}set trailingLayers(i){this.endLayers=i}async destroy(){await this.manager.destroy()}loaded(){this.listenOn(document,"pointermove",this._onContainerPointerMove),this.listenOn(document,"pointerup",this._onContainerPointerUp)}_calculatePointerOffset(i){let{direction:e}=this,r=this._containerRef.value,a=(e==="vertical"?r.clientHeight:r.clientWidth)/2,s=r.getBoundingClientRect(),o=i.clientX-s.left,c=i.clientY-s.top;this._pointerOffset=e==="vertical"?c-a:o-a}_onContainerPointerUp(i){this._swiping&&(i.preventDefault(),this._positionChanged&&(this.arcgisSwipeChange.emit(),this._positionChanged=!1),this._swiping=!1)}_onContainerPointerMove(i){if(!this._swiping)return;i.preventDefault();let{_pointerOffset:e,el:r,direction:a}=this,{clientX:s,clientY:o}=i,{top:c,left:n,width:d,height:p}=r.getBoundingClientRect(),b=a==="vertical"?p:d,u=(a==="vertical"?o-c-e:s-n-e)/b*100;this.position!==u&&(this.position=u,this._positionChanged=!0,this.arcgisSwipeInput.emit())}_getKeyPosition(i){let{key:e}=i,{position:r}=this,{max:a,min:s,step:o,stepMultiplier:c,direction:n}=this.viewModel,d=o*c;if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].includes(e)&&(i.preventDefault(),i.stopPropagation()),n==="vertical"?e==="ArrowDown"||e==="ArrowRight":e==="ArrowUp"||e==="ArrowRight"){let p=i.shiftKey?d:o;return r+p}if(n==="vertical"?e==="ArrowUp"||e==="ArrowLeft":e==="ArrowDown"||e==="ArrowLeft"){let p=i.shiftKey?d:o;return r-p}return e==="Home"?s:e==="End"?a:(n==="vertical"?e==="PageDown":e==="PageUp")?r+d:(n==="vertical"?e==="PageUp":e==="PageDown")?r-d:null}_onContainerKeyDown(i){let e=this._getKeyPosition(i);typeof e=="number"&&this.position!==e&&(this.position=e,this.arcgisSwipeInput.emit(),this.arcgisSwipeChange.emit())}render(){let{state:i,direction:e}=this.viewModel,r=i==="disabled"||this.disabled,a={[C.disabled]:r,disabled:r,vertical:e==="vertical",horizontal:e==="horizontal"};return v`<div class=${m(f("root",C.widget,a))}>${i==="disabled"?null:this._renderContainer()}</div>`}_renderHandle(){let{direction:i}=this.viewModel,{hideHandle:e}=this,r={[M.dragHorizontal]:i==="vertical",[M.dragVertical]:i==="horizontal"},a=f("handle",!!e&&"handle-hidden");return v`<div class=${m(a)} role=presentation><span aria-hidden=true class=${m(f("handle-icon",r))}></span></div>`}_renderDivider(){return this.hideDivider?null:v`<div class="divider" role=presentation></div>`}_renderContent(){return[this._renderDivider(),this._renderHandle()]}_renderContainer(){let{disabled:i,viewModel:e}=this,{max:r,min:a,direction:s,position:o}=e,c=this.label??this.messages.dragLabel??"",n=`${o}%`,d={top:s==="vertical"?n:void 0,left:s==="vertical"?void 0:n},p=this._renderContent();return i?v`<div class="container" role=presentation style=${L(d)}>${p}</div>`:v`<div @pointerdown=${this._onContainerPointerDown} .ariaLabel=${c} .ariaOrientation=${s} .ariaValueMax=${`${r}`} .ariaValueMin=${`${a}`} .ariaValueNow=${`${o}`} .ariaValueText=${n} class="container" @keydown=${this._onContainerKeyDown} role=slider style=${L(d)} tabindex=0 title=${c??O} touch-action=none ${A(this._containerRef)}>${p}</div>`}};k("arcgis-swipe",P);return P},"core/Accessor","core/Collection","core/Error","core/accessorSupport/decorators","core/reactiveUtils",a,b,c,d,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{b as x,c as y}from"./BK2UM27Y.js";import c from"./LH2T4TMP.js";import{b as $}from"./ZGOAZB5L.js";import"./GDLDEHUJ.js";import{a as b}from"./7465ANAR.js";import"./GIBXI44G.js";import"./RQT2PVDJ.js";import"./LXME6MU5.js";import{Q as u,R as v,U as f,X as s,_ as w,a as g,b as a,x as d}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{downloadBlobAsFile:D},{watch:o},{getAttachmentFilenameParts:O},{b:_}])=>{var E={primary:"Exif IFD0"},I={primary:{description:"Image Description"}};function k(l){if(l.exifInfo?.length)return l.exifInfo.find(({name:t})=>t===E.primary)?.tags?.find(({name:t})=>t===I.primary.description)?.value}var N=g`.container{display:flex;flex-direction:column;gap:var(--calcite-space-md)}.button-group{display:flex;flex-wrap:wrap;flex-direction:row;gap:var(--calcite-space-xs)}@media(forced-colors:active){calcite-label{font-weight:var(--calcite-font-weight-bold)}}.metadata-content{word-break:break-word;word-wrap:break-word;line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-regular);font-style:normal}.preview-placeholder{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);box-sizing:border-box;border-radius:var(--calcite-corner-radius-sm);background-color:var(--calcite-color-surface-2)}`,m=class extends v{constructor(){super(...arguments),this.#t=new x,this.#e=new ResizeObserver(([t])=>{if(!t||this.dialogOpen)return;let{height:i,width:e}=t.contentRect;if(i===0||e===0)return;let n=this._attachmentPreviewDimensions;(n?.height!==i||n.width!==e)&&(this._attachmentPreviewDimensions={height:i,width:e})}),this._messages=b({blocking:!0,name:"feature-form-next"}),this._hasPreviewError=!1,this.formDisabled=!1,this.dialogOpen=!1,this.arcgisInternalAttachmentRename=d(),this.arcgisInternalAttachmentReplaceStart=d()}static{this.properties={_hasPreviewError:16,_formattedSize:16,_imageDescription:16,_localizedType:16,_attachmentPreviewDimensions:16,attachment:0,input:0,messageOverrides:0,formDisabled:5,dialogOpen:5}}static{this.styles=N}#t;#e;#i;get _canMaximize(){let t=this.attachment?.contentType;return!!t&&(t.startsWith("video")||t.startsWith("audio")||t.startsWith("image"))}get _maximizeDisabled(){return!this.input||this._hasPreviewError}get _ownMessages(){return this._messages.components.attachments["attachment-detail-view"]}loaded(){this.manager.onLifecycle(()=>[o(()=>this.attachment?.url,()=>this._hasPreviewError=!1),o(()=>this.attachment?k(this.attachment):void 0,t=>this._imageDescription=t,{initial:!0}),o(()=>({messageOverrides:this.messageOverrides,size:this.attachment?.size}),({size:t})=>this._formattedSize=t==null?void 0:_(this._messages.units,t),{initial:!0}),o(()=>({contentType:this.attachment?.contentType,messageOverrides:this.messageOverrides}),({contentType:t})=>this._localizedType=t?this._messages.components.attachments.thumbnail.fileTypes[$(t)]:void 0,{initial:!0})])}willUpdate(t){t.has("dialogOpen")&&this.#t.moveAllToCache()}#a(){this.dialogOpen=!0}async#n(){let t=this.attachment;if(!t?.url)return;let i=await(await fetch(t.url)).blob();D(i,t.name)}#s(){this.arcgisInternalAttachmentReplaceStart.emit()}#r(){this.dialogOpen=!1}#c(t){this.attachment&&this.arcgisInternalAttachmentRename.emit({name:t})}#o(){this._hasPreviewError=!0}#l(t){this.#i&&this.#e.unobserve(this.#i),this.#i=t,t&&this.#e.observe(t)}_resetName(){if(!this.input||!this.attachment)return;let t=this.input.getAttachmentEditState(this.attachment).initialName;t!=null&&this.arcgisInternalAttachmentRename.emit({name:t})}render(){let{attachment:t,input:i,_ownMessages:e,_formattedSize:n,_imageDescription:r,_localizedType:c}=this,h=t&&i?.getAttachmentEditState(t).isReplaced;return a`<div class="container" data-testid=attachment-detail-view-root>${this._renderInlineAttachmentPreview()}<div class="button-group">${this._canMaximize?a`<calcite-button icon-start=expand kind=neutral appearance=outline .disabled=${this._maximizeDisabled} @click=${this.#a} title=${e.maximize??s} .label=${e.maximize}></calcite-button>`:void 0}${h?void 0:a`<calcite-button icon-start=download kind=neutral @click=${this.#n} appearance=outline .disabled=${!t||!i} title=${e.download??s} .label=${e.download}></calcite-button>`}<calcite-button icon-start=upload-to @click=${this.#s} kind=neutral appearance=outline .disabled=${this.formDisabled||!this.input?.canUploadFiles} title=${e.replace??s} .label=${e.replace}></calcite-button></div><div>${r?this._renderMetadataPlain(e.imageDescription,r):void 0}${i?.allowUserRename?this._renderNameEntry():this._renderMetadataPlain(e.fileName,t?.name??"")}${n!==void 0?this._renderMetadataPlain(e.size,n):void 0}${c!==void 0?this._renderMetadataPlain(e.type,c):void 0}</div><calcite-dialog data-testid=attachment-dialog .heading=${this.attachment?.name} .open=${this.dialogOpen} modal placement=cover @calciteDialogClose=${this.#r}>${this.dialogOpen?this._renderAttachmentPreview():void 0}</calcite-dialog></div>`}_renderInlineAttachmentPreview(){if(!this.dialogOpen)return a`<div ${u(this.#l)}>${this._renderAttachmentPreview()}</div>`;let t=this._attachmentPreviewDimensions;return t?a`<div class="preview-placeholder" style=${f({height:`${t.height}px`,width:`${t.width}px`})}></div>`:void 0}_renderAttachmentPreview(){return y(this.#t,this,a`<arcgis-attachment-preview data-testid=attachment-preview .attachment=${this.attachment} .input=${this.input} .messageOverrides=${this._messages} @arcgisInternalAttachmentMediaError=${this.#o}></arcgis-attachment-preview>`)}_renderMetadataPlain(t,i){return a`<calcite-label>${t}<div class="metadata-content">${i}</div></calcite-label>`}_renderNameEntry(){let{attachment:t,input:i,_ownMessages:e,formDisabled:n}=this;if(!t||!i)return"";let{initialName:r,isRenamed:c}=i.getAttachmentEditState(t),{baseName:h,extension:z}=O(t.name??""),P=n||r==null||!c,p=!n&&t.name.trim().length===0;return a`<calcite-label>${e.fileName}<calcite-input .disabled=${n} type=text .label=${e.fileName} data-testid=file-name-input .status=${p?"invalid":"idle"} .value=${h} .suffixText=${z} alignment=start @calciteInputInput=${({currentTarget:A})=>this.#c(A.value)}><calcite-action icon=reset slot=action .disabled=${P} data-testid=reset-name-button @click=${this._resetName} title=${e.reset??s} .text=${e.reset}></calcite-action></calcite-input>${p?a`<calcite-input-message icon status=invalid>${e.nameCannotBeNull}</calcite-input-message>`:void 0}</calcite-label>`}};w("arcgis-attachment-detail-view",m);return m},"core/urlUtils","core/reactiveUtils","widgets/BatchAttributeForm/attachmentUtils",c)
2
+ import{b as x,c as y}from"./BK2UM27Y.js";import c from"./LH2T4TMP.js";import{b as $}from"./ZPA5JUPD.js";import"./GDLDEHUJ.js";import{a as b}from"./7465ANAR.js";import"./GIBXI44G.js";import"./RQT2PVDJ.js";import"./LXME6MU5.js";import{Q as u,R as v,U as f,X as s,_ as w,a as g,b as a,x as d}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{downloadBlobAsFile:D},{watch:o},{getAttachmentFilenameParts:O},{b:_}])=>{var E={primary:"Exif IFD0"},I={primary:{description:"Image Description"}};function k(l){if(l.exifInfo?.length)return l.exifInfo.find(({name:t})=>t===E.primary)?.tags?.find(({name:t})=>t===I.primary.description)?.value}var N=g`.container{display:flex;flex-direction:column;gap:var(--calcite-space-md)}.button-group{display:flex;flex-wrap:wrap;flex-direction:row;gap:var(--calcite-space-xs)}@media(forced-colors:active){calcite-label{font-weight:var(--calcite-font-weight-bold)}}.metadata-content{word-break:break-word;word-wrap:break-word;line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-regular);font-style:normal}.preview-placeholder{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);box-sizing:border-box;border-radius:var(--calcite-corner-radius-sm);background-color:var(--calcite-color-surface-2)}`,m=class extends v{constructor(){super(...arguments),this.#t=new x,this.#e=new ResizeObserver(([t])=>{if(!t||this.dialogOpen)return;let{height:i,width:e}=t.contentRect;if(i===0||e===0)return;let n=this._attachmentPreviewDimensions;(n?.height!==i||n.width!==e)&&(this._attachmentPreviewDimensions={height:i,width:e})}),this._messages=b({blocking:!0,name:"feature-form-next"}),this._hasPreviewError=!1,this.formDisabled=!1,this.dialogOpen=!1,this.arcgisInternalAttachmentRename=d(),this.arcgisInternalAttachmentReplaceStart=d()}static{this.properties={_hasPreviewError:16,_formattedSize:16,_imageDescription:16,_localizedType:16,_attachmentPreviewDimensions:16,attachment:0,input:0,messageOverrides:0,formDisabled:5,dialogOpen:5}}static{this.styles=N}#t;#e;#i;get _canMaximize(){let t=this.attachment?.contentType;return!!t&&(t.startsWith("video")||t.startsWith("audio")||t.startsWith("image"))}get _maximizeDisabled(){return!this.input||this._hasPreviewError}get _ownMessages(){return this._messages.components.attachments["attachment-detail-view"]}loaded(){this.manager.onLifecycle(()=>[o(()=>this.attachment?.url,()=>this._hasPreviewError=!1),o(()=>this.attachment?k(this.attachment):void 0,t=>this._imageDescription=t,{initial:!0}),o(()=>({messageOverrides:this.messageOverrides,size:this.attachment?.size}),({size:t})=>this._formattedSize=t==null?void 0:_(this._messages.units,t),{initial:!0}),o(()=>({contentType:this.attachment?.contentType,messageOverrides:this.messageOverrides}),({contentType:t})=>this._localizedType=t?this._messages.components.attachments.thumbnail.fileTypes[$(t)]:void 0,{initial:!0})])}willUpdate(t){t.has("dialogOpen")&&this.#t.moveAllToCache()}#a(){this.dialogOpen=!0}async#n(){let t=this.attachment;if(!t?.url)return;let i=await(await fetch(t.url)).blob();D(i,t.name)}#s(){this.arcgisInternalAttachmentReplaceStart.emit()}#r(){this.dialogOpen=!1}#c(t){this.attachment&&this.arcgisInternalAttachmentRename.emit({name:t})}#o(){this._hasPreviewError=!0}#l(t){this.#i&&this.#e.unobserve(this.#i),this.#i=t,t&&this.#e.observe(t)}_resetName(){if(!this.input||!this.attachment)return;let t=this.input.getAttachmentEditState(this.attachment).initialName;t!=null&&this.arcgisInternalAttachmentRename.emit({name:t})}render(){let{attachment:t,input:i,_ownMessages:e,_formattedSize:n,_imageDescription:r,_localizedType:c}=this,h=t&&i?.getAttachmentEditState(t).isReplaced;return a`<div class="container" data-testid=attachment-detail-view-root>${this._renderInlineAttachmentPreview()}<div class="button-group">${this._canMaximize?a`<calcite-button icon-start=expand kind=neutral appearance=outline .disabled=${this._maximizeDisabled} @click=${this.#a} title=${e.maximize??s} .label=${e.maximize}></calcite-button>`:void 0}${h?void 0:a`<calcite-button icon-start=download kind=neutral @click=${this.#n} appearance=outline .disabled=${!t||!i} title=${e.download??s} .label=${e.download}></calcite-button>`}<calcite-button icon-start=upload-to @click=${this.#s} kind=neutral appearance=outline .disabled=${this.formDisabled||!this.input?.canUploadFiles} title=${e.replace??s} .label=${e.replace}></calcite-button></div><div>${r?this._renderMetadataPlain(e.imageDescription,r):void 0}${i?.allowUserRename?this._renderNameEntry():this._renderMetadataPlain(e.fileName,t?.name??"")}${n!==void 0?this._renderMetadataPlain(e.size,n):void 0}${c!==void 0?this._renderMetadataPlain(e.type,c):void 0}</div><calcite-dialog data-testid=attachment-dialog .heading=${this.attachment?.name} .open=${this.dialogOpen} modal placement=cover @calciteDialogClose=${this.#r}>${this.dialogOpen?this._renderAttachmentPreview():void 0}</calcite-dialog></div>`}_renderInlineAttachmentPreview(){if(!this.dialogOpen)return a`<div ${u(this.#l)}>${this._renderAttachmentPreview()}</div>`;let t=this._attachmentPreviewDimensions;return t?a`<div class="preview-placeholder" style=${f({height:`${t.height}px`,width:`${t.width}px`})}></div>`:void 0}_renderAttachmentPreview(){return y(this.#t,this,a`<arcgis-attachment-preview data-testid=attachment-preview .attachment=${this.attachment} .input=${this.input} .messageOverrides=${this._messages} @arcgisInternalAttachmentMediaError=${this.#o}></arcgis-attachment-preview>`)}_renderMetadataPlain(t,i){return a`<calcite-label>${t}<div class="metadata-content">${i}</div></calcite-label>`}_renderNameEntry(){let{attachment:t,input:i,_ownMessages:e,formDisabled:n}=this;if(!t||!i)return"";let{initialName:r,isRenamed:c}=i.getAttachmentEditState(t),{baseName:h,extension:z}=O(t.name??""),P=n||r==null||!c,p=!n&&t.name.trim().length===0;return a`<calcite-label>${e.fileName}<calcite-input .disabled=${n} type=text .label=${e.fileName} data-testid=file-name-input .status=${p?"invalid":"idle"} .value=${h} .suffixText=${z} alignment=start @calciteInputInput=${({currentTarget:A})=>this.#c(A.value)}><calcite-action icon=reset slot=action .disabled=${P} data-testid=reset-name-button @click=${this._resetName} title=${e.reset??s} .text=${e.reset}></calcite-action></calcite-input>${p?a`<calcite-input-message icon status=invalid>${e.nameCannotBeNull}</calcite-input-message>`:void 0}</calcite-label>`}};w("arcgis-attachment-detail-view",m);return m},"core/urlUtils","core/reactiveUtils","widgets/BatchAttributeForm/attachmentUtils",c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{i as m}from"./EVJFKABL.js";import"./WV2GLDRQ.js";import"./4CLSMFD2.js";import{v as p}from"./EWM5PERI.js";import"./ELAKAKPE.js";import"./33LESQ6T.js";import"./KZUUBMYO.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{getLocale:a,getLocaleLanguage:n}])=>{p("AM5C241025748");var e="en-US",o=new Map([["ar",()=>import("./TT57O767.js")],["bg-BG",()=>import("./DRD2FAEC.js")],["bs-BA",()=>import("./ENHMLZOY.js")],["ca-ES",()=>import("./ZQL4CTJK.js")],["cs-CZ",()=>import("./ITRBNYSS.js")],["da-DK",()=>import("./T5XVILYA.js")],["de-DE",()=>import("./VCJ6M3PX.js")],["de-CH",()=>import("./JAH2AKJ5.js")],["el-GR",()=>import("./X5RVRRKO.js")],["en-US",()=>import("./ZO5WNVFD.js")],["en-CA",()=>import("./SFMD5PPC.js")],["es-ES",()=>import("./GE4QV5JC.js")],["et-EE",()=>import("./V7OBQRSG.js")],["fi-FI",()=>import("./DQRQZK5Y.js")],["fr-FR",()=>import("./PSD74QRS.js")],["he-IL",()=>import("./P3ZJLVKC.js")],["hr-HR",()=>import("./FIYZBOAN.js")],["hu-HU",()=>import("./ONSMVZAM.js")],["id-ID",()=>import("./7SDUVBEL.js")],["it-IT",()=>import("./PBXO27K2.js")],["ja-JP",()=>import("./WQIIAMYV.js")],["ko-KR",()=>import("./DWQQDLIU.js")],["lt-LT",()=>import("./VWHNYGBM.js")],["lv-LV",()=>import("./V3HQQ6TJ.js")],["no-NO",()=>import("./CEVISDMV.js")],["nb-NO",()=>import("./CEVISDMV.js")],["nl-NL",()=>import("./SIIF27TS.js")],["pl-PL",()=>import("./BP7H6IBX.js")],["pt-BR",()=>import("./ZUYPKJYL.js")],["pt-PT",()=>import("./LFSVKJXI.js")],["ro-RO",()=>import("./UN65FKRA.js")],["ru-RU",()=>import("./DQDUD556.js")],["sk-SK",()=>import("./MGE3J5KE.js")],["sl-SL",()=>import("./23L5GSFN.js")],["sr-RS",()=>import("./EGD2CSA7.js")],["sv-SE",()=>import("./AKAOYYJ7.js")],["th-TH",()=>import("./PST64E7E.js")],["tr-TR",()=>import("./GGUWUNUA.js")],["uk-UA",()=>import("./S5MD2X3H.js")],["vi-VN",()=>import("./MPIIQAQO.js")],["zh-CN",()=>import("./Z66I2FAE.js")],["zh-HK",()=>import("./6LUCQLB7.js")],["zh-TW",()=>import("./6LUCQLB7.js")]]);function s(t){if(!t)return e;if(o.has(t))return t;let r=n();return r&&o.has(r)?r:e}async function l(t,r=a()){let i=m.new(t);return i.locale=(await o.get(s(r))()).default,i}return l},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as o}from"./DYUFBVXE.js";import i from"./OISNNHIG.js";import{a as x}from"./7465ANAR.js";import e from"./KRJCOTGC.js";import d from"./U7WRQCRV.js";import{h as C}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import b from"./SBYVR52H.js";import"./LXME6MU5.js";import{Q as I,R as y,T as c,X as h,_ as w,a as f,b as a,x as g}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:m,formatNumber:p},{isFeatureItem:M,isLayerItem:v,isGroupLayerItem:L},S,,,,F])=>{var r={container:"container",flowItem:"flow-item",layerDropdown:"layer-dropdown",listItemFeature:"feature",listItemFeatureIcon:"feature-icon",listItemIcon:"icon",itemCount:"item-count",notice:"notice",panel:"panel"},T=f`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-spacing-md);padding:var(--calcite-spacing-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-spacing-lg);padding:var(--calcite-spacing-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-spacing-sm) 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-spacing-md) 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-spacing-lg) 0 var(--calcite-spacing-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-spacing-lg) * -1)}calcite-chip{align-self:center;margin-inline:var(--calcite-spacing-xxs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`,_=F(S),$=class extends y{constructor(){super(...arguments),this.viewModel=_(this),this.messages=x(),this.#i=!1,this.#t=new WeakSet,this.#e=null,this.autoDestroyDisabled=!1,this.icon="selection",this.view=this.viewModel.view,this.displayMode="group",this.filterText=this.viewModel.filterText,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideFilter=!1,this.hideFilterNotice=!1,this.hideHeader=!1,this.hideItemCloseActions=!1,this.hideItemCount=!1,this.hideItemIcons=!1,this.hideItemMenus=!1,this.hideLayerFilter=!1,this.hideMenu=!1,this.hideZoomToButton=!1,this.highlightOnHoverDisabled=!1,this.layer=this.viewModel.layer,this.maxVisibleFeatureCountPerLayer=this.viewModel.maxVisibleFeatureCountPerLayer,this.menuScale="m",this.selectionManager=this.viewModel.selectionManager,this.visualScale="s",this.arcgisClear=g(),this.arcgisPropertyChange=C()("state"),this.arcgisReady=g()}static{this.properties={hasFilterText:16,isUpdating:16,itemWithOpenMenu:16,autoDestroyDisabled:5,disabled:5,icon:1,label:1,referenceElement:1,view:0,activeLayerItem:32,afterListItemSelect:0,allLayerItems:32,count:32,displayMode:1,effectiveSelectionManager:32,filterText:1,hideChip:5,hideChipCloseButton:5,hideFilter:5,hideFilterNotice:5,hideHeader:5,hideItemCloseActions:5,hideItemCount:5,hideItemIcons:5,hideItemMenus:5,hideLayerFilter:5,hideMenu:5,hideZoomToButton:5,highlightOnHoverDisabled:5,listItemActionConfigurations:0,listItemUnavailableFunction:0,layer:0,layerItems:32,maxVisibleFeatureCountExceeded:32,maxVisibleFeatureCountPerLayer:9,menuScale:1,selectionManager:0,state:32,visibleFeatureCount:32,visibleFeatureItems:32,visibleLayerCount:32,visualScale:1}}static{this.styles=T}#i;#t;#e;get hasFilterText(){let{filterText:e}=this;return e!=null&&e!==""}get isUpdating(){return this.viewModel.isUpdating}get disabled(){return this.#i||this.state==="disabled"}set disabled(e){this.#i=e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get count(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get layerItems(){return this.viewModel.layerItems}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get state(){return this.viewModel.state}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}async clear(){this.viewModel.clear()}async collapseAll(){this.viewModel.collapseAll()}async deselectItem(e){this.viewModel.deselectItem(e)}async destroy(){this.viewModel?.destroy()}async expandAll(){this.viewModel.expandAll()}async findLayerItem(e){return this.viewModel.findLayerItem(e)}async findParentItem(e){return this.viewModel.findParentItem(e)}async goToItem(e){this.viewModel.goToItem(e)}async removeFromSelection(e){this.viewModel.removeFromSelection(e)}async replace(e){this.viewModel.replace(e)}async selectItem(e){this.viewModel.selectSingleItem(e)}connectedCallback(){super.connectedCallback(),this.#e=new IntersectionObserver((e,t)=>{let{messages:s}=this;e.forEach(i=>{if(!i.isIntersecting)return;let l=i.target;if(this.#t.has(l)){t.unobserve(l);return}let d=l.getAttribute("data-thumbnail-key"),n=d?this._getFeatureItemByThumbnailKey(d):void 0;if(!n)return;this.#t.add(l);let u=n.title&&s.previewTemplateAriaLabel?m(s.previewTemplateAriaLabel,{label:n.title}):s.preview;if(n.thumbnail){l.appendChild(n.thumbnail);return}n.fetchThumbnail({ariaLabel:u}).then(b=>b&&l.appendChild(b)).catch(()=>this.#t.delete(l))})})}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect()}_isDropdownItemVisible(e,t){let{hidden:s,type:i}=t;return(typeof s=="function"?s({item:e}):s)?!1:!!(!i||i==="feature"&&M(e)||i==="layer"&&v(e)||i==="group"&&L(e))}_handleClearSelection(){this.clear(),this.arcgisClear.emit()}_onFeatureItemBlur(){this.highlightOnHoverDisabled||this.viewModel.removeTemporaryHighlight()}_onFeatureItemFocus(e){this.highlightOnHoverDisabled||this.viewModel.addTemporaryHighlight(e)}_closeItemMenu(e){(!e||e===this.itemWithOpenMenu)&&(this.itemWithOpenMenu=void 0)}_getFeatureItemByThumbnailKey(e){return this.viewModel.visibleFeatureItems.find(t=>t.thumbnailKey===e)}_isItemUnavailable(e){return!e.layerIsVisible||this.listItemUnavailableFunction?.({item:e})||!1}_makeObserverRef(){let e=null;return t=>{t?(e=t,this.#e?.observe(t)):e&&(this.#e?.unobserve(e),e=null)}}_afterListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.afterListItemSelect?.({item:e})}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton?m(t.selectionCount,{count:e}):m(t.clearSelectionCount,{count:e})}#n(){if(this.hideChip||this.hideHeader)return;let{count:e}=this,t=p(e),s=!this.hideChipCloseButton&&e>0;return a`<calcite-chip appearance=outline .closable=${s} .closed=${e===0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0} .label=${t} .scale=${this.visualScale} slot=header-actions-end title=${this._getTooltipForChip(e)??h} @calciteChipClose=${this._handleClearSelection}>${t}</calcite-chip>`}#c(){if(this.hideHeader||this.hideMenu)return;let{menuScale:e,messages:t}=this,s=this.disabled||this.count===0;return[a`<calcite-action .disabled=${s} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear??""} text-enabled @click=${this.clear}></calcite-action>`,a`<calcite-action .disabled=${s} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll??""} text-enabled @click=${this.collapseAll}></calcite-action>`]}#r(){let{layerItems:e,messages:t}=this;if(this.count===0||e.length<2||this.hideLayerFilter)return;let s=t.allLayersCount?m(t.allLayersCount,{count:e.length}):"";return a`<calcite-combobox class=${c(r.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer??""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this.filterText=void 0;let l=i.selectedItems[0]?.value??void 0;this.layer=l==="all-layers"?void 0:l}}>${o("all-layers",a`<calcite-combobox-item .heading=${s} icon=layers .selected=${this.layer==null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map(i=>this.#h(i))}</calcite-combobox>`}#d(){if(!(this.hideFilter||this.count===0))return a`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({target:{value:e}})=>{this.filterText=e}}></calcite-input>`}#h(e){let t=e.title||this.messages?.untitledLayer||"";return o(e.key,a`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer===this.layer} .value=${e.layer}></calcite-combobox-item>`)}#m(){let{messages:e}=this;if(this.visibleFeatureCount!==0)return a`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel??""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`}#s(e){return this.activeLayerItem?this.#l(this.activeLayerItem):e.map(t=>L(t)?this.#g(t):v(t)?this.#l(t):null).filter(t=>t!=null)}#u(){if(!(this.disabled||this.visibleFeatureCount>0||this.hideFilter||this.hideFilterNotice))return a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`}#p(e){if(this.hideItemCount)return;let{messages:t}=this,s=p(e.total),i=p(e.visibleTotal),l=t.selectionCount?m(t.selectionCount,{count:s}):void 0;return!this.hasFilterText&&e.maxVisibleFeatureCountExceeded?a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures??h}></calcite-icon>${`${p(this.maxVisibleFeatureCountPerLayer)}+`}</span>`:a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}>${i}</span>`}#a(e){if(this.hideItemMenus)return;let{messages:t}=this,s=this.itemWithOpenMenu===e,i=M(e),l=i?t.deselectFeature:v(e)?t.deselectLayer:t.deselectGroup;return[o("dropdown",a`<calcite-dropdown .open=${s} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${()=>this._closeItemMenu(e)} @calciteDropdownOpen=${()=>{this.itemWithOpenMenu=e}}>${o("action",a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu??""}></calcite-action>`)}${s?o("dropdown-group",a`<calcite-dropdown-group selection-mode=none>${this.hideZoomToButton?void 0:o("zoom-to",a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${()=>this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`)}${o("select-single",a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${()=>this.selectItem(e)}>${i?t.onlySelectFeature:t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection",a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${()=>this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map(d=>{let{disabled:n,label:u}=d;if(this._isDropdownItemVisible(e,d))return o(`custom-action-${u}`,a`<calcite-dropdown-item .disabled=${typeof n=="function"?n({item:e}):!!n} .iconStart=${d.icon??void 0} @calciteDropdownItemSelect=${()=>d.callback({item:e})}>${u}</calcite-dropdown-item>`)})}</calcite-dropdown-group>`):void 0}</calcite-dropdown>`)]}#g(e){let t=e.title||this.messages.untitledLayer;if(e.visibleTotal===0)return;let{displayMode:s}=this;return s==="layer"||s==="feature"?this.#s(e.items):o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`)}#l(e){if(e.visibleTotal===0||!e.visible)return;if(this.displayMode==="feature")return this.#o(e.featureItems);let{messages:t}=this,s=e.title||t.untitledLayer;return o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${s} title=${(e.layerIsVisible?void 0:t.layerIsNotVisible)??h} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#p(e)}${this.#a(e)}${this.#o(e.featureItems)}${e.maxVisibleFeatureCountExceeded?a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>`:void 0}</calcite-list-item>`)}#o(e){return e.map(t=>this.#v(t))}#v(e){if(!e.visible)return;let{hideItemIcons:t,messages:s}=this,i=e.title||s.untitledFeature,l=!t&&this.displayMode!=="feature",d=!t&&e.supportsThumbnail;return o(e.key,a`<calcite-list-item class=${c(l?r.listItemFeatureIcon:r.listItemFeature)} .closable=${!this.hideItemCloseActions} .iconStart=${d?void 0:e.iconName} .label=${i} .unavailable=${this._isItemUnavailable(e)} .value=${i} @blur=${this._onFeatureItemBlur} @calciteListItemClose=${n=>{n.stopPropagation(),this.deselectItem(e)}} @calciteListItemSelect=${n=>this._afterListItemSelect(e,n)} @focus=${this._onFeatureItemFocus.bind(this,e)} @pointerenter=${this._onFeatureItemFocus.bind(this,e)} @pointerleave=${this._onFeatureItemBlur}>${this.#$(e)}${this.#a(e)}</calcite-list-item>`)}#$(e){if(!(this.hideItemIcons||!e.supportsThumbnail))return o("thumbnail-container",a`<div class=${c(r.listItemIcon)} slot=content-start>${o(e.thumbnailKey,a`<span data-thumbnail-key=${e.thumbnailKey??h} ${I(this._makeObserverRef())}></span>`)}</div>`)}render(){let e=this.hideHeader?void 0:this.el.title||this.messages.selection;return a`<div><calcite-flow><calcite-flow-item class=${c(r.flowItem)} .heading=${e} .loading=${this.state==="loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${c(r.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${c(r.container)}>${this.#r()}${this.#d()}${this.#m()}${this.#u()}</div></calcite-panel>${this.#n()}${this.#c()}</calcite-flow-item></calcite-flow></div>`}};w("arcgis-selection-list",$);return $},"intl","widgets/support/SelectionList/selectionListUtils","widgets/support/SelectionList/SelectionListViewModel",b,d,e,i)
2
+ import{a as o}from"./DYUFBVXE.js";import i from"./OISNNHIG.js";import{a as x}from"./7465ANAR.js";import e from"./KRJCOTGC.js";import d from"./U7WRQCRV.js";import{h as C}from"./GIBXI44G.js";import"./RQT2PVDJ.js";import b from"./SBYVR52H.js";import"./LXME6MU5.js";import{Q as I,R as y,T as c,X as h,_ as w,a as f,b as a,x as g}from"./7IGSTLKW.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{substitute:m,formatNumber:p},{isFeatureItem:M,isLayerItem:v,isGroupLayerItem:L},S,,,,F])=>{var r={container:"container",flowItem:"flow-item",layerDropdown:"layer-dropdown",listItemFeature:"feature",listItemFeatureIcon:"feature-icon",listItemIcon:"icon",itemCount:"item-count",notice:"notice",panel:"panel"},T=f`:host{width:100%;display:flex;height:100%;flex:1 1 0;>*{align-items:center;align-self:center;width:100%;height:100%}}.root{display:flex;flex-direction:column}calcite-flow{height:100%;width:100%}.container,.flow-item,.panel{display:flex}.flow-item{overflow:auto}.flow-item[scale=s] .container{gap:var(--calcite-spacing-sm);padding:var(--calcite-spacing-sm) 0}.flow-item[scale=m] .container{gap:var(--calcite-spacing-md);padding:var(--calcite-spacing-md) 0}.flow-item[scale=l] .container{gap:var(--calcite-spacing-lg);padding:var(--calcite-spacing-lg) 0}.container{flex-direction:column;background-color:var(--calcite-color-foreground-1)}.container>*{background-color:var(--calcite-color-foreground-1)}.container>*[scale=s]{padding:0 var(--calcite-spacing-sm) 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm)}.container>*[scale=m]{padding:0 var(--calcite-spacing-md) 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size-md)}.container>*[scale=l]{padding:0 var(--calcite-spacing-lg) 0 var(--calcite-spacing-lg);font-size:var(--calcite-font-size-lg)}.icon{display:flex;align-items:center;justify-content:center;min-width:var(--calcite-spacing-xxl);height:var(--calcite-spacing-xxl)}.icon span{line-height:0}.feature-icon .icon{margin-inline-start:calc(var(--calcite-spacing-lg) * -1)}calcite-chip{align-self:center;margin-inline:var(--calcite-spacing-xxs);line-height:initial}.item-count{display:flex;gap:.5em;align-items:center}`,_=F(S),$=class extends y{constructor(){super(...arguments),this.viewModel=_(this),this.messages=x(),this.#i=!1,this.#t=new WeakSet,this.#e=null,this.autoDestroyDisabled=!1,this.icon="selection",this.view=this.viewModel.view,this.displayMode="group",this.filterText=this.viewModel.filterText,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideFilter=!1,this.hideFilterNotice=!1,this.hideHeader=!1,this.hideItemCloseActions=!1,this.hideItemCount=!1,this.hideItemIcons=!1,this.hideItemMenus=!1,this.hideLayerFilter=!1,this.hideMenu=!1,this.hideZoomToButton=!1,this.highlightOnHoverDisabled=!1,this.layer=this.viewModel.layer,this.maxVisibleFeatureCountPerLayer=this.viewModel.maxVisibleFeatureCountPerLayer,this.menuScale="m",this.selectionManager=this.viewModel.selectionManager,this.visualScale="s",this.arcgisClear=g(),this.arcgisPropertyChange=C()("state"),this.arcgisReady=g()}static{this.properties={hasFilterText:16,isUpdating:16,itemWithOpenMenu:16,autoDestroyDisabled:5,disabled:5,icon:1,label:1,referenceElement:1,view:0,activeLayerItem:32,afterListItemSelect:0,allLayerItems:32,count:32,displayMode:1,effectiveSelectionManager:32,filterText:1,hideChip:5,hideChipCloseButton:5,hideFilter:5,hideFilterNotice:5,hideHeader:5,hideItemCloseActions:5,hideItemCount:5,hideItemIcons:5,hideItemMenus:5,hideLayerFilter:5,hideMenu:5,hideZoomToButton:5,highlightOnHoverDisabled:5,listItemActionConfigurations:0,listItemUnavailableFunction:0,layer:0,layerItems:32,maxVisibleFeatureCountExceeded:32,maxVisibleFeatureCountPerLayer:9,menuScale:1,selectionManager:0,state:32,visibleFeatureCount:32,visibleFeatureItems:32,visibleLayerCount:32,visualScale:1}}static{this.styles=T}#i;#t;#e;get hasFilterText(){let{filterText:e}=this;return e!=null&&e!==""}get isUpdating(){return this.viewModel.isUpdating}get disabled(){return this.#i||this.state==="disabled"}set disabled(e){this.#i=e}get activeLayerItem(){return this.viewModel.activeLayerItem}get allLayerItems(){return this.viewModel.allLayerItems}get count(){return this.viewModel.effectiveCount}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get layerItems(){return this.viewModel.layerItems}get maxVisibleFeatureCountExceeded(){return this.viewModel.maxVisibleFeatureCountExceeded}get state(){return this.viewModel.state}get visibleFeatureCount(){return this.viewModel.visibleFeatureCount}get visibleFeatureItems(){return this.viewModel.visibleFeatureItems}get visibleLayerCount(){return this.viewModel.visibleLayerCount}async clear(){this.viewModel.clear()}async collapseAll(){this.viewModel.collapseAll()}async deselectItem(e){this.viewModel.deselectItem(e)}async destroy(){this.viewModel?.destroy()}async expandAll(){this.viewModel.expandAll()}async findLayerItem(e){return this.viewModel.findLayerItem(e)}async findParentItem(e){return this.viewModel.findParentItem(e)}async goToItem(e){this.viewModel.goToItem(e)}async removeFromSelection(e){this.viewModel.removeFromSelection(e)}async replace(e){this.viewModel.replace(e)}async selectItem(e){this.viewModel.selectSingleItem(e)}connectedCallback(){super.connectedCallback(),this.#e=new IntersectionObserver((e,t)=>{let{messages:s}=this;e.forEach(i=>{if(!i.isIntersecting)return;let l=i.target;if(this.#t.has(l)){t.unobserve(l);return}let d=l.getAttribute("data-thumbnail-key"),n=d?this._getFeatureItemByThumbnailKey(d):void 0;if(!n)return;this.#t.add(l);let u=n.title&&s.previewTemplateAriaLabel?m(s.previewTemplateAriaLabel,{label:n.title}):s.preview;if(n.thumbnail){l.appendChild(n.thumbnail);return}n.fetchThumbnail({ariaLabel:u}).then(b=>b&&l.appendChild(b)).catch(()=>this.#t.delete(l))})})}disconnectedCallback(){super.disconnectedCallback(),this.#e?.disconnect()}_isDropdownItemVisible(e,t){let{hidden:s,type:i}=t;return(typeof s=="function"?s({item:e}):s)?!1:!!(!i||i==="feature"&&M(e)||i==="layer"&&v(e)||i==="group"&&L(e))}_handleClearSelection(){this.clear(),this.arcgisClear.emit()}_onFeatureItemBlur(){this.highlightOnHoverDisabled||this.viewModel.removeTemporaryHighlight()}_onFeatureItemFocus(e){this.highlightOnHoverDisabled||this.viewModel.addTemporaryHighlight(e)}_closeItemMenu(e){(!e||e===this.itemWithOpenMenu)&&(this.itemWithOpenMenu=void 0)}_getFeatureItemByThumbnailKey(e){return this.viewModel.visibleFeatureItems.find(t=>t.thumbnailKey===e)}_isItemUnavailable(e){return!e.layerIsVisible||this.listItemUnavailableFunction?.({item:e})||!1}_makeObserverRef(){let e=null;return t=>{t?(e=t,this.#e?.observe(t)):e&&(this.#e?.unobserve(e),e=null)}}_afterListItemSelect(e,t){t.stopPropagation(),this._closeItemMenu(),this.afterListItemSelect?.({item:e})}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton?m(t.selectionCount,{count:e}):m(t.clearSelectionCount,{count:e})}#n(){if(this.hideChip||this.hideHeader)return;let{count:e}=this,t=p(e),s=!this.hideChipCloseButton&&e>0;return a`<calcite-chip appearance=outline .closable=${s} .closed=${e===0} .disabled=${this.disabled} .icon=${this.maxVisibleFeatureCountExceeded?"exclamation-mark-triangle":void 0} .label=${t} .scale=${this.visualScale} slot=header-actions-end title=${this._getTooltipForChip(e)??h} @calciteChipClose=${this._handleClearSelection}>${t}</calcite-chip>`}#c(){if(this.hideHeader||this.hideMenu)return;let{menuScale:e,messages:t}=this,s=this.disabled||this.count===0;return[a`<calcite-action .disabled=${s} icon=reset .scale=${e} slot=header-menu-actions .text=${t.clear??""} text-enabled @click=${this.clear}></calcite-action>`,a`<calcite-action .disabled=${s} icon=folders .scale=${e} slot=header-menu-actions .text=${t.collapseAll??""} text-enabled @click=${this.collapseAll}></calcite-action>`]}#r(){let{layerItems:e,messages:t}=this;if(this.count===0||e.length<2||this.hideLayerFilter)return;let s=t.allLayersCount?m(t.allLayersCount,{count:e.length}):"";return a`<calcite-combobox class=${c(r.layerDropdown)} .disabled=${this.disabled} .label=${t.filterByLayer??""} overlay-positioning=fixed .placeholder=${t.filterByLayer} .scale=${this.visualScale} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this.filterText=void 0;let l=i.selectedItems[0]?.value??void 0;this.layer=l==="all-layers"?void 0:l}}>${o("all-layers",a`<calcite-combobox-item .heading=${s} icon=layers .selected=${this.layer==null} value=all-layers></calcite-combobox-item>`)}${this.layerItems.map(i=>this.#h(i))}</calcite-combobox>`}#d(){if(!(this.hideFilter||this.count===0))return a`<calcite-input clearable .disabled=${this.disabled} icon=search .placeholder=${this.messages.filter} .scale=${this.visualScale} .value=${this.filterText} @calciteInputInput=${({target:{value:e}})=>{this.filterText=e}}></calcite-input>`}#h(e){let t=e.title||this.messages?.untitledLayer||"";return o(e.key,a`<calcite-combobox-item .heading=${t} .icon=${e.iconName} .selected=${e.layer===this.layer} .value=${e.layer}></calcite-combobox-item>`)}#m(){let{messages:e}=this;if(this.visibleFeatureCount!==0)return a`<calcite-list .disabled=${this.disabled} display-mode=nested interaction-mode=interactive .label=${e.componentLabel??""} .loading=${this.isUpdating} .scale=${this.visualScale} selection-mode=none>${this.#s(this.allLayerItems)}</calcite-list>`}#s(e){return this.activeLayerItem?this.#l(this.activeLayerItem):e.map(t=>L(t)?this.#g(t):v(t)?this.#l(t):null).filter(t=>t!=null)}#u(){if(!(this.disabled||this.visibleFeatureCount>0||this.hideFilter||this.hideFilterNotice))return a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale} width=full><div slot=message>${this.messages.noMatchingFeatures}</div></calcite-notice>`}#p(e){if(this.hideItemCount)return;let{messages:t}=this,s=p(e.total),i=p(e.visibleTotal),l=t.selectionCount?m(t.selectionCount,{count:s}):void 0;return!this.hasFilterText&&e.maxVisibleFeatureCountExceeded?a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}><calcite-icon icon=exclamation-mark-triangle scale=s title=${t.tooManyFeatures??h}></calcite-icon>${`${p(this.maxVisibleFeatureCountPerLayer)}+`}</span>`:a`<span class=${c(r.itemCount)} slot=content-end title=${l??h}>${i}</span>`}#a(e){if(this.hideItemMenus)return;let{messages:t}=this,s=this.itemWithOpenMenu===e,i=M(e),l=i?t.deselectFeature:v(e)?t.deselectLayer:t.deselectGroup;return[o("dropdown",a`<calcite-dropdown .open=${s} overlay-positioning=fixed placement=bottom-end .scale=${this.menuScale} slot=actions-end width=m @calciteDropdownClose=${()=>this._closeItemMenu(e)} @calciteDropdownOpen=${()=>{this.itemWithOpenMenu=e}}>${o("action",a`<calcite-action icon=ellipsis .scale=${this.visualScale} slot=trigger .text=${t.menu??""}></calcite-action>`)}${s?o("dropdown-group",a`<calcite-dropdown-group selection-mode=none>${!this.hideZoomToButton&&!e.isTable?o("zoom-to",a`<calcite-dropdown-item icon-start=layer-zoom-to @calciteDropdownItemSelect=${()=>this.goToItem(e)}>${t.zoomTo}</calcite-dropdown-item>`):void 0}${o("select-single",a`<calcite-dropdown-item icon-start=selection-filter @calciteDropdownItemSelect=${()=>this.selectItem(e)}>${i?t.onlySelectFeature:t.onlySelectThis}</calcite-dropdown-item>`)}${o("clear-selection",a`<calcite-dropdown-item icon-start=selection-x @calciteDropdownItemSelect=${()=>this.deselectItem(e)}>${l}</calcite-dropdown-item>`)}${this.listItemActionConfigurations?.map(d=>{let{disabled:n,label:u}=d;if(this._isDropdownItemVisible(e,d))return o(`custom-action-${u}`,a`<calcite-dropdown-item .disabled=${typeof n=="function"?n({item:e}):!!n} .iconStart=${d.icon??void 0} @calciteDropdownItemSelect=${()=>d.callback({item:e})}>${u}</calcite-dropdown-item>`)})}</calcite-dropdown-group>`):void 0}</calcite-dropdown>`)]}#g(e){let t=e.title||this.messages.untitledLayer;if(e.visibleTotal===0)return;let{displayMode:s}=this;return s==="layer"||s==="feature"?this.#s(e.items):o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${t} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#a(e)}${this.#s(e.items)}</calcite-list-item>`)}#l(e){if(e.visibleTotal===0||!e.visible)return;if(this.displayMode==="feature")return this.#o(e.featureItems);let{messages:t}=this,s=e.title||t.untitledLayer;return o(e.key,a`<calcite-list-item .closable=${!this.hideItemCloseActions} .expanded=${e.expanded} .iconStart=${this.hideItemIcons?void 0:e.iconName} .label=${s} title=${(e.layerIsVisible?void 0:t.layerIsNotVisible)??h} .unavailable=${this._isItemUnavailable(e)} .value=${e.title} @calciteListItemCollapse=${i=>{i.stopPropagation(),e.expanded=!1}} @calciteListItemClose=${i=>{i.stopPropagation(),this.deselectItem(e)}} @calciteListItemExpand=${i=>{i.stopPropagation(),e.expanded=!0}} @calciteListItemSelect=${i=>this._afterListItemSelect(e,i)}>${this.#p(e)}${this.#a(e)}${this.#o(e.featureItems)}${e.maxVisibleFeatureCountExceeded?a`<calcite-notice class=${c(r.notice)} icon=exclamation-mark-triangle kind=info open .scale=${this.visualScale}><div slot=message>${t.tooManyFeatures}</div></calcite-notice>`:void 0}</calcite-list-item>`)}#o(e){return e.map(t=>this.#v(t))}#v(e){if(!e.visible)return;let{hideItemIcons:t,messages:s}=this,i=e.title||s.untitledFeature,l=!t&&this.displayMode!=="feature",d=!t&&e.supportsThumbnail;return o(e.key,a`<calcite-list-item class=${c(l?r.listItemFeatureIcon:r.listItemFeature)} .closable=${!this.hideItemCloseActions} .iconStart=${d?void 0:e.iconName} .label=${i} .unavailable=${this._isItemUnavailable(e)} .value=${i} @blur=${this._onFeatureItemBlur} @calciteListItemClose=${n=>{n.stopPropagation(),this.deselectItem(e)}} @calciteListItemSelect=${n=>this._afterListItemSelect(e,n)} @focus=${this._onFeatureItemFocus.bind(this,e)} @pointerenter=${this._onFeatureItemFocus.bind(this,e)} @pointerleave=${this._onFeatureItemBlur}>${this.#$(e)}${this.#a(e)}</calcite-list-item>`)}#$(e){if(!(this.hideItemIcons||!e.supportsThumbnail))return o("thumbnail-container",a`<div class=${c(r.listItemIcon)} slot=content-start>${o(e.thumbnailKey,a`<span data-thumbnail-key=${e.thumbnailKey??h} ${I(this._makeObserverRef())}></span>`)}</div>`)}render(){let e=this.hideHeader?void 0:this.el.title||this.messages.selection;return a`<div><calcite-flow><calcite-flow-item class=${c(r.flowItem)} .heading=${e} .loading=${this.state==="loading"} overlay-positioning=fixed .scale=${this.visualScale} selected><calcite-panel class=${c(r.panel)} .disabled=${this.disabled} overlay-positioning=fixed .scale=${this.visualScale}><div class=${c(r.container)}>${this.#r()}${this.#d()}${this.#m()}${this.#u()}</div></calcite-panel>${this.#n()}${this.#c()}</calcite-flow-item></calcite-flow></div>`}};w("arcgis-selection-list",$);return $},"intl","widgets/support/SelectionList/selectionListUtils","widgets/support/SelectionList/SelectionListViewModel",b,d,e,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{b as s,d}from"./MQL4JTYG.js";import{Q as h,Y as o,p as r,s as l}from"./CTVCZ2FU.js";import"./TAVTDQ6S.js";var a=class t extends o{constructor(e,i){super(e,i),this.responsiveRules=[],this._dp=new h([this._root._rootContainer.onPrivate("width",n=>{this._isUsed()&&this._maybeApplyRules()}),this._root._rootContainer.onPrivate("height",n=>{this._isUsed()&&this._maybeApplyRules()})])}static widthXXS(e,i){return e<=t.XXS}static widthXS(e,i){return e<=t.XS}static widthS(e,i){return e<=t.S}static widthM(e,i){return e<=t.M}static widthL(e,i){return e<=t.L}static widthXL(e,i){return e<=t.XL}static widthXXL(e,i){return e<=t.XXL}static heightXXS(e,i){return i<=t.XXS}static heightXS(e,i){return i<=t.XS}static heightS(e,i){return i<=t.S}static heightM(e,i){return i<=t.M}static heightL(e,i){return i<=t.L}static heightXL(e,i){return i<=t.XL}static heightXXL(e,i){return i<=t.XXL}static isXXS(e,i){return e<=t.XXS&&i<=t.XXS}static isXS(e,i){return e<=t.XS&&i<=t.XS}static isS(e,i){return e<=t.S&&i<=t.S}static isM(e,i){return e<=t.M&&i<=t.M}static isL(e,i){return e<=t.L&&i<=t.L}static isXL(e,i){return e<=t.XL&&i<=t.XL}static isXXL(e,i){return e<=t.XXL&&i<=t.XXL}static maybeXXS(e,i){return e<=t.XXS||i<=t.XXS}static maybeXS(e,i){return e<=t.XS||i<=t.XS}static maybeS(e,i){return e<=t.S||i<=t.S}static maybeM(e,i){return e<=t.M||i<=t.M}static maybeL(e,i){return e<=t.L||i<=t.L}static maybeXL(e,i){return e<=t.XL||i<=t.XL}static maybeXXL(e,i){return e<=t.XXL||i<=t.XXL}static newEmpty(e){return new this(e,!0)}addRule(e){return e.name&&!e.template&&(e.template=this.rule(e.name,e.tags)),this.responsiveRules.push(e),this._maybeApplyRule(e),e}removeRule(e){l(this.responsiveRules,e)}dispose(){this._dp&&this._dp.dispose()}_isUsed(){return this._root._rootContainer.get("themes").indexOf(this)!==-1}_maybeApplyRules(){r(this.responsiveRules,e=>{this._maybeUnapplyRule(e)}),r(this.responsiveRules,e=>{this._maybeApplyRule(e)})}_maybeApplyRule(e){if(e.applied)return;let i=this._root._rootContainer.getPrivate("width"),n=this._root._rootContainer.getPrivate("height");e.relevant.call(e,i,n)&&(e.applied=!0,e.template&&e.settings&&e.template.setAll(e.settings),e.applying&&e.applying.call(e))}_maybeUnapplyRule(e){if(!e.applied)return;let i=this._root._rootContainer.getPrivate("width"),n=this._root._rootContainer.getPrivate("height");e.relevant.call(e,i,n)||(e.applied=!1,e.template&&e.template.removeAll(),e.removing&&e.removing.call(e))}setupDefaultRules(){super.setupDefaultRules();let e=i=>this.addRule(i);e({name:"Chart",relevant:t.widthXXS,settings:{paddingLeft:0,paddingRight:0}}),e({name:"Chart",relevant:t.heightXXS,settings:{paddingTop:0,paddingBottom:0}}),e({name:"Bullet",relevant:t.isXS,settings:{forceHidden:!0}}),e({name:"Legend",relevant:t.isXS,settings:{forceHidden:!0}}),e({name:"HeatLegend",tags:["vertical"],relevant:t.widthXS,settings:{forceHidden:!0}}),e({name:"HeatLegend",tags:["horizontal"],relevant:t.heightXS,settings:{forceHidden:!0}}),e({name:"Label",tags:["heatlegend","start"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"Label",tags:["heatlegend","end"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"Button",tags:["resize"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"AxisRendererX",relevant:t.heightXS,settings:{inside:!0}}),e({name:"AxisRendererY",relevant:t.widthXS,settings:{inside:!0}}),e({name:"AxisRendererXLabel",relevant:t.heightXS,settings:{minPosition:.1,maxPosition:.9}}),e({name:"AxisLabel",tags:["y"],relevant:t.widthXS,settings:{centerY:d,maxPosition:.9}}),e({name:"AxisLabel",tags:["x"],relevant:t.heightXXS,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["x","minor"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["y"],relevant:t.widthXXS,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["y","minor"],relevant:t.heightL,settings:{forceHidden:!0}}),e({name:"AxisTick",tags:["x"],relevant:t.heightXS,settings:{inside:!0,minPosition:.1,maxPosition:.9}}),e({name:"AxisTick",tags:["y"],relevant:t.widthXXS,settings:{inside:!0,minPosition:.1,maxPosition:.9}}),e({name:"Grid",relevant:t.maybeXXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["radial"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["circular"],relevant:t.maybeS,settings:{inside:!0}}),e({name:"AxisTick",tags:["circular"],relevant:t.maybeS,settings:{inside:!0}}),e({name:"AxisTick",tags:["radial"],relevant:t.maybeS,settings:{inside:!0}}),e({name:"RadialLabel",tags:["circular"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"PieChart",relevant:t.maybeXS,settings:{radius:s(99)}}),e({name:"PieChart",relevant:t.widthM,settings:{radius:s(99)}}),e({name:"RadialLabel",tags:["pie"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["pie"],relevant:t.widthM,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pie"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pie"],relevant:t.widthM,settings:{forceHidden:!0}}),e({name:"FunnelSeries",relevant:t.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["funnel","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["funnel","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["funnel","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["funnel","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"PyramidSeries",relevant:t.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["pyramid","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pyramid","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["pyramid","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pyramid","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"PictorialStackedSeries",relevant:t.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["pictorial","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pictorial","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["pictorial","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pictorial","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Label",tags:["flow","horizontal"],relevant:t.widthS,settings:{forceHidden:!0}}),e({name:"Label",tags:["flow","vertical"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Chord",relevant:t.maybeXS,settings:{radius:s(99)}}),e({name:"Label",tags:["hierarchy","node"],relevant:t.maybeXS,settings:{forceHidden:!0}})}};a.XXS=100;a.XS=200;a.S=300;a.M=400;a.L=600;a.XL=800;a.XXL=1e3;var S=a;export{S as default};
2
+ import{b as s,d}from"./33LESQ6T.js";import{Q as h,Y as o,p as r,s as l}from"./KZUUBMYO.js";import"./TAVTDQ6S.js";var a=class t extends o{constructor(e,i){super(e,i),this.responsiveRules=[],this._dp=new h([this._root._rootContainer.onPrivate("width",n=>{this._isUsed()&&this._maybeApplyRules()}),this._root._rootContainer.onPrivate("height",n=>{this._isUsed()&&this._maybeApplyRules()})])}static widthXXS(e,i){return e<=t.XXS}static widthXS(e,i){return e<=t.XS}static widthS(e,i){return e<=t.S}static widthM(e,i){return e<=t.M}static widthL(e,i){return e<=t.L}static widthXL(e,i){return e<=t.XL}static widthXXL(e,i){return e<=t.XXL}static heightXXS(e,i){return i<=t.XXS}static heightXS(e,i){return i<=t.XS}static heightS(e,i){return i<=t.S}static heightM(e,i){return i<=t.M}static heightL(e,i){return i<=t.L}static heightXL(e,i){return i<=t.XL}static heightXXL(e,i){return i<=t.XXL}static isXXS(e,i){return e<=t.XXS&&i<=t.XXS}static isXS(e,i){return e<=t.XS&&i<=t.XS}static isS(e,i){return e<=t.S&&i<=t.S}static isM(e,i){return e<=t.M&&i<=t.M}static isL(e,i){return e<=t.L&&i<=t.L}static isXL(e,i){return e<=t.XL&&i<=t.XL}static isXXL(e,i){return e<=t.XXL&&i<=t.XXL}static maybeXXS(e,i){return e<=t.XXS||i<=t.XXS}static maybeXS(e,i){return e<=t.XS||i<=t.XS}static maybeS(e,i){return e<=t.S||i<=t.S}static maybeM(e,i){return e<=t.M||i<=t.M}static maybeL(e,i){return e<=t.L||i<=t.L}static maybeXL(e,i){return e<=t.XL||i<=t.XL}static maybeXXL(e,i){return e<=t.XXL||i<=t.XXL}static newEmpty(e){return new this(e,!0)}addRule(e){return e.name&&!e.template&&(e.template=this.rule(e.name,e.tags)),this.responsiveRules.push(e),this._maybeApplyRule(e),e}removeRule(e){l(this.responsiveRules,e)}dispose(){this._dp&&this._dp.dispose()}_isUsed(){return this._root._rootContainer.get("themes").indexOf(this)!==-1}_maybeApplyRules(){r(this.responsiveRules,e=>{this._maybeUnapplyRule(e)}),r(this.responsiveRules,e=>{this._maybeApplyRule(e)})}_maybeApplyRule(e){if(e.applied)return;let i=this._root._rootContainer.getPrivate("width"),n=this._root._rootContainer.getPrivate("height");e.relevant.call(e,i,n)&&(e.applied=!0,e.template&&e.settings&&e.template.setAll(e.settings),e.applying&&e.applying.call(e))}_maybeUnapplyRule(e){if(!e.applied)return;let i=this._root._rootContainer.getPrivate("width"),n=this._root._rootContainer.getPrivate("height");e.relevant.call(e,i,n)||(e.applied=!1,e.template&&e.template.removeAll(),e.removing&&e.removing.call(e))}setupDefaultRules(){super.setupDefaultRules();let e=i=>this.addRule(i);e({name:"Chart",relevant:t.widthXXS,settings:{paddingLeft:0,paddingRight:0}}),e({name:"Chart",relevant:t.heightXXS,settings:{paddingTop:0,paddingBottom:0}}),e({name:"Bullet",relevant:t.isXS,settings:{forceHidden:!0}}),e({name:"Legend",relevant:t.isXS,settings:{forceHidden:!0}}),e({name:"HeatLegend",tags:["vertical"],relevant:t.widthXS,settings:{forceHidden:!0}}),e({name:"HeatLegend",tags:["horizontal"],relevant:t.heightXS,settings:{forceHidden:!0}}),e({name:"Label",tags:["heatlegend","start"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"Label",tags:["heatlegend","end"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"Button",tags:["resize"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"AxisRendererX",relevant:t.heightXS,settings:{inside:!0}}),e({name:"AxisRendererY",relevant:t.widthXS,settings:{inside:!0}}),e({name:"AxisRendererXLabel",relevant:t.heightXS,settings:{minPosition:.1,maxPosition:.9}}),e({name:"AxisLabel",tags:["y"],relevant:t.widthXS,settings:{centerY:d,maxPosition:.9}}),e({name:"AxisLabel",tags:["x"],relevant:t.heightXXS,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["x","minor"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["y"],relevant:t.widthXXS,settings:{forceHidden:!0}}),e({name:"AxisLabel",tags:["y","minor"],relevant:t.heightL,settings:{forceHidden:!0}}),e({name:"AxisTick",tags:["x"],relevant:t.heightXS,settings:{inside:!0,minPosition:.1,maxPosition:.9}}),e({name:"AxisTick",tags:["y"],relevant:t.widthXXS,settings:{inside:!0,minPosition:.1,maxPosition:.9}}),e({name:"Grid",relevant:t.maybeXXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["radial"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["circular"],relevant:t.maybeS,settings:{inside:!0}}),e({name:"AxisTick",tags:["circular"],relevant:t.maybeS,settings:{inside:!0}}),e({name:"AxisTick",tags:["radial"],relevant:t.maybeS,settings:{inside:!0}}),e({name:"RadialLabel",tags:["circular"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"PieChart",relevant:t.maybeXS,settings:{radius:s(99)}}),e({name:"PieChart",relevant:t.widthM,settings:{radius:s(99)}}),e({name:"RadialLabel",tags:["pie"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"RadialLabel",tags:["pie"],relevant:t.widthM,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pie"],relevant:t.maybeXS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pie"],relevant:t.widthM,settings:{forceHidden:!0}}),e({name:"FunnelSeries",relevant:t.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["funnel","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["funnel","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["funnel","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["funnel","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"PyramidSeries",relevant:t.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["pyramid","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pyramid","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["pyramid","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pyramid","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"PictorialStackedSeries",relevant:t.widthM,settings:{alignLabels:!1}}),e({name:"Label",tags:["pictorial","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pictorial","vertical"],relevant:t.widthL,settings:{forceHidden:!0}}),e({name:"Label",tags:["pictorial","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Tick",tags:["pictorial","horizontal"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Label",tags:["flow","horizontal"],relevant:t.widthS,settings:{forceHidden:!0}}),e({name:"Label",tags:["flow","vertical"],relevant:t.heightS,settings:{forceHidden:!0}}),e({name:"Chord",relevant:t.maybeXS,settings:{radius:s(99)}}),e({name:"Label",tags:["hierarchy","node"],relevant:t.maybeXS,settings:{forceHidden:!0}})}};a.XXS=100;a.XS=200;a.S=300;a.M=400;a.L=600;a.XL=800;a.XXL=1e3;var S=a;export{S as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as w}from"./MQL4JTYG.js";import{K as _,N as E,O as I,f as L,g,m as A,p as H}from"./CTVCZ2FU.js";import{a as tt}from"./TAVTDQ6S.js";function et(t,e){let r=0,n=0,o=1,i=0,s=0,u=0,l=0,a=0;return t.formatToParts(e).forEach(c=>{switch(c.type){case"year":r=+c.value;break;case"month":n=+c.value-1;break;case"day":o=+c.value;break;case"hour":i=+c.value;break;case"minute":s=+c.value;break;case"second":u=+c.value;break;case"fractionalSecond":l=+c.value;break;case"weekday":switch(c.value){case"Sun":a=0;break;case"Mon":a=1;break;case"Tue":a=2;break;case"Wed":a=3;break;case"Thu":a=4;break;case"Fri":a=5;break;case"Sat":a=6;break}}}),i===24&&(i=0),{year:r,month:n,day:o,hour:i,minute:s,second:u,millisecond:l,weekday:a}}function rt(t,e){let{year:r,month:n,day:o,hour:i,minute:s,second:u,millisecond:l}=et(t,e);return h(r,n,o,i,s,u,l)}function h(t,e,r,n,o,i,s){if(t>=100||t<0)return Date.UTC(t,e,r,n,o,i,s);let u=new Date(Date.UTC(t+400,e,r,n,o,i,s));return u.setUTCFullYear(u.getUTCFullYear()-400),u.getTime()}var x=864e5,N=class{constructor(e,r){if(this._offsets=new Map,!r)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this.name=e,this._dtf=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3})}static new(e){return new this(e,!0)}convertLocal(e){let r=this.offsetUTC(e),n=e.getTimezoneOffset(),o=new Date(e);o.setUTCMinutes(o.getUTCMinutes()-(r-n));let i=o.getTimezoneOffset();return n!=i&&o.setUTCMinutes(o.getUTCMinutes()+i-n),o}offsetUTC(e){let r=e.getTime();if(!isFinite(r))return NaN;let n=Math.floor(r/x),o=this._offsets.get(n);if(o===void 0){let i=this._offsetAt(n*x),s=this._offsetAt(n*x+x-1);o=i===s?i:null,this._offsets.set(n,o)}return o===null?this._offsetAt(r):o}_offsetAt(e){return(e-rt(this._dtf,new Date(e)))/6e4}parseDate(e){let r=new Date(e.getTime()-Math.round(this.offsetUTC(e)*6e4));return{year:r.getUTCFullYear(),month:r.getUTCMonth(),day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds(),weekday:r.getUTCDay()}}};var q={};tt(q,{StyleRule:()=>O,StyleSheet:()=>P,addClass:()=>Tt,addEventListener:()=>B,addSpacing:()=>kt,alternativeColor:()=>R,blur:()=>ct,brighten:()=>$,capitalizeFirst:()=>Bt,cleanFormat:()=>Pt,contains:()=>G,decimalPlaces:()=>Et,escapeForRgex:()=>$t,focus:()=>lt,get12Hours:()=>Nt,getBrightnessStep:()=>Zt,getDayFromWeek:()=>It,getEventKey:()=>bt,getEventTarget:()=>yt,getFormat:()=>Ot,getLightnessStep:()=>m,getMonthWeek:()=>Ht,getPointerId:()=>at,getRendererEvent:()=>ft,getSafeResolution:()=>St,getShadowRoot:()=>wt,getStyle:()=>dt,getTimeZone:()=>Yt,getTimezoneOffset:()=>zt,getWeek:()=>j,getWeekYear:()=>At,getYearDay:()=>Lt,hslToHsv:()=>Wt,hslToRgb:()=>v,hsvToHsl:()=>Gt,htmlToText:()=>Mt,iOS:()=>W,isLight:()=>U,isLocalEvent:()=>gt,isTouchEvent:()=>pt,lighten:()=>F,mergeTags:()=>Vt,onZoom:()=>ut,padString:()=>b,plainText:()=>Ut,ready:()=>it,relativeToValue:()=>Ct,removeClass:()=>vt,removeElement:()=>st,rgbToHsl:()=>S,sameBounds:()=>Kt,sanitizeHTML:()=>Ft,saturate:()=>k,setInteractive:()=>mt,setStyle:()=>ht,splitString:()=>Rt,stripFormatTags:()=>jt,stripTags:()=>K,supports:()=>T,trim:()=>M,trimLeft:()=>Z,trimRight:()=>V,truncateTextWithEllipsis:()=>Dt});function it(t){if(document.readyState!=="loading")t();else{let e=()=>{document.readyState!=="loading"&&(document.removeEventListener("readystatechange",e),t())};document.addEventListener("readystatechange",e)}}function st(t){t.parentNode&&t.parentNode.removeChild(t)}function B(t,e,r,n){return t.addEventListener(e,r,n||!1),new I(()=>{t.removeEventListener(e,r,n||!1)})}function ut(t){return B(window,"resize",e=>{t()})}function T(t){switch(t){case"touchevents":return window.hasOwnProperty("TouchEvent");case"pointerevents":return window.hasOwnProperty("PointerEvent");case"mouseevents":return window.hasOwnProperty("MouseEvent");case"wheelevents":return window.hasOwnProperty("WheelEvent");case"keyboardevents":return window.hasOwnProperty("KeyboardEvent")}return!1}function at(t){return t.pointerId||0}function ct(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{let t=document.createElement("button");t.style.position="fixed",t.style.top="0px",t.style.left="-10000px",document.body.appendChild(t),t.focus(),t.blur(),document.body.removeChild(t)}}function lt(t){t&&t.focus()}function ft(t){if(T("pointerevents"))return t;if(T("touchevents"))switch(t){case"pointerover":return"touchstart";case"pointerout":return"touchend";case"pointerleave":return"touchend";case"pointerdown":return"touchstart";case"pointermove":return"touchmove";case"pointerup":return"touchend";case"click":return"click";case"dblclick":return"dblclick"}else if(T("mouseevents"))switch(t){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerleave":return"mouseleave";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return t}function pt(t){if(typeof Touch<"u"&&t instanceof Touch)return!0;if(typeof PointerEvent<"u"&&t instanceof PointerEvent&&t.pointerType!=null)switch(t.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(t instanceof MouseEvent)}else if(t.type!=null&&t.type.match(/^mouse/))return!1;return!0}function ht(t,e,r){t.style[e]=r}function dt(t,e){return t.style[e]}function yt(t){if(t.composedPath){let e=t.composedPath();return e.length===0?null:e[0]}else return t.target}function G(t,e){let r=e;for(;;){if(t===r)return!0;if(r.parentNode===null){if(r.host==null)return!1;r=r.host}else r=r.parentNode}}function gt(t,e){return t.target&&G(e.root.dom,t.target)}function mt(t,e){e?t.style.pointerEvents="auto":t.style.pointerEvents="none"}function bt(t){if(t.key!==void 0)return t.key;switch(t.keyCode){case 9:return"Tab";case 13:return"Enter";case 16:return"Shift";case 17:return"Control";case 27:return"Escape";case 32:return" ";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown";case 46:return"Delete"}return""+t.keyCode}function wt(t){let e=t;for(;;){if(e.parentNode===null)return e.host!=null?e:null;e=e.parentNode}}var D;function _t(t,e,r=""){let n=document.createElement("style");return n.type="text/css",r!=""&&n.setAttribute("nonce",r),n.textContent=e,t===null?document.head.appendChild(n):t.appendChild(n),n}function xt(t,e=""){if(t===null){if(D==null){let r=document.createElement("style");r.type="text/css",e!=""&&r.setAttribute("nonce",e),document.head.appendChild(r),D=r.sheet}return D}else{let r=document.createElement("style");return r.type="text/css",e!=""&&r.setAttribute("nonce",e),t.appendChild(r),r.sheet}}function Y(t,e){let r=t.cssRules.length;return t.insertRule(e+"{}",r),t.cssRules[r]}var O=class extends E{constructor(e,r,n,o=""){super(),this._root=xt(e,o);try{this._rule=Y(this._root,r)}catch{this._rule=Y(this._root,":not(*)")}_(n,(i,s)=>{this.setStyle(i,s)})}set selector(e){this._rule.selectorText=e}get selector(){return this._rule.selectorText}_dispose(){let e=A(this._root.cssRules,this._rule);if(e===-1)throw new Error("Could not dispose StyleRule");this._root.deleteRule(e)}_setVendorPrefixName(e,r){let n=this._rule.style;n.setProperty("-webkit-"+e,r,""),n.setProperty("-moz-"+e,r,""),n.setProperty("-ms-"+e,r,""),n.setProperty("-o-"+e,r,""),n.setProperty(e,r,"")}setStyle(e,r){e==="transition"?this._setVendorPrefixName(e,r):this._rule.style.setProperty(e,r,"")}},P=class extends E{constructor(e,r,n=""){super(),this._element=_t(e,r,n)}_dispose(){this._element.parentNode&&this._element.parentNode.removeChild(this._element)}};function Tt(t,e){if(t)if(t.classList){let r=e.split(" ");H(r,n=>{t.classList.add(n)})}else{let r=t.getAttribute("class");r?t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" ")+" "+e):t.setAttribute("class",e)}}function vt(t,e){if(t)if(t.classList)t.classList.remove(e);else{let r=t.getAttribute("class");r&&t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" "))}}function W(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function St(){return W()?1:void 0}function Ct(t,e){return g(t)?t:t!=null&&g(t.value)&&g(e)?e*t.value:0}function Et(t){let e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function b(t,e=0,r="0"){return typeof t!="string"&&(t=t.toString()),e>t.length?Array(e-t.length+1).join(r)+t:t}function Z(t){return t.replace(/^[\s]*/,"")}function V(t){return t.replace(/[\s]*$/,"")}function M(t){return Z(V(t))}function Dt(t,e,r=!1,n="..."){if(t.length>e){let o=e-1;for(;o>=0&&t.charAt(o).match(/\w/);)o--;return o>=0&&r==!1?t.substring(0,o+1)+n:t.substring(0,e)+n}else return t}function Ot(t){if(typeof t>"u")return"string";t=t.toLowerCase().replace(/^\[[^\]]*\]/,""),t=t.replace(/\[[^\]]+\]/,""),t=t.trim();let e=t.match(/\/(date|number|duration)$/);return e?e[1]:t==="number"?"number":t==="date"?"date":t==="duration"?"duration":t.match(/[#0]/)?"number":t.match(/[ymwdhnsqaxkzgtei]/)?"date":"string"}function Pt(t){return t.replace(/\/(date|number|duration)$/i,"")}function K(t){return t&&t.replace(/<[^>]*>/g,"")}function Mt(t){return!t||t.indexOf("<")==-1&&t.indexOf("&")==-1?t:new DOMParser().parseFromString(t,"text/html").documentElement.textContent||""}function jt(t){return t&&t.replace(/\[[^\]]*\]/g,"")}function Ut(t){return t&&K((""+t).replace(/[\n\r]+/g,". "))}var z="script|iframe|frame|frameset|object|embed|applet|noscript|template|link|meta|base|form";function Ft(t){return t==null||t===""?t:(""+t).replace(new RegExp("<\\s*("+z+")\\b[^>]*>[\\s\\S]*?<\\s*\\/\\s*\\1\\s*>","gi"),"").replace(new RegExp("<\\s*\\/?\\s*(?:"+z+")\\b[^>]*>","gi"),"").replace(/\son[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/((?:href|src|xlink:href|action|formaction|data|background|poster|srcdoc|ping)\s*=\s*)(?:"[\s]*j[\s]*a[\s]*v[\s]*a[\s]*s[\s]*c[\s]*r[\s]*i[\s]*p[\s]*t[\s]*:[^"]*"|'[\s]*j[\s]*a[\s]*v[\s]*a[\s]*s[\s]*c[\s]*r[\s]*i[\s]*p[\s]*t[\s]*:[^']*'|(?:javascript|vbscript|livescript|mocha):[^\s>]*)/gi,'$1"#"').replace(/\ssrcdoc\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/\sstyle\s*=\s*(?:"[^"]*(?:expression|javascript:|vbscript:|behavior|-moz-binding)[^"]*"|'[^']*(?:expression|javascript:|vbscript:|behavior|-moz-binding)[^']*')/gi,"")}function $t(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function kt(t){let e="";for(let r=0;r<t.length;r++){let n=t.charAt(r);n.toUpperCase()==n&&r!=0&&(e+=" "),e+=n}return e}function Rt(t){let e=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/,r=/([^اأدذرزو]*[اأدذرزو])/gi,n=t.split(/(\s+)/),o=[];return n.forEach(i=>{if(i.match(/^\s+$/))i===" "&&(i=" "),o.push(i);else if(e.test(i)){let s=i.split(r).filter(u=>u!=="");o=o.concat(s)}else o=o.concat([...i])}),o}function Lt(t,e=!1){if(e)return Math.floor((t.getTime()-h(t.getUTCFullYear(),0,0,0,0,0,0))/864e5);let r=new Date(t.getFullYear(),0,0),n=t.getTime()-r.getTime()+(r.getTimezoneOffset()-t.getTimezoneOffset())*60*1e3,o=1e3*60*60*24;return Math.floor(n/o)}function j(t,e=!1){let r=e?new Date(h(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0,0)):new Date(h(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)),n=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-n);let o=new Date(h(r.getUTCFullYear(),0,1,0,0,0,0));return Math.ceil(((r.getTime()-o.getTime())/864e5+1)/7)}function At(t,e=!1){let r=e?new Date(h(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0,0)):new Date(h(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)),n=r.getUTCDay()||7;return r.setUTCDate(r.getUTCDate()+4-n),r.getUTCFullYear()}function Ht(t,e=!1){let r=j(e?new Date(h(t.getUTCFullYear(),t.getUTCMonth(),1,0,0,0,0)):new Date(t.getFullYear(),t.getMonth(),1),e),n=j(t,e);return n==1&&(n=53),n-r+1}function It(t,e,r=1,n=!1){let o=new Date(e,0,4,0,0,0,0);return n&&o.setUTCFullYear(e),t*7+r-((o.getDay()||7)+3)}function Nt(t,e){return t>12?t-=12:t===0&&(t=12),e!=null?t+(e-1):t}function Yt(t,e=!1,r=!1,n=!1,o){if(n)return e?"Coordinated Universal Time":"UTC";if(o){let u=t.toLocaleString("en-US",{timeZone:o}),l=t.toLocaleString("en-US",{timeZone:o,timeZoneName:e?"long":"short"});return M(l.substr(u.length))}let i=t.toLocaleString("UTC"),s=t.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(i.length);return r===!1&&(s=s.replace(/ (standard|daylight|summer|winter) /i," ")),M(s)}function zt(t,e){let r=e||new Date(Date.UTC(2012,0,1,0,0,0,0)),n=new Date(r.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(r.toLocaleString("en-US",{timeZone:t})).getTime()-n.getTime())/6e4*-1}function Bt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function v(t){let e,r,n,o=t.h,i=t.s,s=t.l;if(i==0)e=r=n=s;else{let u=function(f,C,p){return p<0&&(p+=1),p>1&&(p-=1),p<.16666666666666666?f+(C-f)*6*p:p<.5?C:p<.6666666666666666?f+(C-f)*(.6666666666666666-p)*6:f},l=s<.5?s*(1+i):s+i-s*i,a=2*s-l;e=u(a,l,o+1/3),r=u(a,l,o),n=u(a,l,o-1/3)}return{r:Math.round(e*255),g:Math.round(r*255),b:Math.round(n*255)}}function S(t){let e=t.r/255,r=t.g/255,n=t.b/255,o=Math.max(e,r,n),i=Math.min(e,r,n),s=0,u=0,l=(o+i)/2;if(o===i)s=u=0;else{let a=o-i;switch(u=l>.5?a/(2-o-i):a/(o+i),o){case e:s=(r-n)/a+(r<n?6:0);break;case r:s=(n-e)/a+2;break;case n:s=(e-r)/a+4;break}s/=6}return{h:s,s:u,l}}function Gt(t){let e=t.v*(1-t.s/2),r=e===0||e===1?0:(t.v-e)/Math.min(e,1-e);return{h:t.h,s:r,l:e,a:t.a}}function Wt(t){let e=t.l+t.s*Math.min(t.l,1-t.l),r=e===0?0:2*(1-t.l/e);return{h:t.h,s:r,v:e,a:t.a}}function F(t,e){return t&&{r:Math.max(0,Math.min(255,t.r+m(t.r,e))),g:Math.max(0,Math.min(255,t.g+m(t.g,e))),b:Math.max(0,Math.min(255,t.b+m(t.b,e))),a:t.a}}function m(t,e){let r=e>0?255-t:t;return Math.round(r*e)}function $(t,e){if(t){let r=Math.min(Math.max(t.r,t.g,t.b),230),n=m(r,e);return{r:Math.max(0,Math.min(255,Math.round(t.r+n))),g:Math.max(0,Math.min(255,Math.round(t.g+n))),b:Math.max(0,Math.min(255,Math.round(t.b+n))),a:t.a}}else return t}function Zt(t,e){return Math.round(255*e)}function U(t){return(t.r*299+t.g*587+t.b*114)/1e3>=128}function k(t,e){if(t===void 0||e==1)return t;let r=S(t);return r.s=e,v(r)}function R(t,e={r:255,g:255,b:255},r={r:0,g:0,b:0}){let n=e,o=r;return U(r)&&(n=r,o=e),U(t)?o:n}function Vt(t,e){return t||(t=[]),[...t,...e].filter((r,n,o)=>o.indexOf(r)===n)}function Kt(t,e){return!(!e||t.left!=e.left||t.right!=e.right||t.top!=e.top||t.bottom!=e.bottom)}function J(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(c){try{a(n.next(c))}catch(f){s(f)}}function l(c){try{a(n.throw(c))}catch(f){s(f)}}function a(c){c.done?i(c.value):o(c.value).then(u,l)}a((n=n.apply(t,e||[])).next())})}function ae(t){return J(this,void 0,void 0,function*(){if(t!==void 0){let e=[];_(t,(r,n)=>{e.push(n.waitForStop())}),yield Promise.all(e)}})}function d(t,e,r){return e+t*(r-e)}function qt(t,e,r){return t>=1?r:e}function Jt(t,e,r){return new w(d(t,e.percent,r.percent))}function Qt(t,e,r){return y.interpolate(t,e,r)}function ce(t,e){return typeof t=="number"&&typeof e=="number"?d:t instanceof w&&e instanceof w?Jt:t instanceof y&&e instanceof y?Qt:qt}var Q;(function(t){t[t.Stopped=0]="Stopped",t[t.Playing=1]="Playing",t[t.Paused=2]="Paused"})(Q||(Q={}));function X(t){return t[0]==="#"&&(t=t.substr(1)),t.length==3&&(t=t[0].repeat(2)+t[1].repeat(2)+t[2].repeat(2)),parseInt(t,16)}function Xt(t){t=t.replace(/[ ]/g,"");let e=t.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=t.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return 0;let r="";for(let n=1;n<=3;n++){let o=parseInt(e[n]).toString(16);o.length==1&&(o="0"+o),r+=o}return X(r)}function pe(t){return y.fromAny(t)}var y=class t{constructor(e){this._hex=e|0}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return this._hex&255}toCSS(e=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+e+")"}toCSSHex(){return"#"+b(this.r.toString(16),2)+b(this.g.toString(16),2)+b(this.b.toString(16),2)}toHSL(e=1){return S({r:this.r,g:this.g,b:this.b,a:e})}static fromHSL(e,r,n){let o=v({h:e,s:r,l:n});return this.fromRGB(o.r,o.g,o.b)}toString(){return this.toCSSHex()}static fromHex(e){return new t(e)}static fromRGB(e,r,n){return new t((n|0)+(r<<8)+(e<<16))}static fromString(e){return new t(X(e))}static fromCSS(e){return new t(Xt(e))}static fromAny(e){if(L(e)){if(e[0]=="#")return t.fromString(e);if(e.substr(0,3)=="rgb")return t.fromCSS(e)}else{if(g(e))return t.fromHex(e);if(e instanceof t)return t.fromHex(e.hex)}throw new Error("Unknown color syntax: "+e)}static alternative(e,r,n){let o=R({r:e.r,g:e.g,b:e.b},r?{r:r.r,g:r.g,b:r.b}:void 0,n?{r:n.r,g:n.g,b:n.b}:void 0);return this.fromRGB(o.r,o.g,o.b)}static interpolate(e,r,n,o="rgb"){if(o=="hsl"){let i=r.toHSL(),s=n.toHSL();return t.fromHSL(d(e,i.h,s.h),d(e,i.s,s.s),d(e,i.l,s.l))}else return t.fromRGB(d(e,r.r,n.r),d(e,r.g,n.g),d(e,r.b,n.b))}static interpolateColors(e,r,n="rgb"){let o=r.length-1;if(o<1)return r[0];let i=(e>0?Math.min(1,e):0)*o,s=Math.min(Math.floor(i),o-1);return t.interpolate(i-s,r[s],r[s+1],n)}static lighten(e,r){let n=F({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static brighten(e,r){let n=$({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static saturate(e,r){let n=k({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}};export{J as a,h as b,N as c,it as d,st as e,B as f,ut as g,T as h,at as i,ct as j,lt as k,ft as l,pt as m,ht as n,dt as o,yt as p,G as q,gt as r,mt as s,bt as t,wt as u,O as v,St as w,Ct as x,Et as y,b as z,M as A,Dt as B,Ot as C,Pt as D,K as E,jt as F,Ft as G,$t as H,Rt as I,Lt as J,j as K,At as L,Ht as M,It as N,Nt as O,Yt as P,zt as Q,Bt as R,Vt as S,Kt as T,q as U,pe as V,y as W,ae as X,Jt as Y,ce as Z,Q as _};
2
+ import{a as w}from"./33LESQ6T.js";import{K as _,N as E,O as I,f as L,g,m as A,p as H}from"./KZUUBMYO.js";import{a as tt}from"./TAVTDQ6S.js";function et(t,e){let r=0,n=0,o=1,i=0,s=0,u=0,l=0,a=0;return t.formatToParts(e).forEach(c=>{switch(c.type){case"year":r=+c.value;break;case"month":n=+c.value-1;break;case"day":o=+c.value;break;case"hour":i=+c.value;break;case"minute":s=+c.value;break;case"second":u=+c.value;break;case"fractionalSecond":l=+c.value;break;case"weekday":switch(c.value){case"Sun":a=0;break;case"Mon":a=1;break;case"Tue":a=2;break;case"Wed":a=3;break;case"Thu":a=4;break;case"Fri":a=5;break;case"Sat":a=6;break}}}),i===24&&(i=0),{year:r,month:n,day:o,hour:i,minute:s,second:u,millisecond:l,weekday:a}}function rt(t,e){let{year:r,month:n,day:o,hour:i,minute:s,second:u,millisecond:l}=et(t,e);return h(r,n,o,i,s,u,l)}function h(t,e,r,n,o,i,s){if(t>=100||t<0)return Date.UTC(t,e,r,n,o,i,s);let u=new Date(Date.UTC(t+400,e,r,n,o,i,s));return u.setUTCFullYear(u.getUTCFullYear()-400),u.getTime()}var x=864e5,N=class{constructor(e,r){if(this._offsets=new Map,!r)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this.name=e,this._dtf=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",weekday:"short",fractionalSecondDigits:3})}static new(e){return new this(e,!0)}convertLocal(e){let r=this.offsetUTC(e),n=e.getTimezoneOffset(),o=new Date(e);o.setUTCMinutes(o.getUTCMinutes()-(r-n));let i=o.getTimezoneOffset();return n!=i&&o.setUTCMinutes(o.getUTCMinutes()+i-n),o}offsetUTC(e){let r=e.getTime();if(!isFinite(r))return NaN;let n=Math.floor(r/x),o=this._offsets.get(n);if(o===void 0){let i=this._offsetAt(n*x),s=this._offsetAt(n*x+x-1);o=i===s?i:null,this._offsets.set(n,o)}return o===null?this._offsetAt(r):o}_offsetAt(e){return(e-rt(this._dtf,new Date(e)))/6e4}parseDate(e){let r=new Date(e.getTime()-Math.round(this.offsetUTC(e)*6e4));return{year:r.getUTCFullYear(),month:r.getUTCMonth(),day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds(),weekday:r.getUTCDay()}}};var q={};tt(q,{StyleRule:()=>O,StyleSheet:()=>P,addClass:()=>Tt,addEventListener:()=>B,addSpacing:()=>kt,alternativeColor:()=>R,blur:()=>ct,brighten:()=>$,capitalizeFirst:()=>Bt,cleanFormat:()=>Pt,contains:()=>G,decimalPlaces:()=>Et,escapeForRgex:()=>$t,focus:()=>lt,get12Hours:()=>Nt,getBrightnessStep:()=>Zt,getDayFromWeek:()=>It,getEventKey:()=>bt,getEventTarget:()=>yt,getFormat:()=>Ot,getLightnessStep:()=>m,getMonthWeek:()=>Ht,getPointerId:()=>at,getRendererEvent:()=>ft,getSafeResolution:()=>St,getShadowRoot:()=>wt,getStyle:()=>dt,getTimeZone:()=>Yt,getTimezoneOffset:()=>zt,getWeek:()=>j,getWeekYear:()=>At,getYearDay:()=>Lt,hslToHsv:()=>Wt,hslToRgb:()=>v,hsvToHsl:()=>Gt,htmlToText:()=>Mt,iOS:()=>W,isLight:()=>U,isLocalEvent:()=>gt,isTouchEvent:()=>pt,lighten:()=>F,mergeTags:()=>Vt,onZoom:()=>ut,padString:()=>b,plainText:()=>Ut,ready:()=>it,relativeToValue:()=>Ct,removeClass:()=>vt,removeElement:()=>st,rgbToHsl:()=>S,sameBounds:()=>Kt,sanitizeHTML:()=>Ft,saturate:()=>k,setInteractive:()=>mt,setStyle:()=>ht,splitString:()=>Rt,stripFormatTags:()=>jt,stripTags:()=>K,supports:()=>T,trim:()=>M,trimLeft:()=>Z,trimRight:()=>V,truncateTextWithEllipsis:()=>Dt});function it(t){if(document.readyState!=="loading")t();else{let e=()=>{document.readyState!=="loading"&&(document.removeEventListener("readystatechange",e),t())};document.addEventListener("readystatechange",e)}}function st(t){t.parentNode&&t.parentNode.removeChild(t)}function B(t,e,r,n){return t.addEventListener(e,r,n||!1),new I(()=>{t.removeEventListener(e,r,n||!1)})}function ut(t){return B(window,"resize",e=>{t()})}function T(t){switch(t){case"touchevents":return window.hasOwnProperty("TouchEvent");case"pointerevents":return window.hasOwnProperty("PointerEvent");case"mouseevents":return window.hasOwnProperty("MouseEvent");case"wheelevents":return window.hasOwnProperty("WheelEvent");case"keyboardevents":return window.hasOwnProperty("KeyboardEvent")}return!1}function at(t){return t.pointerId||0}function ct(){if(document.activeElement&&document.activeElement!=document.body)if(document.activeElement.blur)document.activeElement.blur();else{let t=document.createElement("button");t.style.position="fixed",t.style.top="0px",t.style.left="-10000px",document.body.appendChild(t),t.focus(),t.blur(),document.body.removeChild(t)}}function lt(t){t&&t.focus()}function ft(t){if(T("pointerevents"))return t;if(T("touchevents"))switch(t){case"pointerover":return"touchstart";case"pointerout":return"touchend";case"pointerleave":return"touchend";case"pointerdown":return"touchstart";case"pointermove":return"touchmove";case"pointerup":return"touchend";case"click":return"click";case"dblclick":return"dblclick"}else if(T("mouseevents"))switch(t){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerleave":return"mouseleave";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return t}function pt(t){if(typeof Touch<"u"&&t instanceof Touch)return!0;if(typeof PointerEvent<"u"&&t instanceof PointerEvent&&t.pointerType!=null)switch(t.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(t instanceof MouseEvent)}else if(t.type!=null&&t.type.match(/^mouse/))return!1;return!0}function ht(t,e,r){t.style[e]=r}function dt(t,e){return t.style[e]}function yt(t){if(t.composedPath){let e=t.composedPath();return e.length===0?null:e[0]}else return t.target}function G(t,e){let r=e;for(;;){if(t===r)return!0;if(r.parentNode===null){if(r.host==null)return!1;r=r.host}else r=r.parentNode}}function gt(t,e){return t.target&&G(e.root.dom,t.target)}function mt(t,e){e?t.style.pointerEvents="auto":t.style.pointerEvents="none"}function bt(t){if(t.key!==void 0)return t.key;switch(t.keyCode){case 9:return"Tab";case 13:return"Enter";case 16:return"Shift";case 17:return"Control";case 27:return"Escape";case 32:return" ";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown";case 46:return"Delete"}return""+t.keyCode}function wt(t){let e=t;for(;;){if(e.parentNode===null)return e.host!=null?e:null;e=e.parentNode}}var D;function _t(t,e,r=""){let n=document.createElement("style");return n.type="text/css",r!=""&&n.setAttribute("nonce",r),n.textContent=e,t===null?document.head.appendChild(n):t.appendChild(n),n}function xt(t,e=""){if(t===null){if(D==null){let r=document.createElement("style");r.type="text/css",e!=""&&r.setAttribute("nonce",e),document.head.appendChild(r),D=r.sheet}return D}else{let r=document.createElement("style");return r.type="text/css",e!=""&&r.setAttribute("nonce",e),t.appendChild(r),r.sheet}}function Y(t,e){let r=t.cssRules.length;return t.insertRule(e+"{}",r),t.cssRules[r]}var O=class extends E{constructor(e,r,n,o=""){super(),this._root=xt(e,o);try{this._rule=Y(this._root,r)}catch{this._rule=Y(this._root,":not(*)")}_(n,(i,s)=>{this.setStyle(i,s)})}set selector(e){this._rule.selectorText=e}get selector(){return this._rule.selectorText}_dispose(){let e=A(this._root.cssRules,this._rule);if(e===-1)throw new Error("Could not dispose StyleRule");this._root.deleteRule(e)}_setVendorPrefixName(e,r){let n=this._rule.style;n.setProperty("-webkit-"+e,r,""),n.setProperty("-moz-"+e,r,""),n.setProperty("-ms-"+e,r,""),n.setProperty("-o-"+e,r,""),n.setProperty(e,r,"")}setStyle(e,r){e==="transition"?this._setVendorPrefixName(e,r):this._rule.style.setProperty(e,r,"")}},P=class extends E{constructor(e,r,n=""){super(),this._element=_t(e,r,n)}_dispose(){this._element.parentNode&&this._element.parentNode.removeChild(this._element)}};function Tt(t,e){if(t)if(t.classList){let r=e.split(" ");H(r,n=>{t.classList.add(n)})}else{let r=t.getAttribute("class");r?t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" ")+" "+e):t.setAttribute("class",e)}}function vt(t,e){if(t)if(t.classList)t.classList.remove(e);else{let r=t.getAttribute("class");r&&t.setAttribute("class",r.split(" ").filter(n=>n!==e).join(" "))}}function W(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function St(){return W()?1:void 0}function Ct(t,e){return g(t)?t:t!=null&&g(t.value)&&g(e)?e*t.value:0}function Et(t){let e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function b(t,e=0,r="0"){return typeof t!="string"&&(t=t.toString()),e>t.length?Array(e-t.length+1).join(r)+t:t}function Z(t){return t.replace(/^[\s]*/,"")}function V(t){return t.replace(/[\s]*$/,"")}function M(t){return Z(V(t))}function Dt(t,e,r=!1,n="..."){if(t.length>e){let o=e-1;for(;o>=0&&t.charAt(o).match(/\w/);)o--;return o>=0&&r==!1?t.substring(0,o+1)+n:t.substring(0,e)+n}else return t}function Ot(t){if(typeof t>"u")return"string";t=t.toLowerCase().replace(/^\[[^\]]*\]/,""),t=t.replace(/\[[^\]]+\]/,""),t=t.trim();let e=t.match(/\/(date|number|duration)$/);return e?e[1]:t==="number"?"number":t==="date"?"date":t==="duration"?"duration":t.match(/[#0]/)?"number":t.match(/[ymwdhnsqaxkzgtei]/)?"date":"string"}function Pt(t){return t.replace(/\/(date|number|duration)$/i,"")}function K(t){return t&&t.replace(/<[^>]*>/g,"")}function Mt(t){return!t||t.indexOf("<")==-1&&t.indexOf("&")==-1?t:new DOMParser().parseFromString(t,"text/html").documentElement.textContent||""}function jt(t){return t&&t.replace(/\[[^\]]*\]/g,"")}function Ut(t){return t&&K((""+t).replace(/[\n\r]+/g,". "))}var z="script|iframe|frame|frameset|object|embed|applet|noscript|template|link|meta|base|form";function Ft(t){return t==null||t===""?t:(""+t).replace(new RegExp("<\\s*("+z+")\\b[^>]*>[\\s\\S]*?<\\s*\\/\\s*\\1\\s*>","gi"),"").replace(new RegExp("<\\s*\\/?\\s*(?:"+z+")\\b[^>]*>","gi"),"").replace(/\son[a-z]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/((?:href|src|xlink:href|action|formaction|data|background|poster|srcdoc|ping)\s*=\s*)(?:"[\s]*j[\s]*a[\s]*v[\s]*a[\s]*s[\s]*c[\s]*r[\s]*i[\s]*p[\s]*t[\s]*:[^"]*"|'[\s]*j[\s]*a[\s]*v[\s]*a[\s]*s[\s]*c[\s]*r[\s]*i[\s]*p[\s]*t[\s]*:[^']*'|(?:javascript|vbscript|livescript|mocha):[^\s>]*)/gi,'$1"#"').replace(/\ssrcdoc\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/\sstyle\s*=\s*(?:"[^"]*(?:expression|javascript:|vbscript:|behavior|-moz-binding)[^"]*"|'[^']*(?:expression|javascript:|vbscript:|behavior|-moz-binding)[^']*')/gi,"")}function $t(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function kt(t){let e="";for(let r=0;r<t.length;r++){let n=t.charAt(r);n.toUpperCase()==n&&r!=0&&(e+=" "),e+=n}return e}function Rt(t){let e=/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/,r=/([^اأدذرزو]*[اأدذرزو])/gi,n=t.split(/(\s+)/),o=[];return n.forEach(i=>{if(i.match(/^\s+$/))i===" "&&(i=" "),o.push(i);else if(e.test(i)){let s=i.split(r).filter(u=>u!=="");o=o.concat(s)}else o=o.concat([...i])}),o}function Lt(t,e=!1){if(e)return Math.floor((t.getTime()-h(t.getUTCFullYear(),0,0,0,0,0,0))/864e5);let r=new Date(t.getFullYear(),0,0),n=t.getTime()-r.getTime()+(r.getTimezoneOffset()-t.getTimezoneOffset())*60*1e3,o=1e3*60*60*24;return Math.floor(n/o)}function j(t,e=!1){let r=e?new Date(h(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0,0)):new Date(h(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)),n=r.getUTCDay()||7;r.setUTCDate(r.getUTCDate()+4-n);let o=new Date(h(r.getUTCFullYear(),0,1,0,0,0,0));return Math.ceil(((r.getTime()-o.getTime())/864e5+1)/7)}function At(t,e=!1){let r=e?new Date(h(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0,0)):new Date(h(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)),n=r.getUTCDay()||7;return r.setUTCDate(r.getUTCDate()+4-n),r.getUTCFullYear()}function Ht(t,e=!1){let r=j(e?new Date(h(t.getUTCFullYear(),t.getUTCMonth(),1,0,0,0,0)):new Date(t.getFullYear(),t.getMonth(),1),e),n=j(t,e);return n==1&&(n=53),n-r+1}function It(t,e,r=1,n=!1){let o=new Date(e,0,4,0,0,0,0);return n&&o.setUTCFullYear(e),t*7+r-((o.getDay()||7)+3)}function Nt(t,e){return t>12?t-=12:t===0&&(t=12),e!=null?t+(e-1):t}function Yt(t,e=!1,r=!1,n=!1,o){if(n)return e?"Coordinated Universal Time":"UTC";if(o){let u=t.toLocaleString("en-US",{timeZone:o}),l=t.toLocaleString("en-US",{timeZone:o,timeZoneName:e?"long":"short"});return M(l.substr(u.length))}let i=t.toLocaleString("UTC"),s=t.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(i.length);return r===!1&&(s=s.replace(/ (standard|daylight|summer|winter) /i," ")),M(s)}function zt(t,e){let r=e||new Date(Date.UTC(2012,0,1,0,0,0,0)),n=new Date(r.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(r.toLocaleString("en-US",{timeZone:t})).getTime()-n.getTime())/6e4*-1}function Bt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function v(t){let e,r,n,o=t.h,i=t.s,s=t.l;if(i==0)e=r=n=s;else{let u=function(f,C,p){return p<0&&(p+=1),p>1&&(p-=1),p<.16666666666666666?f+(C-f)*6*p:p<.5?C:p<.6666666666666666?f+(C-f)*(.6666666666666666-p)*6:f},l=s<.5?s*(1+i):s+i-s*i,a=2*s-l;e=u(a,l,o+1/3),r=u(a,l,o),n=u(a,l,o-1/3)}return{r:Math.round(e*255),g:Math.round(r*255),b:Math.round(n*255)}}function S(t){let e=t.r/255,r=t.g/255,n=t.b/255,o=Math.max(e,r,n),i=Math.min(e,r,n),s=0,u=0,l=(o+i)/2;if(o===i)s=u=0;else{let a=o-i;switch(u=l>.5?a/(2-o-i):a/(o+i),o){case e:s=(r-n)/a+(r<n?6:0);break;case r:s=(n-e)/a+2;break;case n:s=(e-r)/a+4;break}s/=6}return{h:s,s:u,l}}function Gt(t){let e=t.v*(1-t.s/2),r=e===0||e===1?0:(t.v-e)/Math.min(e,1-e);return{h:t.h,s:r,l:e,a:t.a}}function Wt(t){let e=t.l+t.s*Math.min(t.l,1-t.l),r=e===0?0:2*(1-t.l/e);return{h:t.h,s:r,v:e,a:t.a}}function F(t,e){return t&&{r:Math.max(0,Math.min(255,t.r+m(t.r,e))),g:Math.max(0,Math.min(255,t.g+m(t.g,e))),b:Math.max(0,Math.min(255,t.b+m(t.b,e))),a:t.a}}function m(t,e){let r=e>0?255-t:t;return Math.round(r*e)}function $(t,e){if(t){let r=Math.min(Math.max(t.r,t.g,t.b),230),n=m(r,e);return{r:Math.max(0,Math.min(255,Math.round(t.r+n))),g:Math.max(0,Math.min(255,Math.round(t.g+n))),b:Math.max(0,Math.min(255,Math.round(t.b+n))),a:t.a}}else return t}function Zt(t,e){return Math.round(255*e)}function U(t){return(t.r*299+t.g*587+t.b*114)/1e3>=128}function k(t,e){if(t===void 0||e==1)return t;let r=S(t);return r.s=e,v(r)}function R(t,e={r:255,g:255,b:255},r={r:0,g:0,b:0}){let n=e,o=r;return U(r)&&(n=r,o=e),U(t)?o:n}function Vt(t,e){return t||(t=[]),[...t,...e].filter((r,n,o)=>o.indexOf(r)===n)}function Kt(t,e){return!(!e||t.left!=e.left||t.right!=e.right||t.top!=e.top||t.bottom!=e.bottom)}function J(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(c){try{a(n.next(c))}catch(f){s(f)}}function l(c){try{a(n.throw(c))}catch(f){s(f)}}function a(c){c.done?i(c.value):o(c.value).then(u,l)}a((n=n.apply(t,e||[])).next())})}function ae(t){return J(this,void 0,void 0,function*(){if(t!==void 0){let e=[];_(t,(r,n)=>{e.push(n.waitForStop())}),yield Promise.all(e)}})}function d(t,e,r){return e+t*(r-e)}function qt(t,e,r){return t>=1?r:e}function Jt(t,e,r){return new w(d(t,e.percent,r.percent))}function Qt(t,e,r){return y.interpolate(t,e,r)}function ce(t,e){return typeof t=="number"&&typeof e=="number"?d:t instanceof w&&e instanceof w?Jt:t instanceof y&&e instanceof y?Qt:qt}var Q;(function(t){t[t.Stopped=0]="Stopped",t[t.Playing=1]="Playing",t[t.Paused=2]="Paused"})(Q||(Q={}));function X(t){return t[0]==="#"&&(t=t.substr(1)),t.length==3&&(t=t[0].repeat(2)+t[1].repeat(2)+t[2].repeat(2)),parseInt(t,16)}function Xt(t){t=t.replace(/[ ]/g,"");let e=t.match(/^rgb\(([0-9]*),([0-9]*),([0-9]*)\)/i);if(e)e.push("1");else if(e=t.match(/^rgba\(([0-9]*),([0-9]*),([0-9]*),([.0-9]*)\)/i),!e)return 0;let r="";for(let n=1;n<=3;n++){let o=parseInt(e[n]).toString(16);o.length==1&&(o="0"+o),r+=o}return X(r)}function pe(t){return y.fromAny(t)}var y=class t{constructor(e){this._hex=e|0}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return this._hex&255}toCSS(e=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+e+")"}toCSSHex(){return"#"+b(this.r.toString(16),2)+b(this.g.toString(16),2)+b(this.b.toString(16),2)}toHSL(e=1){return S({r:this.r,g:this.g,b:this.b,a:e})}static fromHSL(e,r,n){let o=v({h:e,s:r,l:n});return this.fromRGB(o.r,o.g,o.b)}toString(){return this.toCSSHex()}static fromHex(e){return new t(e)}static fromRGB(e,r,n){return new t((n|0)+(r<<8)+(e<<16))}static fromString(e){return new t(X(e))}static fromCSS(e){return new t(Xt(e))}static fromAny(e){if(L(e)){if(e[0]=="#")return t.fromString(e);if(e.substr(0,3)=="rgb")return t.fromCSS(e)}else{if(g(e))return t.fromHex(e);if(e instanceof t)return t.fromHex(e.hex)}throw new Error("Unknown color syntax: "+e)}static alternative(e,r,n){let o=R({r:e.r,g:e.g,b:e.b},r?{r:r.r,g:r.g,b:r.b}:void 0,n?{r:n.r,g:n.g,b:n.b}:void 0);return this.fromRGB(o.r,o.g,o.b)}static interpolate(e,r,n,o="rgb"){if(o=="hsl"){let i=r.toHSL(),s=n.toHSL();return t.fromHSL(d(e,i.h,s.h),d(e,i.s,s.s),d(e,i.l,s.l))}else return t.fromRGB(d(e,r.r,n.r),d(e,r.g,n.g),d(e,r.b,n.b))}static interpolateColors(e,r,n="rgb"){let o=r.length-1;if(o<1)return r[0];let i=(e>0?Math.min(1,e):0)*o,s=Math.min(Math.floor(i),o-1);return t.interpolate(i-s,r[s],r[s+1],n)}static lighten(e,r){let n=F({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static brighten(e,r){let n=$({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}static saturate(e,r){let n=k({r:e.r,g:e.g,b:e.b},r);return t.fromRGB(n.r,n.g,n.b)}};export{J as a,h as b,N as c,it as d,st as e,B as f,ut as g,T as h,at as i,ct as j,lt as k,ft as l,pt as m,ht as n,dt as o,yt as p,G as q,gt as r,mt as s,bt as t,wt as u,O as v,St as w,Ct as x,Et as y,b as z,M as A,Dt as B,Ot as C,Pt as D,K as E,jt as F,Ft as G,$t as H,Rt as I,Lt as J,j as K,At as L,Ht as M,It as N,Nt as O,Yt as P,zt as Q,Bt as R,Vt as S,Kt as T,q as U,pe as V,y as W,ae as X,Jt as Y,ce as Z,Q as _};