@arcgis/common-components 5.2.0-next.0 → 5.2.0-next.10

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.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as E}from"./ECNI2A4K.js";import{b as k}from"./SKYXMBD4.js";import{e as f}from"./F45Q3BRT.js";import{a as n}from"./YG4PY2H3.js";import{A as l,B as w,H as v,g as C,i,j as u,l as m,q as r,z as g}from"./OOBX2C2L.js";function y(a,e,t){window.localStorage.setItem(a,JSON.stringify(e))}function S(a,e){let t=window.localStorage.getItem(a);return t&&e?JSON.parse(t):t}var R=C`:host,arcgis-picker-input{display:block}.color-picker-container{display:flex;flex-direction:column}.color-picker{--calcite-color-border-1: transparent;overflow-x:hidden}.preview-swatch{width:100%;height:24px}.recent-colors-container{align-items:center;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-input);display:flex;gap:var(--calcite-space-sm);height:32px;padding:0 var(--calcite-space-xs);transition:outline-offset .1s ease-in-out,outline-color .1s ease-in-out}.preview-recent-swatch{cursor:pointer}.recent-colors-container:focus,.preview-recent-swatch:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-brand);outline-offset:var(--calcite-border-width-md)}.empty-swatch{cursor:default}.end-action{display:flex}`,h=class extends w{constructor(){super(),this._messages=k(),this.actionEl=g(),this.open=!1,this.setRecentColorElement=e=>t=>{switch(e){case 1:this.recentColor1El=t;break;case 2:this.recentColor2El=t;break;default:this.recentColor3El=t}},this.recentColors=[],this.clearable=!1,this.compact=!1,this.disabled=!1,this.placement="auto",this.storageId="arcgis-color-input-storage-colors",this.hideRecentColors=!1,this.showTransparency=!1,this.arcgisChange=r(),this.arcgisColorInputChange=r(),this.arcgisColorInputPopoverClose=r(),this.arcgisColorInputPopoverOpen=r(),this.arcgisColorInputSwatchUpdate=r(),this.arcgisInternalStoredColor=r(),this.arcgisPickerClose=r(),this.arcgisPickerOpen=r(),this.arcgisSwatchUpdate=r(),this.listenOn(document,"arcgisInternalStoredColor",this.handleUpdateRecentColors),this.listenOn(document,"arcgisRecentColorsUpdate",this.handleStoreNewRecentColor)}static{this.properties={recentColors:16,clearable:5,color:1,compact:5,disabled:5,messageOverrides:0,placement:1,popoverProps:0,storageId:1,hideRecentColors:5,showTransparency:5}}static{this.styles=R}async close(){await this.inlineInputEl?.close()}async setFocus(){await this.inlineInputEl?.setFocus()}isOpen(){return this.open}load(){this.setRecentColorsFromStorage()}disconnectedCallback(){super.disconnectedCallback(),this.removeTooltip()}async handleOpen(){await this.colorPickerEl?.setFocus(),this.open=!0,this.arcgisPickerOpen.emit(),this.arcgisColorInputPopoverOpen.emit()}setInlineInputRef(e){this.inlineInputEl=e}setColorPickerRef(e){e&&(this.colorPickerEl=e)}getRecentColorElement(e){switch(e){case 1:return this.recentColor1El;case 2:return this.recentColor2El;default:return this.recentColor3El}}setRecentColorsFromStorage(){let e=S(this.storageId,!0);e&&(this.recentColors=[...e])}handleSwatchClickOrKeyUp(e){if("key"in e&&e.key!=="Enter"&&e.key!=="Space")return;let t=e.currentTarget.color||void 0;this.updateColor(t),this.arcgisSwatchUpdate.emit(t),this.arcgisColorInputSwatchUpdate.emit(t),setTimeout(()=>this.recentColor1El?.focus(),200)}handleRecentColorsKeyDown(e){if(this.recentColors.length===1)return;let t=e.key,o;this.activeColorSwatchEl===this.recentColor1El?o=1:this.activeColorSwatchEl===this.recentColor2El?o=2:this.activeColorSwatchEl===this.recentColor3El&&(o=3),t==="ArrowLeft"&&(!o||o===1?this.getRecentColorElement(this.recentColors.length)?.focus():this.getRecentColorElement(o-1)?.focus()),t==="ArrowRight"&&(!o||o===this.recentColors.length?this.recentColor1El?.focus():this.getRecentColorElement(o+1)?.focus())}handleUpdateActiveSwatch(e){this.activeColorSwatchEl=e.target}handleStoreNewRecentColor(e){this.storeRecentColorToStorage(e.detail)}handleUpdateRecentColors(e){e.composedPath().includes(this.el)||this.setRecentColorsFromStorage()}handleClearColor(){this.updateColor(void 0)}updateColor(e,t=!0){e!==this.color&&(this.color=e,this.arcgisChange.emit(),this.arcgisColorInputChange.emit(),t&&this.storeRecentColorToStorage(e))}storeRecentColorToStorage(e){if(!e)return;e.length>7&&(e=e.slice(0,7));let t=[e,...this.recentColors.filter(o=>o!==e)].slice(0,3);y(this.storageId,t),this.recentColors=t,this.arcgisInternalStoredColor.emit()}handleClose(e){e.stopPropagation(),this.storeRecentColorToStorage(this.colorPickerEl?.value),this.open=!1,this.arcgisPickerClose.emit(this.colorPickerEl?.value),this.arcgisColorInputPopoverClose.emit(this.colorPickerEl?.value)}addTooltip(e){this.removeTooltip(),this.tooltipContainerEl=document.createElement("div"),m(i`<calcite-tooltip .placement=${e.placement??"auto"} .referenceElement=${e.referenceElement} overlay-positioning=fixed open>${e.innerHTML}</calcite-tooltip>`,this.tooltipContainerEl),document.body.append(this.tooltipContainerEl)}removeTooltip(){this.tooltipContainerEl?.parentNode&&(this.tooltipContainerEl.remove(),this.tooltipContainerEl=void 0)}render(){let{compact:e,disabled:t,recentColors:o,_messages:s}=this,p=[o[0],o[1]],$=f(this.el)==="rtl";return e||p.push(o[2]),i`<arcgis-picker-input .disabled=${t} .intlDone=${s.commitColor} .heading=${s.selectColor} .label=${s.selectColor} @arcgisPopoverOpen=${this.handleOpen} @arcgisPopoverClose=${this.handleClose} .popoverProps=${this.popoverProps} ${l(this.setInlineInputRef)}><div class="color-picker-container" slot=content>${n(`color-picker${e?"--compact":""}`,i`<calcite-color-picker .clearable=${this.clearable} class="color-picker" @calciteColorPickerInput=${E(c=>{c.stopPropagation(),this.updateColor(this.colorPickerEl.value,!1)},500)} .scale=${e?"s":"m"} .storageId=${this.storageId} .alphaChannel=${this.showTransparency} .value=${this.color} ${l(this.setColorPickerRef)}></calcite-color-picker>`)}</div><div slot=preview><calcite-color-picker-swatch class="preview-swatch" .color=${this.color} scale=s></calcite-color-picker-swatch></div>${!this.hideRecentColors&&i`<div slot=content-end class="recent-colors-container" @keydown=${this.handleRecentColorsKeyDown} tabindex=-1>${p.map((c,d)=>c?n(c,i`<calcite-color-picker-swatch class="preview-recent-swatch" role=button scale=s tabindex=0 .active=${c===this.color} .color=${c} @click=${this.handleSwatchClickOrKeyUp} @keyup=${this.handleSwatchClickOrKeyUp} @focus=${this.handleUpdateActiveSwatch} ${l(this.setRecentColorElement(d+1))}></calcite-color-picker-swatch>`):this.renderEmptySwatch(`empty-swatch-${d}`))}</div>`||""}${this.clearable&&i`<div slot=content-end class="end-action"><calcite-action icon=circle-disallowed scale=s .label=${s.clearColor} .text=${s.clearColor??""} @click=${this.handleClearColor} @mouseover=${()=>this.addTooltip({referenceElement:this.actionEl.value,placement:$?"right-start":"left-start",innerHTML:s.noColor??""})} @mouseout=${()=>this.removeTooltip()} ${l(this.actionEl)}></calcite-action></div>`||""}</arcgis-picker-input>`}renderEmptySwatch(e){return n(e,i`<svg class="empty-swatch" viewBox="0 0 20 20" xmlns=http://www.w3.org/2000/svg width=20>${u`<rect width=20 height=20 fill=#f8f8f8 stroke=#000 stroke-dasharray=2 />`}</svg>`)}};v("arcgis-color-input",h);export{h as ArcgisColorInput};
@@ -8080,7 +8080,7 @@ $&
8080
8080
  `;class aB extends L{static get pluginName(){return"ArcgisColorPickerUI"}constructor(e){super(e),this.props=this.editor.config.get("ArcgisColorPicker"),this.label="Font Color",this.props&&this.props.label&&(this.label=this.props.label),this.visible=!1,this.visibleHandler=t=>this.visible=t}init(){let e=this.editor;e.ui.componentFactory.add("arcgis-color-picker",(t=>{let o=new On(t);o.set({label:this.label,tooltip:!0,withText:!1,icon:k0,class:"ColorPickerButton"}),setTimeout((()=>{o.element.children[2].style.width="20px",o.element.children[2].style.height="10px"}),0);let i=e.commands.get("toggleArcgisColorPicker");o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"change:isEnabled",(()=>{o.element.children[2].style.opacity=o.isEnabled?1:.5}));let r=()=>{let s=e.model.document.selection,a=s.getAttribute("colorPicker"),l=s.getAttribute("fontColor"),c=a??l,d=!!c&&c[0]==="{";return o.set({icon:d?`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\r
8081
8081
  <path d="M16.173 14.976H17.266L12.458 4.024H11.542L6.734 14.976H7.827L9.133 12H14.867L16.173 14.976ZM9.572 11L12 5.47L14.428 11H9.572ZM7 22H5.703C4.72123 21.9989 3.77997 21.6085 3.08575 20.9142C2.39154 20.22 2.00106 19.2788 2 18.297V15C2 13.897 1.103 13 0 13V12C1.103 12 2 11.103 2 10V6.703C2.00106 5.72123 2.39154 4.77997 3.08575 4.08575C3.77997 3.39154 4.72123 3.00106 5.703 3H7V4H5.703C4.98644 4.00106 4.29954 4.28618 3.79286 4.79286C3.28618 5.29954 3.00106 5.98644 3 6.703V10C2.99975 10.4953 2.87688 10.9828 2.64236 11.419C2.40785 11.8552 2.06898 12.2266 1.656 12.5C2.06898 12.7734 2.40785 13.1448 2.64236 13.581C2.87688 14.0172 2.99975 14.5047 3 15V18.297C3.00106 19.0136 3.28618 19.7005 3.79286 20.2071C4.29954 20.7138 4.98644 20.9989 5.703 21H7V22ZM18.297 22H17V21H18.297C19.0136 20.9989 19.7005 20.7138 20.2071 20.2071C20.7138 19.7005 20.9989 19.0136 21 18.297V15C21.0003 14.5047 21.1231 14.0172 21.3576 13.581C21.5922 13.1448 21.931 12.7734 22.344 12.5C21.931 12.2266 21.5922 11.8552 21.3576 11.419C21.1231 10.9828 21.0003 10.4953 21 10V6.703C20.9989 5.98644 20.7138 5.29954 20.2071 4.79286C19.7005 4.28618 19.0136 4.00106 18.297 4H17V3H18.297C19.2788 3.00106 20.22 3.39154 20.9142 4.08575C21.6085 4.77997 21.9989 5.72123 22 6.703V10C22 11.103 22.897 12 24 12V13C22.897 13 22 13.897 22 15V18.297C21.9989 19.2788 21.6085 20.22 20.9142 20.9142C20.22 21.6085 19.2788 21.9989 18.297 22ZM17 19H7V16H17V19Z" fill="#151515"/>\r
8082
8082
  </svg>\r
8083
- `:k0}),c};return e.editing.view.document.on("click",r),this.listenTo(o,"execute",(()=>{let s=r();e.execute("toggleArcgisColorPicker",this.visible,this.visibleHandler,s,o.element),o.element.setAttribute("data-cke-tooltip-disabled",!0),o.element.classList.remove("ck-off"),o.element.classList.add("ck-on");let a=document.querySelector(".ck.ck-balloon-panel.ck-balloon-panel_arrow_s.ck-balloon-panel_visible.ck-balloon-panel_with-arrow.ck-toolbar-container");a&&a.classList.remove("ck-balloon-panel_visible")})),o}))}}class lB extends re{constructor(e){super(e),this.props=this.editor.config.get("ArcgisColorPicker"),this.props&&(this.data=this.props.data,this.filterPlaceholder=this.props.filterPlaceholder??"Search attributes",this.enableFields=this.props.enableFields??!1,this.doneText=this.props.doneText??"Done",this.customText=this.props.customText??"Static",this.attributeText=this.props.attributeText??"Data-driven",this.storageId=this.props.storageId||"arcgis-symbol-styler-storage-colors",this._initColorPicker(),this._loadUI(),this.prevColor=null)}_initColorPicker=()=>{this.colorPicker=document.createElement("calcite-color-picker"),this.colorPicker.storageId=this.storageId,this.colorPicker.addEventListener("calciteColorPickerInput",(e=>{let t=e.target.value,o=this.editor.model.document.selection;this.editor.model.change((i=>{let r=this.editor.model.schema.getValidRanges(o.getRanges(),Do);for(let s of r)i.setAttribute(Do,t,s)}))}))};_loadUI=()=>{this.popover=document.createElement("calcite-popover"),this.divContainer=document.createElement("div"),this.panel=document.createElement("calcite-panel"),this.tabs=document.createElement("calcite-tabs"),this.tabNav=document.createElement("calcite-tab-nav"),this.customTab=document.createElement("calcite-tab"),this.customTabTitle=document.createElement("calcite-tab-title"),this.doneButton=document.createElement("calcite-button"),this.popover.placement="bottom-start",this.popover.offsetDistance=5,this.popover.focusTrapDisabled=!0,this.popover.pointerDisabled=!0,this.popover.topLayerDisabled=!0,this.popover.style="--calcite-popover-z-index: 101",this.popover.autoClose=!0,this.popover.appendChild(this.divContainer),this.divContainer.appendChild(this.panel),this.panel.appendChild(this.tabs),this.panel.appendChild(this.doneButton),this.tabNav.appendChild(this.customTabTitle),this.tabs.appendChild(this.customTab),this.customTab.appendChild(this.colorPicker),this.enableFields&&(this.attributeTab=document.createElement("calcite-tab"),this.attributeTabTitle=document.createElement("calcite-tab-title"),this.attributeList=document.createElement("calcite-list"),this.tabs.appendChild(this.tabNav),this.tabs.appendChild(this.attributeTab),this.tabNav.appendChild(this.attributeTabTitle),this.attributeTab.appendChild(this.attributeList),this.attributeTabTitle.innerText=this.attributeText,this.attributeList.selectionMode="single",this.attributeList.filterEnabled=!0,this.attributeList.filterPlaceholder=this.filterPlaceholder,this.attributeTab.style.width="294px",this.attributeList.style.maxHeight="300px",this.tabs.bordered=!0,this.tabs.layout="center",this.tabNav.slot="title-group",this.data&&this.data.forEach((e=>{let{name:t,alias:o,description:i}=e,r=document.createElement("calcite-list-item");r.label=o,r.style.textAlign="start",r.description=`{${t}}`,r.id=`{${t}}`,r.value=o,r.style.whiteSpace="normal",r.addEventListener("calciteListItemSelect",(()=>{let s=this.editor.model.document.selection;this.editor.model.change((a=>{let l=this.editor.model.schema.getValidRanges(s.getRanges(),Do);for(let c of l)a.setAttribute(Do,`{${t}}`,c)}))})),this.attributeList.appendChild(r)}))),this.customTabTitle.innerText=this.customText,this.doneButton.innerText=this.doneText,this.doneButton.slot="footer",this.doneButton.appearance="outline-fill",this.customTab.selected=!0,this.colorPicker.channelsDisabled=!0,this.colorPicker.savedDisabled=!1,this.colorPicker.allowEmpty=!0,this.colorPicker.value=null,this.editor.locale.uiLanguage,this.divContainer.style.width="294px",this.colorPicker.style.width="100%",this.colorPicker.style.boxSizing="border-box",this.colorPicker.style.padding="0.5rem",this.customTab.style.width="294px",this.doneButton.style.width="100%",this.doneButton.addEventListener("click",(()=>{this.popover.open=!1}))};deselectListItems=()=>{let e=this.attributeList.querySelector("[selected]");e&&(e.selected=!1)};setPickerView=e=>{if(!this.enableFields)return void(this.customTabTitle.selected=!0);let t=e&&e[0]==="{";this.attributeTab.selected=this.attributeTabTitle.selected=t,this.customTab.selected=this.customTabTitle.selected=!t};setColorState=e=>{if(e){let t=e[0];if(t==="#")this.colorPicker.value=e,this.enableFields&&this.deselectListItems();else if(t==="{"){let o=CSS.escape(e);this.attributeList.querySelector(`#${o}`).selected=!0,this.colorPicker.value=null}}else this.colorPicker.value=null,this.enableFields&&this.deselectListItems()};execute(e,t,o,i){this.editor.model.document.selection,this.addedPopver||(this.popover.referenceElement=i,this.popover.addEventListener("calcitePopoverClose",(()=>{i.classList.remove("ck-on"),i.classList.add("ck-off"),t(!1)})),document.body.appendChild(this.popover),this.addedPopver=!0),e||(this.setPickerView(o),this.setColorState(o),window.setTimeout((()=>{this.popover.setFocus()}),100)),t(!e)}}let Do="colorPicker";class cB extends L{static get pluginName(){return"ArcgisColorPickerEditing"}constructor(e){super(e),e.model.schema.extend("$text",{allowAttributes:Do}),e.model.schema.setAttributeProperties(Do,{isFormatting:!0,copyOnEnter:!0}),e.conversion.for("downcast").attributeToElement({model:Do,view:(t,{writer:o})=>o.createAttributeElement("span",{style:`color:${t}`})}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:Do,value:t=>t.getStyle("color").replace(/\s/g,"")}}),this.editor.commands.add("toggleArcgisColorPicker",new lB(this.editor))}}class dB extends re{constructor(e){super(e)}execute(){let e=t=>{let o=document.getElementsByClassName("ck ck-form__row ck-table-form__dimensions-row");o.length&&o[0].parentElement.remove();let i=document.getElementsByClassName("ck ck-toolbar ck-toolbar_compact");i.length>1&&i[1].remove();let r=this.editor.editing.view.getDomRoot(),s=r.querySelector(".ck.ck-widget__type-around__button.ck-widget__type-around__button_before"),a=r.querySelector(".ck.ck-widget__type-around__button.ck-widget__type-around__button_after"),l=this.editor.locale.uiLanguage;l!=="he"&&l!=="ar"||(s&&(s.style.transform="translateY(-50%) scaleX(-1)"),a&&(a.style.transform="translateY(50%) scaleX(-1)"))};document.body.addEventListener("click",e),this.editor.on("destroy",(()=>{document.body.removeEventListener("click",e)}))}}class uB extends L{static get pluginName(){return"TableModsEditing"}init(){this.editor.commands.add("TableModsCommand",new dB(this.editor))}}class hB extends L{static get pluginName(){return"TableModsUI"}constructor(e){super(e)}init(){setTimeout((()=>this.editor.execute("TableModsCommand")),0)}}class ur extends Dp{}ur.builtinPlugins=[class extends L{static get requires(){return[Z2,K2]}static get pluginName(){return"Alignment"}},class extends L{static get requires(){return[lE,dE]}static get pluginName(){return"BlockQuote"}},Qw,class extends ol{constructor(){super(...arguments),this.token=null,this._tokens=new Map}static get pluginName(){return"CloudServices"}static get requires(){return[gE]}async init(){let n=this.context.config.get("cloudServices")||{};for(let[t,o]of Object.entries(n))this[t]=o;if(!this.tokenUrl)return void(this.token=null);let e=this.context.plugins.get("CloudServicesCore");this.token=await e.createToken(this.tokenUrl).init(),this._tokens.set(this.tokenUrl,this.token)}async registerTokenUrl(n){if(this._tokens.has(n))return this.getTokenFor(n);let e=this.context.plugins.get("CloudServicesCore"),t=await e.createToken(n).init();return this._tokens.set(n,t),t}getTokenFor(n){let e=this._tokens.get(n);if(!e)throw new y("cloudservices-token-not-registered",this);return e}destroy(){super.destroy();for(let n of this._tokens.values())n.destroy()}},Sf,class extends L{static get requires(){return[d5,u5]}static get pluginName(){return"FontBackgroundColor"}},class extends L{static get requires(){return[m5,g5]}static get pluginName(){return"FontColor"}},class extends L{static get requires(){return[b5,w5]}static get pluginName(){return"FontFamily"}},class extends L{static get requires(){return[A5,v5]}static get pluginName(){return"FontSize"}normalizeSizeOptions(n){return gc(n)}},qf,class extends L{static get requires(){return[$5,W5]}static get pluginName(){return"Image"}},class extends L{static get requires(){return[Z5,K5]}static get pluginName(){return"ImageCaption"}},class extends L{static get pluginName(){return"ImageInsertViaUrlUI"}static get requires(){return[bc]}afterInit(){this._imageInsertUI=this.editor.plugins.get("ImageInsertUI"),this._imageInsertUI.registerIntegration({name:"url",observable:()=>this.editor.commands.get("insertImage"),requiresForm:!0,buttonViewCreator:n=>this._createInsertUrlButton(n),formViewCreator:n=>this._createInsertUrlView(n)})}_createInsertUrlView(n){let e=this.editor,t=e.locale,o=t.t,i=e.commands.get("replaceImageSource"),r=e.commands.get("insertImage"),s=new xI(t),a=n?null:new Xm(t,[s]);return s.bind("isImageSelected").to(this._imageInsertUI),s.bind("isEnabled").toMany([r,i],"isEnabled",((...l)=>l.some((c=>c)))),s.imageURLInputValue=i.value||"",this._imageInsertUI.dropdownView.on("change:isOpen",(()=>{this._imageInsertUI.dropdownView.isOpen&&(s.imageURLInputValue=i.value||"",a&&(a.isCollapsed=!0))}),{priority:"low"}),s.on("submit",(()=>{i.isEnabled?e.execute("replaceImageSource",{source:s.imageURLInputValue}):e.execute("insertImage",{source:s.imageURLInputValue}),this._closePanel()})),s.on("cancel",(()=>this._closePanel())),a?(a.set({isCollapsed:!0}),a.bind("label").to(this._imageInsertUI,"isImageSelected",(l=>o(l?"Update image URL":"Insert image via URL"))),a):s}_createInsertUrlButton(n){let e=n?On:ne,t=this.editor,o=new e(t.locale),i=t.locale.t;return o.set({icon:Y.imageUrl,tooltip:!0}),o.bind("label").to(this._imageInsertUI,"isImageSelected",(r=>i(r?"Update image URL":"Insert image via URL"))),o}_closePanel(){this.editor.editing.view.focus(),this._imageInsertUI.dropdownView.isOpen=!1}},class extends L{static get requires(){return[Zw,vI,CI]}static get pluginName(){return"ImageResize"}},class extends L{static get requires(){return[bk,eD]}static get pluginName(){return"ImageStyle"}},class extends L{static get requires(){return[vs,gt]}static get pluginName(){return"ImageToolbar"}afterInit(){let n=this.editor,e=n.t,t=n.plugins.get(vs),o=n.plugins.get("ImageUtils");var i;t.register("image",{ariaLabel:e("Image toolbar"),items:(i=n.config.get("image.toolbar")||[],i.map((r=>xe(r)?r.name:r))),getRelatedElement:r=>o.getClosestSelectedImageWidget(r)})}},class extends L{static get pluginName(){return"Indent"}static get requires(){return[nD,rD]}},class extends L{constructor(n){super(n),n.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}init(){let n=this.editor,e=n.config.get("indentBlock");e.classes&&e.classes.length?(this._setupConversionUsingClasses(e.classes),n.commands.add("indentBlock",new Ms(n,new Dk({direction:"forward",classes:e.classes}))),n.commands.add("outdentBlock",new Ms(n,new Dk({direction:"backward",classes:e.classes})))):(n.data.addStyleProcessorRules(A1),this._setupConversionUsingOffset(),n.commands.add("indentBlock",new Ms(n,new Ek({direction:"forward",offset:e.offset,unit:e.unit}))),n.commands.add("outdentBlock",new Ms(n,new Ek({direction:"backward",offset:e.offset,unit:e.unit}))))}afterInit(){let n=this.editor,e=n.model.schema,t=n.commands.get("indent"),o=n.commands.get("outdent"),i=n.config.get("heading.options");(i&&i.map((r=>r.model))||sD).forEach((r=>{e.isRegistered(r)&&e.extend(r,{allowAttributes:"blockIndent"})})),e.setAttributeProperties("blockIndent",{isFormatting:!0}),t.registerChildCommand(n.commands.get("indentBlock")),o.registerChildCommand(n.commands.get("outdentBlock"))}_setupConversionUsingOffset(){let n=this.editor.conversion,e=this.editor.locale.contentLanguageDirection==="rtl"?"margin-right":"margin-left";n.for("upcast").attributeToAttribute({view:{styles:{[e]:/[\s\S]+/}},model:{key:"blockIndent",value:t=>{if(!t.is("element","li"))return t.getStyle(e)}}}),n.for("downcast").attributeToAttribute({model:"blockIndent",view:t=>({key:"style",value:{[e]:t}})})}_setupConversionUsingClasses(n){let e={model:{key:"blockIndent",values:[]},view:{}};for(let t of n)e.model.values.push(t),e.view[t]={key:"class",value:[t]};this.editor.conversion.attributeToAttribute(e)}},Xw,m0,Gk,class extends L{static get requires(){return[Os,yD,AD,Qo]}static get pluginName(){return"MediaEmbed"}},db,jf,class extends L{static get pluginName(){return"PasteFromOffice"}static get requires(){return[Lt]}init(){let n=this.editor,e=n.plugins.get("ClipboardPipeline"),t=n.editing.view.document,o=[],i=this.editor.plugins.has("MultiLevelList");o.push(new eT(t,i)),o.push(new oT(t)),o.push(new nT(t)),e.on("inputTransformation",((r,s)=>{if(s._isTransformedWithPasteFromOffice||n.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;let a=s.dataTransfer.getData("text/html"),l=o.find((c=>c.isActive(a)));l&&(s._parsedData||(s._parsedData=rT(a,t.stylesProcessor)),l.execute(s),s._isTransformedWithPasteFromOffice=!0)}),{priority:"high"})}},class extends L{static get requires(){return[lT,sT]}static get pluginName(){return"RemoveFormat"}},fb,class extends L{static get requires(){return[LI,zI]}static get pluginName(){return"Subscript"}},class extends L{static get requires(){return[OI,RI]}static get pluginName(){return"Superscript"}},Wb,class extends L{static get requires(){return[vs]}static get pluginName(){return"TableToolbar"}afterInit(){let n=this.editor,e=n.t,t=n.plugins.get(vs),o=n.config.get("table.contentToolbar"),i=n.config.get("table.tableToolbar");o&&t.register("tableContent",{ariaLabel:e("Table toolbar"),items:o,getRelatedElement:qs}),i&&t.register("table",{ariaLabel:e("Table toolbar"),items:i,getRelatedElement:Zb})}},class extends L{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(n){super(n),n.config.define("typing",{transformations:{include:iE}})}init(){let n=this.editor.model.document.selection;n.on("change:range",(()=>{this.isEnabled=!n.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){let n=this.editor,e=n.model,t=n.plugins.get("Delete"),o=(function(r){let s=r.extra||[],a=r.remove||[],l=c=>!a.includes(c);return(function(c){let d=new Set;for(let u of c)if(typeof u=="string"&&Wp[u])for(let h of Wp[u])d.add(h);else d.add(u);return Array.from(d)})(r.include.concat(s).filter(l)).filter(l).map((c=>typeof c=="string"&&qp[c]?qp[c]:c)).filter((c=>typeof c=="object")).map((c=>({from:nE(c.from),to:rE(c.to)})))})(n.config.get("typing.transformations")),i=new ac(n.model,(r=>{for(let s of o)if(s.from.test(r))return{normalizedTransformation:s}}));i.on("matched:data",((r,s)=>{if(!s.batch.isTyping)return;let{from:a,to:l}=s.normalizedTransformation,c=a.exec(s.text),d=l(c.slice(1)),u=s.range,h=c.index;e.enqueueChange((m=>{for(let g=1;g<c.length;g++){let b=c[g],w=d[g-1];if(w==null){h+=b.length;continue}let A=u.start.getShiftedBy(h),S=e.createRange(A,A.getShiftedBy(b.length)),M=sE(A);e.insertContent(m.createText(w,M),S),h+=w.length}e.enqueueChange((()=>{t.requestUndoOnBackspace()}))}))})),i.bind("isEnabled").to(this)}},class extends L{static get requires(){return[FI,VI]}static get pluginName(){return"Underline"}},class extends L{static get pluginName(){return"TableProperties"}static get requires(){return[eS,cS]}},class extends L{static get pluginName(){return"TableCellProperties"}static get requires(){return[vS,hS]}},class extends L{static get requires(){return[ES,DS,Qo]}static get pluginName(){return"HorizontalLine"}},class extends L{static get pluginName(){return"GeneralHtmlSupport"}static get requires(){return[Ue,uI,hI,mI,gI,pI,fI,kI,bI,wI,_I]}init(){let n=this.editor,e=n.plugins.get(Ue);e.loadAllowedEmptyElementsConfig(n.config.get("htmlSupport.allowEmpty")||[]),e.loadAllowedConfig(n.config.get("htmlSupport.allow")||[]),e.loadDisallowedConfig(n.config.get("htmlSupport.disallow")||[])}getGhsAttributeNameForElement(n){let e=this.editor.plugins.get("DataSchema"),t=Array.from(e.getDefinitionsForView(n,!1)),o=t.find((i=>i.isInline&&!t[0].isObject));return o?o.model:Ot(n)}addModelHtmlClass(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"classes",(a=>{for(let l of ke(e))a.add(l)}))}))}removeModelHtmlClass(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"classes",(a=>{for(let l of ke(e))a.delete(l)}))}))}setModelHtmlAttributes(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"attributes",(a=>{for(let[l,c]of Object.entries(e))a.set(l,c)}))}))}removeModelHtmlAttributes(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"attributes",(a=>{for(let l of ke(e))a.delete(l)}))}))}setModelHtmlStyles(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"styles",(a=>{for(let[l,c]of Object.entries(e))a.set(l,c)}))}))}removeModelHtmlStyles(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"styles",(a=>{for(let l of ke(e))a.delete(l)}))}))}}],ur.builtinPlugins=[...ur.builtinPlugins,f0,class extends L{static get pluginName(){return"ArcgisColorPicker"}static get requires(){return[aB,cB]}},class extends L{static get pluginName(){return"TableMods"}static get requires(){return[uB,hB]}}];var b0={columns:10,documentColors:0,colors:[{color:"#ffffff",label:" "},{color:"#fff5ee",label:" "},{color:"#fff8dc",label:" "},{color:"#fffacd",label:" "},{color:"#ffffe0",label:" "},{color:"#98fb98",label:" "},{color:"#afeeee",label:" "},{color:"#e0ffff",label:" "},{color:"#e6e6fa",label:" "},{color:"#dda0dd",label:" "},{color:"#d3d3d3",label:" "},{color:"#ffc0cb",label:" "},{color:"#ffe4c4",label:" "},{color:"#ffe4b5",label:" "},{color:"#f0e68c",label:" "},{color:"#90ee90",label:" "},{color:"#20b2aa",label:" "},{color:"#87cefa",label:" "},{color:"#6495ed",label:" "},{color:"#ee82ee",label:" "},{color:"#c0c0c0",label:" "},{color:"#f08080",label:" "},{color:"#f4a460",label:" "},{color:"#ffa500",label:" "},{color:"#eee8aa",label:" "},{color:"#7fff00",label:" "},{color:"#48d1cc",label:" "},{color:"#87ceeb",label:" "},{color:"#7b68ee",label:" "},{color:"#da70d6",label:" "},{color:"#808080",label:" "},{color:"#ff0000",label:" "},{color:"#ff4500",label:" "},{color:"#ff8c00",label:" "},{color:"#ffff00",label:" "},{color:"#32cd32",label:" "},{color:"#8fbc8f",label:" "},{color:"#4169e1",label:" "},{color:"#6a5acd",label:" "},{color:"#ba55d3",label:" "},{color:"#696969",label:" "},{color:"#dc143c",label:" "},{color:"#d2691e",label:" "},{color:"#ff7f50",label:" "},{color:"#ffd700",label:" "},{color:"#228b22",label:" "},{color:"#2e8b57",label:" "},{color:"#0000ff",label:" "},{color:"#8a2be2",label:" "},{color:"#9932cc",label:" "},{color:"#2f4f4f",label:" "},{color:"#b22222",label:" "},{color:"#8b4513",label:" "},{color:"#a0522d",label:" "},{color:"#808000",label:" "},{color:"#008000",label:" "},{color:"#008b8b",label:" "},{color:"#0000cd",label:" "},{color:"#483d8b",label:" "},{color:"#8b008b",label:" "},{color:"#000000",label:" "},{color:"#8b0000",label:" "},{color:"#800000",label:" "},{color:"#a52a2a",label:" "},{color:"#556b2f",label:" "},{color:"#006400",label:" "},{color:"#191970",label:" "},{color:"#000080",label:" "},{color:"#4b0082",label:" "},{color:"#800080",label:" "}]};ur.defaultConfig={licenseKey:"WlZCOVRvK1lBTUdYRG13dnQ3L1krYTlycHc5dTVZbm5kWmRoMkpIRS9ETHBGbzd1YzBYUGNxcTZVbVljTkprQldwTjlqbzJIa3Jidmd6SXBtdUU9LU1qQXlOREE1TWpRPQ==",link:{addTargetToExternalLinks:!0},toolbar:{items:["fontSize","fontFamily","arcgis-color-picker","|","sourceEditing","arcgis-field-expression","link","|","insertTable","numberedList","bulletedList","alignment","|","bold","italic","underline","|","removeFormat","undo","redo"]},image:{toolbar:["imageStyle:alignLeft","imageStyle:alignRight","imageStyle:alignBlockLeft","imageStyle:alignCenter","imageStyle:alignBlockRight","toggleImageCaption"]},fontFamily:{options:["default",{title:"Arial",model:"Arial",view:{name:"span",styles:{"font-family":"Arial, Helvetica, sans-serif"}}},{title:"Courier New",model:"Courier",view:{name:"span",styles:{"font-family":"Courier New, Courier, monospace"}}},{title:"Tahoma",model:"Tahoma",view:{name:"span",styles:{"font-family":"Tahoma, Geneva, sans-serif"}}},{title:"Times New Roman",model:"Times",view:{name:"span",styles:{"font-family":"Times New Roman, Times, serif"}}},{title:"Verdana",model:"Verdana",view:{name:"span",styles:{"font-family":"Verdana, Geneva, sans-serif"}}}],supportAllValues:!0},fontSize:{options:[10,12,14,18,24],supportAllValues:!0},fontColor:{...b0},fontBackgroundColor:{...b0},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties"],tableProperties:{colorPicker:{format:"hex"}},tableCellProperties:{colorPicker:{format:"hex"},defaultProperties:{horizontalAlignment:"center"}}},htmlSupport:{allow:[{name:"p",styles:!0},{name:"a",styles:!0,attributes:!0},{name:"div",styles:!0,attributes:["align","aria-hidden","aria-label"]},{name:"video",styles:!0,attributes:["autoplay","controls","height","loop","muted","poster","preload","width"]},{name:"audio",styles:!0,attributes:["autoplay","controls","loop","muted","preload"]},{name:"ul"},{name:"ol"},{name:"li"},{name:"tbody"},{name:"br"},{name:"hr"},{name:"source",styles:!0,attributes:["media","src","type"]},{name:"table",styles:!0,attributes:["width","height","cellpadding","cellspacing","border"]},{name:"td",styles:!0,attributes:["height","width","valign","align","colspan","rowspan","nowrap"]},{name:"th",styles:!0,attributes:["height","width","valign","align","colspan","rowspan","nowrap"]},{name:"tr",styles:!0,attributes:!0},{name:"tbody",styles:!0,attributes:!0},{name:"hr",styles:!0,attributes:!0},{name:"img",styles:!0,attributes:!0},{name:"abbr",attributes:["title"]},{name:"font",styles:!0,attributes:!0},{name:"dd",styles:!0},{name:"dl",styles:!0},{name:"dt",styles:!0},{name:"h2",styles:!0},{name:"h3",styles:!0},{name:"h4",styles:!0},{name:"h5",styles:!0},{name:"h6",styles:!0},{name:"sub",styles:!0},{name:"sup",styles:!0},{name:"figcaption",styles:!0},{name:"article",styles:!0},{name:"aside",styles:!0},{name:"details",styles:!0,attributes:["open"]},{name:"footer",styles:!0},{name:"header",styles:!0},{name:"main",styles:!0},{name:"mark",styles:!0},{name:"nav",styles:!0},{name:"section",styles:!0},{name:"summary",styles:!0},{name:"time",styles:!0},{name:"pre",styles:!0},{name:"code",styles:!0},{name:"blockquote",styles:!0},{name:"del",styles:!0},{name:"span",styles:!0,attributes:["aria-label","aria-hidden"]}],disallow:[{name:"a",attributes:{rel:!0}}]},language:"en"};let mB=ur;function To(n,e,t,o){let i,r=null;typeof o=="function"?i=o:(r=n.commands.get(o),i=()=>{n.execute(o)}),n.model.document.on("change:data",((s,a)=>{if(r&&!r.isEnabled||!e.isEnabled)return;let l=Be(n.model.document.selection.getRanges());if(!l.isCollapsed||a.isUndo||!a.isLocal)return;let c=Array.from(n.model.document.differ.getChanges()),d=c[0];if(c.length!=1||d.type!=="insert"||d.name!="$text"||d.length!=1)return;let u=d.position.parent;if(u.is("element","codeBlock")||u.is("element","listItem")&&typeof o!="function"&&!["numberedList","bulletedList","todoList"].includes(o)||r&&r.value===!0)return;let h=u.getChild(0),m=n.model.createRangeOn(h);if(!m.containsRange(l)&&!l.end.isEqual(m.end))return;let g=t.exec(h.data.substr(0,l.end.offset));g&&n.model.enqueueChange((b=>{let w=b.createPositionAt(u,0),A=b.createPositionAt(u,g[0].length),S=new Ct(w,A);if(i({match:g})!==!1){b.remove(S);let M=n.model.document.selection.getFirstRange(),F=b.createRangeIn(u);!u.isEmpty||F.isEqual(M)||F.containsRange(M,!0)||b.remove(u)}S.detach(),n.model.enqueueChange((()=>{n.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function Ji(n,e,t,o){let i,r;t instanceof RegExp?i=t:r=t,r=r||(s=>{let a,l=[],c=[];for(;(a=i.exec(s))!==null&&!(a&&a.length<4);){let{index:d,1:u,2:h,3:m}=a,g=u+h+m;d+=a[0].length-g.length;let b=[d,d+u.length],w=[d+u.length+h.length,d+u.length+h.length+m.length];l.push(b),l.push(w),c.push([d+u.length,d+u.length+h.length])}return{remove:l,format:c}}),n.model.document.on("change:data",((s,a)=>{if(a.isUndo||!a.isLocal||!e.isEnabled)return;let l=n.model,c=l.document.selection;if(!c.isCollapsed)return;let d=Array.from(l.document.differ.getChanges()),u=d[0];if(d.length!=1||u.type!=="insert"||u.name!="$text"||u.length!=1)return;let h=c.focus,m=h.parent,{text:g,range:b}=(function(M,F){let G=M.start;return{text:Array.from(M.getItems()).reduce(((X,ae)=>!ae.is("$text")&&!ae.is("$textProxy")||ae.getAttribute("code")?(G=F.createPositionAfter(ae),""):X+ae.data),""),range:F.createRange(G,M.end)}})(l.createRange(l.createPositionAt(m,0),h),l),w=r(g),A=w0(b.start,w.format,l),S=w0(b.start,w.remove,l);A.length&&S.length&&l.enqueueChange((M=>{if(o(M,A)!==!1){for(let F of S.reverse())M.remove(F);l.enqueueChange((()=>{n.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function w0(n,e,t){return e.filter((o=>o[0]!==void 0&&o[1]!==void 0)).map((o=>t.createRange(n.getShiftedBy(o[0]),n.getShiftedBy(o[1]))))}function aa(n,e){return(t,o)=>{if(!n.commands.get(e).isEnabled)return!1;let i=n.model.schema.getValidRanges(o,e);for(let r of i)t.setAttribute(e,!0,r);t.removeSelectionAttribute(e)}}function ed(n){let e=n.t,t=n.config.get("codeBlock.languages");for(let o of t)o.label==="Plain text"&&(o.label=e("Plain text")),o.class===void 0&&(o.class=`language-${o.language}`);return t}function td(n,e,t){let o={};for(let i of n)e==="class"?o[i[e].split(" ").shift()]=i[t]:o[i[e]]=i[t];return o}function od(n){return n.data.match(/^(\s*)/)[0]}function id(n){let e=n.document.selection,t=[];if(e.isCollapsed)return[e.anchor];let o=e.getFirstRange().getWalker({ignoreElementEnd:!0,direction:"backward"});for(let{item:i}of o){if(!i.is("$textProxy"))continue;let{parent:r,startOffset:s}=i.textNode;if(!r.is("element","codeBlock"))continue;let a=od(i.textNode),l=n.createPositionAt(r,s+a.length);t.push(l)}return t}function _0(n){let e=Be(n.getSelectedBlocks());return!!e&&e.is("element","codeBlock")}function A0(n,e){return!e.is("rootElement")&&!n.isLimit(e)&&n.checkChild(e.parent,"codeBlock")}class gB extends re{constructor(e){super(e),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){let t=this.editor,o=t.model,i=o.document.selection,r=ed(t)[0],s=Array.from(i.getSelectedBlocks()),a=e.forceValue==null?!this.value:e.forceValue,l=(function(c,d,u){return c.language?c.language:c.usePreviousLanguageChoice&&d?d:u})(e,this._lastLanguage,r.language);o.change((c=>{a?this._applyCodeBlock(c,s,l):this._removeCodeBlock(c,s)}))}_getValue(){let e=Be(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!e.is("element","codeBlock"))&&e.getAttribute("language")}_checkEnabled(){if(this.value)return!0;let e=this.editor.model.document.selection,t=this.editor.model.schema,o=Be(e.getSelectedBlocks());return!!o&&A0(t,o)}_applyCodeBlock(e,t,o){this._lastLanguage=o;let i=this.editor.model.schema,r=t.filter((s=>A0(i,s)));for(let s of r)e.rename(s,"codeBlock"),e.setAttribute("language",o,s),i.removeDisallowedAttributes([s],e),Array.from(s.getChildren()).filter((a=>!i.checkChild(s,a))).forEach((a=>e.remove(a)));r.reverse().forEach(((s,a)=>{let l=r[a+1];s.previousSibling===l&&(e.appendElement("softBreak",l),e.merge(e.createPositionBefore(s)))}))}_removeCodeBlock(e,t){let o=t.filter((i=>i.is("element","codeBlock")));for(let i of o){let r=e.createRangeOn(i);for(let s of Array.from(r.getItems()).reverse())if(s.is("element","softBreak")&&s.parent.is("element","codeBlock")){let{position:a}=e.split(e.createPositionBefore(s)),l=a.nodeAfter;e.rename(l,"paragraph"),e.removeAttribute("language",l),e.remove(s)}e.rename(i,"paragraph"),e.removeAttribute("language",i)}}}class pB extends re{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){let e=this.editor.model;e.change((t=>{let o=id(e);for(let i of o){let r=t.createText(this._indentSequence);e.insertContent(r,i)}}))}_checkEnabled(){return!!this._indentSequence&&_0(this.editor.model.document.selection)}}class fB extends re{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){let e=this.editor.model;e.change((()=>{let t=id(e);for(let o of t){let i=C0(e,o,this._indentSequence);i&&e.deleteContent(e.createSelection(i))}}))}_checkEnabled(){if(!this._indentSequence)return!1;let e=this.editor.model;return!!_0(e.document.selection)&&id(e).some((t=>C0(e,t,this._indentSequence)))}}function C0(n,e,t){let o=(function(l){let c=l.parent.getChild(l.index);return c&&!c.is("element","softBreak")||(c=l.nodeBefore),!c||c.is("element","softBreak")?null:c})(e);if(!o)return null;let i=od(o),r=i.lastIndexOf(t);if(r+t.length!==i.length||r===-1)return null;let{parent:s,startOffset:a}=o;return n.createRange(n.createPositionAt(s,a+r),n.createPositionAt(s,a+r+t.length))}function v0(n,e,t=!1){let o=td(e,"language","class"),i=td(e,"language","label");return(r,s,a)=>{let{writer:l,mapper:c,consumable:d}=a;if(!d.consume(s.item,"insert"))return;let u=s.item.getAttribute("language"),h=c.toViewPosition(n.createPositionBefore(s.item)),m={};t&&(m["data-language"]=i[u],m.spellcheck="false");let g=o[u]?{class:o[u]}:void 0,b=l.createContainerElement("code",g),w=l.createContainerElement("pre",m,b);l.insert(h,w),c.bindElements(s.item,b)}}let y0="paragraph";class kB extends L{static get pluginName(){return"CodeBlockEditing"}static get requires(){return[Lp]}constructor(e){super(e),e.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:" "})}init(){let e=this.editor,t=e.model.schema,o=e.model,i=e.editing.view,r=e.plugins.has("ListEditing")?e.plugins.get("ListEditing"):null,s=ed(e);e.commands.add("codeBlock",new gB(e)),e.commands.add("indentCodeBlock",new pB(e)),e.commands.add("outdentCodeBlock",new fB(e)),this.listenTo(i.document,"tab",((a,l)=>{let c=l.shiftKey?"outdentCodeBlock":"indentCodeBlock";e.commands.get(c).isEnabled&&(e.execute(c),l.stopPropagation(),l.preventDefault(),a.stop())}),{context:"pre"}),t.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",isBlock:!0,allowAttributes:["language"]}),t.addAttributeCheck(((a,l)=>!!(a.endsWith("codeBlock")&&r&&r.getListAttributeNames().includes(l))||!a.endsWith("codeBlock $text")&&void 0)),e.model.schema.addChildCheck(((a,l)=>{if(a.endsWith("codeBlock")&&l.isObject)return!1})),e.editing.downcastDispatcher.on("insert:codeBlock",v0(o,s,!0)),e.data.downcastDispatcher.on("insert:codeBlock",v0(o,s)),e.data.downcastDispatcher.on("insert:softBreak",(function(a){return(l,c,d)=>{if(c.item.parent.name!=="codeBlock")return;let{writer:u,mapper:h,consumable:m}=d;if(!m.consume(c.item,"insert"))return;let g=h.toViewPosition(a.createPositionBefore(c.item));u.insert(g,u.createText(`
8083
+ `:k0}),c};return e.editing.view.document.on("click",r),this.listenTo(o,"execute",(()=>{let s=r();e.execute("toggleArcgisColorPicker",this.visible,this.visibleHandler,s,o.element),o.element.setAttribute("data-cke-tooltip-disabled",!0),o.element.classList.remove("ck-off"),o.element.classList.add("ck-on");let a=document.querySelector(".ck.ck-balloon-panel.ck-balloon-panel_arrow_s.ck-balloon-panel_visible.ck-balloon-panel_with-arrow.ck-toolbar-container");a&&a.classList.remove("ck-balloon-panel_visible")})),o}))}}class lB extends re{constructor(e){super(e),this.props=this.editor.config.get("ArcgisColorPicker"),this.props&&(this.data=this.props.data,this.filterPlaceholder=this.props.filterPlaceholder??"Search attributes",this.enableFields=this.props.enableFields??!1,this.doneText=this.props.doneText??"Done",this.customText=this.props.customText??"Static",this.attributeText=this.props.attributeText??"Data-driven",this.storageId=this.props.storageId||"arcgis-symbol-styler-storage-colors",this._initColorPicker(),this._loadUI(),this.prevColor=null)}_initColorPicker=()=>{this.colorPicker=document.createElement("calcite-color-picker"),this.colorPicker.storageId=this.storageId,this.colorPicker.addEventListener("calciteColorPickerInput",(e=>{let t=e.target.value,o=this.editor.model.document.selection;this.editor.model.change((i=>{let r=this.editor.model.schema.getValidRanges(o.getRanges(),Do);for(let s of r)i.setAttribute(Do,t,s)}))}))};_loadUI=()=>{this.popover=document.createElement("calcite-popover"),this.divContainer=document.createElement("div"),this.panel=document.createElement("calcite-panel"),this.tabs=document.createElement("calcite-tabs"),this.tabNav=document.createElement("calcite-tab-nav"),this.customTab=document.createElement("calcite-tab"),this.customTabTitle=document.createElement("calcite-tab-title"),this.doneButton=document.createElement("calcite-button"),this.popover.placement="bottom-start",this.popover.offsetDistance=5,this.popover.focusTrapDisabled=!0,this.popover.pointerDisabled=!0,this.popover.topLayerDisabled=!0,this.popover.style="--calcite-popover-z-index: 101",this.popover.autoClose=!0,this.popover.appendChild(this.divContainer),this.divContainer.appendChild(this.panel),this.panel.appendChild(this.tabs),this.panel.appendChild(this.doneButton),this.tabNav.appendChild(this.customTabTitle),this.tabs.appendChild(this.customTab),this.customTab.appendChild(this.colorPicker),this.enableFields&&(this.attributeTab=document.createElement("calcite-tab"),this.attributeTabTitle=document.createElement("calcite-tab-title"),this.attributeList=document.createElement("calcite-list"),this.tabs.appendChild(this.tabNav),this.tabs.appendChild(this.attributeTab),this.tabNav.appendChild(this.attributeTabTitle),this.attributeTab.appendChild(this.attributeList),this.attributeTabTitle.innerText=this.attributeText,this.attributeList.selectionMode="single",this.attributeList.filterEnabled=!0,this.attributeList.filterPlaceholder=this.filterPlaceholder,this.attributeTab.style.width="294px",this.attributeList.style.maxHeight="300px",this.tabs.bordered=!0,this.tabs.layout="center",this.tabNav.slot="title-group",this.data&&this.data.forEach((e=>{let{name:t,alias:o,description:i}=e,r=document.createElement("calcite-list-item");r.label=o,r.style.textAlign="start",r.description=`{${t}}`,r.id=`{${t}}`,r.value=o,r.style.whiteSpace="normal",r.addEventListener("calciteListItemSelect",(()=>{let s=this.editor.model.document.selection;this.editor.model.change((a=>{let l=this.editor.model.schema.getValidRanges(s.getRanges(),Do);for(let c of l)a.setAttribute(Do,`{${t}}`,c)}))})),this.attributeList.appendChild(r)}))),this.customTabTitle.innerText=this.customText,this.doneButton.innerText=this.doneText,this.doneButton.slot="footer",this.doneButton.appearance="outline-fill",this.customTab.selected=!0,this.colorPicker.channelsDisabled=!0,this.colorPicker.savedDisabled=!1,this.colorPicker.allowEmpty=!0,this.colorPicker.value=null,this.editor.locale.uiLanguage,this.divContainer.style.width="294px",this.colorPicker.style.width="100%",this.colorPicker.style.boxSizing="border-box",this.colorPicker.style.padding="0.5rem",this.customTab.style.width="294px",this.doneButton.style.width="100%",this.doneButton.addEventListener("click",(()=>{this.popover.open=!1}))};deselectListItems=()=>{let e=this.attributeList.querySelector("[selected]");e&&(e.selected=!1)};setPickerView=e=>{if(!this.enableFields)return void(this.customTabTitle.selected=!0);let t=e&&e[0]==="{";this.attributeTab.selected=this.attributeTabTitle.selected=t,this.customTab.selected=this.customTabTitle.selected=!t};setColorState=e=>{if(e){let t=e[0];if(t==="#")this.colorPicker.value=e,this.enableFields&&this.deselectListItems();else if(t==="{"){let o=CSS.escape(e);this.attributeList.querySelector(`#${o}`).selected=!0,this.colorPicker.value=null}}else this.colorPicker.value=null,this.enableFields&&this.deselectListItems()};execute(e,t,o,i){this.editor.model.document.selection,this.addedPopver||(this.popover.referenceElement=i,this.popover.addEventListener("calcitePopoverClose",(()=>{i.classList.remove("ck-on"),i.classList.add("ck-off"),i.removeAttribute("data-cke-tooltip-disabled"),t(!1)})),document.body.appendChild(this.popover),this.addedPopver=!0),e||(this.setPickerView(o),this.setColorState(o),window.setTimeout((()=>{this.popover.setFocus()}),100)),t(!e)}}let Do="colorPicker";class cB extends L{static get pluginName(){return"ArcgisColorPickerEditing"}constructor(e){super(e),e.model.schema.extend("$text",{allowAttributes:Do}),e.model.schema.setAttributeProperties(Do,{isFormatting:!0,copyOnEnter:!0}),e.conversion.for("downcast").attributeToElement({model:Do,view:(t,{writer:o})=>o.createAttributeElement("span",{style:`color:${t}`})}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:Do,value:t=>t.getStyle("color").replace(/\s/g,"")}}),this.editor.commands.add("toggleArcgisColorPicker",new lB(this.editor))}}class dB extends re{constructor(e){super(e)}execute(){let e=t=>{let o=document.getElementsByClassName("ck ck-form__row ck-table-form__dimensions-row");o.length&&o[0].parentElement.remove();let i=document.getElementsByClassName("ck ck-toolbar ck-toolbar_compact");i.length>1&&i[1].remove();let r=this.editor.editing.view.getDomRoot(),s=r.querySelector(".ck.ck-widget__type-around__button.ck-widget__type-around__button_before"),a=r.querySelector(".ck.ck-widget__type-around__button.ck-widget__type-around__button_after"),l=this.editor.locale.uiLanguage;l!=="he"&&l!=="ar"||(s&&(s.style.transform="translateY(-50%) scaleX(-1)"),a&&(a.style.transform="translateY(50%) scaleX(-1)"))};document.body.addEventListener("click",e),this.editor.on("destroy",(()=>{document.body.removeEventListener("click",e)}))}}class uB extends L{static get pluginName(){return"TableModsEditing"}init(){this.editor.commands.add("TableModsCommand",new dB(this.editor))}}class hB extends L{static get pluginName(){return"TableModsUI"}constructor(e){super(e)}init(){setTimeout((()=>this.editor.execute("TableModsCommand")),0)}}class ur extends Dp{}ur.builtinPlugins=[class extends L{static get requires(){return[Z2,K2]}static get pluginName(){return"Alignment"}},class extends L{static get requires(){return[lE,dE]}static get pluginName(){return"BlockQuote"}},Qw,class extends ol{constructor(){super(...arguments),this.token=null,this._tokens=new Map}static get pluginName(){return"CloudServices"}static get requires(){return[gE]}async init(){let n=this.context.config.get("cloudServices")||{};for(let[t,o]of Object.entries(n))this[t]=o;if(!this.tokenUrl)return void(this.token=null);let e=this.context.plugins.get("CloudServicesCore");this.token=await e.createToken(this.tokenUrl).init(),this._tokens.set(this.tokenUrl,this.token)}async registerTokenUrl(n){if(this._tokens.has(n))return this.getTokenFor(n);let e=this.context.plugins.get("CloudServicesCore"),t=await e.createToken(n).init();return this._tokens.set(n,t),t}getTokenFor(n){let e=this._tokens.get(n);if(!e)throw new y("cloudservices-token-not-registered",this);return e}destroy(){super.destroy();for(let n of this._tokens.values())n.destroy()}},Sf,class extends L{static get requires(){return[d5,u5]}static get pluginName(){return"FontBackgroundColor"}},class extends L{static get requires(){return[m5,g5]}static get pluginName(){return"FontColor"}},class extends L{static get requires(){return[b5,w5]}static get pluginName(){return"FontFamily"}},class extends L{static get requires(){return[A5,v5]}static get pluginName(){return"FontSize"}normalizeSizeOptions(n){return gc(n)}},qf,class extends L{static get requires(){return[$5,W5]}static get pluginName(){return"Image"}},class extends L{static get requires(){return[Z5,K5]}static get pluginName(){return"ImageCaption"}},class extends L{static get pluginName(){return"ImageInsertViaUrlUI"}static get requires(){return[bc]}afterInit(){this._imageInsertUI=this.editor.plugins.get("ImageInsertUI"),this._imageInsertUI.registerIntegration({name:"url",observable:()=>this.editor.commands.get("insertImage"),requiresForm:!0,buttonViewCreator:n=>this._createInsertUrlButton(n),formViewCreator:n=>this._createInsertUrlView(n)})}_createInsertUrlView(n){let e=this.editor,t=e.locale,o=t.t,i=e.commands.get("replaceImageSource"),r=e.commands.get("insertImage"),s=new xI(t),a=n?null:new Xm(t,[s]);return s.bind("isImageSelected").to(this._imageInsertUI),s.bind("isEnabled").toMany([r,i],"isEnabled",((...l)=>l.some((c=>c)))),s.imageURLInputValue=i.value||"",this._imageInsertUI.dropdownView.on("change:isOpen",(()=>{this._imageInsertUI.dropdownView.isOpen&&(s.imageURLInputValue=i.value||"",a&&(a.isCollapsed=!0))}),{priority:"low"}),s.on("submit",(()=>{i.isEnabled?e.execute("replaceImageSource",{source:s.imageURLInputValue}):e.execute("insertImage",{source:s.imageURLInputValue}),this._closePanel()})),s.on("cancel",(()=>this._closePanel())),a?(a.set({isCollapsed:!0}),a.bind("label").to(this._imageInsertUI,"isImageSelected",(l=>o(l?"Update image URL":"Insert image via URL"))),a):s}_createInsertUrlButton(n){let e=n?On:ne,t=this.editor,o=new e(t.locale),i=t.locale.t;return o.set({icon:Y.imageUrl,tooltip:!0}),o.bind("label").to(this._imageInsertUI,"isImageSelected",(r=>i(r?"Update image URL":"Insert image via URL"))),o}_closePanel(){this.editor.editing.view.focus(),this._imageInsertUI.dropdownView.isOpen=!1}},class extends L{static get requires(){return[Zw,vI,CI]}static get pluginName(){return"ImageResize"}},class extends L{static get requires(){return[bk,eD]}static get pluginName(){return"ImageStyle"}},class extends L{static get requires(){return[vs,gt]}static get pluginName(){return"ImageToolbar"}afterInit(){let n=this.editor,e=n.t,t=n.plugins.get(vs),o=n.plugins.get("ImageUtils");var i;t.register("image",{ariaLabel:e("Image toolbar"),items:(i=n.config.get("image.toolbar")||[],i.map((r=>xe(r)?r.name:r))),getRelatedElement:r=>o.getClosestSelectedImageWidget(r)})}},class extends L{static get pluginName(){return"Indent"}static get requires(){return[nD,rD]}},class extends L{constructor(n){super(n),n.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}init(){let n=this.editor,e=n.config.get("indentBlock");e.classes&&e.classes.length?(this._setupConversionUsingClasses(e.classes),n.commands.add("indentBlock",new Ms(n,new Dk({direction:"forward",classes:e.classes}))),n.commands.add("outdentBlock",new Ms(n,new Dk({direction:"backward",classes:e.classes})))):(n.data.addStyleProcessorRules(A1),this._setupConversionUsingOffset(),n.commands.add("indentBlock",new Ms(n,new Ek({direction:"forward",offset:e.offset,unit:e.unit}))),n.commands.add("outdentBlock",new Ms(n,new Ek({direction:"backward",offset:e.offset,unit:e.unit}))))}afterInit(){let n=this.editor,e=n.model.schema,t=n.commands.get("indent"),o=n.commands.get("outdent"),i=n.config.get("heading.options");(i&&i.map((r=>r.model))||sD).forEach((r=>{e.isRegistered(r)&&e.extend(r,{allowAttributes:"blockIndent"})})),e.setAttributeProperties("blockIndent",{isFormatting:!0}),t.registerChildCommand(n.commands.get("indentBlock")),o.registerChildCommand(n.commands.get("outdentBlock"))}_setupConversionUsingOffset(){let n=this.editor.conversion,e=this.editor.locale.contentLanguageDirection==="rtl"?"margin-right":"margin-left";n.for("upcast").attributeToAttribute({view:{styles:{[e]:/[\s\S]+/}},model:{key:"blockIndent",value:t=>{if(!t.is("element","li"))return t.getStyle(e)}}}),n.for("downcast").attributeToAttribute({model:"blockIndent",view:t=>({key:"style",value:{[e]:t}})})}_setupConversionUsingClasses(n){let e={model:{key:"blockIndent",values:[]},view:{}};for(let t of n)e.model.values.push(t),e.view[t]={key:"class",value:[t]};this.editor.conversion.attributeToAttribute(e)}},Xw,m0,Gk,class extends L{static get requires(){return[Os,yD,AD,Qo]}static get pluginName(){return"MediaEmbed"}},db,jf,class extends L{static get pluginName(){return"PasteFromOffice"}static get requires(){return[Lt]}init(){let n=this.editor,e=n.plugins.get("ClipboardPipeline"),t=n.editing.view.document,o=[],i=this.editor.plugins.has("MultiLevelList");o.push(new eT(t,i)),o.push(new oT(t)),o.push(new nT(t)),e.on("inputTransformation",((r,s)=>{if(s._isTransformedWithPasteFromOffice||n.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;let a=s.dataTransfer.getData("text/html"),l=o.find((c=>c.isActive(a)));l&&(s._parsedData||(s._parsedData=rT(a,t.stylesProcessor)),l.execute(s),s._isTransformedWithPasteFromOffice=!0)}),{priority:"high"})}},class extends L{static get requires(){return[lT,sT]}static get pluginName(){return"RemoveFormat"}},fb,class extends L{static get requires(){return[LI,zI]}static get pluginName(){return"Subscript"}},class extends L{static get requires(){return[OI,RI]}static get pluginName(){return"Superscript"}},Wb,class extends L{static get requires(){return[vs]}static get pluginName(){return"TableToolbar"}afterInit(){let n=this.editor,e=n.t,t=n.plugins.get(vs),o=n.config.get("table.contentToolbar"),i=n.config.get("table.tableToolbar");o&&t.register("tableContent",{ariaLabel:e("Table toolbar"),items:o,getRelatedElement:qs}),i&&t.register("table",{ariaLabel:e("Table toolbar"),items:i,getRelatedElement:Zb})}},class extends L{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(n){super(n),n.config.define("typing",{transformations:{include:iE}})}init(){let n=this.editor.model.document.selection;n.on("change:range",(()=>{this.isEnabled=!n.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){let n=this.editor,e=n.model,t=n.plugins.get("Delete"),o=(function(r){let s=r.extra||[],a=r.remove||[],l=c=>!a.includes(c);return(function(c){let d=new Set;for(let u of c)if(typeof u=="string"&&Wp[u])for(let h of Wp[u])d.add(h);else d.add(u);return Array.from(d)})(r.include.concat(s).filter(l)).filter(l).map((c=>typeof c=="string"&&qp[c]?qp[c]:c)).filter((c=>typeof c=="object")).map((c=>({from:nE(c.from),to:rE(c.to)})))})(n.config.get("typing.transformations")),i=new ac(n.model,(r=>{for(let s of o)if(s.from.test(r))return{normalizedTransformation:s}}));i.on("matched:data",((r,s)=>{if(!s.batch.isTyping)return;let{from:a,to:l}=s.normalizedTransformation,c=a.exec(s.text),d=l(c.slice(1)),u=s.range,h=c.index;e.enqueueChange((m=>{for(let g=1;g<c.length;g++){let b=c[g],w=d[g-1];if(w==null){h+=b.length;continue}let A=u.start.getShiftedBy(h),S=e.createRange(A,A.getShiftedBy(b.length)),M=sE(A);e.insertContent(m.createText(w,M),S),h+=w.length}e.enqueueChange((()=>{t.requestUndoOnBackspace()}))}))})),i.bind("isEnabled").to(this)}},class extends L{static get requires(){return[FI,VI]}static get pluginName(){return"Underline"}},class extends L{static get pluginName(){return"TableProperties"}static get requires(){return[eS,cS]}},class extends L{static get pluginName(){return"TableCellProperties"}static get requires(){return[vS,hS]}},class extends L{static get requires(){return[ES,DS,Qo]}static get pluginName(){return"HorizontalLine"}},class extends L{static get pluginName(){return"GeneralHtmlSupport"}static get requires(){return[Ue,uI,hI,mI,gI,pI,fI,kI,bI,wI,_I]}init(){let n=this.editor,e=n.plugins.get(Ue);e.loadAllowedEmptyElementsConfig(n.config.get("htmlSupport.allowEmpty")||[]),e.loadAllowedConfig(n.config.get("htmlSupport.allow")||[]),e.loadDisallowedConfig(n.config.get("htmlSupport.disallow")||[])}getGhsAttributeNameForElement(n){let e=this.editor.plugins.get("DataSchema"),t=Array.from(e.getDefinitionsForView(n,!1)),o=t.find((i=>i.isInline&&!t[0].isObject));return o?o.model:Ot(n)}addModelHtmlClass(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"classes",(a=>{for(let l of ke(e))a.add(l)}))}))}removeModelHtmlClass(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"classes",(a=>{for(let l of ke(e))a.delete(l)}))}))}setModelHtmlAttributes(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"attributes",(a=>{for(let[l,c]of Object.entries(e))a.set(l,c)}))}))}removeModelHtmlAttributes(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"attributes",(a=>{for(let l of ke(e))a.delete(l)}))}))}setModelHtmlStyles(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"styles",(a=>{for(let[l,c]of Object.entries(e))a.set(l,c)}))}))}removeModelHtmlStyles(n,e,t){let o=this.editor.model,i=this.getGhsAttributeNameForElement(n);o.change((r=>{for(let s of Ki(o,t,i))Gi(r,s,i,"styles",(a=>{for(let l of ke(e))a.delete(l)}))}))}}],ur.builtinPlugins=[...ur.builtinPlugins,f0,class extends L{static get pluginName(){return"ArcgisColorPicker"}static get requires(){return[aB,cB]}},class extends L{static get pluginName(){return"TableMods"}static get requires(){return[uB,hB]}}];var b0={columns:10,documentColors:0,colors:[{color:"#ffffff",label:" "},{color:"#fff5ee",label:" "},{color:"#fff8dc",label:" "},{color:"#fffacd",label:" "},{color:"#ffffe0",label:" "},{color:"#98fb98",label:" "},{color:"#afeeee",label:" "},{color:"#e0ffff",label:" "},{color:"#e6e6fa",label:" "},{color:"#dda0dd",label:" "},{color:"#d3d3d3",label:" "},{color:"#ffc0cb",label:" "},{color:"#ffe4c4",label:" "},{color:"#ffe4b5",label:" "},{color:"#f0e68c",label:" "},{color:"#90ee90",label:" "},{color:"#20b2aa",label:" "},{color:"#87cefa",label:" "},{color:"#6495ed",label:" "},{color:"#ee82ee",label:" "},{color:"#c0c0c0",label:" "},{color:"#f08080",label:" "},{color:"#f4a460",label:" "},{color:"#ffa500",label:" "},{color:"#eee8aa",label:" "},{color:"#7fff00",label:" "},{color:"#48d1cc",label:" "},{color:"#87ceeb",label:" "},{color:"#7b68ee",label:" "},{color:"#da70d6",label:" "},{color:"#808080",label:" "},{color:"#ff0000",label:" "},{color:"#ff4500",label:" "},{color:"#ff8c00",label:" "},{color:"#ffff00",label:" "},{color:"#32cd32",label:" "},{color:"#8fbc8f",label:" "},{color:"#4169e1",label:" "},{color:"#6a5acd",label:" "},{color:"#ba55d3",label:" "},{color:"#696969",label:" "},{color:"#dc143c",label:" "},{color:"#d2691e",label:" "},{color:"#ff7f50",label:" "},{color:"#ffd700",label:" "},{color:"#228b22",label:" "},{color:"#2e8b57",label:" "},{color:"#0000ff",label:" "},{color:"#8a2be2",label:" "},{color:"#9932cc",label:" "},{color:"#2f4f4f",label:" "},{color:"#b22222",label:" "},{color:"#8b4513",label:" "},{color:"#a0522d",label:" "},{color:"#808000",label:" "},{color:"#008000",label:" "},{color:"#008b8b",label:" "},{color:"#0000cd",label:" "},{color:"#483d8b",label:" "},{color:"#8b008b",label:" "},{color:"#000000",label:" "},{color:"#8b0000",label:" "},{color:"#800000",label:" "},{color:"#a52a2a",label:" "},{color:"#556b2f",label:" "},{color:"#006400",label:" "},{color:"#191970",label:" "},{color:"#000080",label:" "},{color:"#4b0082",label:" "},{color:"#800080",label:" "}]};ur.defaultConfig={licenseKey:"WlZCOVRvK1lBTUdYRG13dnQ3L1krYTlycHc5dTVZbm5kWmRoMkpIRS9ETHBGbzd1YzBYUGNxcTZVbVljTkprQldwTjlqbzJIa3Jidmd6SXBtdUU9LU1qQXlOREE1TWpRPQ==",link:{addTargetToExternalLinks:!0},toolbar:{items:["fontSize","fontFamily","arcgis-color-picker","|","sourceEditing","arcgis-field-expression","link","|","insertTable","numberedList","bulletedList","alignment","|","bold","italic","underline","|","removeFormat","undo","redo"]},image:{toolbar:["imageStyle:alignLeft","imageStyle:alignRight","imageStyle:alignBlockLeft","imageStyle:alignCenter","imageStyle:alignBlockRight","toggleImageCaption"]},fontFamily:{options:["default",{title:"Arial",model:"Arial",view:{name:"span",styles:{"font-family":"Arial, Helvetica, sans-serif"}}},{title:"Courier New",model:"Courier",view:{name:"span",styles:{"font-family":"Courier New, Courier, monospace"}}},{title:"Tahoma",model:"Tahoma",view:{name:"span",styles:{"font-family":"Tahoma, Geneva, sans-serif"}}},{title:"Times New Roman",model:"Times",view:{name:"span",styles:{"font-family":"Times New Roman, Times, serif"}}},{title:"Verdana",model:"Verdana",view:{name:"span",styles:{"font-family":"Verdana, Geneva, sans-serif"}}}],supportAllValues:!0},fontSize:{options:[10,12,14,18,24],supportAllValues:!0},fontColor:{...b0},fontBackgroundColor:{...b0},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties"],tableProperties:{colorPicker:{format:"hex"}},tableCellProperties:{colorPicker:{format:"hex"},defaultProperties:{horizontalAlignment:"center"}}},htmlSupport:{allow:[{name:"p",styles:!0},{name:"a",styles:!0,attributes:!0},{name:"div",styles:!0,attributes:["align","aria-hidden","aria-label"]},{name:"video",styles:!0,attributes:["autoplay","controls","height","loop","muted","poster","preload","width"]},{name:"audio",styles:!0,attributes:["autoplay","controls","loop","muted","preload"]},{name:"ul"},{name:"ol"},{name:"li"},{name:"tbody"},{name:"br"},{name:"hr"},{name:"source",styles:!0,attributes:["media","src","type"]},{name:"table",styles:!0,attributes:["width","height","cellpadding","cellspacing","border"]},{name:"td",styles:!0,attributes:["height","width","valign","align","colspan","rowspan","nowrap"]},{name:"th",styles:!0,attributes:["height","width","valign","align","colspan","rowspan","nowrap"]},{name:"tr",styles:!0,attributes:!0},{name:"tbody",styles:!0,attributes:!0},{name:"hr",styles:!0,attributes:!0},{name:"img",styles:!0,attributes:!0},{name:"abbr",attributes:["title"]},{name:"font",styles:!0,attributes:!0},{name:"dd",styles:!0},{name:"dl",styles:!0},{name:"dt",styles:!0},{name:"h2",styles:!0},{name:"h3",styles:!0},{name:"h4",styles:!0},{name:"h5",styles:!0},{name:"h6",styles:!0},{name:"sub",styles:!0},{name:"sup",styles:!0},{name:"figcaption",styles:!0},{name:"article",styles:!0},{name:"aside",styles:!0},{name:"details",styles:!0,attributes:["open"]},{name:"footer",styles:!0},{name:"header",styles:!0},{name:"main",styles:!0},{name:"mark",styles:!0},{name:"nav",styles:!0},{name:"section",styles:!0},{name:"summary",styles:!0},{name:"time",styles:!0},{name:"pre",styles:!0},{name:"code",styles:!0},{name:"blockquote",styles:!0},{name:"del",styles:!0},{name:"span",styles:!0,attributes:["aria-label","aria-hidden"]}],disallow:[{name:"a",attributes:{rel:!0}}]},language:"en"};let mB=ur;function To(n,e,t,o){let i,r=null;typeof o=="function"?i=o:(r=n.commands.get(o),i=()=>{n.execute(o)}),n.model.document.on("change:data",((s,a)=>{if(r&&!r.isEnabled||!e.isEnabled)return;let l=Be(n.model.document.selection.getRanges());if(!l.isCollapsed||a.isUndo||!a.isLocal)return;let c=Array.from(n.model.document.differ.getChanges()),d=c[0];if(c.length!=1||d.type!=="insert"||d.name!="$text"||d.length!=1)return;let u=d.position.parent;if(u.is("element","codeBlock")||u.is("element","listItem")&&typeof o!="function"&&!["numberedList","bulletedList","todoList"].includes(o)||r&&r.value===!0)return;let h=u.getChild(0),m=n.model.createRangeOn(h);if(!m.containsRange(l)&&!l.end.isEqual(m.end))return;let g=t.exec(h.data.substr(0,l.end.offset));g&&n.model.enqueueChange((b=>{let w=b.createPositionAt(u,0),A=b.createPositionAt(u,g[0].length),S=new Ct(w,A);if(i({match:g})!==!1){b.remove(S);let M=n.model.document.selection.getFirstRange(),F=b.createRangeIn(u);!u.isEmpty||F.isEqual(M)||F.containsRange(M,!0)||b.remove(u)}S.detach(),n.model.enqueueChange((()=>{n.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function Ji(n,e,t,o){let i,r;t instanceof RegExp?i=t:r=t,r=r||(s=>{let a,l=[],c=[];for(;(a=i.exec(s))!==null&&!(a&&a.length<4);){let{index:d,1:u,2:h,3:m}=a,g=u+h+m;d+=a[0].length-g.length;let b=[d,d+u.length],w=[d+u.length+h.length,d+u.length+h.length+m.length];l.push(b),l.push(w),c.push([d+u.length,d+u.length+h.length])}return{remove:l,format:c}}),n.model.document.on("change:data",((s,a)=>{if(a.isUndo||!a.isLocal||!e.isEnabled)return;let l=n.model,c=l.document.selection;if(!c.isCollapsed)return;let d=Array.from(l.document.differ.getChanges()),u=d[0];if(d.length!=1||u.type!=="insert"||u.name!="$text"||u.length!=1)return;let h=c.focus,m=h.parent,{text:g,range:b}=(function(M,F){let G=M.start;return{text:Array.from(M.getItems()).reduce(((X,ae)=>!ae.is("$text")&&!ae.is("$textProxy")||ae.getAttribute("code")?(G=F.createPositionAfter(ae),""):X+ae.data),""),range:F.createRange(G,M.end)}})(l.createRange(l.createPositionAt(m,0),h),l),w=r(g),A=w0(b.start,w.format,l),S=w0(b.start,w.remove,l);A.length&&S.length&&l.enqueueChange((M=>{if(o(M,A)!==!1){for(let F of S.reverse())M.remove(F);l.enqueueChange((()=>{n.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function w0(n,e,t){return e.filter((o=>o[0]!==void 0&&o[1]!==void 0)).map((o=>t.createRange(n.getShiftedBy(o[0]),n.getShiftedBy(o[1]))))}function aa(n,e){return(t,o)=>{if(!n.commands.get(e).isEnabled)return!1;let i=n.model.schema.getValidRanges(o,e);for(let r of i)t.setAttribute(e,!0,r);t.removeSelectionAttribute(e)}}function ed(n){let e=n.t,t=n.config.get("codeBlock.languages");for(let o of t)o.label==="Plain text"&&(o.label=e("Plain text")),o.class===void 0&&(o.class=`language-${o.language}`);return t}function td(n,e,t){let o={};for(let i of n)e==="class"?o[i[e].split(" ").shift()]=i[t]:o[i[e]]=i[t];return o}function od(n){return n.data.match(/^(\s*)/)[0]}function id(n){let e=n.document.selection,t=[];if(e.isCollapsed)return[e.anchor];let o=e.getFirstRange().getWalker({ignoreElementEnd:!0,direction:"backward"});for(let{item:i}of o){if(!i.is("$textProxy"))continue;let{parent:r,startOffset:s}=i.textNode;if(!r.is("element","codeBlock"))continue;let a=od(i.textNode),l=n.createPositionAt(r,s+a.length);t.push(l)}return t}function _0(n){let e=Be(n.getSelectedBlocks());return!!e&&e.is("element","codeBlock")}function A0(n,e){return!e.is("rootElement")&&!n.isLimit(e)&&n.checkChild(e.parent,"codeBlock")}class gB extends re{constructor(e){super(e),this._lastLanguage=null}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){let t=this.editor,o=t.model,i=o.document.selection,r=ed(t)[0],s=Array.from(i.getSelectedBlocks()),a=e.forceValue==null?!this.value:e.forceValue,l=(function(c,d,u){return c.language?c.language:c.usePreviousLanguageChoice&&d?d:u})(e,this._lastLanguage,r.language);o.change((c=>{a?this._applyCodeBlock(c,s,l):this._removeCodeBlock(c,s)}))}_getValue(){let e=Be(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!e.is("element","codeBlock"))&&e.getAttribute("language")}_checkEnabled(){if(this.value)return!0;let e=this.editor.model.document.selection,t=this.editor.model.schema,o=Be(e.getSelectedBlocks());return!!o&&A0(t,o)}_applyCodeBlock(e,t,o){this._lastLanguage=o;let i=this.editor.model.schema,r=t.filter((s=>A0(i,s)));for(let s of r)e.rename(s,"codeBlock"),e.setAttribute("language",o,s),i.removeDisallowedAttributes([s],e),Array.from(s.getChildren()).filter((a=>!i.checkChild(s,a))).forEach((a=>e.remove(a)));r.reverse().forEach(((s,a)=>{let l=r[a+1];s.previousSibling===l&&(e.appendElement("softBreak",l),e.merge(e.createPositionBefore(s)))}))}_removeCodeBlock(e,t){let o=t.filter((i=>i.is("element","codeBlock")));for(let i of o){let r=e.createRangeOn(i);for(let s of Array.from(r.getItems()).reverse())if(s.is("element","softBreak")&&s.parent.is("element","codeBlock")){let{position:a}=e.split(e.createPositionBefore(s)),l=a.nodeAfter;e.rename(l,"paragraph"),e.removeAttribute("language",l),e.remove(s)}e.rename(i,"paragraph"),e.removeAttribute("language",i)}}}class pB extends re{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){let e=this.editor.model;e.change((t=>{let o=id(e);for(let i of o){let r=t.createText(this._indentSequence);e.insertContent(r,i)}}))}_checkEnabled(){return!!this._indentSequence&&_0(this.editor.model.document.selection)}}class fB extends re{constructor(e){super(e),this._indentSequence=e.config.get("codeBlock.indentSequence")}refresh(){this.isEnabled=this._checkEnabled()}execute(){let e=this.editor.model;e.change((()=>{let t=id(e);for(let o of t){let i=C0(e,o,this._indentSequence);i&&e.deleteContent(e.createSelection(i))}}))}_checkEnabled(){if(!this._indentSequence)return!1;let e=this.editor.model;return!!_0(e.document.selection)&&id(e).some((t=>C0(e,t,this._indentSequence)))}}function C0(n,e,t){let o=(function(l){let c=l.parent.getChild(l.index);return c&&!c.is("element","softBreak")||(c=l.nodeBefore),!c||c.is("element","softBreak")?null:c})(e);if(!o)return null;let i=od(o),r=i.lastIndexOf(t);if(r+t.length!==i.length||r===-1)return null;let{parent:s,startOffset:a}=o;return n.createRange(n.createPositionAt(s,a+r),n.createPositionAt(s,a+r+t.length))}function v0(n,e,t=!1){let o=td(e,"language","class"),i=td(e,"language","label");return(r,s,a)=>{let{writer:l,mapper:c,consumable:d}=a;if(!d.consume(s.item,"insert"))return;let u=s.item.getAttribute("language"),h=c.toViewPosition(n.createPositionBefore(s.item)),m={};t&&(m["data-language"]=i[u],m.spellcheck="false");let g=o[u]?{class:o[u]}:void 0,b=l.createContainerElement("code",g),w=l.createContainerElement("pre",m,b);l.insert(h,w),c.bindElements(s.item,b)}}let y0="paragraph";class kB extends L{static get pluginName(){return"CodeBlockEditing"}static get requires(){return[Lp]}constructor(e){super(e),e.config.define("codeBlock",{languages:[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"cs",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],indentSequence:" "})}init(){let e=this.editor,t=e.model.schema,o=e.model,i=e.editing.view,r=e.plugins.has("ListEditing")?e.plugins.get("ListEditing"):null,s=ed(e);e.commands.add("codeBlock",new gB(e)),e.commands.add("indentCodeBlock",new pB(e)),e.commands.add("outdentCodeBlock",new fB(e)),this.listenTo(i.document,"tab",((a,l)=>{let c=l.shiftKey?"outdentCodeBlock":"indentCodeBlock";e.commands.get(c).isEnabled&&(e.execute(c),l.stopPropagation(),l.preventDefault(),a.stop())}),{context:"pre"}),t.register("codeBlock",{allowWhere:"$block",allowChildren:"$text",isBlock:!0,allowAttributes:["language"]}),t.addAttributeCheck(((a,l)=>!!(a.endsWith("codeBlock")&&r&&r.getListAttributeNames().includes(l))||!a.endsWith("codeBlock $text")&&void 0)),e.model.schema.addChildCheck(((a,l)=>{if(a.endsWith("codeBlock")&&l.isObject)return!1})),e.editing.downcastDispatcher.on("insert:codeBlock",v0(o,s,!0)),e.data.downcastDispatcher.on("insert:codeBlock",v0(o,s)),e.data.downcastDispatcher.on("insert:softBreak",(function(a){return(l,c,d)=>{if(c.item.parent.name!=="codeBlock")return;let{writer:u,mapper:h,consumable:m}=d;if(!m.consume(c.item,"insert"))return;let g=h.toViewPosition(a.createPositionBefore(c.item));u.insert(g,u.createText(`
8084
8084
  `))}})(o),{priority:"high"}),e.data.upcastDispatcher.on("element:code",(function(a,l){let c=td(l,"class","language"),d=l[0].language;return(u,h,m)=>{let g=h.viewItem,b=g.parent;if(!b||!b.is("element","pre")||h.modelCursor.findAncestor("codeBlock"))return;let{consumable:w,writer:A}=m;if(!w.test(g,{name:!0}))return;let S=A.createElement("codeBlock"),M=[...g.getClassNames()];M.length||M.push("");for(let F of M){let G=c[F];if(G){A.setAttribute("language",G,S);break}}S.hasAttribute("language")||A.setAttribute("language",d,S),m.convertChildren(g,S),m.safeInsert(S,h.modelCursor)&&(w.consume(g,{name:!0}),m.updateConversionResult(S,h))}})(0,s)),e.data.upcastDispatcher.on("text",((a,l,{consumable:c,writer:d})=>{let u=l.modelCursor;if(!c.test(l.viewItem)||!u.findAncestor("codeBlock"))return;c.consume(l.viewItem);let h=l.viewItem.data.split(`
8085
8085
  `).map((g=>d.createText(g))),m=h[h.length-1];for(let g of h)if(d.insert(g,u),u=u.getShiftedBy(g.offsetSize),g!==m){let b=d.createElement("softBreak");d.insert(b,u),u=d.createPositionAfter(b)}l.modelRange=d.createRange(l.modelCursor,u),l.modelCursor=u})),e.data.upcastDispatcher.on("element:pre",((a,l,{consumable:c})=>{let d=l.viewItem;if(d.findAncestor("pre"))return;let u=Array.from(d.getChildren()),h=u.find((m=>m.is("element","code")));if(h)for(let m of u)m!==h&&m.is("$text")&&c.consume(m,{name:!0})}),{priority:"high"}),this.listenTo(e.editing.view.document,"clipboardInput",((a,l)=>{let c=o.createRange(o.document.selection.anchor);if(l.targetRanges&&(c=e.editing.mapper.toModelRange(l.targetRanges[0])),!c.start.parent.is("element","codeBlock"))return;let d=l.dataTransfer.getData("text/plain"),u=new Jt(e.editing.view.document);l.content=(function(h,m){let g=h.createDocumentFragment(),b=m.split(`
8086
8086
  `),w=b.reduce(((A,S,M)=>(A.push(S),M<b.length-1&&A.push(h.createElement("br")),A)),[]);return h.appendChild(w,g),g})(u,d)})),this.listenTo(o,"getSelectedContent",((a,[l])=>{let c=l.anchor;!l.isCollapsed&&c.parent.is("element","codeBlock")&&c.hasSameParentAs(l.focus)&&o.change((d=>{let u=a.return;if(c.parent.is("element")&&(u.childCount>1||l.containsEntireContent(c.parent))){let m=d.createElement("codeBlock",c.parent.getAttributes());d.append(u,m);let g=d.createDocumentFragment();return d.append(m,g),void(a.return=g)}let h=u.getChild(0);t.checkAttribute(h,"code")&&d.setAttribute("code",!0,h)}))}))}afterInit(){let e=this.editor,t=e.commands,o=t.get("indent"),i=t.get("outdent");o&&o.registerChildCommand(t.get("indentCodeBlock"),{priority:"highest"}),i&&i.registerChildCommand(t.get("outdentCodeBlock")),this.listenTo(e.editing.view.document,"enter",((r,s)=>{e.model.document.selection.getLastPosition().parent.is("element","codeBlock")&&((function(a,l){let c=a.model,d=c.document,u=a.editing.view,h=d.selection.getLastPosition(),m=h.nodeAfter;return l||!d.selection.isCollapsed||!h.isAtStart||!ui(m)?!1:(a.model.change((g=>{a.execute("enter");let b=d.selection.anchor.parent.previousSibling;g.rename(b,y0),g.setSelection(b,"in"),a.model.schema.removeDisallowedAttributes([b],g),g.remove(m)})),u.scrollToTheSelection(),!0)})(e,s.isSoft)||(function(a,l){let c=a.model,d=c.document,u=a.editing.view,h=d.selection.getLastPosition(),m=h.nodeBefore,g;if(l||!d.selection.isCollapsed||!h.isAtEnd||!m||!m.previousSibling)return!1;if(ui(m)&&ui(m.previousSibling))g=c.createRange(c.createPositionBefore(m.previousSibling),c.createPositionAfter(m));else if(nd(m)&&ui(m.previousSibling)&&ui(m.previousSibling.previousSibling))g=c.createRange(c.createPositionBefore(m.previousSibling.previousSibling),c.createPositionAfter(m));else{if(!(nd(m)&&ui(m.previousSibling)&&nd(m.previousSibling.previousSibling)&&m.previousSibling.previousSibling&&ui(m.previousSibling.previousSibling.previousSibling)))return!1;g=c.createRange(c.createPositionBefore(m.previousSibling.previousSibling.previousSibling),c.createPositionAfter(m))}return a.model.change((b=>{b.remove(g),a.execute("enter");let w=d.selection.anchor.parent;b.rename(w,y0),a.model.schema.removeDisallowedAttributes([w],b)})),u.scrollToTheSelection(),!0})(e,s.isSoft)||(function(a){let l=a.model,c=l.document,d=c.selection.getLastPosition(),u=d.nodeBefore||d.textNode,h;u&&u.is("$text")&&(h=od(u)),a.model.change((m=>{a.execute("shiftEnter"),h&&m.insertText(h,c.selection.anchor)}))})(e),s.preventDefault(),r.stop())}),{context:"pre"})}}function nd(n){return n&&n.is("$text")&&!n.data.match(/\S/)}function ui(n){return n&&n.is("element","softBreak")}var x0=z(9085),bB={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};$()(x0.Z,bB),x0.Z.locals;class wB extends L{static get pluginName(){return"CodeBlockUI"}init(){let e=this.editor,t=e.t,o=e.ui.componentFactory,i=ed(e),r=this._getLanguageListItemDefinitions(i),s=e.commands.get("codeBlock");o.add("codeBlock",(a=>{let l=ot(a,Fn),c=l.buttonView,d=t("Insert code block");return c.set({label:d,tooltip:!0,icon:Y.codeBlock,isToggleable:!0}),c.bind("isOn").to(s,"value",(u=>!!u)),c.on("execute",(()=>{e.execute("codeBlock",{usePreviousLanguageChoice:!0}),e.editing.view.focus()})),l.on("execute",(u=>{e.execute("codeBlock",{language:u.source._codeBlockLanguage,forceValue:!0}),e.editing.view.focus()})),l.class="ck-code-block-dropdown",l.bind("isEnabled").to(s),vo(l,r,{role:"menu",ariaLabel:d}),l})),o.add("menuBar:codeBlock",(a=>{let l=new eo(a);l.buttonView.set({label:t("Code block"),icon:Y.codeBlock}),l.bind("isEnabled").to(s);let c=new Ko(a);c.set({ariaLabel:t("Insert code block")});for(let d of r){let u=new Go(a,l),h=new Pe(a);h.bind(...Object.keys(d.model)).to(d.model),h.bind("ariaChecked").to(h,"isOn"),h.delegate("execute").to(l),h.on("execute",(()=>{e.execute("codeBlock",{language:d.model._codeBlockLanguage,forceValue:s.value!=d.model._codeBlockLanguage}),e.editing.view.focus()})),u.children.add(h),c.items.add(u)}return l.panelView.children.add(c),l}))}_getLanguageListItemDefinitions(e){let t=this.editor.commands.get("codeBlock"),o=new Je;for(let i of e){let r={type:"button",model:new Wo({_codeBlockLanguage:i.language,label:i.label,role:"menuitemradio",withText:!0})};r.model.bind("isOn").to(t,"value",(s=>s===r.model._codeBlockLanguage)),o.add(r)}return o}}let _B=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(let{listStyle:n,typeAttribute:e,listType:t}of _B);var E0=z(7133),AB={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};$()(E0.Z,AB),E0.Z.locals;var D0=z(4553),CB={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};$()(D0.Z,CB),D0.Z.locals,mn("Ctrl+Enter");var T0=z(1588),vB={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};$()(T0.Z,vB),T0.Z.locals,mn("Ctrl+Enter");function yB(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Xi={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},xB=/[&<>"']/,EB=/[&<>"']/g,DB=/[<>"']|&(?!#?\w+;)/,TB=/[<>"']|&(?!#?\w+;)/g,SB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},S0=n=>SB[n];function Qe(n,e){if(e){if(xB.test(n))return n.replace(EB,S0)}else if(DB.test(n))return n.replace(TB,S0);return n}let IB=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function I0(n){return n.replace(IB,((e,t)=>(t=t.toLowerCase())==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}let BB=/(^|[^\[])\^/g;function Ee(n,e){n=n.source||n,e=e||"";let t={replace:(o,i)=>(i=(i=i.source||i).replace(BB,"$1"),n=n.replace(o,i),t),getRegex:()=>new RegExp(n,e)};return t}let MB=/[^\w:]/g,NB=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function B0(n,e,t){if(n){let o;try{o=decodeURIComponent(I0(t)).replace(MB,"").toLowerCase()}catch{return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}e&&!NB.test(t)&&(t=(function(o,i){la[" "+o]||(PB.test(o)?la[" "+o]=o+"/":la[" "+o]=da(o,"/",!0)),o=la[" "+o];let r=o.indexOf(":")===-1;return i.substring(0,2)==="//"?r?i:o.replace(LB,"$1")+i:i.charAt(0)==="/"?r?i:o.replace(zB,"$1")+i:o+i})(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}let la={},PB=/^[^:]+:\/*[^/]*$/,LB=/^([^:]+:)[\s\S]*$/,zB=/^([^:]+:\/*[^/]*)[\s\S]*$/,ca={exec:function(){}};function $t(n){let e,t,o=1;for(;o<arguments.length;o++)for(t in e=arguments[o],e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}function M0(n,e){let t=n.replace(/\|/g,((i,r,s)=>{let a=!1,l=r;for(;--l>=0&&s[l]==="\\";)a=!a;return a?"|":" |"})).split(/ \|/),o=0;if(t[0].trim()||t.shift(),t.length>0&&!t[t.length-1].trim()&&t.pop(),t.length>e)t.splice(e);else for(;t.length<e;)t.push("");for(;o<t.length;o++)t[o]=t[o].trim().replace(/\\\|/g,"|");return t}function da(n,e,t){let o=n.length;if(o===0)return"";let i=0;for(;i<o;){let r=n.charAt(o-i-1);if(r!==e||t){if(r===e||!t)break;i++}else i++}return n.substr(0,o-i)}function N0(n){n&&n.sanitize&&!n.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function P0(n,e){if(e<1)return"";let t="";for(;e>1;)1&e&&(t+=n),e>>=1,n+=n;return t+n}function L0(n,e,t,o){let i=e.href,r=e.title?Qe(e.title):null,s=n[1].replace(/\\([\[\]])/g,"$1");if(n[0].charAt(0)!=="!"){o.state.inLink=!0;let a={type:"link",raw:t,href:i,title:r,text:s,tokens:o.inlineTokens(s,[])};return o.state.inLink=!1,a}return{type:"image",raw:t,href:i,title:r,text:Qe(s)}}class rd{constructor(e){this.options=e||Xi}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let o=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?o:da(o,`
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as k}from"./NKMDS2IH.js";import{b as D}from"./YSXFXVP6.js";import"./F45Q3BRT.js";import{B as V,C as _,D as v,E as u,H as L,g as w,i as $,j as d}from"./OOBX2C2L.js";export default $arcgis.t(([{substitute:F}])=>{var N=w`:host{display:block;--arcgis-histogram-bar-color: var(--calcite-color-border-1);--arcgis-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:block;direction:ltr}.svg{display:block;width:100%;height:100%}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;function B(t,n,i,e,r){let[s,a]=r;if(!t||a===0||s===0||i==null||n==null)return null;let o=i-n,l=(t.length>1?t[t.length-1].maxValue-t[0].minValue:0)/o,[c,h]=e==="vertical"?[a*l,s]:[a,s*l],p=t?t.map(m=>m.count):[],g=Math.max(...p);return t.map(m=>{let[f,b]=e==="vertical"?[c/t.length,g!==0?m.count/g*h:0]:[g!==0?m.count/g*c:0,h/t.length],{maxValue:C}=m,y=i-C,[S,z]=e==="vertical"?[0,y*(a/o)]:[s-b-y*(s/o),a-f];return[S,z,b,f]})}function O(t,n,i,e,r){let s=[];return t!=null&&s.push({value:t,symbol:"x\u0304",lineClass:"average-data-line"}),n!=null&&i!=null&&e!=null&&s.push(...H(i,e,n,t)),r&&s.push(...r),s}function A(t,n,i,e,r){if(i==null)return[0,0,0,0];let s=Math.round((r-i)/e*100)/100,[a,o]=t;if(n==="vertical"){let c=o-s*o||1;return c=Math.round(c)+.5,[0,"100%",c,c]}let l=s*a||1;return l=Math.round(l)+.5,[l,l,"100%",0]}function P(t,n,i,e,r){if(i==null)return[0,0];let s=Math.round((r-i)/e*100)/100,[a,o]=t;return n==="vertical"?[a,o-s*o]:[0,s*a]}function T(t,n,i){if(!t||t.length===0)return null;if(I(t)){let e=t.map(r=>({...r,color:E(r.color??i)}));return e.unshift({color:n,minValue:Number.NEGATIVE_INFINITY,maxValue:e[0].minValue}),e.push({color:n,minValue:e[e.length-1].maxValue,maxValue:Number.POSITIVE_INFINITY}),e}else return t.map(e=>({...e,color:E(e.color??i)}))}function R(t,n,i,e){if(!t||t.length===0)return i;if(I(t)){let r=G(t,n);if(r.length===0)return i;if(e){let{color:s=i,weight:a}=r[0],{color:o=i,weight:l}=r[1]??r[0],c=a+l;return`color-mix(in srgb, ${s} ${a/c*100}%, ${o} ${l/c*100}%)`}return r[0].color??i}return Y(t,n)}function G(t,n){let i=[];for(let e of t){let r=Math.max(0,Math.min(n.maxValue,e.maxValue)-Math.max(n.minValue,e.minValue));r>0&&i.push({color:e.color,weight:r})}return i.sort((e,r)=>r.weight-e.weight)}function Y(t,n){let i=(n.maxValue-n.minValue)/2+n.minValue;if(i>t[t.length-1].value)return t[t.length-1].color;for(let e=0;e<t.length-1;e++){let r=t[e],s=t[e+1];if(i<=r.value)return r.color;if(i<s.value){let a=(i-r.value)/(s.value-r.value)*100;return`color-mix(in srgb, ${r.color}, ${s.color} ${a}%)`}}return t[t.length-1].color}function I(t){return t[0]!=null&&"minValue"in t[0]}function E(t){if(typeof t=="string")return t;if(Array.isArray(t))return`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]??1})`;let{r:n,g:i,b:e,a:r=1}=t;return`rgba(${n}, ${i}, ${e}, ${r})`}function H(t,n,i,e){let r=.06*(n-t);return U(i,e).filter(s=>Math.abs(e-s)>r).map((s,a,o)=>{let l=o.length/2,c=s>e?"+":"-",h=a>=l?a-l+1:l-a;return{symbol:`${c}${h===1?"":h}\u03C3`,value:s}})}function U(t,n){if(n==null||t==null)return[];let i=1,e=[];for(let r=i*-1;r<=i;r++)r!==0&&e.push(n+r*t);return e}var M="var(--arcgis-histogram-bar-color)",q="var(--arcgis-histogram-stop-color)",x=class extends V{constructor(){super(...arguments),this._messages=D(),this._normalizedStops=null,this._formatLabel=n=>k(this._messages._lang,this._numberFormatterOptions).format(n),this._numberFormatterOptions={maximumFractionDigits:2},this.containerDimensions=[0,0],this.icon="graph-histogram",this.layout="horizontal",this.colorBlendingEnabled=!1}static{this.properties={containerDimensions:16,colorStops:0,icon:3,average:11,messageOverrides:0,standardDeviation:11,bins:0,dataLines:0,label:1,layout:3,max:11,min:11,colorBlendingEnabled:5}}static{this.styles=N}loaded(){let n=new ResizeObserver(r=>{for(let s of r){let{width:a,height:o}=s.contentRect;this.containerDimensions=[a,o]}}),{width:i,height:e}=this.el.getBoundingClientRect();this.containerDimensions=[i,e],n.observe(this.el)}willUpdate(n){n.has("colorStops")&&(this._normalizedStops=T(this.colorStops,M,q))}render(){let{label:n}=this;return $`<div role=img .ariaLabel=${n??void 0} class="content">${this._renderContent()}</div>`}_renderContent(){let{containerDimensions:[n,i]}=this,e="bg-fill";return n?$`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${d`<defs><clipPath id=${e}><rect height=${i??u} width=${n??u} x=0 y=0 /></clipPath></defs><g style=${v({clipPath:`url(#${e})`})}><g>${this._renderBars()}</g></g><g>${this._renderLines()}</g>`}</svg>`:null}_renderBars(){let{bins:n,_messages:i}=this,e=B(this.bins,this.min,this.max,this.layout,this.containerDimensions);return!e||!n?null:e.map((r,s)=>{let[a,o,l,c]=r,h=n[s],p=i?.barLabel?F(i.barLabel,h):"";return d`<rect style=${v({fill:R(this._normalizedStops,h,M,this.colorBlendingEnabled)})} .ariaLabel=${p} data-index=${s??u} height=${c??u} role=img shape-rendering=crispEdges stroke-width=0 width=${l??u} x=${a??u} y=${o??u} />`})}_renderLines(){return O(this.average,this.standardDeviation,this.min,this.max,this.dataLines)?.map(n=>W({dataLine:n,containerDimensions:this.containerDimensions,layout:this.layout,min:this.min,max:this.max,labelFormatter:this._formatLabel}))}},W=t=>{let{containerDimensions:n,layout:i,min:e,max:r,dataLine:s,labelFormatter:a}=t,o=r!=null&&e!=null?r-e:0,[l,c,h,p]=A(n,i,e,o,s.value),[g,m]=P(n,i,e,o,s.value),f="symbol"in s?[d`<tspan class="data-line-symbol">${s.symbol}</tspan>`,d`<tspan>${a(s.value)}</tspan>`]:s.label,b="lineClass"in s&&s.lineClass?s.lineClass:"data-line";return d`<g><title>${s.value}</title><line class=${_(b)} shape-rendering=crispEdges x1=${l??u} x2=${c??u} y1=${h??u} y2=${p??u} /><text class="label" text-anchor=end transform=${(i==="horizontal"?"rotate(270)":void 0)??u} x=${g??u} y=${m-2}>${f}</text></g>`};L("arcgis-histogram",x);return x},"intl")
2
+ import{a as k}from"./NKMDS2IH.js";import{b as D}from"./SKYXMBD4.js";import"./F45Q3BRT.js";import{B as V,C as _,D as v,E as u,H as L,g as w,i as $,j as d}from"./OOBX2C2L.js";export default $arcgis.t(([{substitute:F}])=>{var N=w`:host{display:block;--arcgis-histogram-bar-color: var(--calcite-color-border-1);--arcgis-histogram-stop-color: color-mix(in srgb, var(--calcite-color-brand) 80%, transparent)}.content{display:block;direction:ltr}.svg{display:block;width:100%;height:100%}.data-line{stroke:#888;stroke-width:1px;shape-rendering:crispEdges}.average-data-line{stroke-width:1px;shape-rendering:crispEdges;stroke:#444}.label,.data-line-symbol{font-size:12px;stroke:#fff;stroke-width:2px;paint-order:stroke;unicode-bidi:plaintext}.data-line-symbol{font-family:"Georgia, serif",sans-serif;font-style:italic}`;function B(t,n,i,e,r){let[s,a]=r;if(!t||a===0||s===0||i==null||n==null)return null;let o=i-n,l=(t.length>1?t[t.length-1].maxValue-t[0].minValue:0)/o,[c,h]=e==="vertical"?[a*l,s]:[a,s*l],p=t?t.map(m=>m.count):[],g=Math.max(...p);return t.map(m=>{let[f,b]=e==="vertical"?[c/t.length,g!==0?m.count/g*h:0]:[g!==0?m.count/g*c:0,h/t.length],{maxValue:C}=m,y=i-C,[S,z]=e==="vertical"?[0,y*(a/o)]:[s-b-y*(s/o),a-f];return[S,z,b,f]})}function O(t,n,i,e,r){let s=[];return t!=null&&s.push({value:t,symbol:"x\u0304",lineClass:"average-data-line"}),n!=null&&i!=null&&e!=null&&s.push(...H(i,e,n,t)),r&&s.push(...r),s}function A(t,n,i,e,r){if(i==null)return[0,0,0,0];let s=Math.round((r-i)/e*100)/100,[a,o]=t;if(n==="vertical"){let c=o-s*o||1;return c=Math.round(c)+.5,[0,"100%",c,c]}let l=s*a||1;return l=Math.round(l)+.5,[l,l,"100%",0]}function P(t,n,i,e,r){if(i==null)return[0,0];let s=Math.round((r-i)/e*100)/100,[a,o]=t;return n==="vertical"?[a,o-s*o]:[0,s*a]}function T(t,n,i){if(!t||t.length===0)return null;if(I(t)){let e=t.map(r=>({...r,color:E(r.color??i)}));return e.unshift({color:n,minValue:Number.NEGATIVE_INFINITY,maxValue:e[0].minValue}),e.push({color:n,minValue:e[e.length-1].maxValue,maxValue:Number.POSITIVE_INFINITY}),e}else return t.map(e=>({...e,color:E(e.color??i)}))}function R(t,n,i,e){if(!t||t.length===0)return i;if(I(t)){let r=G(t,n);if(r.length===0)return i;if(e){let{color:s=i,weight:a}=r[0],{color:o=i,weight:l}=r[1]??r[0],c=a+l;return`color-mix(in srgb, ${s} ${a/c*100}%, ${o} ${l/c*100}%)`}return r[0].color??i}return Y(t,n)}function G(t,n){let i=[];for(let e of t){let r=Math.max(0,Math.min(n.maxValue,e.maxValue)-Math.max(n.minValue,e.minValue));r>0&&i.push({color:e.color,weight:r})}return i.sort((e,r)=>r.weight-e.weight)}function Y(t,n){let i=(n.maxValue-n.minValue)/2+n.minValue;if(i>t[t.length-1].value)return t[t.length-1].color;for(let e=0;e<t.length-1;e++){let r=t[e],s=t[e+1];if(i<=r.value)return r.color;if(i<s.value){let a=(i-r.value)/(s.value-r.value)*100;return`color-mix(in srgb, ${r.color}, ${s.color} ${a}%)`}}return t[t.length-1].color}function I(t){return t[0]!=null&&"minValue"in t[0]}function E(t){if(typeof t=="string")return t;if(Array.isArray(t))return`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${t[3]??1})`;let{r:n,g:i,b:e,a:r=1}=t;return`rgba(${n}, ${i}, ${e}, ${r})`}function H(t,n,i,e){let r=.06*(n-t);return U(i,e).filter(s=>Math.abs(e-s)>r).map((s,a,o)=>{let l=o.length/2,c=s>e?"+":"-",h=a>=l?a-l+1:l-a;return{symbol:`${c}${h===1?"":h}\u03C3`,value:s}})}function U(t,n){if(n==null||t==null)return[];let i=1,e=[];for(let r=i*-1;r<=i;r++)r!==0&&e.push(n+r*t);return e}var M="var(--arcgis-histogram-bar-color)",q="var(--arcgis-histogram-stop-color)",x=class extends V{constructor(){super(...arguments),this._messages=D(),this._normalizedStops=null,this._formatLabel=n=>k(this._messages._lang,this._numberFormatterOptions).format(n),this._numberFormatterOptions={maximumFractionDigits:2},this.containerDimensions=[0,0],this.icon="graph-histogram",this.layout="horizontal",this.colorBlendingEnabled=!1}static{this.properties={containerDimensions:16,colorStops:0,icon:3,average:11,messageOverrides:0,standardDeviation:11,bins:0,dataLines:0,label:1,layout:3,max:11,min:11,colorBlendingEnabled:5}}static{this.styles=N}loaded(){let n=new ResizeObserver(r=>{for(let s of r){let{width:a,height:o}=s.contentRect;this.containerDimensions=[a,o]}}),{width:i,height:e}=this.el.getBoundingClientRect();this.containerDimensions=[i,e],n.observe(this.el)}willUpdate(n){n.has("colorStops")&&(this._normalizedStops=T(this.colorStops,M,q))}render(){let{label:n}=this;return $`<div role=img .ariaLabel=${n??void 0} class="content">${this._renderContent()}</div>`}_renderContent(){let{containerDimensions:[n,i]}=this,e="bg-fill";return n?$`<svg class="svg" xmlns=http://www.w3.org/2000/svg>${d`<defs><clipPath id=${e}><rect height=${i??u} width=${n??u} x=0 y=0 /></clipPath></defs><g style=${v({clipPath:`url(#${e})`})}><g>${this._renderBars()}</g></g><g>${this._renderLines()}</g>`}</svg>`:null}_renderBars(){let{bins:n,_messages:i}=this,e=B(this.bins,this.min,this.max,this.layout,this.containerDimensions);return!e||!n?null:e.map((r,s)=>{let[a,o,l,c]=r,h=n[s],p=i?.barLabel?F(i.barLabel,h):"";return d`<rect style=${v({fill:R(this._normalizedStops,h,M,this.colorBlendingEnabled)})} .ariaLabel=${p} data-index=${s??u} height=${c??u} role=img shape-rendering=crispEdges stroke-width=0 width=${l??u} x=${a??u} y=${o??u} />`})}_renderLines(){return O(this.average,this.standardDeviation,this.min,this.max,this.dataLines)?.map(n=>W({dataLine:n,containerDimensions:this.containerDimensions,layout:this.layout,min:this.min,max:this.max,labelFormatter:this._formatLabel}))}},W=t=>{let{containerDimensions:n,layout:i,min:e,max:r,dataLine:s,labelFormatter:a}=t,o=r!=null&&e!=null?r-e:0,[l,c,h,p]=A(n,i,e,o,s.value),[g,m]=P(n,i,e,o,s.value),f="symbol"in s?[d`<tspan class="data-line-symbol">${s.symbol}</tspan>`,d`<tspan>${a(s.value)}</tspan>`]:s.label,b="lineClass"in s&&s.lineClass?s.lineClass:"data-line";return d`<g><title>${s.value}</title><line class=${_(b)} shape-rendering=crispEdges x1=${l??u} x2=${c??u} y1=${h??u} y2=${p??u} /><text class="label" text-anchor=end transform=${(i==="horizontal"?"rotate(270)":void 0)??u} x=${g??u} y=${m-2}>${f}</text></g>`};L("arcgis-histogram",x);return x},"intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{c as $,e as D,l as S,m as T}from"./4BJYJUMR.js";import{a as M,b as p,c as E}from"./WJ3TYWP2.js";import{b as A}from"./YSXFXVP6.js";import"./F45Q3BRT.js";import{a as z}from"./YG4PY2H3.js";import{A as x,B as C,H as _,g as R,i as q,m as N,n as F,q as I,z as B}from"./OOBX2C2L.js";export default $arcgis.t(([{formatDate:Z,convertDateFormatToIntlOptions:y,formatDateOnly:te,formatTimeOnly:ie,formatTimestamp:W,formatNumber:se},ne,{clone:L}])=>{function P(i){return new Date(`1970-01-01T${i}Z`).getTime()}function H(i){return new Date(`${i} 00:00:00`).getTime()}function ae(i,e,s){let t;return e==="unknown"?t=Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=Z(i,{...y("short-date-short-time"),timeZone:e}),t}function oe(i){return i?te(i,y("short-date")):""}function le(i){let e;return typeof i=="string"?e=ie(i,y("short-date-long-time")):e=Z(i,{...y("long-time"),timeZone:"utc"}),e}function re(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?W(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):W(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):Z(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function j(i,e,s){if(!$(i)&&!T(i)&&!S(i)&&!D(i))return;let t;return E(i,s).fields.forEach(l=>{let n=l.name,d="domain"in l?l.domain:void 0;if(!D(i)&&i.subtypeField===n){let m;S(i)||$(i)?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{T(i)&&i.subtypeCode!==r.code||(e.name===n&&(t=t||[],t.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(a=>{if(e.name===a){let o=r.domains[a];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push({code:u.code,name:u.name})})}}))})}if(e.name===n&&($(i)||D(i))){let m=$(i)?i.typeIdField:void 0,r=$(i)?i.types:void 0;$(i)&&m&&r?(m===n?t=r.map(a=>({code:a.id,name:a.name})):(t=t||[],r.forEach(a=>{if(!a.domains?.[n]||a.domains[n].type==="inherited"){let o=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push(L(u))})}else a.domains?.[n]?.codedValues&&a.domains[n].codedValues.forEach(o=>{let u=!1;t.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||t.push(L(o))})})),!t?.length&&d?.codedValues&&(t=L(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function U(i,e){let s=e;if(s){let t="";for(let l=0;l<s.length;l++){let n=s[l];n.code==i&&(t+=(t.length?" | ":"")+n.name)}return t.length||(t=`${i}`),t}return i}function G(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function J(i){switch(i.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"blob":case"geometry":case"global-id":case"guid":case"oid":case"raster":case"xml":return;default:return i.type}}var ue=R`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`,k=class extends C{constructor(){super(...arguments),this.dropdownNode=B(),this._messages=A({blocking:!0}),this._propWatcherTask=new M(this,{task:async([e,s,t])=>{let l=p(e)&&p(s)||p(t);if(!p(t)&&!p(e)&&!p(s)?N("error",this,F("uniqueValues")):p(t)||(p(e)||N("error",this,F("layer")),p(s)||N("error",this,F("fieldName"))),p(e)&&p(s)){let{visualizationSource:n}=this;if(!E(e,n).fields?.filter(d=>d.name===s))throw N("error",this,"Field could not be found."),new Error}if(!l)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=I(),this.arcgisSortByChange=I(),this.arcgisLoad=I()}static{this.properties={initialRender:16,view:0,layer:0,visualizationSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ue}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(p(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:t}=e;return{uniqueValues:s,partialUniqueValues:t}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,n=(e?E(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(p(this.uniqueValues))this.fieldInfo={layerField:n,fieldDomains:e&&n?j(e,n,l):void 0,simpleType:e&&n?J(n):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&n){this.fieldInfo={layerField:n,fieldDomains:j(e,n,l),simpleType:J(n),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ne({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=G(n),a=m.uniqueValueInfos.filter(o=>p(o.value)?n.type==="string"&&!r||n.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(G(n)||n.type,o.value!=="<Null>"&&o.value!==""):!1);a.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{a.find(u=>u.value===o.code)||a.push({value:o.code,count:0})}),d.uniqueValueInfos=a,d.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(m){if(N("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(d)){let r=[];d.fieldDomains.forEach(a=>{r.find(o=>o.value===a.code)||r.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:s}=this;this.listNode=e,s&&e?.setAttribute("style",`max-height: ${s||400}px`)}onSortMenuSelect(e){let s=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=s||void 0,this.arcgisSortByChange.emit(s||void 0)}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==s[t])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:t,multiple:l,initialRender:n,showFilterLength:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:a,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!a?.length)return"";let g=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,K=c?["date","date-only","time-only"].includes(c):!1,Q=v=>{v.sort((h,f)=>h.count<=f.count?1:-1)},X=v=>{let h=r?.length;v.sort((f,V)=>{if(!h&&g)return(typeof f.value=="string"?Number.parseFloat(f.value):f.value)-(typeof V.value=="string"?Number.parseFloat(V.value):V.value);{let w=h?U(f.value,r):f.label??f.value,b=h?U(V.value,r):V.label??V.value;return`${w}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${w}`.localeCompare(`${b}`)}})},Y=(v,h)=>{v.sort((f,V)=>{let w=h?.indexOf(f.value)??-1,b=h?.indexOf(V.value)??-1;return w===b||w>-1&&b>-1?0:w>b?-1:1})};X(a),!t||t==="count"?Q(a):t==="selected"&&Y(a,s);let ee=a.map(v=>this.renderUniqueValue(v)),O;return o&&!n&&(O=q`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),q`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${a.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${v=>{let h=v.target.selectedItems.map(f=>f.value);!r&&c==="date-only"?h=h?.map(f=>H(f)):!r&&c==="time-only"?h=h?.map(f=>P(f)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(f=>Number.parseInt(f)):c&&["single","double"].includes(c)&&(h=h?.map(f=>Number.parseFloat(f))),!this.isSameLists(h,this.selectedValues)&&(this.selectedValues=h,this.arcgisChange.emit(h))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${x(this.setListRef)}>${a.length>=d&&!n?this.renderSort(g,K):null}${ee}</calcite-list>${O}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return q`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${x(this.dropdownNode)}><calcite-action slot=trigger .label=${l.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t==="count"||!p(t)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:t,view:l,fieldInfo:n,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:a}=n,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?U(e.value,m):a==="date"?ae(e.value,o):a==="date-only"?oe(e.value):a==="time-only"?le(e.value):a==="timestamp-offset"?re(e.value,l):typeof e.value=="number"?se(e.value,d):e.label??e.value,c=s?a==="date-only"?s.includes(m?.length?e.value:H(e.value)):a==="time-only"?s.includes(m?.length?e.value:P(e.value)):s.includes(e.value):!1;return z(`list-item_${e.value}`,q`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${p(e.count)&&(r.length>200&&!t||r.length<=200)?q`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};_("arcgis-unique-values-list",k);return k},"intl","smartMapping/statistics/uniqueValues","core/lang")
2
+ import{c as $,e as D,l as S,m as T}from"./4BJYJUMR.js";import{a as M,b as p,c as E}from"./WJ3TYWP2.js";import{b as A}from"./SKYXMBD4.js";import"./F45Q3BRT.js";import{a as z}from"./YG4PY2H3.js";import{A as x,B as C,H as _,g as R,i as q,m as N,n as F,q as I,z as B}from"./OOBX2C2L.js";export default $arcgis.t(([{formatDate:Z,convertDateFormatToIntlOptions:y,formatDateOnly:te,formatTimeOnly:ie,formatTimestamp:W,formatNumber:se},ne,{clone:L}])=>{function P(i){return new Date(`1970-01-01T${i}Z`).getTime()}function H(i){return new Date(`${i} 00:00:00`).getTime()}function ae(i,e,s){let t;return e==="unknown"?t=Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):t=Z(i,{...y("short-date-short-time"),timeZone:e}),t}function oe(i){return i?te(i,y("short-date")):""}function le(i){let e;return typeof i=="string"?e=ie(i,y("short-date-long-time")):e=Z(i,{...y("long-time"),timeZone:"utc"}),e}function re(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?W(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):W(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?Z(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):Z(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function j(i,e,s){if(!$(i)&&!T(i)&&!S(i)&&!D(i))return;let t;return E(i,s).fields.forEach(l=>{let n=l.name,d="domain"in l?l.domain:void 0;if(!D(i)&&i.subtypeField===n){let m;S(i)||$(i)?m=i.subtypes:m=i.parent.subtypes,m.forEach(r=>{T(i)&&i.subtypeCode!==r.code||(e.name===n&&(t=t||[],t.push({code:r.code,name:r.name})),r.domains&&Object.keys(r.domains).forEach(a=>{if(e.name===a){let o=r.domains[a];o?.type==="coded-value"&&o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t=t||[],t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push({code:u.code,name:u.name})})}}))})}if(e.name===n&&($(i)||D(i))){let m=$(i)?i.typeIdField:void 0,r=$(i)?i.types:void 0;$(i)&&m&&r?(m===n?t=r.map(a=>({code:a.id,name:a.name})):(t=t||[],r.forEach(a=>{if(!a.domains?.[n]||a.domains[n].type==="inherited"){let o=d;o?.codedValues&&o.codedValues.forEach(u=>{let c=!1;t.forEach(g=>{g.code===u.code&&(c=!0,`| ${g.name} |`.includes(`| ${u.name} |`)||(g.name+=` | ${u.name}`))}),c||t.push(L(u))})}else a.domains?.[n]?.codedValues&&a.domains[n].codedValues.forEach(o=>{let u=!1;t.forEach(c=>{c.code===o.code&&(u=!0,`| ${c.name} |`.includes(`| ${o.name} |`)||(c.name+=` | ${o.name}`))}),u||t.push(L(o))})})),!t?.length&&d?.codedValues&&(t=L(d.codedValues))):d?.codedValues&&(t=d.codedValues)}}),t}function U(i,e){let s=e;if(s){let t="";for(let l=0;l<s.length;l++){let n=s[l];n.code==i&&(t+=(t.length?" | ":"")+n.name)}return t.length||(t=`${i}`),t}return i}function G(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function J(i){switch(i.type){case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"blob":case"geometry":case"global-id":case"guid":case"oid":case"raster":case"xml":return;default:return i.type}}var ue=R`:host{width:100%}.container{min-height:30px}.popover-unique-list{width:100%;overflow-y:auto}.unique-values-content-list-msg{font-size:75%;margin:5px}.count{padding:0 6px;font-size:smaller;white-space:nowrap}`,k=class extends C{constructor(){super(...arguments),this.dropdownNode=B(),this._messages=A({blocking:!0}),this._propWatcherTask=new M(this,{task:async([e,s,t])=>{let l=p(e)&&p(s)||p(t);if(!p(t)&&!p(e)&&!p(s)?N("error",this,F("uniqueValues")):p(t)||(p(e)||N("error",this,F("layer")),p(s)||N("error",this,F("fieldName"))),p(e)&&p(s)){let{visualizationSource:n}=this;if(!E(e,n).fields?.filter(d=>d.name===s))throw N("error",this,"Field could not be found."),new Error}if(!l)throw new Error;await this.processProps()},args:()=>[this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=I(),this.arcgisSortByChange=I(),this.arcgisLoad=I()}static{this.properties={initialRender:16,view:0,layer:0,visualizationSource:1,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ue}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(p(e?.uniqueValueInfos)){let{uniqueValueInfos:s,partialUniqueValues:t}=e;return{uniqueValues:s,partialUniqueValues:t}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:s,view:t,visualizationSource:l}=this,n=(e?E(e,l):void 0)?.fields?.filter(d=>d.name===s)?.[0];if(p(this.uniqueValues))this.fieldInfo={layerField:n,fieldDomains:e&&n?j(e,n,l):void 0,simpleType:e&&n?J(n):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&n){this.fieldInfo={layerField:n,fieldDomains:j(e,n,l),simpleType:J(n),partialUniqueValues:!1};let{fieldInfo:d}=this;try{let m=await ne({layer:e,view:t,field:s,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),r=G(n),a=m.uniqueValueInfos.filter(o=>p(o.value)?n.type==="string"&&!r||n.type==="guid"?o.value!=="<Null>"&&`${o.value}`.trim()!=="":(G(n)||n.type,o.value!=="<Null>"&&o.value!==""):!1);a.sort((o,u)=>o.count>u.count?-1:o.count<u.count?1:0),d.fieldDomains?.length&&d.fieldDomains.forEach(o=>{a.find(u=>u.value===o.code)||a.push({value:o.code,count:0})}),d.uniqueValueInfos=a,d.partialUniqueValues=m.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(m){if(N("error",this,`uniqueValues() - ${m.message}`),this.hasFieldDomains(d)){let r=[];d.fieldDomains.forEach(a=>{r.find(o=>o.value===a.code)||r.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:s}=this;this.listNode=e,s&&e?.setAttribute("style",`max-height: ${s||400}px`)}onSortMenuSelect(e){let s=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=s||void 0,this.arcgisSortByChange.emit(s||void 0)}isSameLists(e,s){if(!e&&!s)return!0;if(!e||!s||e?.length!==s?.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==s[t])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:s,sortBy:t,multiple:l,initialRender:n,showFilterLength:d,_messages:m}=this,{fieldDomains:r,uniqueValueInfos:a,partialUniqueValues:o,layerField:u}=e,c=u?.type;if(!a?.length)return"";let g=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,K=c?["date","date-only","time-only"].includes(c):!1,Q=v=>{v.sort((h,f)=>h.count<=f.count?1:-1)},X=v=>{let h=r?.length;v.sort((f,V)=>{if(!h&&g)return(typeof f.value=="string"?Number.parseFloat(f.value):f.value)-(typeof V.value=="string"?Number.parseFloat(V.value):V.value);{let w=h?U(f.value,r):f.label??f.value,b=h?U(V.value,r):V.label??V.value;return`${w}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${w}`.localeCompare(`${b}`)}})},Y=(v,h)=>{v.sort((f,V)=>{let w=h?.indexOf(f.value)??-1,b=h?.indexOf(V.value)??-1;return w===b||w>-1&&b>-1?0:w>b?-1:1})};X(a),!t||t==="count"?Q(a):t==="selected"&&Y(a,s);let ee=a.map(v=>this.renderUniqueValue(v)),O;return o&&!n&&(O=q`<div class="unique-values-content-list-msg">${m.errors.tooManyUniqueValues}</div>`),q`<div class="container"><calcite-list .label=${m.values} class="popover-unique-list" .filterEnabled=${a.length>=d} .selectionMode=${l?"multiple":"single"} .filterPlaceholder=${m.searchValues} @calciteListChange=${v=>{let h=v.target.selectedItems.map(f=>f.value);!r&&c==="date-only"?h=h?.map(f=>H(f)):!r&&c==="time-only"?h=h?.map(f=>P(f)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?h=h?.map(f=>Number.parseInt(f)):c&&["single","double"].includes(c)&&(h=h?.map(f=>Number.parseFloat(f))),!this.isSameLists(h,this.selectedValues)&&(this.selectedValues=h,this.arcgisChange.emit(h))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${x(this.setListRef)}>${a.length>=d&&!n?this.renderSort(g,K):null}${ee}</calcite-list>${O}</div>`},error:()=>""})}renderSort(e,s){let{sortBy:t,_messages:l}=this;return q`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${x(this.dropdownNode)}><calcite-action slot=trigger .label=${l.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${t==="count"||!p(t)} data-value=count>${l.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="name"} data-value=name>${e||s?l.sortAscending:l.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${t==="selected"} data-value=selected>${l.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:s,initialRender:t,view:l,fieldInfo:n,numberFormatOptions:d}=this,{fieldDomains:m,uniqueValueInfos:r,simpleType:a}=n,o=l&&"timeZone"in l&&l.timeZone||"system",u=m?.length?U(e.value,m):a==="date"?ae(e.value,o):a==="date-only"?oe(e.value):a==="time-only"?le(e.value):a==="timestamp-offset"?re(e.value,l):typeof e.value=="number"?se(e.value,d):e.label??e.value,c=s?a==="date-only"?s.includes(m?.length?e.value:H(e.value)):a==="time-only"?s.includes(m?.length?e.value:P(e.value)):s.includes(e.value):!1;return z(`list-item_${e.value}`,q`<calcite-list-item .label=${`${u}`} .value=${`${e.value}`} .selected=${c}>${p(e.count)&&(r.length>200&&!t||r.length<=200)?q`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};_("arcgis-unique-values-list",k);return k},"intl","smartMapping/statistics/uniqueValues","core/lang")