@arcgis/core 4.27.0-next.20230421 → 4.27.0-next.20230422
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/085e9a46ee3a8a1a5e20.js +1 -0
- package/assets/esri/core/workers/chunks/5f3899efbb967c6e8422.js +1 -0
- package/assets/esri/core/workers/chunks/f47046967c3b13996a14.js +1 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +1 -0
- package/assets/esri/themes/base/widgets/_FeatureMedia.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/Popup/t9n/Popup.json +1 -1
- package/assets/esri/widgets/Popup/t9n/Popup_en.json +1 -1
- package/chunks/Button.js +5 -0
- package/chunks/ColorSet.js +5 -0
- package/chunks/DefaultTheme.js +5 -0
- package/chunks/Theme.js +5 -0
- package/chunks/Tick.js +5 -0
- package/chunks/Tooltip.js +5 -0
- package/interfaces.d.ts +6 -0
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
- package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
- package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureMedia/chartCommon.js +5 -0
- package/widgets/Feature/FeatureMedia/pieChart.js +5 -0
- package/widgets/Feature/FeatureMedia/xyChart.js +5 -0
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/support/chartUtilsAm5.js +5 -0
- package/assets/esri/core/workers/chunks/353e5b283e0f4416684a.js +0 -1
- package/assets/esri/core/workers/chunks/81529aee5e6efa3afc83.js +0 -1
- package/assets/esri/core/workers/chunks/bcd79124744cd3682c78.js +0 -1
- package/widgets/support/am5chartUtils.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"widgetLabel":"Popup","zoom":"Zoom to","next":"Next feature","previous":"Previous feature","dock":"Dock","undock":"Undock","pageText":"{index} of {total}","selectedFeature":"Selected feature","selectedFeatures":"{total}
|
|
1
|
+
{"widgetLabel":"Popup","zoom":"Zoom to","next":"Next feature","previous":"Previous feature","dock":"Dock","undock":"Undock","pageText":"{index} of {total}","selectedFeature":"Selected feature","selectedFeatures":"Results: {total}","browseClusteredFeatures":"Browse features","exitRelatedRecords":"Exit related records","selectFeature":"Select feature"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"widgetLabel":"Popup","zoom":"Zoom to","next":"Next feature","previous":"Previous feature","dock":"Dock","undock":"Undock","pageText":"{index} of {total}","selectedFeature":"Selected feature","selectedFeatures":"{total}
|
|
1
|
+
{"widgetLabel":"Popup","zoom":"Zoom to","next":"Next feature","previous":"Previous feature","dock":"Dock","undock":"Undock","pageText":"{index} of {total}","selectedFeature":"Selected feature","selectedFeatures":"Results: {total}","browseClusteredFeatures":"Browse features","exitRelatedRecords":"Exit related records","selectFeature":"Select feature"}
|
package/chunks/Button.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{a4 as e,g as s,aq as t,aj as i,a2 as a,ak as r}from"./Theme.js";class n extends e{_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),a=this.height(),r=e,n=a,o=r/Math.abs(e),h=n/Math.abs(a);if(s(r)&&s(n)){let e=Math.min(r,n)/2,s=t(this.get("cornerRadiusTL",8),e),a=t(this.get("cornerRadiusTR",8),e),c=t(this.get("cornerRadiusBR",8),e),l=t(this.get("cornerRadiusBL",8),e),d=Math.min(Math.abs(r/2),Math.abs(n/2));s=i(s,0,d),a=i(a,0,d),c=i(c,0,d),l=i(l,0,d);const b=this._display;b.moveTo(s*o,0),b.lineTo(r-a*o,0),a>0&&b.arcTo(r,0,r,a*h,a),b.lineTo(r,n-c*h),c>0&&b.arcTo(r,n,r-c*o,n,c),b.lineTo(l*o,n),l>0&&b.arcTo(0,n,0,n-l*h,l),b.lineTo(0,s*h),s>0&&b.arcTo(0,0,s*o,0,s),b.closePath()}}}Object.defineProperty(n,"className",{enumerable:!0,configurable:!0,writable:!0,value:"RoundedRectangle"}),Object.defineProperty(n,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:e.classNames.concat([n.className])});class o extends a{_afterNew(){this._settings.themeTags=r(this._settings.themeTags,["button"]),super._afterNew(),this._settings.background||this.set("background",n.new(this._root,{themeTags:r(this._settings.themeTags,["background"])}))}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){const e=this._prevSettings.icon,s=this.get("icon");s!==e&&(this._disposeProperty("icon"),e&&e.dispose(),s&&this.children.push(s),this._prevSettings.icon=s)}if(this.isDirty("label")){const e=this._prevSettings.label,s=this.get("label");s!==e&&(this._disposeProperty("label"),e&&e.dispose(),s&&this.children.push(s),this._prevSettings.label=s)}}}Object.defineProperty(o,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Button"}),Object.defineProperty(o,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:a.classNames.concat([o.className])});export{o as B,n as R};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{E as e,C as t}from"./Theme.js";class s extends e{_afterNew(){super._afterNewApplyThemes(),this._dirty.colors=!1}_beforeChanged(){this.isDirty("colors")&&this.reset()}generateColors(){this.setPrivate("currentPass",this.getPrivate("currentPass",0)+1);const e=this.getPrivate("currentPass"),s=this.get("colors",[this.get("baseColor",t.fromHex(16711680))]);this.getPrivate("numColors")||this.setPrivate("numColors",s.length);const r=this.getPrivate("numColors"),a=0,i=this.get("passOptions"),o=this.get("reuse");for(let n=a;n<r;n++)if(o)s.push(s[n]);else{const r=s[n].toHSL();let a=r.h+(i.hue||0)*e;for(;a>1;)a-=1;let o=r.s+(i.saturation||0)*e;o>1&&(o=1),o<0&&(o=0);let l=r.l+(i.lightness||0)*e;for(;l>1;)l-=1;s.push(t.fromHSL(a,o,l))}}getIndex(e){const s=this.get("colors",[]),r=this.get("saturation");return e>=s.length?(this.generateColors(),this.getIndex(e)):null!=r?t.saturate(s[e],r):s[e]}next(){let e=this.getPrivate("currentStep",this.get("startIndex",0));return this.setPrivate("currentStep",e+this.get("step",1)),this.getIndex(e)}reset(){this.setPrivate("currentStep",this.get("startIndex",0)),this.setPrivate("currentPass",0)}}Object.defineProperty(s,"className",{enumerable:!0,configurable:!0,writable:!0,value:"ColorSet"}),Object.defineProperty(s,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:e.classNames.concat([s.className])});export{s as C};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{ai as e,C as t,am as o,an as a,a3 as i,a0 as n,ao as r}from"./Theme.js";function l(e,t,o,a){e.set(t,o.get(a)),o.on(a,(o=>{e.set(t,o)}))}class s extends e{setupDefaultRules(){super.setupDefaultRules();const e=this._root.language,s=this._root.interfaceColors,d=this._root.horizontalLayout,c=this._root.verticalLayout,u=this.rule.bind(this);u("InterfaceColors").setAll({stroke:t.fromHex(15066597),fill:t.fromHex(15987699),primaryButton:t.fromHex(6788316),primaryButtonHover:t.fromHex(6779356),primaryButtonDown:t.fromHex(6872182),primaryButtonActive:t.fromHex(6872182),primaryButtonText:t.fromHex(16777215),primaryButtonStroke:t.fromHex(16777215),secondaryButton:t.fromHex(14277081),secondaryButtonHover:t.fromHex(10724259),secondaryButtonDown:t.fromHex(9276813),secondaryButtonActive:t.fromHex(15132390),secondaryButtonText:t.fromHex(0),secondaryButtonStroke:t.fromHex(16777215),grid:t.fromHex(0),background:t.fromHex(16777215),alternativeBackground:t.fromHex(0),text:t.fromHex(0),alternativeText:t.fromHex(16777215),disabled:t.fromHex(11382189),positive:t.fromHex(5288704),negative:t.fromHex(11730944)});{const e=u("ColorSet");e.setAll({passOptions:{hue:.05,saturation:0,lightness:0},colors:[t.fromHex(6797276)],step:1,reuse:!1,startIndex:0}),e.setPrivate("currentStep",0),e.setPrivate("currentPass",0)}u("Entity").setAll({stateAnimationDuration:0,stateAnimationEasing:o(r)}),u("Component").setAll({interpolationDuration:0,interpolationEasing:o(r)}),u("Sprite").setAll({visible:!0,scale:1,opacity:1,rotation:0,position:"relative",tooltipX:a,tooltipY:a,tooltipPosition:"fixed",isMeasured:!0}),u("Sprite").states.create("default",{visible:!0,opacity:1}),u("Container").setAll({interactiveChildren:!0,setStateOnChildren:!1}),u("Graphics").setAll({strokeWidth:1}),u("Chart").setAll({width:i,height:i,interactiveChildren:!1}),u("Sprite",["horizontal","center"]).setAll({centerX:a,x:a}),u("Sprite",["vertical","center"]).setAll({centerY:a,y:a}),u("Container",["horizontal","layout"]).setAll({layout:d}),u("Container",["vertical","layout"]).setAll({layout:c}),u("Pattern").setAll({repetition:"repeat",width:50,height:50,rotation:0,fillOpacity:1}),u("LinePattern").setAll({gap:6,colorOpacity:1,width:49,height:49}),u("RectanglePattern").setAll({gap:6,checkered:!1,centered:!0,maxWidth:5,maxHeight:5,width:48,height:48,strokeWidth:0}),u("CirclePattern").setAll({gap:5,checkered:!1,centered:!1,radius:3,strokeWidth:0,width:45,height:45}),u("LinearGradient").setAll({rotation:90}),u("Legend").setAll({fillField:"fill",strokeField:"stroke",nameField:"name",layout:n.new(this._root,{}),layer:30,clickTarget:"itemContainer"}),u("Container",["legend","item","itemcontainer"]).setAll({paddingLeft:5,paddingRight:5,paddingBottom:5,paddingTop:5,layout:d,setStateOnChildren:!0,interactiveChildren:!1,ariaChecked:!0,focusable:!0,ariaLabel:e.translate("Press ENTER to toggle"),role:"checkbox"});{const e=u("Rectangle",["legend","item","background"]);e.setAll({fillOpacity:0}),l(e,"fill",s,"background")}u("Container",["legend","marker"]).setAll({setStateOnChildren:!0,centerY:a,paddingLeft:0,paddingRight:0,paddingBottom:0,paddingTop:0,width:18,height:18}),u("RoundedRectangle",["legend","marker","rectangle"]).setAll({width:i,height:i,cornerRadiusBL:3,cornerRadiusTL:3,cornerRadiusBR:3,cornerRadiusTR:3});{const e=u("RoundedRectangle",["legend","marker","rectangle"]).states.create("disabled",{});l(e,"fill",s,"disabled"),l(e,"stroke",s,"disabled")}u("Label",["legend","label"]).setAll({centerY:a,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,populateText:!0});l(u("Label",["legend","label"]).states.create("disabled",{}),"fill",s,"disabled");u("Label",["legend","value","label"]).setAll({centerY:a,marginLeft:5,paddingRight:0,paddingLeft:0,paddingTop:0,paddingBottom:0,width:50,centerX:i,populateText:!0});l(u("Label",["legend","value","label"]).states.create("disabled",{}),"fill",s,"disabled");u("HeatLegend").setAll({stepCount:1}),u("RoundedRectangle",["heatlegend","marker"]).setAll({cornerRadiusTR:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusBL:0}),u("RoundedRectangle",["vertical","heatlegend","marker"]).setAll({height:i,width:15}),u("RoundedRectangle",["horizontal","heatlegend","marker"]).setAll({width:i,height:15}),u("HeatLegend",["vertical"]).setAll({height:i}),u("HeatLegend",["horizontal"]).setAll({width:i}),u("Label",["heatlegend","start"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5}),u("Label",["heatlegend","end"]).setAll({paddingLeft:5,paddingRight:5,paddingTop:5,paddingBottom:5});{const e=u("Label");e.setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"1em",populateText:!1}),l(e,"fill",s,"text")}u("RadialLabel").setAll({textType:"regular",centerY:a,centerX:a,inside:!1,radius:0,baseRadius:i,orientation:"auto",textAlign:"center"}),u("RoundedRectangle").setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8}),u("PointedRectangle").setAll({pointerBaseWidth:15,pointerLength:10,cornerRadius:8}),u("Slice").setAll({shiftRadius:0,dRadius:0,dInnerRadius:0});{const e=u("Tick");e.setAll({strokeOpacity:.15,isMeasured:!1,length:4.5,position:"absolute",crisp:!0}),l(e,"stroke",s,"grid")}u("Bullet").setAll({locationX:.5,locationY:.5}),u("Tooltip").setAll({position:"absolute",getFillFromSprite:!0,getStrokeFromSprite:!1,autoTextColor:!0,paddingTop:9,paddingBottom:8,paddingLeft:10,paddingRight:10,marginBottom:5,pointerOrientation:"vertical",centerX:a,centerY:a,animationEasing:o(r),exportable:!1});u("PointedRectangle",["tooltip","background"]).setAll({strokeOpacity:.9,cornerRadius:4,pointerLength:4,pointerBaseWidth:8,fillOpacity:.9,stroke:t.fromHex(16777215)});{const e=u("Label",["tooltip"]);e.setAll({role:"tooltip",populateText:!0,paddingRight:0,paddingTop:0,paddingLeft:0,paddingBottom:0}),l(e,"fill",s,"alternativeText")}u("Button").setAll({paddingTop:8,paddingBottom:8,paddingLeft:10,paddingRight:10,interactive:!0,layout:d,interactiveChildren:!1,setStateOnChildren:!0,focusable:!0}),u("Button").states.create("hover",{}),u("Button").states.create("down",{stateAnimationDuration:0}),u("Button").states.create("active",{});{const e=u("RoundedRectangle",["button","background"]);l(e,"fill",s,"primaryButton"),l(e,"stroke",s,"primaryButtonStroke")}l(u("RoundedRectangle",["button","background"]).states.create("hover",{}),"fill",s,"primaryButtonHover");l(u("RoundedRectangle",["button","background"]).states.create("down",{stateAnimationDuration:0}),"fill",s,"primaryButtonDown");l(u("RoundedRectangle",["button","background"]).states.create("active",{}),"fill",s,"primaryButtonActive");l(u("Graphics",["button","icon"]),"stroke",s,"primaryButtonText");l(u("Label",["button"]),"fill",s,"primaryButtonText");u("Button",["zoom"]).setAll({paddingTop:18,paddingBottom:18,paddingLeft:12,paddingRight:12,centerX:46,centerY:-10,y:0,x:i,role:"button",ariaLabel:e.translate("Zoom Out"),layer:30});{const e=u("RoundedRectangle",["background","button","zoom"]);e.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),l(e,"fill",s,"primaryButton")}l(u("RoundedRectangle",["background","button","zoom"]).states.create("hover",{}),"fill",s,"primaryButtonHover");l(u("RoundedRectangle",["background","button","zoom"]).states.create("down",{stateAnimationDuration:0}),"fill",s,"primaryButtonDown");{const e=u("Graphics",["icon","button","zoom"]);e.setAll({crisp:!0,strokeOpacity:.7,draw:e=>{e.moveTo(0,0),e.lineTo(12,0)}}),l(e,"stroke",s,"primaryButtonText")}u("Button",["resize"]).setAll({paddingTop:9,paddingBottom:9,paddingLeft:13,paddingRight:13,draggable:!0,centerX:a,centerY:a,position:"absolute",role:"slider",ariaValueMin:"0",ariaValueMax:"100",ariaLabel:e.translate("Use up and down arrows to move selection")});{const e=u("RoundedRectangle",["background","resize","button"]);e.setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),l(e,"fill",s,"secondaryButton"),l(e,"stroke",s,"secondaryButtonStroke")}l(u("RoundedRectangle",["background","resize","button"]).states.create("hover",{}),"fill",s,"secondaryButtonHover");l(u("RoundedRectangle",["background","resize","button"]).states.create("down",{stateAnimationDuration:0}),"fill",s,"secondaryButtonDown");{const e=u("Graphics",["resize","button","icon"]);e.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:e=>{e.moveTo(0,.5),e.lineTo(0,12.5),e.moveTo(4,.5),e.lineTo(4,12.5)}}),l(e,"stroke",s,"secondaryButtonText")}u("Button",["resize","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize"}),u("Button",["resize","horizontal"]).setAll({cursorOverStyle:"ew-resize"}),u("Button",["play"]).setAll({paddingTop:13,paddingBottom:13,paddingLeft:14,paddingRight:14,ariaLabel:e.translate("Play"),toggleKey:"active"});{const e=u("RoundedRectangle",["play","background"]);e.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),l(e,"fill",s,"primaryButton")}{const e=u("Graphics",["play","icon"]);e.setAll({stateAnimationDuration:0,dx:1,draw:e=>{e.moveTo(0,-5),e.lineTo(8,0),e.lineTo(0,5),e.lineTo(0,-5)}}),l(e,"fill",s,"primaryButtonText")}u("Graphics",["play","icon"]).states.create("default",{stateAnimationDuration:0}),u("Graphics",["play","icon"]).states.create("active",{stateAnimationDuration:0,draw:e=>{e.moveTo(-4,-5),e.lineTo(-1,-5),e.lineTo(-1,5),e.lineTo(-4,5),e.lineTo(-4,-5),e.moveTo(4,-5),e.lineTo(1,-5),e.lineTo(1,5),e.lineTo(4,5),e.lineTo(4,-5)}}),u("Button",["switch"]).setAll({paddingTop:4,paddingBottom:4,paddingLeft:4,paddingRight:4,ariaLabel:e.translate("Press ENTER to toggle"),toggleKey:"active",width:40,height:24,layout:null});{const e=u("RoundedRectangle",["switch","background"]);e.setAll({strokeOpacity:.5,cornerRadiusBL:100,cornerRadiusBR:100,cornerRadiusTL:100,cornerRadiusTR:100}),l(e,"fill",s,"primaryButton")}{const e=u("Circle",["switch","icon"]);e.setAll({radius:8,centerY:0,centerX:0,dx:0}),l(e,"fill",s,"primaryButtonText")}u("Graphics",["switch","icon"]).states.create("active",{dx:16}),u("Scrollbar").setAll({start:0,end:1,layer:30,animationEasing:o(r)}),u("Scrollbar",["vertical"]).setAll({marginRight:13,marginLeft:13,minWidth:12,height:i}),u("Scrollbar",["horizontal"]).setAll({marginTop:13,marginBottom:13,minHeight:12,width:i}),this.rule("Button",["scrollbar"]).setAll({exportable:!1});{const e=u("RoundedRectangle",["scrollbar","main","background"]);e.setAll({cornerRadiusTL:8,cornerRadiusBL:8,cornerRadiusTR:8,cornerRadiusBR:8,fillOpacity:.8}),l(e,"fill",s,"fill")}{const e=u("RoundedRectangle",["scrollbar","thumb"]);e.setAll({role:"slider",ariaLive:"polite",position:"absolute",draggable:!0}),l(e,"fill",s,"secondaryButton")}l(u("RoundedRectangle",["scrollbar","thumb"]).states.create("hover",{}),"fill",s,"secondaryButtonHover");l(u("RoundedRectangle",["scrollbar","thumb"]).states.create("down",{stateAnimationDuration:0}),"fill",s,"secondaryButtonDown");u("RoundedRectangle",["scrollbar","thumb","vertical"]).setAll({x:a,width:i,centerX:a,ariaLabel:e.translate("Use up and down arrows to move selection")}),u("RoundedRectangle",["scrollbar","thumb","horizontal"]).setAll({y:a,centerY:a,height:i,ariaLabel:e.translate("Use left and right arrows to move selection")});{const e=u("PointedRectangle",["axis","tooltip","background"]);e.setAll({cornerRadius:0}),l(e,"fill",s,"alternativeBackground")}u("Label",["axis","tooltip"]).setAll({role:void 0}),u("Label",["axis","tooltip","y"]).setAll({textAlign:"right"}),u("Label",["axis","tooltip","y","opposite"]).setAll({textAlign:"left"}),u("Label",["axis","tooltip","x"]).setAll({textAlign:"center"}),u("Tooltip",["categoryaxis"]).setAll({labelText:"{category}"}),u("Star").setAll({spikes:5,innerRadius:5,radius:10}),u("Tooltip",["stock"]).setAll({paddingTop:6,paddingBottom:5,paddingLeft:7,paddingRight:7}),u("PointedRectangle",["tooltip","stock","axis"]).setAll({pointerLength:0,pointerBaseWidth:0,cornerRadius:3}),u("Label",["tooltip","stock"]).setAll({fontSize:"0.8em"}),u("SpriteResizer").setAll({rotationStep:10});u("Container",["resizer","grip"]).states.create("hover",{});{const e=u("RoundedRectangle",["resizer","grip"]);e.setAll({strokeOpacity:.7,strokeWidth:1,fillOpacity:1,width:12,height:12}),l(e,"fill",s,"background"),l(e,"stroke",s,"alternativeBackground")}{const e=u("RoundedRectangle",["resizer","grip","outline"]);e.setAll({strokeOpacity:0,fillOpacity:0,width:20,height:20}),e.states.create("hover",{fillOpacity:.3}),l(e,"fill",s,"alternativeBackground")}u("RoundedRectangle",["resizer","grip","left"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0}),u("RoundedRectangle",["resizer","grip","right"]).setAll({cornerRadiusBL:0,cornerRadiusBR:0,cornerRadiusTL:0,cornerRadiusTR:0});{const e=u("Rectangle",["resizer","rectangle"]);e.setAll({strokeDasharray:[2,2],strokeOpacity:.5,strokeWidth:1}),l(e,"stroke",s,"alternativeBackground")}}}export{s as D,l as s};
|
package/chunks/Theme.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{a as t}from"./tslib.es6.js";function e(t){return Number(t)!==t}function i(t){return{}.toString.call(t)}function s(t){if(null!=t&&!l(t)){let i=Number(t);return e(i)&&h(t)&&""!=t?s(t.replace(/[^0-9.\-]+/g,"")):i}return t}function r(t){if(o(t))return new Date(t);if(l(t))return new Date(t);{let e=Number(t);return l(e)?new Date(e):new Date(t)}}function a(t){if(e(t))return"NaN";if(t===1/0)return"Infinity";if(t===-1/0)return"-Infinity";if(0===t&&1/t==-1/0)return"-0";let i=t<0;t=Math.abs(t);let s,r=/^([0-9]+)(?:\.([0-9]+))?(?:e[\+\-]([0-9]+))?$/.exec(""+t),a=r[1],o=r[2]||"";if(void 0===r[3])s=""===o?a:a+"."+o;else{let e=+r[3];if(t<1){s="0."+n("0",e-1)+a+o}else{let t=e-o.length;s=0===t?a+o:t<0?a+o.slice(0,t)+"."+o.slice(t):a+o+n("0",t)}}return i?"-"+s:s}function n(t,e){return new Array(e+1).join(t)}function o(t){return"[object Date]"===i(t)}function h(t){return"string"==typeof t}function l(t){return"number"==typeof t&&Number(t)==t}function d(t){return"object"==typeof t&&null!==t}const u="__§§§__",p="__§§§§__";function c(t,e){const i=t.length;for(let s=0;s<i;++s)if(t[s]===e)return s;return-1}function g(t,e){const i=t.length;for(let s=0;s<i;++s)if(e(t[s]))return!0;return!1}function _(t,e){const i=t.length,s=new Array(i);for(let r=0;r<i;++r)s[r]=e(t[r],r);return s}function m(t,e){const i=t.length;for(let s=0;s<i;++s)e(t[s],s)}function f(t,e){let i=t.length;for(;i>0;)--i,e(t[i],i)}function b(t,e){const i=t.length;for(let s=0;s<i&&e(t[s],s);++s);}function v(t,e){let i=!1,s=0;for(;;){if(s=t.indexOf(e,s),-1===s)return i;i=!0,t.splice(s,1)}}function y(t,e){let i=t.indexOf(e);return-1!==i&&(t.splice(i,1),!0)}function w(t,e){-1===t.indexOf(e)&&t.push(e)}function P(t){const e=t.length,i=new Array(e);for(let s=0;s<e;++s)i[s]=t[s];return i}function D(t,e,i){t.splice(e,0,i)}function x(t,e){t.splice(e,1)}function k(t,e){const i=t.length;for(let s=0;s<i;++s)if(e(t[s],s))return s;return-1}function O(t,e){let i=t.length;for(;i>0;)if(--i,e(t[i],i))return i;return-1}function T(t,e){const i=k(t,e);if(-1!==i)return t[i]}function j(t,e){const i=O(t,e);if(-1!==i)return t[i]}function S(t,e){let i=0,s=t.length,r=!1;for(;i<s;){const a=i+s>>1,n=e(t[a]);n<0?i=a+1:0===n?(r=!0,i=a+1):s=a}return{found:r,index:r?i-1:i}}function E(t,e){let i=0,s=t.length,r=!1;for(;i<s;){const a=i+s>>1,n=e(t[a]);n<0?i=a+1:0===n?(r=!0,s=a):s=a}return{found:r,index:i}}function C(t,e){let i=t.length;for(;i>0;)--i,e(t[i])||t.splice(i,1)}class M{constructor(){Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._disposed=!1}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}}class B{constructor(t){Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dispose",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._disposed=!1,this._dispose=t}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}}class I extends M{constructor(){super(...arguments),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}_dispose(){m(this._disposers,(t=>{t.dispose()}))}}class A extends M{constructor(t){super(),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._disposers=t}_dispose(){m(this._disposers,(t=>{t.dispose()}))}}class H extends B{constructor(){super(...arguments),Object.defineProperty(this,"_counter",{enumerable:!0,configurable:!0,writable:!0,value:0})}increment(){return++this._counter,new B((()=>{--this._counter,0===this._counter&&this.dispose()}))}}class L{constructor(){Object.defineProperty(this,"_listeners",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_killed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_disabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_iterating",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_enabled",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._listeners=[],this._killed=[],this._disabled={},this._iterating=0,this._enabled=!0,this._disposed=!1}isDisposed(){return this._disposed}dispose(){if(!this._disposed){this._disposed=!0;const t=this._listeners;this._iterating=1,this._listeners=null,this._disabled=null;try{m(t,(t=>{t.disposer.dispose()}))}finally{this._killed=null,this._iterating=null}}}hasListeners(){return 0!==this._listeners.length}hasListenersByType(t){return g(this._listeners,(e=>(null===e.type||e.type===t)&&!e.killed))}enable(){this._enabled=!0}disable(){this._enabled=!1}enableType(t){delete this._disabled[t]}disableType(t,e=1/0){this._disabled[t]=e}_removeListener(t){if(0===this._iterating){const e=this._listeners.indexOf(t);if(-1===e)throw new Error("Invalid state: could not remove listener");this._listeners.splice(e,1)}else this._killed.push(t)}_removeExistingListener(t,e,i,s){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener((r=>{r.once!==t||r.type!==e||void 0!==i&&r.callback!==i||r.context!==s||r.disposer.dispose()}))}isEnabled(t){if(this._disposed)throw new Error("EventDispatcher is disposed");return this._enabled&&this._listeners.length>0&&this.hasListenersByType(t)&&void 0===this._disabled[t]}removeType(t){if(this._disposed)throw new Error("EventDispatcher is disposed");this._eachListener((e=>{e.type===t&&e.disposer.dispose()}))}has(t,e,i){return-1!==k(this._listeners,(s=>!0!==s.once&&s.type===t&&(void 0===e||s.callback===e)&&s.context===i))}_shouldDispatch(t){if(this._disposed)throw new Error("EventDispatcher is disposed");const e=this._disabled[t];return l(e)?(e<=1?delete this._disabled[t]:--this._disabled[t],!1):this._enabled}_eachListener(t){++this._iterating;try{m(this._listeners,t)}finally{--this._iterating,0===this._iterating&&0!==this._killed.length&&(m(this._killed,(t=>{this._removeListener(t)})),this._killed.length=0)}}dispatch(t,e){this._shouldDispatch(t)&&this._eachListener((i=>{i.killed||null!==i.type&&i.type!==t||i.dispatch(t,e)}))}_on(t,e,i,s,r,a){if(this._disposed)throw new Error("EventDispatcher is disposed");this._removeExistingListener(t,e,i,s);const n={type:e,callback:i,context:s,shouldClone:r,dispatch:a,killed:!1,once:t,disposer:new B((()=>{n.killed=!0,this._removeListener(n)}))};return this._listeners.push(n),n}onAll(t,e,i=!0){return this._on(!1,null,t,e,i,((i,s)=>t.call(e,s))).disposer}on(t,e,i,s=!0){return this._on(!1,t,e,i,s,((t,s)=>e.call(i,s))).disposer}once(t,e,i,s=!0){const r=this._on(!0,t,e,i,s,((t,s)=>{r.disposer.dispose(),e.call(i,s)}));return r.disposer}off(t,e,i){this._removeExistingListener(!1,t,e,i)}copyFrom(t){if(this._disposed)throw new Error("EventDispatcher is disposed");if(t===this)throw new Error("Cannot copyFrom the same TargetedEventDispatcher");const e=[];return m(t._listeners,(t=>{!t.killed&&t.shouldClone&&(null===t.type?e.push(this.onAll(t.callback,t.context)):t.once?e.push(this.once(t.type,t.callback,t.context)):e.push(this.on(t.type,t.callback,t.context)))})),new A(e)}}function N(t,e){if(!(t>=0&&t<e))throw new Error("Index out of bounds: "+t)}class R{constructor(t=[]){Object.defineProperty(this,"_values",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new L}),this._values=t}get values(){return this._values}contains(t){return-1!==this._values.indexOf(t)}removeValue(t){let e=0,i=this._values.length;for(;e<i;)this._values[e]===t?(this.removeIndex(e),--i):++e}indexOf(t){return c(this._values,t)}get length(){return this._values.length}hasIndex(t){return t>=0&&t<this._values.length}getIndex(t){return this._values[t]}_onPush(t){this.events.isEnabled("push")&&this.events.dispatch("push",{type:"push",target:this,newValue:t})}_onInsertIndex(t,e){this.events.isEnabled("insertIndex")&&this.events.dispatch("insertIndex",{type:"insertIndex",target:this,index:t,newValue:e})}_onSetIndex(t,e,i){this.events.isEnabled("setIndex")&&this.events.dispatch("setIndex",{type:"setIndex",target:this,index:t,oldValue:e,newValue:i})}_onRemoveIndex(t,e){this.events.isEnabled("removeIndex")&&this.events.dispatch("removeIndex",{type:"removeIndex",target:this,index:t,oldValue:e})}_onMoveIndex(t,e,i){this.events.isEnabled("moveIndex")&&this.events.dispatch("moveIndex",{type:"moveIndex",target:this,oldIndex:t,newIndex:e,value:i})}_onClear(t){this.events.isEnabled("clear")&&this.events.dispatch("clear",{type:"clear",target:this,oldValues:t})}setIndex(t,e){N(t,this._values.length);const i=this._values[t];return i!==e&&(this._values[t]=e,this._onSetIndex(t,i,e)),i}insertIndex(t,e){return N(t,this._values.length+1),D(this._values,t,e),this._onInsertIndex(t,e),e}swap(t,e){const i=this._values.length;if(N(t,i),N(e,i),t!==e){const i=this._values[t],s=this._values[e];this._values[t]=s,this._onSetIndex(t,i,s),this._values[e]=i,this._onSetIndex(e,s,i)}}removeIndex(t){N(t,this._values.length);const e=this._values[t];return x(this._values,t),this._onRemoveIndex(t,e),e}moveValue(t,e){let i=this.indexOf(t);if(-1!==i)if(x(this._values,i),null==e){const e=this._values.length;this._values.push(t),this._onMoveIndex(i,e,t)}else D(this._values,e,t),this._onMoveIndex(i,e,t);else null==e?(this._values.push(t),this._onPush(t)):(D(this._values,e,t),this._onInsertIndex(e,t));return t}push(t){return this._values.push(t),this._onPush(t),t}unshift(t){return this.insertIndex(0,t),t}pushAll(t){m(t,(t=>{this.push(t)}))}copyFrom(t){this.pushAll(t._values)}pop(){return this._values.length-1<0?void 0:this.removeIndex(this._values.length-1)}shift(){return this._values.length?this.removeIndex(0):void 0}setAll(t){const e=this._values;this._values=[],this._onClear(e),m(t,(t=>{this._values.push(t),this._onPush(t)}))}clear(){this.setAll([])}*[Symbol.iterator](){const t=this._values.length;for(let e=0;e<t;++e)yield this._values[e]}each(t){m(this._values,t)}eachReverse(t){f(this._values,t)}}class F extends R{constructor(){super(...arguments),Object.defineProperty(this,"autoDispose",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_onSetIndex(t,e,i){this.autoDispose&&e.dispose(),super._onSetIndex(t,e,i)}_onRemoveIndex(t,e){this.autoDispose&&e.dispose(),super._onRemoveIndex(t,e)}_onClear(t){this.autoDispose&&m(t,(t=>{t.dispose()})),super._onClear(t)}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this.autoDispose&&m(this._values,(t=>{t.dispose()})))}}class W extends F{constructor(t,e){super(),Object.defineProperty(this,"template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"make",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.template=t,this.make=e}}class V extends R{constructor(t){super(),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_events",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._container=t,this._events=this.events.onAll((t=>{if("clear"===t.type)m(t.oldValues,(t=>{this._onRemoved(t)}));else if("push"===t.type)this._onInserted(t.newValue);else if("setIndex"===t.type)this._onRemoved(t.oldValue),this._onInserted(t.newValue,t.index);else if("insertIndex"===t.type)this._onInserted(t.newValue,t.index);else if("removeIndex"===t.type)this._onRemoved(t.oldValue);else{if("moveIndex"!==t.type)throw new Error("Unknown IListEvent type");this._onRemoved(t.value),this._onInserted(t.value,t.newIndex)}}))}_onInserted(t,e){t._setParent(this._container,!0);const i=this._container._childrenDisplay;void 0===e?i.addChild(t._display):i.addChildAt(t._display,e)}_onRemoved(t){this._container._childrenDisplay.removeChild(t._display),this._container.markDirtyBounds(),this._container.markDirty()}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._events.dispose(),m(this.values,(t=>{t.dispose()})))}}class K{constructor(t){Object.defineProperty(this,"_value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._value=t}get value(){return this._value/100}get percent(){return this._value}toString(){return this._value+"%"}interpolate(t,e){return t+this.value*(e-t)}static normalize(t,e,i){return t instanceof K?t:new K(e===i?0:100*Math.min(Math.max(1/(i-e)*(t-e),0),1))}}function U(t){return new K(t)}U(0);const z=U(100),G=U(50);function Y(t){return Object.keys(t)}function X(t,e){return Y(t).sort(e)}function $(t){return Object.assign({},t)}function J(t,e){Y(t).forEach((i=>{e(i,t[i])}))}function Z(t,e){for(let i in t)if(q(t,i)&&!e(i,t[i]))break}function q(t,e){return{}.hasOwnProperty.call(t,e)}function Q(t){t.parentNode&&t.parentNode.removeChild(t)}function tt(t,e,i,s){return t.addEventListener(e,i,s||!1),new B((()=>{t.removeEventListener(e,i,s||!1)}))}function et(t){return tt(window,"resize",(e=>{t()}))}function it(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 st(t){return t.pointerId||0}function rt(){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 at(t){t&&t.focus()}function nt(t){if(it("pointerevents"))return t;if(it("touchevents"))switch(t){case"pointerover":case"pointerdown":return"touchstart";case"pointerout":case"pointerup":return"touchend";case"pointermove":return"touchmove";case"click":return"click";case"dblclick":return"dblclick"}else if(it("mouseevents"))switch(t){case"pointerover":return"mouseover";case"pointerout":return"mouseout";case"pointerdown":return"mousedown";case"pointermove":return"mousemove";case"pointerup":return"mouseup";case"click":return"click";case"dblclick":return"dblclick"}return t}function ot(t){if("undefined"!=typeof Touch&&t instanceof Touch)return!0;if("undefined"!=typeof PointerEvent&&t instanceof PointerEvent&&null!=t.pointerType)switch(t.pointerType){case"touch":case"pen":case 2:return!0;case"mouse":case 4:return!1;default:return!(t instanceof MouseEvent)}else if(null!=t.type&&t.type.match(/^mouse/))return!1;return!0}function ht(t,e,i){t.style[e]=i}function lt(t,e){return t.style[e]}function dt(t,e){let i=e;for(;;){if(t===i)return!0;if(null===i.parentNode){if(null==i.host)return!1;i=i.host}else i=i.parentNode}}function ut(t,e){return t.target&&dt(e.root.dom,t.target)}function pt(t,e){t.style.pointerEvents=e?"auto":"none"}function ct(){return/apple/i.test(navigator.vendor)&&"ontouchend"in document}function gt(){return ct()?1:void 0}function _t(t,e){return l(t)?t:null!=t&&l(t.value)&&l(e)?e*t.value:0}function mt(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 ft(t,e=0,i="0"){return"string"!=typeof t&&(t=t.toString()),e>t.length?Array(e-t.length+1).join(i)+t:t}function bt(t){return t.replace(/^[\s]*/,"")}function vt(t){return t.replace(/[\s]*$/,"")}function yt(t){return bt(vt(t))}function wt(t){if(void 0===t)return"string";let e=(t=(t=(t=t.toLowerCase().replace(/^\[[^\]]*\]/,"")).replace(/\[[^\]]+\]/,"")).trim()).match(/\/(date|number|duration)$/);return e?e[1]:"number"===t?"number":"date"===t?"date":"duration"===t?"duration":t.match(/[#0]/)?"number":t.match(/[ymwdhnsqaxkzgtei]/)?"date":"string"}function Pt(t){return t.replace(/\/(date|number|duration)$/i,"")}function Dt(t){return t?t.replace(/<[^>]*>/g,""):t}function xt(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function kt(t,e=!1){const i=new Date(t.getFullYear(),0,0),s=t.getTime()-i.getTime()+60*(i.getTimezoneOffset()-t.getTimezoneOffset())*1e3,r=864e5;return Math.floor(s/r)}function Ot(t,e=!1){const i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),s=i.getUTCDay()||7;i.setUTCDate(i.getUTCDate()+4-s);const r=new Date(Date.UTC(i.getUTCFullYear(),0,1));return Math.ceil(((i.getTime()-r.getTime())/864e5+1)/7)}function Tt(t,e=!1){const i=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate())),s=i.getUTCDay()||7;i.setUTCDate(i.getUTCDate()+4-s);return new Date(Date.UTC(i.getUTCFullYear(),0,1)).getFullYear()}function jt(t,e=!1){const i=Ot(new Date(t.getFullYear(),t.getMonth(),1),e);let s=Ot(t,e);return 1==s&&(s=53),s-i+1}function St(t,e,i=1,s=!1){let r=new Date(e,0,4,0,0,0,0);return s&&r.setUTCFullYear(e),7*t+i-((r.getDay()||7)+3)}function Et(t,e){return t>12?t-=12:0===t&&(t=12),null!=e?t+(e-1):t}function Ct(t,e=!1,i=!1,s=!1){if(s)return e?"Coordinated Universal Time":"UTC";let r=t.toLocaleString("UTC"),a=t.toLocaleString("UTC",{timeZoneName:e?"long":"short"}).substr(r.length);return!1===i&&(a=a.replace(/ (standard|daylight|summer|winter) /i," ")),a}function Mt(t){const e=new Date(Date.UTC(2012,0,1,0,0,0,0)),i=new Date(e.toLocaleString("en-US",{timeZone:"UTC"}));return(new Date(e.toLocaleString("en-US",{timeZone:t})).getTime()-i.getTime())/6e4*-1}function Bt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function It(t){let e,i,s,r=t.h,a=t.s,n=t.l;if(0==a)e=i=s=n;else{let t=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},o=n<.5?n*(1+a):n+a-n*a,h=2*n-o;e=t(h,o,r+1/3),i=t(h,o,r),s=t(h,o,r-1/3)}return{r:Math.round(255*e),g:Math.round(255*i),b:Math.round(255*s)}}function At(t){let e=t.r/255,i=t.g/255,s=t.b/255,r=Math.max(e,i,s),a=Math.min(e,i,s),n=0,o=0,h=(r+a)/2;if(r===a)n=o=0;else{let t=r-a;switch(o=h>.5?t/(2-r-a):t/(r+a),r){case e:n=(i-s)/t+(i<s?6:0);break;case i:n=(s-e)/t+2;break;case s:n=(e-i)/t+4}n/=6}return{h:n,s:o,l:h}}function Ht(t,e){return t?{r:Math.max(0,Math.min(255,t.r+Lt(t.r,e))),g:Math.max(0,Math.min(255,t.g+Lt(t.g,e))),b:Math.max(0,Math.min(255,t.b+Lt(t.b,e))),a:t.a}:t}function Lt(t,e){let i=e>0?255-t:t;return Math.round(i*e)}function Nt(t,e){if(t){let i=Lt(Math.min(Math.max(t.r,t.g,t.b),230),e);return{r:Math.max(0,Math.min(255,Math.round(t.r+i))),g:Math.max(0,Math.min(255,Math.round(t.g+i))),b:Math.max(0,Math.min(255,Math.round(t.b+i))),a:t.a}}return t}function Rt(t){return(299*t.r+587*t.g+114*t.b)/1e3>=128}function Ft(t,e){if(void 0===t||1==e)return t;let i=At(t);return i.s=e,It(i)}function Wt(t,e={r:255,g:255,b:255},i={r:255,g:255,b:255}){let s=e,r=i;return Rt(i)&&(s=i,r=e),Rt(t)?r:s}function Vt(t,e){return t||(t=[]),[...t,...e].filter(((t,e,i)=>i.indexOf(t)===e))}function Kt(t,e){return!!e&&(t.left==e.left&&(t.right==e.right&&(t.top==e.top&&t.bottom==e.bottom)))}function Ut(t){return"#"===t[0]&&(t=t.substr(1)),3==t.length&&(t=t[0].repeat(2)+t[1].repeat(2)+t[2].repeat(2)),parseInt(t,16)}function zt(t){let e=(t=t.replace(/[ ]/g,"")).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 i="";for(let s=1;s<=3;s++){let t=parseInt(e[s]).toString(16);1==t.length&&(t="0"+t),i+=t}return Ut(i)}function Gt(t){return Yt.fromAny(t)}class Yt{constructor(t){Object.defineProperty(this,"_hex",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._hex=0|t}get hex(){return this._hex}get r(){return this._hex>>>16}get g(){return this._hex>>8&255}get b(){return 255&this._hex}toCSS(t=1){return"rgba("+this.r+", "+this.g+", "+this.b+", "+t+")"}toCSSHex(){return"#"+ft(this.r.toString(16),2)+ft(this.g.toString(16),2)+ft(this.b.toString(16),2)}toHSL(t=1){return At({r:this.r,g:this.g,b:this.b,a:t})}static fromHSL(t,e,i){const s=It({h:t,s:e,l:i});return this.fromRGB(s.r,s.g,s.b)}toString(){return this.toCSSHex()}static fromHex(t){return new Yt(t)}static fromRGB(t,e,i){return new Yt((0|i)+(e<<8)+(t<<16))}static fromString(t){return new Yt(Ut(t))}static fromCSS(t){return new Yt(zt(t))}static fromAny(t){if(h(t)){if("#"==t[0])return Yt.fromString(t);if("rgb"==t.substr(0,3))return Yt.fromCSS(t)}else{if(l(t))return Yt.fromHex(t);if(t instanceof Yt)return Yt.fromHex(t.hex)}throw new Error("Unknown color syntax: "+t)}static alternative(t,e,i){const s=Wt({r:t.r,g:t.g,b:t.b},e?{r:e.r,g:e.g,b:e.b}:void 0,i?{r:i.r,g:i.g,b:i.b}:void 0);return this.fromRGB(s.r,s.g,s.b)}static interpolate(t,e,i,s="rgb"){if("hsl"==s){const s=e.toHSL(),r=i.toHSL();return Yt.fromHSL($t(t,s.h,r.h),$t(t,s.s,r.s),$t(t,s.l,r.l))}return Yt.fromRGB($t(t,e.r,i.r),$t(t,e.g,i.g),$t(t,e.b,i.b))}static lighten(t,e){const i=Ht({r:t.r,g:t.g,b:t.b},e);return Yt.fromRGB(i.r,i.g,i.b)}static brighten(t,e){const i=Nt({r:t.r,g:t.g,b:t.b},e);return Yt.fromRGB(i.r,i.g,i.b)}static saturate(t,e){const i=Ft({r:t.r,g:t.g,b:t.b},e);return Yt.fromRGB(i.r,i.g,i.b)}}function Xt(e){return t(this,void 0,void 0,(function*(){if(void 0!==e){const t=[];J(e,((e,i)=>{t.push(i.waitForStop())})),yield Promise.all(t)}}))}function $t(t,e,i){return e+t*(i-e)}function Jt(t,e,i){return t>=1?i:e}function Zt(t,e,i){return new K($t(t,e.percent,i.percent))}function qt(t,e,i){return Yt.interpolate(t,e,i)}function Qt(t,e){return"number"==typeof t&&"number"==typeof e?$t:t instanceof K&&e instanceof K?Zt:t instanceof Yt&&e instanceof Yt?qt:Jt}const te=Math.PI,ee=te/180,ie=180/te;function se(t,e,i){if(!l(e)||e<=0){let e=Math.round(t);return i&&e-t==.5&&e--,e}{let i=Math.pow(10,e);return Math.round(t*i)/i}}function re(t,e){if(!l(e)||e<=0)return Math.ceil(t);{let i=Math.pow(10,e);return Math.ceil(t*i)/i}}function ae(t,e,i){return Math.min(Math.max(t,e),i)}function ne(t){return Math.sin(ee*t)}function oe(t){return Math.cos(ee*t)}function he(t){return(t%=360)<0&&(t+=360),t}function le(t,e,i,s,r){let a=Number.MAX_VALUE,n=Number.MAX_VALUE,o=-Number.MAX_VALUE,h=-Number.MAX_VALUE,l=[];l.push(de(r,i)),l.push(de(r,s));let d=Math.min(90*Math.floor(i/90),90*Math.floor(s/90)),u=Math.max(90*Math.ceil(i/90),90*Math.ceil(s/90));for(let p=d;p<=u;p+=90)p>=i&&p<=s&&l.push(de(r,p));for(let p=0;p<l.length;p++){let t=l[p];t.x<a&&(a=t.x),t.y<n&&(n=t.y),t.x>o&&(o=t.x),t.y>h&&(h=t.y)}return{left:t+a,top:e+n,right:t+o,bottom:e+h}}function de(t,e){return{x:t*oe(e),y:t*ne(e)}}function ue(t){const e=t.length;if(e>0){let i=t[0],s=i.left,r=i.top,a=i.right,n=i.bottom;if(e>1)for(let o=1;o<e;o++)i=t[o],s=Math.min(i.left,s),a=Math.max(i.right,a),r=Math.min(i.top,r),n=Math.max(i.bottom,n);return{left:s,right:a,top:r,bottom:n}}return{left:0,right:0,top:0,bottom:0}}function pe(t){return t}function ce(t){return t*t*t}function ge(t){return function(e){return 1-t(1-e)}}class _e{constructor(t,e){Object.defineProperty(this,"_entity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_userSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._entity=t,this._settings=e,J(e,(t=>{this._userSettings[t]=!0}))}get(t,e){const i=this._settings[t];return void 0!==i?i:e}setRaw(t,e){this._settings[t]=e}set(t,e){this._userSettings[t]=!0,this.setRaw(t,e)}remove(t){delete this._userSettings[t],delete this._settings[t]}setAll(t){Y(t).forEach((e=>{this.set(e,t[e])}))}_eachSetting(t){J(this._settings,t)}apply(){const t={stateAnimationEasing:!0,stateAnimationDuration:!0},e=this._entity.states.lookup("default");this._eachSetting(((i,s)=>{t[i]||(t[i]=!0,this!==e&&(i in e._settings||(e._settings[i]=this._entity.get(i))),this._entity.set(i,s))}))}applyAnimate(t){null==t&&(t=this._settings.stateAnimationDuration),null==t&&(t=this.get("stateAnimationDuration",this._entity.get("stateAnimationDuration",0)));let e=this._settings.stateAnimationEasing;null==e&&(e=this.get("stateAnimationEasing",this._entity.get("stateAnimationEasing",ce)));const i=this._entity.states.lookup("default"),s={stateAnimationEasing:!0,stateAnimationDuration:!0},r={};return this._eachSetting(((a,n)=>{if(!s[a]){s[a]=!0,this!=i&&(a in i._settings||(i._settings[a]=this._entity.get(a)));const o=this._entity.animate({key:a,to:n,duration:t,easing:e});o&&(r[a]=o)}})),r}}class me{constructor(t){Object.defineProperty(this,"_states",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_entity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._entity=t}lookup(t){return this._states[t]}create(t,e){const i=this._states[t];if(i)return i.setAll(e),i;{const i=new _e(this._entity,e);return this._states[t]=i,i}}remove(t){delete this._states[t]}apply(t){const e=this._states[t];e&&e.apply(),this._entity._applyState(t)}applyAnimate(t,e){let i;const s=this._states[t];return s&&(i=s.applyAnimate(e)),this._entity._applyStateAnimated(t,e),i}}class fe{constructor(){Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.3.11"}),Object.defineProperty(this,"licenses",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"entitiesById",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"rootElements",{enumerable:!0,configurable:!0,writable:!0,value:[]})}}const be=new fe;function ve(t){be.licenses.push(t)}function ye(t,e){return t===e?0:t<e?-1:1}function we(t,e,i){const s=t.length,r=e.length,a=Math.min(s,r);for(let n=0;n<a;++n){const s=i(t[n],e[n]);if(0!==s)return s}return ye(s,r)}function Pe(t,e){return t===e?0:t<e?-1:1}class De{constructor(t){Object.defineProperty(this,"_entity",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_callbacks",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_disabled",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._entity=t}add(t,e){let i=this._callbacks[t];return void 0===i&&(i=this._callbacks[t]=[]),i.push(e),this._entity._markDirtyKey(t),new B((()=>{y(i,e)&&this._entity._markDirtyKey(t)}))}remove(t){const e=this._callbacks[t];void 0!==e&&(delete this._callbacks[t],0!==e.length&&this._entity._markDirtyKey(t))}enable(t){this._disabled[t]&&(delete this._disabled[t],this._entity._markDirtyKey(t))}disable(t){this._disabled[t]||(this._disabled[t]=!0,this._entity._markDirtyKey(t))}fold(t,e){if(!this._disabled[t]){const i=this._callbacks[t];if(void 0!==i)for(let s=0,r=i.length;s<r;++s)e=i[s](e,this._entity,t)}return e}}class xe{constructor(t,e,i,s,r,a,n){Object.defineProperty(this,"_animation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_from",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_to",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_duration",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_easing",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_loops",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_interpolate",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_oldTime",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_time",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_stopped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_playing",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new L}),this._animation=t,this._from=e,this._to=i,this._duration=s,this._easing=r,this._loops=a,this._interpolate=Qt(e,i),this._oldTime=n}get to(){return this._to}get from(){return this._from}get playing(){return this._playing}get stopped(){return this._stopped}stop(){this._stopped||(this._stopped=!0,this._playing=!1,this.events.isEnabled("stopped")&&this.events.dispatch("stopped",{type:"stopped",target:this}))}pause(){this._playing=!1,this._oldTime=null}play(){this._stopped||this._playing||(this._playing=!0,this._animation._startAnimation())}get percentage(){return this._time/this._duration}waitForStop(){return new Promise(((t,e)=>{if(this._stopped)t();else{const e=()=>{i.dispose(),t()},i=this.events.on("stopped",e)}}))}_checkEnded(){return!(this._loops>1)||(--this._loops,!1)}_run(t){null!==this._oldTime&&(this._time+=t-this._oldTime,this._time>this._duration&&(this._time=this._duration)),this._oldTime=t}_reset(t){this._oldTime=t,this._time=0}_value(t){return this._interpolate(this._easing(t),this._from,this._to)}}let ke=0;class Oe{constructor(t){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:++ke}),Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_privateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_settingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_privateSettingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_prevSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_prevPrivateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_animatingSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_animatingPrivateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_disposed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_userProperties",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._settings=t}_checkDirty(){Y(this._settings).forEach((t=>{this._userProperties[t]=!0,this._markDirtyKey(t)}))}resetUserSettings(){this._userProperties={}}_runAnimation(t){if(this.isDisposed())return!1;{let e=!1;return J(this._animatingSettings,((i,s)=>{if(s._stopped)this._stopAnimation(i);else if(s._playing){s._run(t);const r=s.percentage;r>=1?s._checkEnded()?this.set(i,s._value(1)):(e=!0,s._reset(t),this._set(i,s._value(1))):(e=!0,this._set(i,s._value(r)))}})),J(this._animatingPrivateSettings,((i,s)=>{if(s._stopped)this._stopAnimationPrivate(i);else if(s._playing){s._run(t);const r=s.percentage;r>=1?s._checkEnded()?this.setPrivate(i,s._value(1)):(e=!0,s._reset(t),this._setPrivate(i,s._value(1))):(e=!0,this._setPrivate(i,s._value(r)))}})),e}}_markDirtyKey(t){this.markDirty()}_markDirtyPrivateKey(t){this.markDirty()}on(t,e){let i=this._settingEvents[t];return void 0===i&&(i=this._settingEvents[t]=[]),i.push(e),new B((()=>{y(i,e),0===i.length&&delete this._settingEvents[t]}))}onPrivate(t,e){let i=this._privateSettingEvents[t];return void 0===i&&(i=this._privateSettingEvents[t]=[]),i.push(e),new B((()=>{y(i,e),0===i.length&&delete this._privateSettingEvents[t]}))}getRaw(t,e){const i=this._settings[t];return void 0!==i?i:e}get(t,e){return this.getRaw(t,e)}_sendKeyEvent(t,e){const i=this._settingEvents[t];void 0!==i&&m(i,(i=>{i(e,this,t)}))}_sendPrivateKeyEvent(t,e){const i=this._privateSettingEvents[t];void 0!==i&&m(i,(i=>{i(e,this,t)}))}_setRaw(t,e,i){this._prevSettings[t]=e,this._sendKeyEvent(t,i)}setRaw(t,e){const i=this._settings[t];this._settings[t]=e,i!==e&&this._setRaw(t,i,e)}_set(t,e){const i=this._settings[t];this._settings[t]=e,i!==e&&(this._setRaw(t,i,e),this._markDirtyKey(t))}_stopAnimation(t){const e=this._animatingSettings[t];e&&(delete this._animatingSettings[t],e.stop())}set(t,e){return this._set(t,e),this._stopAnimation(t),e}remove(t){t in this._settings&&(this._prevSettings[t]=this._settings[t],delete this._settings[t],this._sendKeyEvent(t,void 0),this._markDirtyKey(t)),this._stopAnimation(t)}removeAll(){m(Y(this._settings),(t=>{this.remove(t)}))}getPrivate(t,e){const i=this._privateSettings[t];return void 0!==i?i:e}_setPrivateRaw(t,e,i){this._prevPrivateSettings[t]=e,this._sendPrivateKeyEvent(t,i)}setPrivateRaw(t,e){const i=this._privateSettings[t];this._privateSettings[t]=e,i!==e&&this._setPrivateRaw(t,i,e)}_setPrivate(t,e){const i=this._privateSettings[t];this._privateSettings[t]=e,i!==e&&(this._setPrivateRaw(t,i,e),this._markDirtyPrivateKey(t))}_stopAnimationPrivate(t){const e=this._animatingPrivateSettings[t];e&&(e.stop(),delete this._animatingPrivateSettings[t])}setPrivate(t,e){return this._setPrivate(t,e),this._stopAnimationPrivate(t),e}removePrivate(t){t in this._privateSettings&&(this._prevPrivateSettings[t]=this._privateSettings[t],delete this._privateSettings[t],this._markDirtyPrivateKey(t)),this._stopAnimationPrivate(t)}setAll(t){J(t,((t,e)=>{this.set(t,e)}))}animate(t){const e=t.key,i=t.to,s=t.duration||0,r=t.loops||1,a=void 0===t.from?this.get(e):t.from,n=void 0===t.easing?pe:t.easing;if(0===s)this.set(e,i);else{if(void 0!==a&&a!==i){this.set(e,a);const t=this._animatingSettings[e]=new xe(this,a,i,s,n,r,this._animationTime());return this._startAnimation(),t}this.set(e,i)}const o=new xe(this,a,i,s,n,r,null);return o.stop(),o}animatePrivate(t){const e=t.key,i=t.to,s=t.duration||0,r=t.loops||1,a=void 0===t.from?this.getPrivate(e):t.from,n=void 0===t.easing?pe:t.easing;if(0===s)this.setPrivate(e,i);else{if(void 0!==a&&a!==i){this.setPrivate(e,a);const t=this._animatingPrivateSettings[e]=new xe(this,a,i,s,n,r,this._animationTime());return this._startAnimation(),t}this.setPrivate(e,i)}const o=new xe(this,a,i,s,n,r,null);return o.stop(),o}_dispose(){}isDisposed(){return this._disposed}dispose(){this._disposed||(this._disposed=!0,this._dispose())}}class Te extends Oe{constructor(t,e,i,s=[]){if(super(e),Object.defineProperty(this,"_root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_user_id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"states",{enumerable:!0,configurable:!0,writable:!0,value:new me(this)}),Object.defineProperty(this,"adapters",{enumerable:!0,configurable:!0,writable:!0,value:new De(this)}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:this._createEvents()}),Object.defineProperty(this,"_userPrivateProperties",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirty",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dirtyPrivate",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_templates",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_internalTemplates",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_defaultThemes",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_templateDisposers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_disposers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_runSetup",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"_disposerProperties",{enumerable:!0,configurable:!0,writable:!0,value:{}}),!i)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._root=t,this._internalTemplates=s,e.id&&this._registerId(e.id)}static new(t,e,i){const s=new this(t,e,!0);return s._template=i,s._afterNew(),s}static _new(t,e,i=[]){const s=new this(t,e,!0,i);return s._afterNew(),s}_afterNew(){this._checkDirty();let t=!1;const e=this._template;e&&(t=!0,e._setObjectTemplate(this)),m(this._internalTemplates,(e=>{t=!0,e._setObjectTemplate(this)})),t&&this._applyTemplates(!1),this.states.create("default",{}),this._setDefaults()}_afterNewApplyThemes(){this._checkDirty();const t=this._template;t&&t._setObjectTemplate(this),m(this._internalTemplates,(t=>{t._setObjectTemplate(this)})),this.states.create("default",{}),this._setDefaults(),this._applyThemes()}_createEvents(){return new L}get classNames(){return this.constructor.classNames}get className(){return this.constructor.className}_setDefaults(){}_setDefault(t,e){t in this._settings||super.set(t,e)}_setRawDefault(t,e){t in this._settings||super.setRaw(t,e)}_clearDirty(){Y(this._dirty).forEach((t=>{this._dirty[t]=!1})),Y(this._dirtyPrivate).forEach((t=>{this._dirtyPrivate[t]=!1}))}isDirty(t){return!!this._dirty[t]}isPrivateDirty(t){return!!this._dirtyPrivate[t]}_markDirtyKey(t){this._dirty[t]=!0,super._markDirtyKey(t)}_markDirtyPrivateKey(t){this._dirtyPrivate[t]=!0,super._markDirtyKey(t)}isType(t){return-1!==this.classNames.indexOf(t)}_pushPropertyDisposer(t,e){let i=this._disposerProperties[t];return void 0===i&&(i=this._disposerProperties[t]=[]),i.push(e),e}_disposeProperty(t){const e=this._disposerProperties[t];void 0!==e&&(m(e,(t=>{t.dispose()})),delete this._disposerProperties[t])}set template(t){const e=this._template;e!==t&&(this._template=t,e&&e._removeObjectTemplate(this),t&&t._setObjectTemplate(this),this._applyTemplates())}get template(){return this._template}markDirty(){this._root._addDirtyEntity(this)}_startAnimation(){this._root._addAnimation(this)}_animationTime(){return this._root.animationTime}_applyState(t){}_applyStateAnimated(t,e){}get(t,e){const i=this.adapters.fold(t,this._settings[t]);return void 0!==i?i:e}isUserSetting(t){return this._userProperties[t]||!1}set(t,e){return this._userProperties[t]=!0,super.set(t,e)}setRaw(t,e){this._userProperties[t]=!0,super.setRaw(t,e)}_setSoft(t,e){return this._userProperties[t]?e:super.set(t,e)}remove(t){delete this._userProperties[t],this._removeTemplateProperty(t)}setPrivate(t,e){return this._userPrivateProperties[t]=!0,super.setPrivate(t,e)}setPrivateRaw(t,e){this._userPrivateProperties[t]=!0,super.setPrivateRaw(t,e)}removePrivate(t){delete this._userPrivateProperties[t],this._removeTemplatePrivateProperty(t)}_setTemplateProperty(t,e,i){if(!this._userProperties[e]){t===this._findTemplateByKey(e)&&super.set(e,i)}}_setTemplatePrivateProperty(t,e,i){if(!this._userPrivateProperties[e]){t===this._findTemplateByPrivateKey(e)&&super.setPrivate(e,i)}}_removeTemplateProperty(t){if(!this._userProperties[t]){const e=this._findTemplateByKey(t);e?super.set(t,e._settings[t]):super.remove(t)}}_removeTemplatePrivateProperty(t){if(!this._userPrivateProperties[t]){const e=this._findTemplateByPrivateKey(t);e?super.setPrivate(t,e._privateSettings[t]):super.removePrivate(t)}}_walkParents(t){t(this._root._rootContainer),t(this)}_applyStateByKey(t){const e=this.states.create(t,{}),i={};this._eachTemplate((s=>{const r=s.states.lookup(t);r&&r._apply(e,i)})),J(e._settings,(t=>{i[t]||e._userSettings[t]||e.remove(t)}))}_applyTemplate(t,e){this._templateDisposers.push(t._apply(this,e)),J(t._settings,((t,i)=>{e.settings[t]||this._userProperties[t]||(e.settings[t]=!0,super.set(t,i))})),J(t._privateSettings,((t,i)=>{e.privateSettings[t]||this._userPrivateProperties[t]||(e.privateSettings[t]=!0,super.setPrivate(t,i))})),this._runSetup&&t.setup&&(this._runSetup=!1,t.setup(this))}_findStaticTemplate(t){if(this._template&&t(this._template))return this._template}_eachTemplate(t){this._findStaticTemplate((e=>(t(e),!1))),f(this._internalTemplates,t),m(this._templates,t)}_applyTemplates(t=!0){t&&this._disposeTemplates();const e={settings:{},privateSettings:{},states:{}};this._eachTemplate((t=>{this._applyTemplate(t,e)})),t&&(J(this._settings,(t=>{this._userProperties[t]||e.settings[t]||super.remove(t)})),J(this._privateSettings,(t=>{this._userPrivateProperties[t]||e.privateSettings[t]||super.removePrivate(t)})))}_findTemplate(t){const e=this._findStaticTemplate(t);if(void 0===e){const e=j(this._internalTemplates,t);return void 0===e?T(this._templates,t):e}return e}_findTemplateByKey(t){return this._findTemplate((e=>t in e._settings))}_findTemplateByPrivateKey(t){return this._findTemplate((e=>t in e._privateSettings))}_disposeTemplates(){m(this._templateDisposers,(t=>{t.dispose()})),this._templateDisposers.length=0}_removeTemplates(){m(this._templates,(t=>{t._removeObjectTemplate(this)})),this._templates.length=0}_applyThemes(){let t=!1;const e=[];let i=[];const s=new Set,r=this.get("themeTagsSelf");return r&&m(r,(t=>{s.add(t)})),this._walkParents((r=>{r===this._root._rootContainer&&(t=!0),r._defaultThemes.length>0&&e.push(r._defaultThemes);const a=r.get("themes");a&&i.push(a);const n=r.get("themeTags");n&&m(n,(t=>{s.add(t)}))})),i=e.concat(i),this._removeTemplates(),t&&f(this.classNames,(t=>{const e=[];m(i,(i=>{m(i,(i=>{const r=i._lookupRules(t);r&&f(r,(t=>{if(t.tags.every((t=>s.has(t)))){const i=E(e,(e=>{const i=ye(t.tags.length,e.tags.length);return 0===i?we(t.tags,e.tags,ye):i}));e.splice(i.index,0,t)}}))}))})),m(e,(t=>{this._templates.push(t.template),t.template._setObjectTemplate(this)}))})),this._applyTemplates(),t&&(this._runSetup=!1),t}_changed(){}_beforeChanged(){if(this.isDirty("id")){const t=this.get("id");t&&this._registerId(t);const e=this._prevSettings.id;e&&delete be.entitiesById[e]}}_registerId(t){if(be.entitiesById[t]&&be.entitiesById[t]!==this)throw new Error('An entity with id "'+t+'" already exists.');be.entitiesById[t]=this}_afterChanged(){}addDisposer(t){return this._disposers.push(t),t}_dispose(){super._dispose();const t=this._template;t&&t._removeObjectTemplate(this),m(this._internalTemplates,(t=>{t._removeObjectTemplate(this)})),this._removeTemplates(),this._disposeTemplates(),this.events.dispose(),this._disposers.forEach((t=>{t.dispose()})),J(this._disposerProperties,((t,e)=>{m(e,(t=>{t.dispose()}))}));const e=this.get("id");e&&delete be.entitiesById[e]}setTimeout(t,e){const i=setTimeout((()=>{this.removeDispose(s),t()}),e),s=new B((()=>{clearTimeout(i)}));return this._disposers.push(s),s}removeDispose(t){if(!this.isDisposed()){let e=c(this._disposers,t);e>-1&&this._disposers.splice(e,1)}t.dispose()}hasTag(t){return-1!==c(this.get("themeTags",[]),t)}addTag(t){if(!this.hasTag(t)){const e=this.get("themeTags",[]);e.push(t),this.set("themeTags",e)}}removeTag(t){if(this.hasTag(t)){const e=this.get("themeTags",[]);v(e,t),this.set("themeTags",e)}}_t(t,e,...i){return this._root.language.translate(t,e,...i)}get root(){return this._root}}Object.defineProperty(Te,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Entity"}),Object.defineProperty(Te,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:["Entity"]});class je{constructor(t,e,i){Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this._name=t,this._template=e,this._settings=i}get(t,e){const i=this._settings[t];return void 0!==i?i:e}set(t,e){this._settings[t]=e,this._template._stateChanged(this._name)}remove(t){delete this._settings[t],this._template._stateChanged(this._name)}setAll(t){Y(t).forEach((e=>{this._settings[e]=t[e]})),this._template._stateChanged(this._name)}_apply(t,e){J(this._settings,((i,s)=>{e[i]||t._userSettings[i]||(e[i]=!0,t.setRaw(i,s))}))}}class Se{constructor(t){Object.defineProperty(this,"_template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_states",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._template=t}lookup(t){return this._states[t]}create(t,e){const i=this._states[t];if(i)return i.setAll(e),i;{const i=new je(t,this._template,e);return this._states[t]=i,this._template._stateChanged(t),i}}remove(t){delete this._states[t],this._template._stateChanged(t)}_apply(t,e){J(this._states,((i,s)=>{let r=e.states[i];null==r&&(r=e.states[i]={});const a=t.states.create(i,{});s._apply(a,r)}))}}class Ee{constructor(){Object.defineProperty(this,"_callbacks",{enumerable:!0,configurable:!0,writable:!0,value:{}})}add(t,e){let i=this._callbacks[t];return void 0===i&&(i=this._callbacks[t]=[]),i.push(e),new B((()=>{y(i,e),0===i.length&&delete this._callbacks[t]}))}remove(t){void 0!==this._callbacks[t]&&delete this._callbacks[t]}_apply(t){const e=[];return J(this._callbacks,((i,s)=>{m(s,(s=>{e.push(t.adapters.add(i,s))}))})),new A(e)}}class Ce{constructor(t,e){if(Object.defineProperty(this,"_settings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_privateSettings",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_settingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_privateSettingEvents",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_entities",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"states",{enumerable:!0,configurable:!0,writable:!0,value:new Se(this)}),Object.defineProperty(this,"adapters",{enumerable:!0,configurable:!0,writable:!0,value:new Ee}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new L}),Object.defineProperty(this,"setup",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),!e)throw new Error("You cannot use `new Class()`, instead use `Class.new()`");this._settings=t}static new(t){return new Ce(t,!0)}get entities(){return this._entities}get(t,e){const i=this._settings[t];return void 0!==i?i:e}setRaw(t,e){this._settings[t]=e}set(t,e){this._settings[t]!==e&&(this.setRaw(t,e),this._entities.forEach((i=>{i._setTemplateProperty(this,t,e)})))}remove(t){t in this._settings&&(delete this._settings[t],this._entities.forEach((e=>{e._removeTemplateProperty(t)})))}removeAll(){J(this._settings,((t,e)=>{this.remove(t)}))}getPrivate(t,e){const i=this._privateSettings[t];return void 0!==i?i:e}setPrivateRaw(t,e){return this._privateSettings[t]=e,e}setPrivate(t,e){return this._privateSettings[t]!==e&&(this.setPrivateRaw(t,e),this._entities.forEach((i=>{i._setTemplatePrivateProperty(this,t,e)}))),e}removePrivate(t){t in this._privateSettings&&(delete this._privateSettings[t],this._entities.forEach((e=>{e._removeTemplatePrivateProperty(t)})))}setAll(t){J(t,((t,e)=>{this.set(t,e)}))}on(t,e){let i=this._settingEvents[t];return void 0===i&&(i=this._settingEvents[t]=[]),i.push(e),new B((()=>{y(i,e),0===i.length&&delete this._settingEvents[t]}))}onPrivate(t,e){let i=this._privateSettingEvents[t];return void 0===i&&(i=this._privateSettingEvents[t]=[]),i.push(e),new B((()=>{y(i,e),0===i.length&&delete this._privateSettingEvents[t]}))}_apply(t,e){const i=[];return J(this._settingEvents,((e,s)=>{m(s,(s=>{i.push(t.on(e,s))}))})),J(this._privateSettingEvents,((e,s)=>{m(s,(s=>{i.push(t.onPrivate(e,s))}))})),this.states._apply(t,e),i.push(this.adapters._apply(t)),i.push(t.events.copyFrom(this.events)),new A(i)}_setObjectTemplate(t){this._entities.push(t)}_removeObjectTemplate(t){v(this._entities,t)}_stateChanged(t){this._entities.forEach((e=>{e._applyStateByKey(t)}))}}class Me extends L{constructor(t){super(),Object.defineProperty(this,"_sprite",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rendererDisposers",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_dispatchParents",{enumerable:!0,configurable:!0,writable:!0,value:!0}),this._sprite=t}_makePointerEvent(t,e){return{type:t,originalEvent:e.event,point:e.point,simulated:e.simulated,native:e.native,target:this._sprite}}_onRenderer(t,e){this._sprite.set("interactive",!0),this._sprite._display.interactive=!0;let i=this._rendererDisposers[t];if(void 0===i){const s=this._sprite._display.on(t,(t=>{e.call(this,t)}));i=this._rendererDisposers[t]=new H((()=>{delete this._rendererDisposers[t],s.dispose()}))}return i.increment()}_on(t,e,i,s,r,a){const n=super._on(t,e,i,s,r,a),o=Me.RENDERER_EVENTS[e];return void 0!==o&&(n.disposer=new A([n.disposer,this._onRenderer(e,o)])),n}stopParentDispatch(){this._dispatchParents=!1}dispatchParents(t,e){const i=this._dispatchParents;this._dispatchParents=!0;try{this.dispatch(t,e),this._dispatchParents&&this._sprite.parent&&this._sprite.parent.events.dispatchParents(t,e)}finally{this._dispatchParents=i}}}Object.defineProperty(Me,"RENDERER_EVENTS",{enumerable:!0,configurable:!0,writable:!0,value:{click:function(t){this.isEnabled("click")&&!this._sprite.isDragging()&&this._sprite._hasDown()&&!this._sprite._hasMoved(this._makePointerEvent("click",t))&&this.dispatch("click",this._makePointerEvent("click",t))},rightclick:function(t){this.isEnabled("rightclick")&&this.dispatch("rightclick",this._makePointerEvent("rightclick",t))},middleclick:function(t){this.isEnabled("middleclick")&&this.dispatch("middleclick",this._makePointerEvent("middleclick",t))},dblclick:function(t){this.dispatchParents("dblclick",this._makePointerEvent("dblclick",t))},pointerover:function(t){this.isEnabled("pointerover")&&this.dispatch("pointerover",this._makePointerEvent("pointerover",t))},pointerout:function(t){this.isEnabled("pointerout")&&this.dispatch("pointerout",this._makePointerEvent("pointerout",t))},pointerdown:function(t){this.dispatchParents("pointerdown",this._makePointerEvent("pointerdown",t))},pointerup:function(t){this.isEnabled("pointerup")&&this.dispatch("pointerup",this._makePointerEvent("pointerup",t))},globalpointerup:function(t){this.isEnabled("globalpointerup")&&this.dispatch("globalpointerup",this._makePointerEvent("globalpointerup",t))},globalpointermove:function(t){this.isEnabled("globalpointermove")&&this.dispatch("globalpointermove",this._makePointerEvent("globalpointermove",t))},wheel:function(t){this.dispatchParents("wheel",{type:"wheel",target:this._sprite,originalEvent:t.event,point:t.point})}}});class Be extends Te{constructor(){super(...arguments),Object.defineProperty(this,"_adjustedLocalBounds",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_localBounds",{enumerable:!0,configurable:!0,writable:!0,value:{left:0,right:0,top:0,bottom:0}}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dataItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_templateField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_sizeDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dragEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dragPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_isHidden",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isShowing",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isHiding",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_isDown",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_downPoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_downPoints",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"_toggleDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_dragDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_hoverDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_focusDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipMoveDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_tooltipPointerDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_statesHandled",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_afterNew(){this.setPrivateRaw("visible",!0),super._afterNew()}_markDirtyKey(t){super._markDirtyKey(t),"x"!=t&&"y"!=t&&"dx"!=t&&"dy"!=t||(this.markDirtyBounds(),this._addPercentagePositionChildren(),this.markDirtyPosition())}_markDirtyPrivateKey(t){super._markDirtyPrivateKey(t),"x"!=t&&"y"!=t||this.markDirtyPosition()}_removeTemplateField(){this._templateField&&this._templateField._removeObjectTemplate(this)}_createEvents(){return new Me(this)}_processTemplateField(){let t;const e=this.get("templateField");if(e){const i=this.dataItem;if(i){const s=i.dataContext;s&&(t=s[e],t instanceof Ce||!t||(t=Ce.new(t)))}}this._templateField!==t&&(this._removeTemplateField(),this._templateField=t,t&&t._setObjectTemplate(this),this._applyTemplates())}_setDataItem(t){const e=this._dataItem;this._dataItem=t,this._processTemplateField();const i="dataitemchanged";t!=e&&this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,oldDataItem:e,newDataItem:t})}set dataItem(t){this._setDataItem(t)}get dataItem(){if(this._dataItem)return this._dataItem;{let t=this._parent;for(;t;){if(t._dataItem)return t._dataItem;t=t._parent}}}_addPercentageSizeChildren(){let t=this.parent;t&&(this.get("width")instanceof K||this.get("height")instanceof K?w(t._percentageSizeChildren,this):y(t._percentageSizeChildren,this))}_addPercentagePositionChildren(){let t=this.parent;t&&(this.get("x")instanceof K||this.get("y")instanceof K?w(t._percentagePositionChildren,this):y(t._percentagePositionChildren,this))}markDirtyPosition(){this._root._addDirtyPosition(this)}updatePivotPoint(){const t=this._localBounds;if(t){const e=this.get("centerX");null!=e&&(this._display.pivot.x=t.left+_t(e,t.right-t.left));const i=this.get("centerY");null!=i&&(this._display.pivot.y=t.top+_t(i,t.bottom-t.top))}}_beforeChanged(){if(super._beforeChanged(),this._handleStates(),this.isDirty("tooltip")){const t=this._prevSettings.tooltip;t&&t.dispose()}if((this.isDirty("layer")||this.isDirty("layerMargin"))&&(this._display.setLayer(this.get("layer"),this.get("layerMargin")),this.markDirtyLayer()),this.isDirty("tooltipPosition")){const t=this._tooltipMoveDp;t&&(t.dispose(),this._tooltipMoveDp=void 0);const e=this._tooltipPointerDp;e&&(e.dispose(),this._tooltipPointerDp=void 0),"pointer"==this.get("tooltipPosition")&&(this._tooltipPointerDp=new A([this.events.on("pointerover",(()=>{this._tooltipMoveDp=this.events.on("globalpointermove",(t=>{this.showTooltip(t.point)}))})),this.events.on("pointerout",(()=>{const t=this._tooltipMoveDp;t&&(t.dispose(),this._tooltipMoveDp=void 0)}))]))}}_handleStates(){this._statesHandled||(this.isDirty("active")&&(this.get("active")?(this.states.applyAnimate("active"),this.set("ariaChecked",!0)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!1)),this.markDirtyAccessibility()),this.isDirty("disabled")&&(this.get("disabled")?(this.states.applyAnimate("disabled"),this.set("ariaChecked",!1)):(this.isHidden()||this.states.applyAnimate("default"),this.set("ariaChecked",!0)),this.markDirtyAccessibility()),this._statesHandled=!0)}_changed(){super._changed();const t=this._display,e=this.events;if(this.isDirty("draggable")){const i=this.get("draggable");i?(this.set("interactive",!0),this._dragDp=new A([e.on("pointerdown",(t=>{this.dragStart(t)})),e.on("globalpointermove",(t=>{this.dragMove(t)})),e.on("globalpointerup",(t=>{this.dragStop(t)}))])):this._dragDp&&(this._dragDp.dispose(),this._dragDp=void 0),t.cancelTouch=!!i}if(this.isDirty("tooltipText")||this.isDirty("tooltipHTML")||this.isDirty("showTooltipOn")){const t=this.get("tooltipText"),i=this.get("tooltipHTML"),s=this.get("showTooltipOn","hover");this._tooltipDp&&(this._tooltipDp.dispose(),this._tooltipDp=void 0),(t||i)&&("click"==s?this._tooltipDp=new A([e.on("click",(()=>{this.setTimeout((()=>this.showTooltip()),10)})),tt(document,"click",(t=>{this.hideTooltip()}))]):"always"==s||(this._tooltipDp=new A([e.on("pointerover",(()=>{this.showTooltip()})),e.on("pointerout",(()=>{this.hideTooltip()}))])))}if(this.isDirty("toggleKey")){let t=this.get("toggleKey");t&&"none"!=t?this._toggleDp=e.on("click",(()=>{this._isDragging||this.set(t,!this.get(t))})):this._toggleDp&&(this._toggleDp.dispose(),this._toggleDp=void 0)}if(this.isDirty("opacity")&&(t.alpha=Math.max(0,this.get("opacity",1))),this.isDirty("rotation")&&(this.markDirtyBounds(),t.angle=this.get("rotation",0)),this.isDirty("scale")&&(this.markDirtyBounds(),t.scale=this.get("scale",0)),(this.isDirty("centerX")||this.isDirty("centerY"))&&(this.markDirtyBounds(),this.updatePivotPoint()),(this.isDirty("visible")||this.isPrivateDirty("visible")||this.isDirty("forceHidden"))&&(this.get("visible")&&this.getPrivate("visible")&&!this.get("forceHidden")?t.visible=!0:(t.visible=!1,this.hideTooltip()),this.markDirtyBounds(),this.get("focusable")&&this.markDirtyAccessibility()),this.isDirty("width")||this.isDirty("height")){this.markDirtyBounds(),this._addPercentageSizeChildren();const t=this.parent;t&&(this.isDirty("width")&&this.get("width")instanceof K||this.isDirty("height")&&this.get("height")instanceof K)&&(t.markDirty(),t._prevWidth=0),this._sizeDirty=!0}if((this.isDirty("maxWidth")||this.isDirty("maxHeight")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("minWidth")||this.isDirty("minHeight")||this.isPrivateDirty("maxWidth")||this.isPrivateDirty("maxHeight")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight"))&&(this.markDirtyBounds(),this._sizeDirty=!0),this._sizeDirty&&this._updateSize(),this.isDirty("wheelable")){const e=this.get("wheelable");e&&this.set("interactive",!0),t.wheelable=!!e}if((this.isDirty("tabindexOrder")||this.isDirty("focusableGroup"))&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this)),this.isDirty("filter")&&(t.filter=this.get("filter")),this.isDirty("cursorOverStyle")&&(t.cursorOverStyle=this.get("cursorOverStyle")),this.isDirty("hoverOnFocus")&&(this.get("hoverOnFocus")?this._focusDp=new A([e.on("focus",(()=>{this.showTooltip()})),e.on("blur",(()=>{this.hideTooltip()}))]):this._focusDp&&(this._focusDp.dispose(),this._focusDp=void 0)),this.isDirty("focusable")&&(this.get("focusable")?this._root._registerTabindexOrder(this):this._root._unregisterTabindexOrder(this),this.markDirtyAccessibility()),(this.isDirty("role")||this.isDirty("ariaLive")||this.isDirty("ariaChecked")||this.isDirty("ariaHidden")||this.isDirty("ariaOrientation")||this.isDirty("ariaValueNow")||this.isDirty("ariaValueMin")||this.isDirty("ariaValueMax")||this.isDirty("ariaValueText")||this.isDirty("ariaLabel")||this.isDirty("ariaControls"))&&this.markDirtyAccessibility(),this.isDirty("exportable")&&(t.exportable=this.get("exportable")),this.isDirty("interactive")){const t=this.events;this.get("interactive")?this._hoverDp=new A([t.on("click",(t=>{ot(t.originalEvent)&&(this.getPrivate("touchHovering")||this.setTimeout((()=>{this._handleOver(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.showTooltip(),this.setPrivateRaw("touchHovering",!0),this.events.dispatch("pointerover",{type:"pointerover",target:t.target,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}),10))})),t.on("globalpointerup",(t=>{ot(t.originalEvent)&&(this.getPrivate("touchHovering")&&(this._handleOut(),(this.get("tooltipText")||this.get("tooltipHTML"))&&this.hideTooltip()),this.setPrivateRaw("touchHovering",!1),this.events.dispatch("pointerout",{type:"pointerout",target:t.target,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})),this._isDown&&this._handleUp(t)})),t.on("pointerover",(()=>{this._handleOver()})),t.on("pointerout",(()=>{this._handleOut()})),t.on("pointerdown",(t=>{this._handleDown(t)}))]):(this._display.interactive=!1,this._hoverDp&&(this._hoverDp.dispose(),this._hoverDp=void 0))}this.isDirty("forceInactive")&&(this._display.inactive=this.get("forceInactive",!1)),"always"==this.get("showTooltipOn")&&this._display.visible&&this.showTooltip()}dragStart(t){this._dragEvent=t,this.events.stopParentDispatch()}dragStop(t){if(this._dragEvent=void 0,this._dragPoint=void 0,this.events.stopParentDispatch(),this._isDragging){this._isDragging=!1;const e="dragstop";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}}_handleOver(){this.isHidden()||(this.get("active")&&this.states.lookup("hoverActive")?this.states.applyAnimate("hoverActive"):this.get("disabled")&&this.states.lookup("hoverDisabled")?this.states.applyAnimate("hoverDisabled"):this.states.applyAnimate("hover"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleOut(){this.isHidden()||(this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):(this.states.lookup("hover")||this.states.lookup("hoverActive"))&&this.states.applyAnimate("default"),this.get("draggable")&&this._isDown&&this.states.lookup("down")&&this.states.applyAnimate("down"))}_handleUp(t){if(!this.isHidden()){this.get("active")&&this.states.lookup("active")?this.states.applyAnimate("active"):this.get("disabled")&&this.states.lookup("disabled")?this.states.applyAnimate("disabled"):this.states.lookup("down")&&(this.isHover()?this.states.applyAnimate("hover"):this.states.applyAnimate("default")),this._downPoint=void 0;const e=st(t.originalEvent);delete this._downPoints[e],0==Y(this._downPoints).length&&(this._isDown=!1)}}_hasMoved(t){const e=st(t.originalEvent),i=this._downPoints[e];if(i){const e=Math.abs(i.x-t.point.x),s=Math.abs(i.y-t.point.y);return e>5||s>5}return!1}_hasDown(){return Y(this._downPoints).length>0}_handleDown(t){const e=this.parent;if(e&&!this.get("draggable")&&e._handleDown(t),this.get("interactive")&&!this.isHidden()){this.states.lookup("down")&&this.states.applyAnimate("down"),this._downPoint={x:t.point.x,y:t.point.y},this._isDown=!0;const e=st(t.originalEvent);this._downPoints[e]={x:t.point.x,y:t.point.y}}}dragMove(t){let e=this._dragEvent;if(e){if(e.simulated&&!t.simulated)return!0;let i=0,s=this.parent;for(;null!=s;)i+=s.get("rotation",0),s=s.parent;let r=t.point.x-e.point.x,a=t.point.y-e.point.y;const n=this.events;if(e.simulated&&!this._isDragging){this._isDragging=!0,this._dragEvent=t,this._dragPoint={x:this.x(),y:this.y()};const e="dragstart";n.isEnabled(e)&&n.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}if(this._isDragging){let e=this._dragPoint;this.set("x",e.x+r*oe(i)+a*ne(i)),this.set("y",e.y+a*oe(i)-r*ne(i));const s="dragged";n.isEnabled(s)&&n.dispatch(s,{type:s,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}else if(Math.hypot(r,a)>5){this._isDragging=!0,this._dragEvent=t,this._dragPoint={x:this.x(),y:this.y()};const e="dragstart";n.isEnabled(e)&&n.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent,point:t.point,simulated:t.simulated})}}}_updateSize(){}_getBounds(){this._localBounds=this._display.getLocalBounds()}depth(){let t=this.parent,e=0;for(;;){if(!t)return e;++e,t=t.parent}}markDirtySize(){this._sizeDirty=!0,this.markDirty()}markDirtyBounds(){if(this.get("isMeasured")){const t=this._display;this._root._addDirtyBounds(this),t.isMeasured=!0,t.invalidateBounds();const e=this.parent;e&&"absolute"!=this.get("position")&&(null==e.get("width")||null==e.get("height")||e.get("layout"))&&e.markDirtyBounds(),this.get("focusable")&&this.isFocus()&&this.markDirtyAccessibility()}}markDirtyAccessibility(){this._root._invalidateAccessibility(this)}markDirtyLayer(){this._display.markDirtyLayer(!0)}markDirty(){super.markDirty(),this.markDirtyLayer()}_updateBounds(){const t=this._adjustedLocalBounds;let e;if(this.get("visible")&&this.getPrivate("visible")&&!this.get("forceHidden")?(this._getBounds(),this._fixMinBounds(this._localBounds),this.updatePivotPoint(),this._adjustedLocalBounds=this._display.getAdjustedBounds(this._localBounds),e=this._adjustedLocalBounds):(e={left:0,right:0,top:0,bottom:0},this._localBounds=e,this._adjustedLocalBounds=e),!t||t.left!==e.left||t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom){const t="boundschanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this}),this.parent&&(this.parent.markDirty(),this.parent.markDirtyBounds())}}_fixMinBounds(t){let e=this.get("minWidth",this.getPrivate("minWidth")),i=this.get("minHeight",this.getPrivate("minHeight"));l(e)&&t.right-t.left<e&&(t.right=t.left+e),l(i)&&t.bottom-t.top<i&&(t.bottom=t.top+i);let s=this.getPrivate("width"),r=this.getPrivate("height");l(s)&&(s>0?t.right=t.left+s:t.left=t.right+s),l(r)&&(r>0?t.bottom=t.top+r:t.top=t.bottom+r)}_removeParent(t){t&&(t.children.removeValue(this),y(t._percentageSizeChildren,this),y(t._percentagePositionChildren,this))}_clearDirty(){super._clearDirty(),this._sizeDirty=!1,this._statesHandled=!1}hover(){this.showTooltip(),this._handleOver()}unhover(){this.hideTooltip(),this._handleOut()}showTooltip(t){const e=this.getTooltip(),i=this.get("tooltipText"),s=this.get("tooltipHTML");if((i||s)&&e){const r=this.get("tooltipPosition"),a=this.getPrivate("tooltipTarget",this);"fixed"!=r&&t||(this._display._setMatrix(),t=this.toGlobal(a._getTooltipPoint())),e.set("pointTo",t),e.set("tooltipTarget",a),e.get("x")||e.set("x",t.x),e.get("y")||e.set("y",t.y),i&&e.label.set("text",i),s&&e.label.set("html",s);const n=this.dataItem;if(n&&e.label._setDataItem(n),"always"==this.get("showTooltipOn")&&(t.x<0||t.x>this._root.width()||t.y<0||t.y>this._root.height()))return void this.hideTooltip();e.label.text.markDirtyText();const o=e.show();return this.setPrivateRaw("showingTooltip",!0),o}}hideTooltip(){const t=this.getTooltip();if(t&&t.get("tooltipTarget")==this.getPrivate("tooltipTarget",this)){let e=t.get("keepTargetHover")&&0==t.get("stateAnimationDuration",0)?400:void 0;const i=t.hide(e);return this.setPrivateRaw("showingTooltip",!1),i}}_getTooltipPoint(){const t=this._localBounds;if(t){let e=0,i=0;return this.get("isMeasured")?(e=t.left+_t(this.get("tooltipX",0),t.right-t.left),i=t.top+_t(this.get("tooltipY",0),t.bottom-t.top)):(e=_t(this.get("tooltipX",0),this.width()),i=_t(this.get("tooltipY",0),this.height())),{x:e,y:i}}return{x:0,y:0}}getTooltip(){let t=this.get("tooltip");if(t)return t;{let t=this.parent;if(t)return t.getTooltip()}}_updatePosition(){const t=this.parent;let e=this.get("dx",0),i=this.get("dy",0),s=this.get("x"),r=this.getPrivate("x"),a=0,n=0;const o=this.get("position");s instanceof K&&(s=t?t.innerWidth()*s.value+t.get("paddingLeft",0):0),l(s)?a=s+e:null!=r?a=r:t&&"relative"==o&&(a=t.get("paddingLeft",0)+e);let h=this.get("y"),d=this.getPrivate("y");h instanceof K&&(h=t?t.innerHeight()*h.value+t.get("paddingTop",0):0),l(h)?n=h+i:null!=d?n=d:t&&"relative"==o&&(n=t.get("paddingTop",0)+i);const u=this._display;if(u.x!=a||u.y!=n){u.invalidateBounds(),u.x=a,u.y=n;const t="positionchanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}this.getPrivate("showingTooltip")&&this.showTooltip()}x(){let t=this.get("x"),e=this.getPrivate("x");const i=this.parent;return i?t instanceof K?_t(t,i.innerWidth())+i.get("paddingLeft",0):l(t)?t:null!=e?e:i.get("paddingLeft",this._display.x):this._display.x}y(){let t=this.getPrivate("y");if(null!=t)return t;let e=this.get("y");const i=this.parent;return i?e instanceof K?_t(e,i.innerHeight())+i.get("paddingTop",0):l(e)?e:null!=t?t:i.get("paddingTop",this._display.y):this._display.y}_dispose(){super._dispose(),this._display.dispose(),this._removeTemplateField(),this._removeParent(this.parent),this._root._removeFocusElement(this);const t=this.get("tooltip");t&&t.dispose(),this.markDirty()}adjustedLocalBounds(){return this._fixMinBounds(this._adjustedLocalBounds),this._adjustedLocalBounds}localBounds(){return this._localBounds}bounds(){const t=this._adjustedLocalBounds,e=this.x(),i=this.y();return{left:t.left+e,right:t.right+e,top:t.top+i,bottom:t.bottom+i}}globalBounds(){const t=this.localBounds(),e=this.toGlobal({x:t.left,y:t.top}),i=this.toGlobal({x:t.right,y:t.top}),s=this.toGlobal({x:t.right,y:t.bottom}),r=this.toGlobal({x:t.left,y:t.bottom});return{left:Math.min(e.x,i.x,s.x,r.x),top:Math.min(e.y,i.y,s.y,r.y),right:Math.max(e.x,i.x,s.x,r.x),bottom:Math.max(e.y,i.y,s.y,r.y)}}_onShow(t){}_onHide(t){}appear(e,i){return t(this,void 0,void 0,(function*(){return yield this.hide(0),i?new Promise(((t,s)=>{this.setTimeout((()=>{t(this.show(e))}),i)})):this.show(e)}))}show(e){return t(this,void 0,void 0,(function*(){if(!this._isShowing){this._isHidden=!1,this._isShowing=!0,this._isHiding=!1,this.states.lookup("default").get("visible")&&this.set("visible",!0),this._onShow(e);const t=this.states.applyAnimate("default",e);yield Xt(t),this._isShowing=!1}}))}hide(e){return t(this,void 0,void 0,(function*(){if(!this._isHiding&&!this._isHidden){this._isHiding=!0,this._isShowing=!1;let t=this.states.lookup("hidden");t||(t=this.states.create("hidden",{opacity:0,visible:!1})),this._isHidden=!0,this._onHide(e);const i=this.states.applyAnimate("hidden",e);yield Xt(i),this._isHiding=!1}}))}isHidden(){return this._isHidden}isShowing(){return this._isShowing}isHiding(){return this._isHiding}isHover(){return this._display.hovering()}isFocus(){return this._root.focused(this)}isDragging(){return this._isDragging}isVisible(){return!(!this.get("visible")||!this.getPrivate("visible")||this.get("forceHidden"))}isVisibleDeep(){return this._parent?this._parent.isVisibleDeep()&&this.isVisible():this.isVisible()}compositeOpacity(){const t=this.get("opacity",1);return this._parent?this._parent.compositeOpacity()*t:t}width(){let t=this.get("width"),e=this.get("maxWidth",this.getPrivate("maxWidth")),i=this.get("minWidth",this.getPrivate("minWidth")),s=this.getPrivate("width"),r=0;if(l(s))r=s;else if(null==t)this._adjustedLocalBounds&&(r=this._adjustedLocalBounds.right-this._adjustedLocalBounds.left);else if(t instanceof K){const e=this.parent;r=e?e.innerWidth()*t.value:this._root.width()*t.value}else l(t)&&(r=t);return l(i)&&(r=Math.max(i,r)),l(e)&&(r=Math.min(e,r)),r}maxWidth(){let t=this.get("maxWidth",this.getPrivate("maxWidth"));if(l(t))return t;{let t=this.get("width");if(l(t))return t}const e=this.parent;return e?e.innerWidth():this._root.width()}maxHeight(){let t=this.get("maxHeight",this.getPrivate("maxHeight"));if(l(t))return t;{let t=this.get("height");if(l(t))return t}const e=this.parent;return e?e.innerHeight():this._root.height()}height(){let t=this.get("height"),e=this.get("maxHeight",this.getPrivate("maxHeight")),i=this.get("minHeight",this.getPrivate("minHeight")),s=this.getPrivate("height"),r=0;if(l(s))r=s;else if(null==t)this._adjustedLocalBounds&&(r=this._adjustedLocalBounds.bottom-this._adjustedLocalBounds.top);else if(t instanceof K){const e=this.parent;r=e?e.innerHeight()*t.value:this._root.height()*t.value}else l(t)&&(r=t);return l(i)&&(r=Math.max(i,r)),l(e)&&(r=Math.min(e,r)),r}_findStaticTemplate(t){return this._templateField&&t(this._templateField)?this._templateField:super._findStaticTemplate(t)}_walkParents(t){this._parent&&this._walkParent(t)}_walkParent(t){this._parent&&this._parent._walkParent(t),t(this)}get parent(){return this._parent}_setParent(t,e=!1){const i=this._parent;t!==i&&(this.markDirtyBounds(),t.markDirty(),this._parent=t,e&&(this._removeParent(i),t&&(this._addPercentageSizeChildren(),this._addPercentagePositionChildren())),this.markDirtyPosition(),this._applyThemes())}getNumberFormatter(){return this.get("numberFormatter",this._root.numberFormatter)}getDateFormatter(){return this.get("dateFormatter",this._root.dateFormatter)}getDurationFormatter(){return this.get("durationFormatter",this._root.durationFormatter)}toGlobal(t){return this._display.toGlobal(t)}toLocal(t){return this._display.toLocal(t)}_getDownPoint(){const t=this._getDownPointId();if(t)return this._downPoints[t]}_getDownPointId(){if(this._downPoints)return X(this._downPoints,((t,e)=>t>e?1:t<e?-1:0))[0]}toFront(){const t=this.parent;t&&t.children.moveValue(this,t.children.length-1)}toBack(){const t=this.parent;t&&t.children.moveValue(this,0)}}Object.defineProperty(Be,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Sprite"}),Object.defineProperty(Be,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Te.classNames.concat([Be.className])});class Ie extends Te{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeGraphics()}),Object.defineProperty(this,"_backgroundDisplay",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeGraphics()}),Object.defineProperty(this,"_clear",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_pattern",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){super._afterNewApplyThemes()}get pattern(){return this._pattern}_draw(){}_beforeChanged(){super._beforeChanged(),(this.isDirty("repetition")||this.isDirty("width")||this.isDirty("height")||this.isDirty("rotation")||this.isDirty("color")||this.isDirty("strokeWidth")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("colorOpacity")||this.isDirty("fill")||this.isDirty("fillOpacity"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){const t=this.get("repetition",""),e=this.get("width",100),i=this.get("height",100),s=this.get("fill"),r=this.get("fillOpacity",1);this._display.clear(),this._backgroundDisplay.clear(),s&&r>0&&(this._backgroundDisplay.beginFill(s,r),this._backgroundDisplay.drawRect(0,0,e,i),this._backgroundDisplay.endFill()),this._display.angle=this.get("rotation",0),this._draw(),this._pattern=this._root._renderer.createPattern(this._display,this._backgroundDisplay,t,e,i)}}}Object.defineProperty(Ie,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Pattern"}),Object.defineProperty(Ie,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Te.classNames.concat([Ie.className])});class Ae extends Ie{constructor(){super(...arguments),Object.defineProperty(this,"_image",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_beforeChanged(){super._beforeChanged(),this._clear=!0,this.isDirty("src")&&this._load()}_draw(){super._draw();const t=this._image;if(t){const e=this.get("width",100),i=this.get("height",100),s=this.get("fit","image");let r=0,a=0;"pattern"==s?(r=e,a=i):(r=t.width,a=t.height,"image"==s&&(this.set("width",r),this.set("height",a)));let n=0,o=0;this.get("centered",!0)&&(n=e/2-r/2,o=i/2-a/2),this._display.image(t,r,a,n,o)}}_load(){const t=this.get("src");if(t){const e=new Image;e.src=t,e.decode().then((()=>{this._image=e,this._draw(),this.events.isEnabled("loaded")&&this.events.dispatch("loaded",{type:"loaded",target:this})})).catch((t=>{}))}}}var He;Object.defineProperty(Ae,"className",{enumerable:!0,configurable:!0,writable:!0,value:"PicturePattern"}),Object.defineProperty(Ae,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Ie.classNames.concat([Ae.className])}),function(t){t.ADD="lighter",t.COLOR="color",t.COLOR_BURN="color-burn",t.COLOR_DODGE="color-dodge",t.DARKEN="darken",t.DIFFERENCE="difference",t.DST_OVER="destination-over",t.EXCLUSION="exclusion",t.HARD_LIGHT="hard-light",t.HUE="hue",t.LIGHTEN="lighten",t.LUMINOSITY="luminosity",t.MULTIPLY="multiply",t.NORMAL="source-over",t.OVERLAY="overlay",t.SATURATION="saturation",t.SCREEN="screen",t.SOFT_LIGHT="soft-light",t.SRC_ATOP="source-atop",t.XOR="xor"}(He||(He={}));const Le=["fill","fillOpacity","stroke","strokeWidth","strokeOpacity","fillPattern","strokePattern","fillGradient","strokeGradient","strokeDasharray","strokeDashoffset"];class Ne extends Be{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeGraphics()}),Object.defineProperty(this,"_clear",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_beforeChanged(){if(super._beforeChanged(),(this.isDirty("draw")||this.isDirty("svgPath"))&&this.markDirtyBounds(),(this.isDirty("fill")||this.isDirty("stroke")||this.isDirty("visible")||this.isDirty("forceHidden")||this.isDirty("scale")||this.isDirty("fillGradient")||this.isDirty("strokeGradient")||this.isDirty("fillPattern")||this.isDirty("strokePattern")||this.isDirty("fillOpacity")||this.isDirty("strokeOpacity")||this.isDirty("strokeWidth")||this.isDirty("draw")||this.isDirty("blendMode")||this.isDirty("strokeDasharray")||this.isDirty("strokeDashoffset")||this.isDirty("svgPath")||this.isDirty("lineJoin")||this.isDirty("shadowColor")||this.isDirty("shadowBlur")||this.isDirty("shadowOffsetX")||this.isDirty("shadowOffsetY"))&&(this._clear=!0),this._display.crisp=this.get("crisp",!1),this.isDirty("fillGradient")){const t=this.get("fillGradient");if(t){this._display.isMeasured=!0;const e=t.get("target");e&&(this._disposers.push(e.events.on("boundschanged",(()=>{this._markDirtyKey("fill")}))),this._disposers.push(e.events.on("positionchanged",(()=>{this._markDirtyKey("fill")}))))}}if(this.isDirty("strokeGradient")){const t=this.get("strokeGradient");if(t){this._display.isMeasured=!0;const e=t.get("target");e&&(this._disposers.push(e.events.on("boundschanged",(()=>{this._markDirtyKey("stroke")}))),this._disposers.push(e.events.on("positionchanged",(()=>{this._markDirtyKey("stroke")}))))}}}_changed(){if(super._changed(),this._clear){this.markDirtyBounds(),this.markDirtyLayer(),this._display.clear();let t=this.get("strokeDasharray");l(t)&&(t=t<.5?[0]:[t]),this._display.setLineDash(t);const e=this.get("strokeDashoffset");e&&this._display.setLineDashOffset(e);const i=this.get("blendMode",He.NORMAL);this._display.blendMode=i;const s=this.get("draw");s&&s(this._display,this);const r=this.get("svgPath");null!=r&&this._display.svgPath(r)}}_afterChanged(){if(super._afterChanged(),this._clear){const t=this.get("fill"),e=this.get("fillGradient"),i=this.get("fillPattern"),s=this.get("fillOpacity"),r=this.get("stroke"),a=this.get("strokeGradient"),n=this.get("strokePattern"),o=this.get("shadowColor"),h=this.get("shadowBlur"),l=this.get("shadowOffsetX"),d=this.get("shadowOffsetY"),u=this.get("shadowOpacity");if(o&&(h||l||d)&&this._display.shadow(o,h,l,d,u),i){let e=!1;!t||i.get("fill")&&!i.get("fillInherited")||(i.set("fill",t),i.set("fillInherited",!0),e=!0),!r||i.get("color")&&!i.get("colorInherited")||(i.set("color",r),i.set("colorInherited",!0),e=!0),e&&i._changed();const a=i.pattern;a&&(this._display.beginFill(a,s),this._display.endFill(),i instanceof Ae&&i.events.once("loaded",(()=>{this._clear=!0,this.markDirty()})))}else if(e){if(t){const i=e.get("stops",[]);i.length&&m(i,(e=>{e.color&&!e.colorInherited||!t||(e.color=t,e.colorInherited=!0),(null==e.opacity||e.opacityInherited)&&(e.opacity=s,e.opacityInherited=!0)}))}const i=e.getFill(this);i&&(this._display.beginFill(i,s),this._display.endFill())}else t&&(this._display.beginFill(t,s),this._display.endFill());if(r||a||n){const t=this.get("strokeOpacity");let e=this.get("strokeWidth",1);this.get("nonScalingStroke")&&(e/=this.get("scale",1)),this.get("crisp")&&(e/=this._root._renderer.resolution);const i=this.get("lineJoin");if(n){let s=!1;!r||n.get("color")&&!n.get("colorInherited")||(n.set("color",r),n.set("colorInherited",!0),s=!0),s&&n._changed();const a=n.pattern;a&&(this._display.lineStyle(e,a,t,i),this._display.endStroke(),n instanceof Ae&&n.events.once("loaded",(()=>{this._clear=!0,this.markDirty()})))}else if(a){const s=a.get("stops",[]);s.length&&m(s,(e=>{e.color&&!e.colorInherited||!r||(e.color=r,e.colorInherited=!0),(null==e.opacity||e.opacityInherited)&&(e.opacity=t,e.opacityInherited=!0)}));const n=a.getFill(this);n&&(this._display.lineStyle(e,n,t,i),this._display.endStroke())}else r&&(this._display.lineStyle(e,r,t,i),this._display.endStroke())}this.getPrivate("showingTooltip")&&this.showTooltip()}this._clear=!1}}Object.defineProperty(Ne,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Graphics"}),Object.defineProperty(Ne,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Be.classNames.concat([Ne.className])});class Re extends Ne{_beforeChanged(){super._beforeChanged(),(this.isDirty("width")||this.isDirty("height")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){super._changed(),this._clear&&!this.get("draw")&&this._draw()}_draw(){this._display.drawRect(0,0,this.width(),this.height())}_updateSize(){this.markDirty(),this._clear=!0}}function Fe(t,e){t.get("reverseChildren",!1)?t.children.eachReverse(e):t.children.each(e)}Object.defineProperty(Re,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Rectangle"}),Object.defineProperty(Re,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Ne.classNames.concat([Re.className])});class We extends Te{}Object.defineProperty(We,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Layout"}),Object.defineProperty(We,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Te.classNames.concat([We.className])});class Ve extends We{updateContainer(t){let e=t.get("paddingLeft",0),i=t.innerWidth(),s=0;Fe(t,(t=>{if(t.isVisible()&&"relative"==t.get("position")){let e=t.get("width");if(e instanceof K){s+=e.value;let r=i*e.value,a=t.get("minWidth",t.getPrivate("minWidth",-1/0));a>r&&(i-=a,s-=e.value);let n=t.get("maxWidth",t.getPrivate("maxWidth",1/0));r>n&&(i-=n,s-=e.value)}else l(e)||(e=t.width()),i-=e+t.get("marginLeft",0)+t.get("marginRight",0)}})),(i<=0||i==1/0)&&(i=.1),Fe(t,(t=>{if(t.isVisible()&&"relative"==t.get("position")){let e=t.get("width");if(e instanceof K){let r=i*e.value/s-t.get("marginLeft",0)-t.get("marginRight",0),a=t.get("minWidth",t.getPrivate("minWidth",-1/0)),n=t.get("maxWidth",t.getPrivate("maxWidth",1/0));r=Math.min(Math.max(a,r),n),t.setPrivate("width",r)}}}));let r=e;Fe(t,(t=>{if("relative"==t.get("position"))if(t.isVisible()){let e=t.adjustedLocalBounds(),i=t.get("marginLeft",0),s=t.get("marginRight",0),a=t.get("maxWidth"),n=e.left,o=e.right;a&&o-n>a&&(o=n+a);let h=r+i-n;t.setPrivate("x",h),r=h+o+s}else t.setPrivate("x",void 0)}))}}Object.defineProperty(Ve,"className",{enumerable:!0,configurable:!0,writable:!0,value:"HorizontalLayout"}),Object.defineProperty(Ve,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:We.classNames.concat([Ve.className])});class Ke extends We{updateContainer(t){let e=t.get("paddingTop",0),i=t.innerHeight(),s=0;Fe(t,(t=>{if(t.isVisible()&&"relative"==t.get("position")){let e=t.get("height");if(e instanceof K){s+=e.value;let r=i*e.value,a=t.get("minHeight",t.getPrivate("minHeight",-1/0));a>r&&(i-=a,s-=e.value);let n=t.get("maxHeight",t.getPrivate("maxHeight",1/0));r>n&&(i-=n,s-=e.value)}else l(e)||(e=t.height()),i-=e+t.get("marginTop",0)+t.get("marginBottom",0)}})),(i<=0||i==1/0)&&(i=.1),Fe(t,(t=>{if(t.isVisible()&&"relative"==t.get("position")){let e=t.get("height");if(e instanceof K){let r=i*e.value/s-t.get("marginTop",0)-t.get("marginBottom",0),a=t.get("minHeight",t.getPrivate("minHeight",-1/0)),n=t.get("maxHeight",t.getPrivate("maxHeight",1/0));r=Math.min(Math.max(a,r),n),t.setPrivate("height",r)}}}));let r=e;Fe(t,(t=>{if("relative"==t.get("position"))if(t.isVisible()){let e=t.adjustedLocalBounds(),i=t.get("marginTop",0),s=e.top,a=e.bottom,n=t.get("maxHeight");n&&a-s>n&&(a=s+n);let o=t.get("marginBottom",0),h=r+i-s;t.setPrivate("y",h),r=h+a+o}else t.setPrivate("y",void 0)}))}}Object.defineProperty(Ke,"className",{enumerable:!0,configurable:!0,writable:!0,value:"VerticalLayout"}),Object.defineProperty(Ke,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:We.classNames.concat([Ke.className])});class Ue extends We{_afterNew(){this._setRawDefault("maxColumns",Number.MAX_VALUE),super._afterNew()}updateContainer(t){let e=t.get("paddingLeft",0),i=t.get("paddingRight",0),s=t.get("paddingTop",0),r=t.maxWidth()-e-i,a=r,n=1;Fe(t,(t=>{if(t.get("visible")&&t.getPrivate("visible")&&!t.get("forceHidden")&&"absolute"!=t.get("position")){let e=t.width();e<a&&(a=e),e>n&&(n=e)}})),a=ae(a,1,r),n=ae(n,1,r);let o=1;o=this.get("fixedWidthGrid")?r/n:r/a,o=Math.max(1,Math.floor(o)),o=Math.min(this.get("maxColumns",Number.MAX_VALUE),o);let h=this.getColumnWidths(t,o,n,r),l=s,d=0,u=0;o=h.length;let p=e;Fe(t,(t=>{if("relative"==t.get("position")&&t.isVisible()){const i=t.get("marginTop",0),s=t.get("marginBottom",0);let r=t.adjustedLocalBounds(),a=t.get("marginLeft",0),n=t.get("marginRight",0),c=p+a-r.left,g=l+i-r.top;t.setPrivate("x",c),t.setPrivate("y",g),p+=h[d]+n,u=Math.max(u,t.height()+i+s),d++,d>=o&&(d=0,p=e,l+=u)}}))}getColumnWidths(t,e,i,s){let r=0,a=[],n=0;return Fe(t,(s=>{let r=s.adjustedLocalBounds();"absolute"!=s.get("position")&&s.isVisible()&&(this.get("fixedWidthGrid")?a[n]=i:a[n]=Math.max(0|a[n],r.right-r.left+s.get("marginLeft",0)+s.get("marginRight",0)),n<t.children.length-1&&(n++,n==e&&(n=0)))})),m(a,(t=>{r+=t})),r>s?e>2?(e-=1,this.getColumnWidths(t,e,i,s)):[s]:a}}Object.defineProperty(Ue,"className",{enumerable:!0,configurable:!0,writable:!0,value:"GridLayout"}),Object.defineProperty(Ue,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:We.classNames.concat([Ue.className])});class ze{static escape(t){return t.replace(/\[\[/g,this.prefix+"1").replace(/([^\/\]]{1})\]\]/g,"$1"+this.prefix+"2").replace(/\]\]/g,this.prefix+"2").replace(/\{\{/g,this.prefix+"3").replace(/\}\}/g,this.prefix+"4").replace(/\'\'/g,this.prefix+"5")}static unescape(t){return t.replace(new RegExp(this.prefix+"1","g"),"[[").replace(new RegExp(this.prefix+"2","g"),"]]").replace(new RegExp(this.prefix+"3","g"),"{{").replace(new RegExp(this.prefix+"4","g"),"}}").replace(new RegExp(this.prefix+"5","g"),"''")}static cleanUp(t){return t.replace(/\[\[/g,"[").replace(/\]\]/g,"]").replace(/\{\{/g,"{").replace(/\}\}/g,"}").replace(/\'\'/g,"'")}static chunk(t,e=!1,i=!1){let s=[];t=this.escape(t);let r=e?t.split("'"):[t];for(let a=0;a<r.length;a++){let t=r[a];if(""!==t)if(a%2==0){t=t.replace(/\]\[/g,"]"+u+"["),t=t.replace(/\[\]/g,"[ ]");let e=t.split(/[\[\]]+/);for(let t=0;t<e.length;t++){let r=this.cleanUp(this.unescape(e[t]));r!==u&&(""!==r&&(t%2==0?s.push({type:"value",text:r}):s.push({type:i?"value":"format",text:"["+r+"]"})))}}else{let e=t.split(/[\[\]]+/);for(let t=0;t<e.length;t++){let i=this.cleanUp(this.unescape(e[t]));""!==i&&(t%2==0?s.push({type:"text",text:i}):this.isImage(i)?s.push({type:"image",text:"["+i+"]"}):s.push({type:"format",text:"["+i+"]"}))}}}return s}static isImage(t){return!!t.match(/img[ ]?:/)}static getTextStyle(t){let e={};if(""==t||"[ ]"==t)return{};const i=t.match(/('[^']*')|("[^"]*")/gi);if(i)for(let r=0;r<i.length;r++)t=t.replace(i[r],i[r].replace(/['"]*/g,"").replace(/[ ]+/g,"+"));let s=t.match(/([\w\-]*:[\s]?[^;\s\]]*)|(\#[\w]{1,6})|([\w\-]+)|(\/)/gi);if(!s)return{};for(let r=0;r<s.length;r++)if(s[r].match(/^(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)$/i))e.fontWeight=s[r];else if(s[r].match(/^(underline|line-through)$/i))e.textDecoration=s[r];else if("/"==s[r]);else if(s[r].match(/:/)){const t=s[r].replace("+"," ").split(/:[ ]*/);e[t[0]]=t[1]}else e.fill=Yt.fromString(s[r]);return e}}function Ge(t,e){if(null!=e){e=""+e;let i,s=(e=ze.escape(e)).match(/\{([^}]+)\}/g);if(s)for(i=0;i<s.length;i++){let r=Ye(t,s[i].replace(/\{([^}]+)\}/,"$1"));null==r&&(r=""),e=e.split(s[i]).join(r)}e=ze.unescape(e)}else e="";return e}function Ye(t,e,i){let s;const r=t.dataItem;let a,n=[],o=/([^.]+)\(([^)]*)\)|([^.]+)/g;for(;a=o.exec(e),null!==a;)if(a[3]){n.push({prop:a[3]});const e=t.getDateFormatter().get("dateFields",[]),i=t.getNumberFormatter().get("numericFields",[]),s=t.getDurationFormatter().get("durationFields",[]);-1!==e.indexOf(a[3])?n.push({method:"formatDate",params:[]}):-1!==i.indexOf(a[3])?n.push({method:"formatNumber",params:[]}):-1!==s.indexOf(a[3])&&n.push({method:"formatDuration",params:[]})}else{let t=[];if(""!=yt(a[2])){let e,i=/'([^']*)'|"([^"]*)"|([0-9\-]+)/g;for(;e=i.exec(a[2]),null!==e;)t.push(e[1]||e[2]||e[3])}n.push({method:a[1],params:t})}if(r){s=$e(t,n,r._settings),(null==s||d(s))&&(s=$e(t,n,r));let i=r.dataContext;null==s&&i&&(s=$e(t,n,i),null==s&&(s=$e(t,[{prop:e}],i)),null==s&&i.dataContext&&(s=$e(t,n,i.dataContext))),null==s&&r.component&&r.component.dataItem!==r&&(s=Ye(r.component,e))}return null==s&&(s=$e(t,n,t)),null==s&&t.parent&&(s=Ye(t.parent,e)),s}function Xe(t,e){const i=t.getPrivate("customData");if(d(i))return i[e]}function $e(t,i,a,n){let h=a,d=!1;for(let l=0,u=i.length;l<u;l++){let u=i[l];if(u.prop){if(h instanceof Be){let t=h.get(u.prop);null==t&&(t=h.getPrivate(u.prop)),null==t&&(t=Xe(h,u.prop)),null==t&&(t=h[u.prop]),h=t}else if(h.get){let t=h.get(u.prop);null==t&&(t=h[u.prop]),h=t}else h=h[u.prop];if(null==h)return}else switch(u.method){case"formatNumber":let i=s(h);null!=i&&(h=t.getNumberFormatter().format(i,n||u.params[0]||void 0),d=!0);break;case"formatDate":let l=r(h);if(!o(l)||e(l.getTime()))return;null!=l&&(h=t.getDateFormatter().format(l,n||u.params[0]||void 0),d=!0);break;case"formatDuration":let p=s(h);null!=p&&(h=t.getDurationFormatter().format(p,n||u.params[0]||void 0,u.params[1]||void 0),d=!0);break;case"urlEncode":case"encodeURIComponent":h=encodeURIComponent(h);break;default:h[u.method]&&h[u.method].apply(a,u.params)}}if(!d){let e=[{method:"",params:n}];if(null==n)l(h)?(e[0].method="formatNumber",e[0].params=""):o(h)&&(e[0].method="formatDate",e[0].params="");else{let t=wt(n);"number"===t?e[0].method="formatNumber":"date"===t?e[0].method="formatDate":"duration"===t&&(e[0].method="formatDuration")}e[0].method&&(h=$e(t,e,h))}return h}Object.defineProperty(ze,"prefix",{enumerable:!0,configurable:!0,writable:!0,value:"__amcharts__"});class Je extends Be{constructor(){super(...arguments),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeContainer()}),Object.defineProperty(this,"_childrenDisplay",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeContainer()}),Object.defineProperty(this,"children",{enumerable:!0,configurable:!0,writable:!0,value:new V(this)}),Object.defineProperty(this,"_percentageSizeChildren",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_percentagePositionChildren",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_prevWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_prevHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_contentWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_contentHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_contentMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_vsbd0",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_vsbd1",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){super._afterNew(),this._display.addChild(this._childrenDisplay)}_dispose(){f(this.allChildren(),(t=>{t.dispose()})),this.getPrivate("htmlElement")&&this._root._removeHTMLContent(this),super._dispose()}_changed(){if(super._changed(),this.isDirty("interactiveChildren")&&(this._display.interactiveChildren=this.get("interactiveChildren",!1)),this.isDirty("layout")&&(this._prevWidth=0,this._prevHeight=0,this.markDirtyBounds(),this._prevSettings.layout&&this.children.each((t=>{t.removePrivate("x"),t.removePrivate("y")}))),(this.isDirty("paddingTop")||this.isDirty("paddingBottom")||this.isDirty("paddingLeft")||this.isDirty("paddingRight"))&&this.children.each((t=>{t.markDirtyPosition()})),this.isDirty("maskContent")){const t=this._childrenDisplay;let e=this._contentMask;this.get("maskContent")?e||(e=Re.new(this._root,{x:-.5,y:-.5,width:this.width()+1,height:this.height()+1}),this._contentMask=e,t.addChildAt(e._display,0),t.mask=e._display):e&&(t.removeChild(e._display),t.mask=null,e.dispose(),this._contentMask=void 0)}}_updateSize(){super._updateSize(),m(this._percentageSizeChildren,(t=>{t._updateSize()})),m(this._percentagePositionChildren,(t=>{t.markDirtyPosition(),t._updateSize()})),this.updateBackground()}updateBackground(){const t=this.get("background");let e=this._localBounds;if(e&&!this.isHidden()){let i=e.left,s=e.top,r=e.right-i,a=e.bottom-s,n=this.get("maxWidth"),o=this.get("maxHeight");o&&a>o&&(a=o),n&&r>n&&(r=n);let h=this.width(),l=this.height();t&&(t.setAll({width:r,height:a,x:i,y:s}),this._display.interactive&&(t._display.interactive=!0));const d=this._contentMask;d&&d.setAll({width:h+1,height:l+1});const u=this.get("verticalScrollbar");if(u){u.set("height",l),u.set("x",h-u.width()-u.get("marginRight",0)),u.set("end",u.get("start",0)+l/this._contentHeight);const t=u.get("background");t&&t.setAll({width:u.width(),height:l});let e=!0;this._contentHeight<=l&&(e=!1),u.setPrivate("visible",e)}}}_applyThemes(){return!!super._applyThemes()&&(this.eachChildren((t=>{t._applyThemes()})),!0)}_applyState(t){super._applyState(t),this.get("setStateOnChildren")&&this.eachChildren((e=>{e.states.apply(t)}))}_applyStateAnimated(t,e){super._applyStateAnimated(t,e),this.get("setStateOnChildren")&&this.eachChildren((i=>{i.states.applyAnimate(t,e)}))}innerWidth(){return this.width()-this.get("paddingRight",0)-this.get("paddingLeft",0)}innerHeight(){return this.height()-this.get("paddingTop",0)-this.get("paddingBottom",0)}_getBounds(){let t=this.get("width"),e=this.get("height"),i=this.getPrivate("width"),s=this.getPrivate("height"),r={left:0,top:0,right:this.width(),bottom:this.height()},a=this.get("layout"),n=!1,o=!1;if((a instanceof Ve||a instanceof Ue)&&(n=!0),a instanceof Ke&&(o=!0),null==t&&null==i||null==e&&null==s||this.get("verticalScrollbar")){let t=Number.MAX_VALUE,e=t,i=-t,s=t,a=-t;const h=this.get("paddingLeft",0),l=this.get("paddingTop",0),d=this.get("paddingRight",0),u=this.get("paddingBottom",0);this.children.each((t=>{if("absolute"!=t.get("position")&&t.get("isMeasured")){let r=t.adjustedLocalBounds(),h=t.x(),l=t.y(),d=h+r.left,u=h+r.right,p=l+r.top,c=l+r.bottom;n&&(d-=t.get("marginLeft",0),u+=t.get("marginRight",0)),o&&(p-=t.get("marginTop",0),c+=t.get("marginBottom",0)),d<e&&(e=d),u>i&&(i=u),p<s&&(s=p),c>a&&(a=c)}})),e==t&&(e=0),i==-t&&(i=0),s==t&&(s=0),a==-t&&(a=0),r.left=e-h,r.top=s-l,r.right=i+d,r.bottom=a+u}else;this._contentWidth=r.right-r.left,this._contentHeight=r.bottom-r.top,l(t)&&(r.left=0,r.right=t),l(i)&&(r.left=0,r.right=i),l(e)&&(r.top=0,r.bottom=e),l(s)&&(r.top=0,r.bottom=s),this._localBounds=r}_updateBounds(){const t=this.get("layout");t&&t.updateContainer(this),super._updateBounds(),this.updateBackground()}markDirty(){super.markDirty(),this._root._addDirtyParent(this)}_prepareChildren(){const t=this.innerWidth(),e=this.innerHeight();if(t!=this._prevWidth||e!=this._prevHeight){let i=this.get("layout"),s=!1,r=!1;i&&((i instanceof Ve||i instanceof Ue)&&(s=!0),i instanceof Ke&&(r=!0)),m(this._percentageSizeChildren,(i=>{if(!s){let e=i.get("width");e instanceof K&&i.setPrivate("width",e.value*t)}if(!r){let t=i.get("height");t instanceof K&&i.setPrivate("height",t.value*e)}})),m(this._percentagePositionChildren,(t=>{t.markDirtyPosition(),t.markDirtyBounds()})),this._prevWidth=t,this._prevHeight=e,this._sizeDirty=!0,this.updateBackground()}this._handleStates()}_updateChildren(){if(this.isDirty("html")){const t=this.get("html");t&&""!==t?this._root._setHTMLContent(this,Ge(this,this.get("html",""))):this._root._removeHTMLContent(this),this._root._positionHTMLElement(this)}if(this.isDirty("verticalScrollbar")){const t=this.get("verticalScrollbar");if(t){t._setParent(this),t.children.removeValue(t.startGrip),t.children.removeValue(t.endGrip),this.set("maskContent",!0),this.set("paddingRight",t.width()+t.get("marginRight",0)+t.get("marginLeft",0));let e=this.get("background");e||(e=this.set("background",Re.new(this._root,{themeTags:["background"],fillOpacity:0,fill:this._root.interfaceColors.get("alternativeBackground")}))),this._vsbd0=this.events.on("wheel",(e=>{const i=e.originalEvent;if(!ut(i,this))return;i.preventDefault();let s=i.deltaY/5e3;const r=t.get("start",0),a=t.get("end",1);r+s<=0&&(s=-r),a+s>=1&&(s=1-a),r+s>=0&&a+s<=1&&(t.set("start",r+s),t.set("end",a+s))})),this._disposers.push(this._vsbd0),this._vsbd1=t.events.on("rangechanged",(()=>{let e=this._contentHeight;const i=this._childrenDisplay,s=this._contentMask;i.y=-t.get("start")*e,i.markDirtyLayer(),s&&(s._display.y=-i.y,i.mask=s._display)})),this._disposers.push(this._vsbd1),this._display.addChild(t._display)}else{const t=this._prevSettings.verticalScrollbar;if(t){this._display.removeChild(t._display),this._vsbd0&&this._vsbd0.dispose(),this._vsbd1&&this._vsbd1.dispose();this._childrenDisplay.y=0,this.setPrivate("height",void 0),this.set("maskContent",!1),this.set("paddingRight",void 0)}}}if(this.isDirty("background")){const t=this._prevSettings.background;t&&this._display.removeChild(t._display);const e=this.get("background");e instanceof Be&&(e.set("isMeasured",!1),e._setParent(this),this._display.addChildAt(e._display,0))}if(this.isDirty("mask")){const e=this.get("mask"),i=this._prevSettings.mask;if(i&&(this._display.removeChild(i._display),i!=e&&i.dispose()),e){var t=e.parent;t&&t.children.removeValue(e),e._setParent(this),this._display.addChildAt(e._display,0),this._childrenDisplay.mask=e._display}}}_processTemplateField(){super._processTemplateField(),this.children.each((t=>{t._processTemplateField()}))}walkChildren(t){this.children.each((e=>{e instanceof Je&&e.walkChildren(t),t(e)}))}eachChildren(t){const e=this.get("background");e&&t(e);const i=this.get("verticalScrollbar");i&&t(i);const s=this.get("mask");s&&t(s),this.children.values.forEach((e=>{t(e)}))}allChildren(){const t=[];return this.eachChildren((e=>{t.push(e)})),t}_setDataItem(t){const e=t!==this._dataItem;super._setDataItem(t);const i=this.get("html","");i&&""!==i&&e&&this._root._setHTMLContent(this,Ge(this,i))}}Object.defineProperty(Je,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Container"}),Object.defineProperty(Je,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Be.classNames.concat([Je.className])});class Ze extends Be{constructor(){super(...arguments),Object.defineProperty(this,"textStyle",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeTextStyle()}),Object.defineProperty(this,"_display",{enumerable:!0,configurable:!0,writable:!0,value:this._root._renderer.makeText("",this.textStyle)}),Object.defineProperty(this,"_textStyles",{enumerable:!0,configurable:!0,writable:!0,value:["textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale"]}),Object.defineProperty(this,"_originalScale",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_updateBounds(){if(this.get("text"))super._updateBounds();else{let t={left:0,right:0,top:0,bottom:0};this._adjustedLocalBounds=t}}_changed(){super._changed(),this._display.clear();let t=this.textStyle;if(this.isDirty("opacity")){let t=this.get("opacity",1);this._display.alpha=t}if((this.isDirty("text")||this.isDirty("populateText"))&&(this._display.text=this._getText(),this.markDirtyBounds(),"tooltip"==this.get("role")&&this._root.updateTooltip(this)),this.isPrivateDirty("tooltipElement")){this.getPrivate("tooltipElement")&&this._disposers.push(new B((()=>{this._root._removeTooltipElement(this)})))}if(this.isDirty("width")&&(t.wordWrapWidth=this.width(),this.markDirtyBounds()),this.isDirty("oversizedBehavior")&&(t.oversizedBehavior=this.get("oversizedBehavior","none"),this.markDirtyBounds()),this.isDirty("breakWords")&&(t.breakWords=this.get("breakWords",!1),this.markDirtyBounds()),this.isDirty("ellipsis")&&(t.ellipsis=this.get("ellipsis"),this.markDirtyBounds()),this.isDirty("ignoreFormatting")&&(t.ignoreFormatting=this.get("ignoreFormatting",!1),this.markDirtyBounds()),this.isDirty("minScale")&&(t.minScale=this.get("minScale",0),this.markDirtyBounds()),this.isDirty("fill")){let e=this.get("fill");e&&(t.fill=e)}if(this.isDirty("fillOpacity")){let e=this.get("fillOpacity",1);e&&(t.fillOpacity=e)}(this.isDirty("maxWidth")||this.isPrivateDirty("maxWidth"))&&(t.maxWidth=this.get("maxWidth",this.getPrivate("maxWidth")),this.markDirtyBounds()),(this.isDirty("maxHeight")||this.isPrivateDirty("maxHeight"))&&(t.maxHeight=this.get("maxHeight",this.getPrivate("maxHeight")),this.markDirtyBounds()),m(this._textStyles,(e=>{this._dirty[e]&&(t[e]=this.get(e),this.markDirtyBounds())})),t.fontSize=this.get("fontSize"),t.fontFamily=this.get("fontFamily"),this._display.style=t,this.isDirty("role")&&"tooltip"==this.get("role")&&this._root.updateTooltip(this)}_getText(){const t=this.get("text","");return this.get("populateText")?Ge(this,t):t}markDirtyText(){this._display.text=this._getText(),"tooltip"==this.get("role")&&this._root.updateTooltip(this),this.markDirtyBounds(),this.markDirty()}_setDataItem(t){super._setDataItem(t),this.get("populateText")&&this.markDirtyText()}getNumberFormatter(){return this.parent?this.parent.getNumberFormatter():super.getNumberFormatter()}getDateFormatter(){return this.parent?this.parent.getDateFormatter():super.getDateFormatter()}getDurationFormatter(){return this.parent?this.parent.getDurationFormatter():super.getDurationFormatter()}}Object.defineProperty(Ze,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Text"}),Object.defineProperty(Ze,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Be.classNames.concat([Ze.className])});class qe extends Je{constructor(){super(...arguments),Object.defineProperty(this,"_text",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_textKeys",{enumerable:!0,configurable:!0,writable:!0,value:["text","fill","fillOpacity","textAlign","fontFamily","fontSize","fontStyle","fontWeight","fontStyle","fontVariant","textDecoration","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","shadowOpacity","lineHeight","baselineRatio","direction","textBaseline","oversizedBehavior","breakWords","ellipsis","minScale","populateText","role","ignoreFormatting"]})}get text(){return this._text}_afterNew(){super._afterNew(),this._makeText(),m(this._textKeys,(t=>{const e=this.get(t);null!=e&&this._text.set(t,e)})),""!==this.get("html","")&&this._text.set("text",""),this.onPrivate("maxWidth",(()=>{this._setMaxDimentions()})),this.onPrivate("maxHeight",(()=>{this._setMaxDimentions()}))}_makeText(){this._text=this.children.push(Ze.new(this._root,{}))}_updateChildren(){if(super._updateChildren(),m(this._textKeys,(t=>{this._text.set(t,this.get(t))})),this.isDirty("maxWidth")&&this._setMaxDimentions(),this.isDirty("maxHeight")&&this._setMaxDimentions(),this.isDirty("rotation")&&this._setMaxDimentions(),""!==this.get("html","")?this._text.set("text",""):this._text.set("text",this.get("text")),this.isDirty("textAlign")||this.isDirty("width")){const t=this.get("textAlign");let e;null!=this.get("width")?e="right"==t?z:"center"==t?G:0:"left"==t||"start"==t?e=this.get("paddingLeft"):"right"!=t&&"end"!=t||(e=-this.get("paddingRight")),this.text.set("x",e)}}_setMaxDimentions(){const t=this.get("rotation"),e=90==t||270==t||-90==t,i=this.get("maxWidth",this.getPrivate("maxWidth",1/0));l(i)?this.text.set(e?"maxHeight":"maxWidth",i-this.get("paddingLeft",0)-this.get("paddingRight",0)):this.text.set(e?"maxHeight":"maxWidth",void 0);const s=this.get("maxHeight",this.getPrivate("maxHeight",1/0));l(s)?this.text.set(e?"maxWidth":"maxHeight",s-this.get("paddingTop",0)-this.get("paddingBottom",0)):this.text.set(e?"maxWidth":"maxHeight",void 0)}_setDataItem(t){super._setDataItem(t),this._markDirtyKey("text"),this.text.get("populateText")&&this.text.markDirtyText()}getText(){return this._text._getText()}}Object.defineProperty(qe,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Label"}),Object.defineProperty(qe,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:Je.classNames.concat([qe.className])});class Qe{constructor(t,e){if(Object.defineProperty(this,"_root",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_rules",{enumerable:!0,configurable:!0,writable:!0,value:{}}),this._root=t,!e)throw new Error("You cannot use `new Class()`, instead use `Class.new()`")}static new(t){const e=new this(t,!0);return e.setupDefaultRules(),e}setupDefaultRules(){}_lookupRules(t){return this._rules[t]}ruleRaw(t,e=[]){let i=this._rules[t];i||(i=this._rules[t]=[]),e.sort(ye);const{index:s,found:r}=S(i,(t=>{const i=ye(t.tags.length,e.length);return 0===i?we(t.tags,e,ye):i}));if(r)return i[s].template;{const t=Ce.new({});return i.splice(s,0,{tags:e,template:t}),t}}rule(t,e=[]){return this.ruleRaw(t,e)}}export{Ve as $,I as A,c as B,Yt as C,B as D,Te as E,ht as F,H as G,nt as H,y as I,P as J,w as K,He as L,A as M,b as N,K as O,u as P,U as Q,he as R,lt as S,ze as T,M as U,pt as V,le as W,ie as X,yt as Y,L as Z,Ke as _,d as a,Ue as a0,be as a1,Je as a2,z as a3,Re as a4,Gt as a5,Ne as a6,rt as a7,at as a8,Y as a9,T as aA,Zt as aB,F as aC,se as aD,Pe as aE,ot as aF,Bt as aG,e as aH,mt as aI,re as aJ,Kt as aK,ye as aa,Q as ab,v as ac,Dt as ad,Ge as ae,Ze as af,gt as ag,ve as ah,Qe as ai,ae as aj,Vt as ak,qe as al,ge as am,G as an,ce as ao,ut as ap,_t as aq,ee as ar,ne as as,oe as at,Le as au,ue as av,W as aw,Ce as ax,R as ay,Oe as az,$ as b,Pt as c,p as d,m as e,J as f,l as g,Mt as h,h as i,Ct as j,C as k,Et as l,kt as m,a as n,et as o,ft as p,jt as q,Ot as r,Tt as s,St as t,s as u,xt as v,Z as w,_ as x,it as y,tt as z};
|
package/chunks/Tick.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{a as e}from"./tslib.es6.js";import{ay as t,az as s,a2 as i,e as a,a9 as l,g as r,a3 as n,aA as o,C as h,O as u,aB as d,al as c,x as m,a6 as p,aC as b}from"./Theme.js";class f extends t{constructor(){super(...arguments),Object.defineProperty(this,"processor",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}incrementRef(){}decrementRef(){}_onPush(e){this.processor&&this.processor.processRow(e),super._onPush(e)}_onInsertIndex(e,t){this.processor&&this.processor.processRow(t),super._onInsertIndex(e,t)}_onSetIndex(e,t,s){this.processor&&this.processor.processRow(s),super._onSetIndex(e,t,s)}}class g extends s{constructor(e,t,s){super(s),Object.defineProperty(this,"component",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"dataContext",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"open",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"close",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.dataContext=t,this.component=e,this._settings.visible=!0,this._checkDirty()}markDirty(){this.component.markDirtyValues(this)}_startAnimation(){this.component._root._addAnimation(this)}_animationTime(){return this.component._root.animationTime}_dispose(){this.component&&this.component.disposeDataItem(this),super._dispose()}show(e){this.setRaw("visible",!0),this.component&&this.component.showDataItem(this,e)}hide(e){this.setRaw("visible",!1),this.component&&this.component.hideDataItem(this,e)}isHidden(){return!this.get("visible")}}class _ extends i{constructor(){super(...arguments),Object.defineProperty(this,"_data",{enumerable:!0,configurable:!0,writable:!0,value:new f}),Object.defineProperty(this,"_dataItems",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"_mainDataItems",{enumerable:!0,configurable:!0,writable:!0,value:this._dataItems}),Object.defineProperty(this,"valueFields",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"fields",{enumerable:!0,configurable:!0,writable:!0,value:["id"]}),Object.defineProperty(this,"_valueFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valueFieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fieldsF",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_valuesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataChanged",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataGrouped",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"inited",{enumerable:!0,configurable:!0,writable:!0,value:!1})}set data(e){e.incrementRef(),this._data.decrementRef(),this._data=e}get data(){return this._data}_dispose(){super._dispose(),this._data.decrementRef()}_onDataClear(){}_afterNew(){super._afterNew(),this._data.incrementRef(),this._updateFields(),this._disposers.push(this.data.events.onAll((e=>{const t=this._mainDataItems;if(this.markDirtyValues(),this._markDirtyGroup(),this._dataChanged=!0,"clear"===e.type)a(t,(e=>{e.dispose()})),t.length=0,this._onDataClear();else if("push"===e.type){const s=new g(this,e.newValue,this._makeDataItem(e.newValue));t.push(s),this.processDataItem(s)}else if("setIndex"===e.type){const s=t[e.index],i=this._makeDataItem(e.newValue);s.bullets&&0==s.bullets.length&&(s.bullets=void 0),l(i).forEach((e=>{s.animate({key:e,to:i[e],duration:this.get("interpolationDuration",0),easing:this.get("interpolationEasing")})})),s.dataContext=e.newValue}else if("insertIndex"===e.type){const s=new g(this,e.newValue,this._makeDataItem(e.newValue));t.splice(e.index,0,s),this.processDataItem(s)}else if("removeIndex"===e.type){t[e.index].dispose(),t.splice(e.index,1)}else{if("moveIndex"!==e.type)throw new Error("Unknown IStreamEvent type");{const s=t[e.oldIndex];t.splice(e.oldIndex,1),t.splice(e.newIndex,0,s)}}this._afterDataChange()})))}_updateFields(){this.valueFields&&(this._valueFields=[],this._valueFieldsF={},a(this.valueFields,(e=>{this.get(e+"Field")&&(this._valueFields.push(e),this._valueFieldsF[e]={fieldKey:e+"Field",workingKey:e+"Working"})}))),this.fields&&(this._fields=[],this._fieldsF={},a(this.fields,(e=>{this.get(e+"Field")&&(this._fields.push(e),this._fieldsF[e]=e+"Field")})))}get dataItems(){return this._dataItems}processDataItem(e){}_makeDataItem(e){const t={};return this._valueFields&&a(this._valueFields,(s=>{const i=this.get(this._valueFieldsF[s].fieldKey);t[s]=e[i],t[this._valueFieldsF[s].workingKey]=t[s]})),this._fields&&a(this._fields,(s=>{const i=this.get(this._fieldsF[s]);t[s]=e[i]})),t}makeDataItem(e){let t=new g(this,void 0,e);return this.processDataItem(t),t}pushDataItem(e){const t=this.makeDataItem(e);return this._mainDataItems.push(t),t}disposeDataItem(e){}showDataItem(t,s){return e(this,void 0,void 0,(function*(){t.set("visible",!0)}))}hideDataItem(t,s){return e(this,void 0,void 0,(function*(){t.set("visible",!1)}))}_clearDirty(){super._clearDirty(),this._valuesDirty=!1}_afterDataChange(){}_afterChanged(){if(super._afterChanged(),this._dataChanged){const e="datavalidated";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this}),this._dataChanged=!1}this.inited=!0}markDirtyValues(e){this.markDirty(),this._valuesDirty=!0}_markDirtyGroup(){this._dataGrouped=!1}markDirtySize(){this._sizeDirty=!0,this.markDirty()}}function v(e){return new Promise(((t,s)=>{setTimeout(t,e)}))}Object.defineProperty(_,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Component"}),Object.defineProperty(_,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:i.classNames.concat([_.className])});let y={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:2629742400,year:31536e6};function w(e,t){return null==t&&(t=1),y[e]*t}function I(e,t,s,i,a,l,n){if(!n||a){let n=0;switch(a||"millisecond"==t||(n=e.getTimezoneOffset(),e.setUTCMinutes(e.getUTCMinutes()-n)),t){case"day":let t=e.getUTCDate();if(s>1){if(l){l=I(l,"day",1);let t=e.getTime()-l.getTime(),i=Math.floor(t/w("day")/s),a=w("day",i*s);e.setTime(l.getTime()+a-n*w("minute"))}}else e.setUTCDate(t);e.setUTCHours(0,0,0,0);break;case"second":let a=e.getUTCSeconds();s>1&&(a=Math.floor(a/s)*s),e.setUTCSeconds(a,0);break;case"millisecond":if(1==s)return e;let o=e.getUTCMilliseconds();o=Math.floor(o/s)*s,e.setUTCMilliseconds(o);break;case"hour":let h=e.getUTCHours();s>1&&(h=Math.floor(h/s)*s),e.setUTCHours(h,0,0,0);break;case"minute":let u=e.getUTCMinutes();s>1&&(u=Math.floor(u/s)*s),e.setUTCMinutes(u,0,0);break;case"month":let d=e.getUTCMonth();s>1&&(d=Math.floor(d/s)*s),e.setUTCMonth(d,1),e.setUTCHours(0,0,0,0);break;case"year":let c=e.getUTCFullYear();s>1&&(c=Math.floor(c/s)*s),e.setUTCFullYear(c,0,1),e.setUTCHours(0,0,0,0);break;case"week":let m=e.getUTCDate(),p=e.getUTCDay();r(i)||(i=1),m=p>=i?m-p+i:m-(7+p)+i,e.setUTCDate(m),e.setUTCHours(0,0,0,0)}if(!a&&"millisecond"!=t&&(e.setUTCMinutes(e.getUTCMinutes()+n),"day"==t||"week"==t||"month"==t||"year"==t)){let t=e.getTimezoneOffset();if(t!=n){let s=t-n;e.setUTCMinutes(e.getUTCMinutes()+s)}}return e}{if(isNaN(e.getTime()))return e;let o=n.offsetUTC(e),h=e.getTimezoneOffset(),u=n.parseDate(e),d=u.year,c=u.month,m=u.day,p=u.hour,b=u.minute,f=u.second,g=u.millisecond,_=u.weekday;switch(t){case"day":if(s>1&&l){l=I(l,"day",1,i,a,void 0,n);let t=e.getTime()-l.getTime(),r=Math.floor(t/w("day")/s),o=w("day",r*s);e.setTime(l.getTime()+o),u=n.parseDate(e),d=u.year,c=u.month,m=u.day}p=0,b=o-h,f=0,g=0;break;case"second":b+=o-h,s>1&&(f=Math.floor(f/s)*s),g=0;break;case"millisecond":b+=o-h,s>1&&(g=Math.floor(g/s)*s);break;case"hour":s>1&&(p=Math.floor(p/s)*s),b=o-h,f=0,g=0;break;case"minute":s>1&&(b=Math.floor(b/s)*s),b+=o-h,f=0,g=0;break;case"month":s>1&&(c=Math.floor(c/s)*s),m=1,p=0,b=o-h,f=0,g=0;break;case"year":s>1&&(d=Math.floor(d/s)*s),c=0,m=1,p=0,b=o-h,f=0,g=0;break;case"week":r(i)||(i=1),m=_>=i?m-_+i:m-(7+_)+i,p=0,b=o-h,f=0,g=0}let v=(e=new Date(d,c,m,p,b,f,g)).getTimezoneOffset();return v!=h&&e.setTime(e.getTime()+6e4*(h-v)),e}}class D extends _{constructor(){super(...arguments),Object.defineProperty(this,"_aggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_selectionAggregatesCalculated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_dataProcessed",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"_psi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pei",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"bullets",{enumerable:!0,configurable:!0,writable:!0,value:new t}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:i.new(this._root,{width:n,height:n,position:"absolute"})})}_afterNew(){this.valueFields.push("value"),super._afterNew(),this.setPrivate("customData",{}),this._disposers.push(this.bullets.events.onAll((e=>{if("clear"===e.type)this._handleBullets(this.dataItems);else if("push"===e.type)this._handleBullets(this.dataItems);else if("setIndex"===e.type)this._handleBullets(this.dataItems);else if("insertIndex"===e.type)this._handleBullets(this.dataItems);else if("removeIndex"===e.type)this._handleBullets(this.dataItems);else{if("moveIndex"!==e.type)throw new Error("Unknown IListEvent type");this._handleBullets(this.dataItems)}})))}_dispose(){this.bulletsContainer.dispose(),super._dispose()}startIndex(){let e=this.dataItems.length;return Math.min(this.getPrivate("startIndex",0),e)}endIndex(){let e=this.dataItems.length;return Math.min(this.getPrivate("endIndex",e),e)}_handleBullets(e){a(e,(e=>{const t=e.bullets;t&&(a(t,(e=>{e.dispose()})),e.bullets=void 0)})),this.markDirtyValues()}getDataItemById(e){return o(this.dataItems,(t=>t.get("id")==e))}_makeBullets(e){this._shouldMakeBullet(e)&&(e.bullets=[],this.bullets.each((t=>{this._makeBullet(e,t)})))}_shouldMakeBullet(e){return!0}_makeBullet(e,t,s){const i=t(this._root,this,e);if(i){let t=i.get("sprite");t&&(t._setDataItem(e),t.setRaw("position","absolute"),this.bulletsContainer.children.push(t)),i._index=s,i.series=this,e.bullets.push(i)}return i}_clearDirty(){super._clearDirty(),this._aggregatesCalculated=!1,this._selectionAggregatesCalculated=!1}_prepareChildren(){super._prepareChildren();let e=this.startIndex(),t=this.endIndex();if(this.isDirty("heatRules")&&(this._valuesDirty=!0),this.isPrivateDirty("baseValueSeries")){const e=this.getPrivate("baseValueSeries");e&&this._disposers.push(e.onPrivate("startIndex",(()=>{this.markDirtyValues()})))}if(this.get("calculateAggregates")&&(this._valuesDirty&&!this._dataProcessed&&(this._aggregatesCalculated||(this._calculateAggregates(0,this.dataItems.length),this._aggregatesCalculated=!0)),this._psi==e&&this._pei==t||this._selectionAggregatesCalculated||(0===e&&t===this.dataItems.length&&this._aggregatesCalculated||this._calculateAggregates(e,t),this._selectionAggregatesCalculated=!0)),this.isDirty("tooltip")){let e=this.get("tooltip");e&&(e.hide(0),e.set("tooltipTarget",this))}if(this.isDirty("fill")||this.isDirty("stroke")){let e;const t=this.get("legendDataItem");if(t&&(e=t.get("markerRectangle"),e&&this.isVisible())){if(this.isDirty("stroke")){let t=this.get("stroke");e.set("stroke",t)}if(this.isDirty("fill")){let t=this.get("fill");e.set("fill",t)}}this.updateLegendMarker(void 0)}if(this.bullets.length>0){let e=this.startIndex(),t=this.endIndex();t<this.dataItems.length&&t++;for(let s=e;s<t;s++){let e=this.dataItems[s];e.bullets||this._makeBullets(e)}}}_calculateAggregates(e,t){let s=this._valueFields;if(!s)throw new Error("No value fields are set for the series.");const i={},l={},r={},n={},o={},h={},u={},d={},c={};a(s,(e=>{i[e]=0,l[e]=0,r[e]=0})),a(s,(s=>{let a=s+"Change",m=s+"ChangePercent",p=s+"ChangePrevious",b=s+"ChangePreviousPercent",f=s+"ChangeSelection",g=s+"ChangeSelectionPercent",_="valueY";"valueX"!=s&&"openValueX"!=s&&"lowValueX"!=s&&"highValueX"!=s||(_="valueX");const v=this.getPrivate("baseValueSeries");for(let y=e;y<t;y++){const t=this.dataItems[y];let w=t.get(s);null!=w&&(r[s]++,i[s]+=w,l[s]+=Math.abs(w),d[s]=i[s]/r[s],(n[s]>w||null==n[s])&&(n[s]=w),(o[s]<w||null==o[s])&&(o[s]=w),u[s]=w,null==h[s]&&(h[s]=w,c[s]=w,v&&(h[_]=v._getBase(_))),0===e&&(t.setRaw(a,w-h[_]),t.setRaw(m,(w-h[_])/h[_]*100)),t.setRaw(p,w-c[_]),t.setRaw(b,(w-c[_])/c[_]*100),t.setRaw(f,w-h[_]),t.setRaw(g,(w-h[_])/h[_]*100),c[s]=w)}})),a(s,(e=>{this.setPrivate(e+"AverageSelection",d[e]),this.setPrivate(e+"CountSelection",r[e]),this.setPrivate(e+"SumSelection",i[e]),this.setPrivate(e+"AbsoluteSumSelection",l[e]),this.setPrivate(e+"LowSelection",n[e]),this.setPrivate(e+"HighSelection",o[e]),this.setPrivate(e+"OpenSelection",h[e]),this.setPrivate(e+"CloseSelection",u[e])})),0===e&&t===this.dataItems.length&&a(s,(e=>{this.setPrivate(e+"Average",d[e]),this.setPrivate(e+"Count",r[e]),this.setPrivate(e+"Sum",i[e]),this.setPrivate(e+"AbsoluteSum",l[e]),this.setPrivate(e+"Low",n[e]),this.setPrivate(e+"High",o[e]),this.setPrivate(e+"Open",h[e]),this.setPrivate(e+"Close",u[e])}))}_updateChildren(){super._updateChildren(),this._psi=this.startIndex(),this._pei=this.endIndex(),this.isDirty("visible")&&this.bulletsContainer.set("visible",this.get("visible"));const e=this.get("heatRules");if(this._valuesDirty&&e&&e.length>0&&a(e,(e=>{const t=e.minValue||this.getPrivate(e.dataField+"Low")||0,s=e.maxValue||this.getPrivate(e.dataField+"High")||0;a(e.target._entities,(i=>{const a=i.dataItem.get(e.dataField);if(!r(a))return void(e.neutral&&i.set(e.key,e.neutral));let l,n;l=e.logarithmic?(Math.log(a)*Math.LOG10E-Math.log(t)*Math.LOG10E)/(Math.log(s)*Math.LOG10E-Math.log(t)*Math.LOG10E):(a-t)/(s-t),!r(a)||r(l)&&Math.abs(l)!=1/0||(l=.5),r(e.min)?n=e.min+(e.max-e.min)*l:e.min instanceof h?n=h.interpolate(l,e.min,e.max):e.min instanceof u&&(n=d(l,e.min,e.max)),e.customFunction?e.customFunction.call(this,i,t,s,a):i.set(e.key,n)}))})),this.bullets.length>0){let e=this.dataItems.length,t=this.startIndex(),s=this.endIndex();s<e&&s++,t>0&&t--;for(let i=0;i<t;i++)this._hideBullets(this.dataItems[i]);for(let i=t;i<s;i++)this._positionBullets(this.dataItems[i]);for(let i=s;i<e;i++)this._hideBullets(this.dataItems[i])}}_positionBullets(e){e.bullets&&a(e.bullets,(e=>{this._positionBullet(e);const t=e.get("sprite");e.get("dynamic")&&(t&&(t._markDirtyKey("fill"),t.markDirtySize()),t instanceof i&&t.walkChildren((e=>{e._markDirtyKey("fill"),e.markDirtySize(),e instanceof c&&e.text.markDirtyText()}))),t instanceof c&&t.get("populateText")&&t.text.markDirtyText()}))}_hideBullets(e){e.bullets&&a(e.bullets,(e=>{let t=e.get("sprite");t&&t.setPrivate("visible",!1)}))}_positionBullet(e){}_placeBulletsContainer(e){e.bulletsContainer.children.moveValue(this.bulletsContainer)}_removeBulletsContainer(){const e=this.bulletsContainer;e.parent&&e.parent.children.removeValue(e)}disposeDataItem(e){const t=e.bullets;t&&a(t,(e=>{e.dispose()}))}_getItemReaderLabel(){return""}showDataItem(t,s){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return e(this,void 0,void 0,(function*(){const e=[i.showDataItem.call(this,t,s)],l=t.bullets;l&&a(l,(t=>{e.push(t.get("sprite").show(s))})),yield Promise.all(e)}))}hideDataItem(t,s){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return e(this,void 0,void 0,(function*(){const e=[i.hideDataItem.call(this,t,s)],l=t.bullets;l&&a(l,(t=>{e.push(t.get("sprite").hide(s))})),yield Promise.all(e)}))}_sequencedShowHide(t,s){return e(this,void 0,void 0,(function*(){if(this.get("sequencedInterpolation"))if(r(s)||(s=this.get("interpolationDuration",0)),s>0){const i=this.startIndex(),a=this.endIndex();yield Promise.all(m(this.dataItems,((l,r)=>e(this,void 0,void 0,(function*(){let e=s||0;(r<i-10||r>a+10)&&(e=0);let n=this.get("sequencedDelay",0)+e/(a-i);yield v(n*(r-i)),t?yield this.showDataItem(l,e):yield this.hideDataItem(l,e)})))))}else yield Promise.all(m(this.dataItems,(e=>t?this.showDataItem(e,0):this.hideDataItem(e,0))))}))}updateLegendValue(e){if(e){const t=e.get("legendDataItem");if(t){const s=t.get("valueLabel");if(s){const t=s.text;let i="";s._setDataItem(e),i=this.get("legendValueText",t.get("text","")),s.set("text",i),t.markDirtyText()}const i=t.get("label");if(i){const t=i.text;let s="";i._setDataItem(e),s=this.get("legendLabelText",t.get("text","")),i.set("text",s),t.markDirtyText()}}}}updateLegendMarker(e){}_onHide(){super._onHide();const e=this.getTooltip();e&&e.hide()}hoverDataItem(e){}unhoverDataItem(e){}_getBase(e){const t=this.dataItems[this.startIndex()];return t?t.get(e):0}}function x(e,t){for(let s=0,i=t.length;s<i;s++){const i=t[s];if(i.length>0){let t=i[0];if(t.length>0){let s=t[0];e.moveTo(s.x,s.y);for(let t=0,a=i.length;t<a;t++)C(e,i[t])}}}}function C(e,t){for(let s=0,i=t.length;s<i;s++){const i=t[s];e.lineTo(i.x,i.y)}}Object.defineProperty(D,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Series"}),Object.defineProperty(D,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:_.classNames.concat([D.className])});class P extends p{_beforeChanged(){super._beforeChanged(),(this.isDirty("points")||this.isDirty("segments")||this._sizeDirty||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){const e=this.get("points"),t=this.get("segments");if(e&&e.length>0){let t=e[0];this._display.moveTo(t.x,t.y),x(this._display,[[e]])}else if(t)x(this._display,t);else if(!this.get("draw")){let e=this.width(),t=this.height();this._display.moveTo(0,0),this._display.lineTo(e,t)}}}}function k(e){return function(){return e}}Object.defineProperty(P,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Line"}),Object.defineProperty(P,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:p.classNames.concat([P.className])});const T=Math.PI,M=2*T,O=1e-6,$=M-O;function j(e){this._+=e[0];for(let t=1,s=e.length;t<s;++t)this._+=arguments[t]+e[t]}function S(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return j;const s=10**t;return function(e){this._+=e[0];for(let t=1,i=e.length;t<i;++t)this._+=Math.round(arguments[t]*s)/s+e[t]}}class F{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?j:S(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,s,i){this._append`Q${+e},${+t},${this._x1=+s},${this._y1=+i}`}bezierCurveTo(e,t,s,i,a,l){this._append`C${+e},${+t},${+s},${+i},${this._x1=+a},${this._y1=+l}`}arcTo(e,t,s,i,a){if(e=+e,t=+t,s=+s,i=+i,(a=+a)<0)throw new Error(`negative radius: ${a}`);let l=this._x1,r=this._y1,n=s-e,o=i-t,h=l-e,u=r-t,d=h*h+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>O)if(Math.abs(u*n-o*h)>O&&a){let c=s-l,m=i-r,p=n*n+o*o,b=c*c+m*m,f=Math.sqrt(p),g=Math.sqrt(d),_=a*Math.tan((T-Math.acos((p+d-b)/(2*f*g)))/2),v=_/g,y=_/f;Math.abs(v-1)>O&&this._append`L${e+v*h},${t+v*u}`,this._append`A${a},${a},0,0,${+(u*c>h*m)},${this._x1=e+y*n},${this._y1=t+y*o}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,s,i,a,l){if(e=+e,t=+t,l=!!l,(s=+s)<0)throw new Error(`negative radius: ${s}`);let r=s*Math.cos(i),n=s*Math.sin(i),o=e+r,h=t+n,u=1^l,d=l?i-a:a-i;null===this._x1?this._append`M${o},${h}`:(Math.abs(this._x1-o)>O||Math.abs(this._y1-h)>O)&&this._append`L${o},${h}`,s&&(d<0&&(d=d%M+M),d>$?this._append`A${s},${s},0,1,${u},${e-r},${t-n}A${s},${s},0,1,${u},${this._x1=o},${this._y1=h}`:d>O&&this._append`A${s},${s},0,${+(d>=T)},${u},${this._x1=e+s*Math.cos(a)},${this._y1=t+s*Math.sin(a)}`)}rect(e,t,s,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${s=+s}v${+i}h${-s}Z`}toString(){return this._}}function V(e){let t=3;return e.digits=function(s){if(!arguments.length)return t;if(null==s)t=null;else{const e=Math.floor(s);if(!(e>=0))throw new RangeError(`invalid digits: ${s}`);t=e}return e},()=>new F(t)}class N extends i{constructor(){super(...arguments),Object.defineProperty(this,"chartContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(i.new(this._root,{width:n,height:n,interactiveChildren:!1}))}),Object.defineProperty(this,"bulletsContainer",{enumerable:!0,configurable:!0,writable:!0,value:i.new(this._root,{interactiveChildren:!1,isMeasured:!1,position:"absolute",width:n,height:n})})}}Object.defineProperty(N,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Chart"}),Object.defineProperty(N,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:i.classNames.concat([N.className])});class U extends N{constructor(){super(...arguments),Object.defineProperty(this,"seriesContainer",{enumerable:!0,configurable:!0,writable:!0,value:i.new(this._root,{width:n,height:n,isMeasured:!1})}),Object.defineProperty(this,"series",{enumerable:!0,configurable:!0,writable:!0,value:new b})}_afterNew(){super._afterNew(),this._disposers.push(this.series);const e=this.seriesContainer.children;this._disposers.push(this.series.events.onAll((t=>{if("clear"===t.type){a(t.oldValues,(e=>{this._removeSeries(e)}));const e=this.get("colors");e&&e.reset()}else if("push"===t.type)e.moveValue(t.newValue),this._processSeries(t.newValue);else if("setIndex"===t.type)e.setIndex(t.index,t.newValue),this._processSeries(t.newValue);else if("insertIndex"===t.type)e.insertIndex(t.index,t.newValue),this._processSeries(t.newValue);else if("removeIndex"===t.type)this._removeSeries(t.oldValue);else{if("moveIndex"!==t.type)throw new Error("Unknown IListEvent type");e.moveValue(t.value,t.newIndex),this._processSeries(t.value)}})))}_processSeries(e){e.chart=this,e._placeBulletsContainer(this)}_removeSeries(e){e.isDisposed()||(this.seriesContainer.children.removeValue(e),e._removeBulletsContainer())}}Object.defineProperty(U,"className",{enumerable:!0,configurable:!0,writable:!0,value:"SerialChart"}),Object.defineProperty(U,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:N.classNames.concat([U.className])});class B extends P{}Object.defineProperty(B,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Tick"}),Object.defineProperty(B,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:P.classNames.concat([B.className])});export{_ as C,g as D,U as S,B as T,D as a,k as c,I as r,V as w};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{a6 as t,aj as e,a2 as i,ak as s,al as o,z as l,ac as r,M as a,C as n,O as h}from"./Theme.js";class p extends t{_beforeChanged(){super._beforeChanged(),(this.isDirty("pointerBaseWidth")||this.isDirty("cornerRadius")||this.isDirty("pointerLength")||this.isDirty("pointerX")||this.isDirty("pointerY")||this.isDirty("width")||this.isDirty("height"))&&(this._clear=!0)}_changed(){if(super._changed(),this._clear){this.markDirtyBounds();let t=this.width(),i=this.height();if(t>0&&i>0){let s=this.get("cornerRadius",8);s=e(s,0,Math.min(t/2,i/2));let o=this.get("pointerX",0),l=this.get("pointerY",0),r=this.get("pointerBaseWidth",15)/2,a=0,n=0,h=0,p=(o-a)*(i-n)-(l-n)*(t-a),u=(o-h)*(0-i)-(l-i)*(t-h);const g=this._display;if(g.moveTo(s,0),p>0&&u>0){let i=Math.round(e(o,s+r,t-r-s));l=e(l,-1/0,0),g.lineTo(i-r,0),g.lineTo(o,l),g.lineTo(i+r,0)}if(g.lineTo(t-s,0),g.arcTo(t,0,t,s,s),p>0&&u<0){let a=Math.round(e(l,s+r,i-r-s));o=e(o,t,1/0),g.lineTo(t,s),g.lineTo(t,Math.max(a-r,s)),g.lineTo(o,l),g.lineTo(t,a+r)}if(g.lineTo(t,i-s),g.arcTo(t,i,t-s,i,s),p<0&&u<0){let a=Math.round(e(o,s+r,t-r-s));l=e(l,i,1/0),g.lineTo(t-s,i),g.lineTo(a+r,i),g.lineTo(o,l),g.lineTo(a-r,i)}if(g.lineTo(s,i),g.arcTo(0,i,0,i-s,s),p<0&&u>0){let t=Math.round(e(l,s+r,i-s-r));o=e(o,-1/0,0),g.lineTo(0,i-s),g.lineTo(0,t+r),g.lineTo(o,l),g.lineTo(0,Math.max(t-r,s))}g.lineTo(0,s),g.arcTo(0,0,s,0,s),g.closePath()}}}}Object.defineProperty(p,"className",{enumerable:!0,configurable:!0,writable:!0,value:"PointedRectangle"}),Object.defineProperty(p,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:t.classNames.concat([p.className])});class u extends i{constructor(t,e,i,s=[]){super(t,e,i,s),Object.defineProperty(this,"_fx",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_fy",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_label",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_fillDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_strokeDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_labelDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_w",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_h",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"_keepHoverDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_htmlContentHovered",{enumerable:!0,configurable:!0,writable:!0,value:!1})}_afterNew(){this._settings.themeTags=s(this._settings.themeTags,["tooltip"]),super._afterNew(),this.set("background",p.new(this._root,{themeTags:["tooltip","background"]})),this._label=this.children.push(o.new(this._root,{})),this._disposers.push(this._label.events.on("boundschanged",(()=>{this._updateBackground()}))),this._disposers.push(this.on("bounds",(()=>{this._updateBackground()}))),this._updateTextColor(),this._root.tooltipContainer.children.push(this),this.hide(0),this._disposers.push(this.label.onPrivate("htmlElement",(t=>{t&&(l(t,"pointerover",(t=>{this._htmlContentHovered=!0})),l(t,"pointerout",(t=>{this._htmlContentHovered=!1})))}))),this._root._tooltips.push(this)}get label(){return this._label}dispose(){super.dispose(),r(this._root._tooltips,this)}_updateChildren(){super._updateChildren(),(this.isDirty("pointerOrientation")||this.isPrivateDirty("minWidth")||this.isPrivateDirty("minHeight"))&&this.get("background")._markDirtyKey("width");null!=this.get("labelText")&&this.label.set("text",this.get("labelText"));null!=this.get("labelHTML")&&this.label.set("html",this.get("labelHTML"))}_changed(){if(super._changed(),(this.isDirty("pointTo")||this.isDirty("pointerOrientation"))&&this._updateBackground(),this.isDirty("tooltipTarget")&&this.updateBackgroundColor(),this.isDirty("keepTargetHover")){if(this.get("keepTargetHover")){const t=this.get("background");this._keepHoverDp=new a([t.events.on("pointerover",(t=>{let e=this.get("tooltipTarget");e&&(e.parent&&e.parent.getPrivate("tooltipTarget")==e&&(e=e.parent),e.hover())})),t.events.on("pointerout",(t=>{let e=this.get("tooltipTarget");e&&(e.parent&&e.parent.getPrivate("tooltipTarget")==e&&(e=e.parent),this._htmlContentHovered||e.unhover())}))])}else this._keepHoverDp&&(this._keepHoverDp.dispose(),this._keepHoverDp=void 0)}}_onShow(){super._onShow(),this.updateBackgroundColor()}updateBackgroundColor(){let t=this.get("tooltipTarget");const e=this.get("background");let i,s;t&&e&&(i=t.get("fill"),s=t.get("stroke"),null==i&&(i=s),this.get("getFillFromSprite")&&(this._fillDp&&this._fillDp.dispose(),null!=i&&e.set("fill",i),this._fillDp=t.on("fill",(t=>{null!=t&&(e.set("fill",t),this._updateTextColor(t))})),this._disposers.push(this._fillDp)),this.get("getStrokeFromSprite")&&(this._strokeDp&&this._strokeDp.dispose(),null!=i&&e.set("stroke",i),this._strokeDp=t.on("fill",(t=>{null!=t&&e.set("stroke",t)})),this._disposers.push(this._strokeDp)),this.get("getLabelFillFromSprite")&&(this._labelDp&&this._labelDp.dispose(),null!=i&&this.label.set("fill",i),this._labelDp=t.on("fill",(t=>{null!=t&&this.label.set("fill",t)})),this._disposers.push(this._labelDp))),this._updateTextColor(i)}_updateTextColor(t){this.get("autoTextColor")&&(null==t&&(t=this.get("background").get("fill")),null==t&&(t=this._root.interfaceColors.get("background")),t instanceof n&&this.label.set("fill",n.alternative(t,this._root.interfaceColors.get("alternativeText"),this._root.interfaceColors.get("text"))))}_setDataItem(t){super._setDataItem(t),this.label._setDataItem(t)}_updateBackground(){super.updateBackground();const t=this._root.container;if(t){let i=.5,s=.5,o=this.get("centerX");o instanceof h&&(i=o.value);let l=this.get("centerY");l instanceof h&&(s=l.value);let r=t.width(),a=t.height(),n=this.parent,u=0,g=0;if(n){u=n.x(),g=n.y();const t=n.get("layerMargin");t&&(u+=t.left||0,g+=t.top||0,r+=(t.left||0)+(t.right||0),a+=(t.top||0)+(t.bottom||0))}const d=this.get("bounds",{left:-u,top:-g,right:r-u,bottom:a-g});this._updateBounds();let c=this.width(),b=this.height();0===c&&(c=this._w),0===b&&(b=this._h);let _=this.get("pointTo",{x:r/2,y:a/2}),f=_.x,m=_.y,v=this.get("pointerOrientation"),T=this.get("background"),y=0,D=0,k=0;T instanceof p&&(y=T.get("pointerLength",0),D=T.get("strokeWidth",0)/2,k=D,T.set("width",c),T.set("height",b));let w=0,x=0,C=d.right-d.left,P=d.bottom-d.top;"horizontal"==v||"left"==v||"right"==v?(D=0,"horizontal"==v?f>d.left+C/2?(f-=c*(1-i)+y,k*=-1):f+=c*i+y:"left"==v?f+=c*(1-i)+y:(f-=c*i+y,k*=-1)):(k=0,"vertical"==v?m>d.top+b/2+y?m-=b*(1-s)+y:(m+=b*s+y,D*=-1):"down"==v?m-=b*(1-s)+y:(m+=b*s+y,D*=-1)),f=e(f,d.left+c*i,d.left+C-c*(1-i))+k,m=e(m,d.top+b*s,d.top+P-b*(1-s))-D,w=_.x-f+c*i+k,x=_.y-m+b*s-D,this._fx=f,this._fy=m;const O=this.get("animationDuration",0);if(O>0&&this.get("visible")&&this.get("opacity")>.1){const t=this.get("animationEasing");this.animate({key:"x",to:f,duration:O,easing:t}),this.animate({key:"y",to:m,duration:O,easing:t})}else this.set("x",f),this.set("y",m);T instanceof p&&(T.set("pointerX",w),T.set("pointerY",x)),c>0&&(this._w=c),b>0&&(this._h=b)}}}Object.defineProperty(u,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Tooltip"}),Object.defineProperty(u,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:i.classNames.concat([u.className])});export{u as T};
|
package/interfaces.d.ts
CHANGED
|
@@ -26702,6 +26702,12 @@ declare namespace __esri {
|
|
|
26702
26702
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#opacity)
|
|
26703
26703
|
*/
|
|
26704
26704
|
opacity: number;
|
|
26705
|
+
/**
|
|
26706
|
+
* The [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-SubtypeGroupLayer.html) to which the sublayer belongs.
|
|
26707
|
+
*
|
|
26708
|
+
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-SubtypeSublayer.html#parent)
|
|
26709
|
+
*/
|
|
26710
|
+
parent: SubtypeGroupLayer;
|
|
26705
26711
|
/**
|
|
26706
26712
|
* Indicates whether to display popups when features in the layer are clicked.
|
|
26707
26713
|
*
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import t from"../core/Error.js";import s from"../core/Logger.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{ensureClass as p,Integer as l}from"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{enumeration as m}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import c from"./Layer.js";import{ArcGISService as d}from"./mixins/ArcGISService.js";import{BlendLayer as h}from"./mixins/BlendLayer.js";import{CustomParametersMixin as y}from"./mixins/CustomParametersMixin.js";import{ImageryTileMixin as f}from"./mixins/ImageryTileMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as j}from"./mixins/PortalLayer.js";import{RefreshableLayer as v}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as R}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{legendEnabled as b}from"./support/commonProperties.js";import T from"./support/Field.js";import{interpolationKebab as w}from"./support/rasterEnums.js";import P from"./support/RasterFunction.js";import O from"./support/rasterDatasets/FunctionRaster.js";import I from"./support/rasterDatasets/RasterFactory.js";import{create as F,getPrimaryRasterUrls as _}from"./support/rasterFunctions/rasterFunctionHelper.js";import{createPopupTemplate as x}from"../support/popupUtils.js";let L=class extends(h(R(g(j(y(f(S(d(v(i(c))))))))))){constructor(...e){super(...e),this._primaryRasters=null,this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(o).then((()=>this._openRaster(r)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[new T({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"})];const{rasterInfo:r}=this,t=r?.attributeTable,s=null!=t?t.fields:null,i="Raster.";if(s){const r=s.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const r=e.clone();return r.name=i+e.name,r}));e=e.concat(r)}const o=r?.dataType,a=r?.multidimensionalInfo;if(("vector-magdir"===o||"vector-uv"===o)&&null!=a){const r=a.variables[0].unit?.trim(),t="Magnitude"+(r?` (${r})`:"");e.push(new T({name:"Raster.Magnitude",alias:t,domain:null,editable:!1,type:"double"})),e.push(new T({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}createPopupTemplate(e){return x({fields:this.rasterFields,title:this.title},e)}async generateRasterInfo(e,r){if(!(e=p(P,e)))return this._primaryRasters[0].rasterInfo;try{const t={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>t[e.url]=e));const s=F(e.rasterFunctionDefinition??e.toJSON(),t),i=new O({rasterFunction:s});return await i.open(r),i.rasterInfo}catch{return null}}write(e,r){const{raster:s}=this;if(this.loaded?"RasterTileServer"===s.datasetFormat&&("Raster"===s.tileType||"Map"===s.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,r);if(r&&r.messages){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`;r.messages.push(new t("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let r=!1;if(this.raster)this.raster.rasterInfo||await this.raster.open(),"Function"===this.raster.datasetFormat?(r=!0,this._primaryRasters=this.raster.primaryRasters.rasters):this._primaryRasters=[this.raster],this.url=this.raster.url;else{const{rasterFunction:r}=this,i=[this.url];r&&_(r.toJSON(),i);const a=await Promise.all(i.map((r=>I.open({url:r,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e})))),n=a.findIndex((e=>null==e));if(n>-1)throw new t("imagery-tile-layer:open",`cannot open raster: ${i[n]}`);if(this._primaryRasters=a,r){const e={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((r=>e[r.url]=r));const i=F(r.rasterFunctionDefinition??r.toJSON(),e),n=new O({rasterFunction:i});try{await n.open(),this.raster=n}catch(o){const e=s.getLogger(this.declaredClass);o instanceof t&&e.error("imagery-tile-layer:open",o.message),e.warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=a[0]}}else this.raster=a[0]}const i=this.raster.rasterInfo;if(!i)throw new t("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("rasterInfo",r?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(a((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}};e([n()],L.prototype,"_primaryRasters",void 0),e([n({type:[l],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],L.prototype,"bandIds",void 0),e([n({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),m(w)],L.prototype,"interpolation",void 0),e([n(b)],L.prototype,"legendEnabled",void 0),e([n({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],L.prototype,"isReference",void 0),e([n({type:["show","hide"]})],L.prototype,"listMode",void 0),e([n({json:{read:!0,write:!0}})],L.prototype,"blendMode",void 0),e([n()],L.prototype,"sourceJSON",void 0),e([n({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],L.prototype,"version",void 0),e([n({readOnly:!0,json:{read:!1}})],L.prototype,"type",void 0),e([n({type:["ArcGISTiledImageServiceLayer"]})],L.prototype,"operationalLayerType",void 0),e([n({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,r)=>!r.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,r,t){r[t]=!e}}}})],L.prototype,"popupEnabled",void 0),e([n({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],L.prototype,"popupTemplate",void 0),e([n({readOnly:!0})],L.prototype,"defaultPopupTemplate",null),e([n({readOnly:!0,type:[T]})],L.prototype,"fields",void 0),e([n({readOnly:!0,type:[T]})],L.prototype,"rasterFields",null),L=e([u("esri.layers.ImageryTileLayer")],L);const N=L;export{N as default};
|