@arcgis/common-components 5.0.0-next.115 → 5.0.0-next.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{WP4NYD4W.js → 3ZLA4F26.js} +2 -2
- package/dist/cdn/{EXVLDYMU.js → 4MZZWZXV.js} +2 -2
- package/dist/cdn/{6Z4VQPIH.js → 6F46EKAV.js} +1 -1
- package/dist/cdn/{CZS5VBJT.js → AQYGP7P7.js} +2 -2
- package/dist/cdn/{ROQXOPAS.js → CWCUPQNZ.js} +2 -2
- package/dist/cdn/{P2ZVYGFG.js → DPO3J5IM.js} +2 -2
- package/dist/cdn/{2YW4NW5M.js → G46ZZRHA.js} +1 -1
- package/dist/cdn/{NPBOVHEX.js → GK5SOX6S.js} +2 -2
- package/dist/cdn/{LYJATIGZ.js → GODTU7XS.js} +2 -2
- package/dist/cdn/{XIDH7CJH.js → JDAVDYNR.js} +2 -2
- package/dist/cdn/{2WLWTNFV.js → JNIZNZWY.js} +2 -2
- package/dist/cdn/{PWGVH2GN.js → JXXHTYT5.js} +2 -2
- package/dist/cdn/{E4B7FUKJ.js → KJVFRRWP.js} +2 -2
- package/dist/cdn/{O53N24KV.js → KLH6QQLH.js} +2 -2
- package/dist/cdn/{HHSF5HC7.js → L5CKYMQ2.js} +1 -1
- package/dist/cdn/{TPDPEUIY.js → NJVOU7GQ.js} +2 -2
- package/dist/cdn/{EKBTNGNJ.js → NO3XDOEQ.js} +2 -2
- package/dist/cdn/{EZSZLYQ3.js → P7UM2CD6.js} +1 -1
- package/dist/cdn/{GLDBQ4C4.js → QBAZJTPF.js} +2 -2
- package/dist/cdn/{PXG2UWR7.js → TCAGZL35.js} +2 -2
- package/dist/cdn/{AOYTSY5V.js → XVG75NIN.js} +2 -2
- package/dist/cdn/{CO6TDXJI.js → YKAKGUKV.js} +2 -2
- package/dist/cdn/{5JPAEVBQ.js → ZTSOXL4L.js} +1 -1
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/commonEnums.js +1 -1
- package/dist/chunks/commonFunctions.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-ckeditor5/customElement.js +1 -1
- package/dist/components/arcgis-ckeditor5-popover/customElement.js +1 -1
- package/dist/components/arcgis-color-input/customElement.js +1 -1
- package/dist/components/arcgis-field-info/customElement.js +1 -1
- package/dist/components/arcgis-field-pick-list/customElement.js +1 -1
- package/dist/components/arcgis-histogram/customElement.js +1 -1
- package/dist/components/arcgis-label-input/customElement.js +1 -1
- package/dist/components/arcgis-picker-input/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color/customElement.js +1 -1
- package/dist/components/arcgis-ramp-color-break/customElement.js +1 -1
- package/dist/components/arcgis-ramp-opacity/customElement.js +1 -1
- package/dist/components/arcgis-slider/customElement.js +1 -1
- package/dist/components/arcgis-slider-input/customElement.js +1 -1
- package/dist/components/arcgis-ticks/customElement.js +1 -1
- package/dist/components/arcgis-unique-values-list/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as i}from"./
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
|
+
import{a as i}from"./ZTSOXL4L.js";import{a as u,b as m}from"./XVG75NIN.js";import{e as g}from"./6F46EKAV.js";import{A as a,B as d,C as e,E as p,H as h,g as n,i as l,q as s,t as c,z as o}from"./P7UM2CD6.js";var v=n`.arcgis-app-ckeditor-popover-footer{display:flex;justify-content:flex-end;margin-top:var(--calcite-space-sm);padding:0 var(--calcite-space-lg)}.arcgis-app-ckeditor-popover-container{margin:0 var(--calcite-space-md) 0 0;padding-bottom:var(--calcite-space-lg);box-shadow:val(--calcite-shadow-1)}`,r=class extends d{constructor(){super(),this.okButton=o(),this.popoverNode=o(),this._propWatcherTask=new u(this,{task:async([t])=>{if(!m(t)){console.error("[ckeditor5] Required properties are missing.");return}},args:()=>[this.refElement]}),this.guid=c(),this.intlOk="Ok",this.intlCancel="Cancel",this.arcgisCkeditor5PopoverClosed=s(),this.arcgisPopoverClosed=s(),this.listen("arcgisCreated",this.afterEditorCreated),this.listen("arcgisSourceEditingChanged",this.onSourceEditingStatusChanged)}static{this.properties={guid:0,refElement:0,intlOk:1,intlCancel:1,intlLabel:1}}static{this.styles=v}async reposition(){this.popoverNode.value?.reposition()}afterEditorCreated(t){this.editor=t.target,this.reposition(),this.requestUpdate()}onSourceEditingStatusChanged(t){this.okButton.value&&(this.okButton.value.disabled=t.detail)}render(){return this.el.classList.add("js-app-flyout"),this._propWatcherTask.render({complete:()=>l`<calcite-popover class=${e(i.popover)} dir=${g(this.el)??p} placement=leading-start open pointer-disabled .referenceElement=${this.refElement} .offsetDistance=${-Math.round(this.refElement.getBoundingClientRect().width)} offset-skidding=50 .label=${this.intlLabel??""} focus-trap-disabled trigger-disabled ${a(this.popoverNode)}><div class=${e(i.arcgisAppCkeditorPopoverContainer)}><slot></slot><div class=${e(i.arcgisAppCkeditorPopoverFooter)}><calcite-button .label=${this.intlOk} @click=${async t=>{this.okButton.value?.disabled||(t.stopPropagation(),this.arcgisCkeditor5PopoverClosed.emit({guid:this.guid,data:await this.editor?.getData()}),this.arcgisPopoverClosed.emit({guid:this.guid,data:await this.editor?.getData()}))}} ${a(this.okButton)}>${this.intlOk}</calcite-button><calcite-button appearance=outline-fill .label=${this.intlCancel} @click=${t=>{t.stopPropagation(),this.arcgisCkeditor5PopoverClosed.emit({guid:this.guid}),this.arcgisPopoverClosed.emit({guid:this.guid})}}>${this.intlCancel}</calcite-button></div></div></calcite-popover>`})}};h("arcgis-ckeditor5-popover",r);export{r as ArcgisCkeditor5Popover};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as tn}from"./5JPAEVBQ.js";import{a as m_}from"./2YW4NW5M.js";import{e as h_}from"./6Z4VQPIH.js";import{A as a_,B as l_,E as c_,H as d_,I as u_,g as i_,i as n_,q as hi,u as r_,z as s_}from"./EZSZLYQ3.js";var ha=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n4(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var ka={exports:{}};ka.exports;var g_;function r4(){return g_||(g_=1,(function(f,I){(function(E){let O=E.en=E.en||{};O.dictionary=Object.assign(O.dictionary||{},{"(may require <kbd>Fn</kbd>)":"(may require <kbd>Fn</kbd>)","%0 of %1":"%0 of %1",Accept:"Accept",Accessibility:"Accessibility","Accessibility help":"Accessibility help","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background","Below, you can find a list of keyboard shortcuts that can be used in the editor.":"Below, you can find a list of keyboard shortcuts that can be used in the editor.",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold","Bold text":"Bold text",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Cannot upload file:":"Cannot upload file:","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"Click to edit block",Close:"Close","Close contextual balloons, dropdowns, and dialogs":"Close contextual balloons, dropdowns, and dialogs",Code:"Code","Code block":"Code block",Color:"Color","Color picker":"Color picker",Column:"Column","Content editing keystrokes":"Content editing keystrokes","Copy selected content":"Copy selected content","Could not insert image at the current position.":"Could not insert image at the current position.","Could not obtain resized image URL.":"Could not obtain resized image URL.","Create link":"Create link",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent","Decrease list item indent":"Decrease list item indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"Drag to move","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor dialog":"Editor dialog","Editor editing area: %0":"Editor editing area: %0","Editor menu bar":"Editor menu bar","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.":"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height","Help Contents. To close this dialog press ESC.":"Help Contents. To close this dialog press ESC.",HEX:"HEX","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML object":"HTML object",Huge:"Huge","Image from computer":"Image from computer","Image or file":"Image or file","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Increase list item indent":"Increase list item indent",Insert:"Insert","Insert a hard break (a new paragraph)":"Insert a hard break (a new paragraph)","Insert a new paragraph directly after a widget":"Insert a new paragraph directly after a widget","Insert a new paragraph directly before a widget":"Insert a new paragraph directly before a widget","Insert a new table row (when in the last cell of a table)":"Insert a new table row (when in the last cell of a table)","Insert a soft break (a <code><br></code> element)":"Insert a soft break (a <code><br></code> element)","Insert code block":"Insert code block","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image or file":"Insert image or file","Insert image via URL":"Insert image via URL","Insert image with file manager":"Insert image with file manager","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table","Insert with file manager":"Insert with file manager","Inserting image failed":"Inserting image failed",Inset:"Inset","Invalid start index value.":"Invalid start index value.",Italic:"Italic","Italic text":"Italic text",Justify:"Justify","Justify cell text":"Justify cell text","Keystrokes that can be used in a list":"Keystrokes that can be used in a list","Keystrokes that can be used in a table cell":"Keystrokes that can be used in a table cell","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower\u2013roman":"Lower\u2013roman","Media URL":"Media URL","media widget":"media widget",MENU_BAR_MENU_EDIT:"Edit",MENU_BAR_MENU_FILE:"File",MENU_BAR_MENU_FONT:"Font",MENU_BAR_MENU_FORMAT:"Format",MENU_BAR_MENU_HELP:"Help",MENU_BAR_MENU_INSERT:"Insert",MENU_BAR_MENU_TEXT:"Text",MENU_BAR_MENU_TOOLS:"Tools",MENU_BAR_MENU_VIEW:"View","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells","Move focus between form fields (inputs, buttons, etc.)":"Move focus between form fields (inputs, buttons, etc.)","Move focus in and out of an active dialog window":"Move focus in and out of an active dialog window","Move focus to the menu bar, navigate between menu bars":"Move focus to the menu bar, navigate between menu bars","Move focus to the toolbar, navigate between toolbars":"Move focus to the toolbar, navigate between toolbars","Move out of a link":"Move out of a link","Move out of an inline code style":"Move out of an inline code style","Move the caret to allow typing directly after a widget":"Move the caret to allow typing directly after a widget","Move the caret to allow typing directly before a widget":"Move the caret to allow typing directly before a widget","Move the selection to the next cell":"Move the selection to the next cell","Move the selection to the previous cell":"Move the selection to the previous cell","Navigate through the table":"Navigate through the table","Navigate through the toolbar or menu bar":"Navigate through the toolbar or menu bar",Next:"Next","No results found":"No results found","No searchable items":"No searchable items",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab","Open media in new tab":"Open media in new tab","Open the accessibility help dialog":"Open the accessibility help dialog",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Paste content":"Paste content","Paste content as plain text":"Paste content as plain text","Paste the media URL in the input.":"Paste the media URL in the input.","Plain text":"Plain text","Press %0 for help.":"Press %0 for help.","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format","Replace from computer":"Replace from computer","Replace image":"Replace image","Replace image from computer":"Replace image from computer","Replace image with file manager":"Replace image with file manager","Replace with file manager":"Replace with file manager","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Revert autoformatting action":"Revert autoformatting action","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Selecting resized image failed":"Selecting resized image failed","Show more items":"Show more items","Show source":"Show source","Side image":"Side image",Small:"Small",Solid:"Solid",Source:"Source","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough","Strikethrough text":"Strikethrough text",Style:"Style",Subscript:"Subscript",Superscript:"Superscript",Table:"Table","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".',"The URL must not be empty.":"The URL must not be empty.",'The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"These keyboard shortcuts allow for quick access to content editing features.":"These keyboard shortcuts allow for quick access to content editing features.","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.",Tiny:"Tiny","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower\u2013latin list style":"Toggle the lower\u2013latin list style","Toggle the lower\u2013roman list style":"Toggle the lower\u2013roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper\u2013latin list style":"Toggle the upper\u2013latin list style","Toggle the upper\u2013roman list style":"Toggle the upper\u2013roman list style",Turquoise:"Turquoise",Underline:"Underline","Underline text":"Underline text",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"Upload from computer","Upload image from computer":"Upload image from computer","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.":"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.","User interface and content navigation keystrokes":"User interface and content navigation keystrokes","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),(function(E,O){f.exports=O()})(self,(()=>(()=>{var E,O,H={8168:(v,S,p)=>{let x=p(8874),D={};for(let k of Object.keys(x))D[x[k]]=k;let C={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};v.exports=C;for(let k of Object.keys(C)){if(!("channels"in C[k]))throw new Error("missing channels property: "+k);if(!("labels"in C[k]))throw new Error("missing channel labels property: "+k);if(C[k].labels.length!==C[k].channels)throw new Error("channel and label counts mismatch: "+k);let{channels:_,labels:B}=C[k];delete C[k].channels,delete C[k].labels,Object.defineProperty(C[k],"channels",{value:_}),Object.defineProperty(C[k],"labels",{value:B})}C.rgb.hsl=function(k){let _=k[0]/255,B=k[1]/255,N=k[2]/255,P=Math.min(_,B,N),V=Math.max(_,B,N),U=V-P,Z,Q;V===P?Z=0:_===V?Z=(B-N)/U:B===V?Z=2+(N-_)/U:N===V&&(Z=4+(_-B)/U),Z=Math.min(60*Z,360),Z<0&&(Z+=360);let se=(P+V)/2;return Q=V===P?0:se<=.5?U/(V+P):U/(2-V-P),[Z,100*Q,100*se]},C.rgb.hsv=function(k){let _,B,N,P,V,U=k[0]/255,Z=k[1]/255,Q=k[2]/255,se=Math.max(U,Z,Q),ge=se-Math.min(U,Z,Q),ie=function(he){return(se-he)/6/ge+.5};return ge===0?(P=0,V=0):(V=ge/se,_=ie(U),B=ie(Z),N=ie(Q),U===se?P=N-B:Z===se?P=.3333333333333333+_-N:Q===se&&(P=.6666666666666666+B-_),P<0?P+=1:P>1&&(P-=1)),[360*P,100*V,100*se]},C.rgb.hwb=function(k){let _=k[0],B=k[1],N=k[2],P=C.rgb.hsl(k)[0],V=1/255*Math.min(_,Math.min(B,N));return N=1-.00392156862745098*Math.max(_,Math.max(B,N)),[P,100*V,100*N]},C.rgb.cmyk=function(k){let _=k[0]/255,B=k[1]/255,N=k[2]/255,P=Math.min(1-_,1-B,1-N);return[100*((1-_-P)/(1-P)||0),100*((1-B-P)/(1-P)||0),100*((1-N-P)/(1-P)||0),100*P]},C.rgb.keyword=function(k){let _=D[k];if(_)return _;let B,N=1/0;for(let U of Object.keys(x)){let Z=x[U],Q=(V=Z,((P=k)[0]-V[0])**2+(P[1]-V[1])**2+(P[2]-V[2])**2);Q<N&&(N=Q,B=U)}var P,V;return B},C.keyword.rgb=function(k){return x[k]},C.rgb.xyz=function(k){let _=k[0]/255,B=k[1]/255,N=k[2]/255;return _=_>.04045?((_+.055)/1.055)**2.4:_/12.92,B=B>.04045?((B+.055)/1.055)**2.4:B/12.92,N=N>.04045?((N+.055)/1.055)**2.4:N/12.92,[100*(.4124*_+.3576*B+.1805*N),100*(.2126*_+.7152*B+.0722*N),100*(.0193*_+.1192*B+.9505*N)]},C.rgb.lab=function(k){let _=C.rgb.xyz(k),B=_[0],N=_[1],P=_[2];return B/=95.047,N/=100,P/=108.883,B=B>.008856?B**.3333333333333333:7.787*B+.13793103448275862,N=N>.008856?N**.3333333333333333:7.787*N+.13793103448275862,P=P>.008856?P**.3333333333333333:7.787*P+.13793103448275862,[116*N-16,500*(B-N),200*(N-P)]},C.hsl.rgb=function(k){let _=k[0]/360,B=k[1]/100,N=k[2]/100,P,V,U;if(B===0)return U=255*N,[U,U,U];P=N<.5?N*(1+B):N+B-N*B;let Z=2*N-P,Q=[0,0,0];for(let se=0;se<3;se++)V=_+.3333333333333333*-(se-1),V<0&&V++,V>1&&V--,U=6*V<1?Z+6*(P-Z)*V:2*V<1?P:3*V<2?Z+(P-Z)*(.6666666666666666-V)*6:Z,Q[se]=255*U;return Q},C.hsl.hsv=function(k){let _=k[0],B=k[1]/100,N=k[2]/100,P=B,V=Math.max(N,.01);return N*=2,B*=N<=1?N:2-N,P*=V<=1?V:2-V,[_,100*(N===0?2*P/(V+P):2*B/(N+B)),100*((N+B)/2)]},C.hsv.rgb=function(k){let _=k[0]/60,B=k[1]/100,N=k[2]/100,P=Math.floor(_)%6,V=_-Math.floor(_),U=255*N*(1-B),Z=255*N*(1-B*V),Q=255*N*(1-B*(1-V));switch(N*=255,P){case 0:return[N,Q,U];case 1:return[Z,N,U];case 2:return[U,N,Q];case 3:return[U,Z,N];case 4:return[Q,U,N];case 5:return[N,U,Z]}},C.hsv.hsl=function(k){let _=k[0],B=k[1]/100,N=k[2]/100,P=Math.max(N,.01),V,U;U=(2-B)*N;let Z=(2-B)*P;return V=B*P,V/=Z<=1?Z:2-Z,V=V||0,U/=2,[_,100*V,100*U]},C.hwb.rgb=function(k){let _=k[0]/360,B=k[1]/100,N=k[2]/100,P=B+N,V;P>1&&(B/=P,N/=P);let U=Math.floor(6*_),Z=1-N;V=6*_-U,1&U&&(V=1-V);let Q=B+V*(Z-B),se,ge,ie;switch(U){default:case 6:case 0:se=Z,ge=Q,ie=B;break;case 1:se=Q,ge=Z,ie=B;break;case 2:se=B,ge=Z,ie=Q;break;case 3:se=B,ge=Q,ie=Z;break;case 4:se=Q,ge=B,ie=Z;break;case 5:se=Z,ge=B,ie=Q}return[255*se,255*ge,255*ie]},C.cmyk.rgb=function(k){let _=k[0]/100,B=k[1]/100,N=k[2]/100,P=k[3]/100;return[255*(1-Math.min(1,_*(1-P)+P)),255*(1-Math.min(1,B*(1-P)+P)),255*(1-Math.min(1,N*(1-P)+P))]},C.xyz.rgb=function(k){let _=k[0]/100,B=k[1]/100,N=k[2]/100,P,V,U;return P=3.2406*_+-1.5372*B+-.4986*N,V=-.9689*_+1.8758*B+.0415*N,U=.0557*_+-.204*B+1.057*N,P=P>.0031308?1.055*P**.4166666666666667-.055:12.92*P,V=V>.0031308?1.055*V**.4166666666666667-.055:12.92*V,U=U>.0031308?1.055*U**.4166666666666667-.055:12.92*U,P=Math.min(Math.max(0,P),1),V=Math.min(Math.max(0,V),1),U=Math.min(Math.max(0,U),1),[255*P,255*V,255*U]},C.xyz.lab=function(k){let _=k[0],B=k[1],N=k[2];return _/=95.047,B/=100,N/=108.883,_=_>.008856?_**.3333333333333333:7.787*_+.13793103448275862,B=B>.008856?B**.3333333333333333:7.787*B+.13793103448275862,N=N>.008856?N**.3333333333333333:7.787*N+.13793103448275862,[116*B-16,500*(_-B),200*(B-N)]},C.lab.xyz=function(k){let _,B,N;B=(k[0]+16)/116,_=k[1]/500+B,N=B-k[2]/200;let P=B**3,V=_**3,U=N**3;return B=P>.008856?P:(B-.13793103448275862)/7.787,_=V>.008856?V:(_-.13793103448275862)/7.787,N=U>.008856?U:(N-.13793103448275862)/7.787,_*=95.047,B*=100,N*=108.883,[_,B,N]},C.lab.lch=function(k){let _=k[0],B=k[1],N=k[2],P;return P=360*Math.atan2(N,B)/2/Math.PI,P<0&&(P+=360),[_,Math.sqrt(B*B+N*N),P]},C.lch.lab=function(k){let _=k[0],B=k[1],N=k[2]/360*2*Math.PI;return[_,B*Math.cos(N),B*Math.sin(N)]},C.rgb.ansi16=function(k,_=null){let[B,N,P]=k,V=_===null?C.rgb.hsv(k)[2]:_;if(V=Math.round(V/50),V===0)return 30;let U=30+(Math.round(P/255)<<2|Math.round(N/255)<<1|Math.round(B/255));return V===2&&(U+=60),U},C.hsv.ansi16=function(k){return C.rgb.ansi16(C.hsv.rgb(k),k[2])},C.rgb.ansi256=function(k){let _=k[0],B=k[1],N=k[2];return _===B&&B===N?_<8?16:_>248?231:Math.round((_-8)/247*24)+232:16+36*Math.round(_/255*5)+6*Math.round(B/255*5)+Math.round(N/255*5)},C.ansi16.rgb=function(k){let _=k%10;if(_===0||_===7)return k>50&&(_+=3.5),_=_/10.5*255,[_,_,_];let B=.5*(1+~~(k>50));return[(1&_)*B*255,(_>>1&1)*B*255,(_>>2&1)*B*255]},C.ansi256.rgb=function(k){if(k>=232){let B=10*(k-232)+8;return[B,B,B]}let _;return k-=16,[Math.floor(k/36)/5*255,Math.floor((_=k%36)/6)/5*255,_%6/5*255]},C.rgb.hex=function(k){let _=(((255&Math.round(k[0]))<<16)+((255&Math.round(k[1]))<<8)+(255&Math.round(k[2]))).toString(16).toUpperCase();return"000000".substring(_.length)+_},C.hex.rgb=function(k){let _=k.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!_)return[0,0,0];let B=_[0];_[0].length===3&&(B=B.split("").map((P=>P+P)).join(""));let N=parseInt(B,16);return[N>>16&255,N>>8&255,255&N]},C.rgb.hcg=function(k){let _=k[0]/255,B=k[1]/255,N=k[2]/255,P=Math.max(Math.max(_,B),N),V=Math.min(Math.min(_,B),N),U=P-V,Z,Q;return Z=U<1?V/(1-U):0,Q=U<=0?0:P===_?(B-N)/U%6:P===B?2+(N-_)/U:4+(_-B)/U,Q/=6,Q%=1,[360*Q,100*U,100*Z]},C.hsl.hcg=function(k){let _=k[1]/100,B=k[2]/100,N=B<.5?2*_*B:2*_*(1-B),P=0;return N<1&&(P=(B-.5*N)/(1-N)),[k[0],100*N,100*P]},C.hsv.hcg=function(k){let _=k[1]/100,B=k[2]/100,N=_*B,P=0;return N<1&&(P=(B-N)/(1-N)),[k[0],100*N,100*P]},C.hcg.rgb=function(k){let _=k[0]/360,B=k[1]/100,N=k[2]/100;if(B===0)return[255*N,255*N,255*N];let P=[0,0,0],V=_%1*6,U=V%1,Z=1-U,Q=0;switch(Math.floor(V)){case 0:P[0]=1,P[1]=U,P[2]=0;break;case 1:P[0]=Z,P[1]=1,P[2]=0;break;case 2:P[0]=0,P[1]=1,P[2]=U;break;case 3:P[0]=0,P[1]=Z,P[2]=1;break;case 4:P[0]=U,P[1]=0,P[2]=1;break;default:P[0]=1,P[1]=0,P[2]=Z}return Q=(1-B)*N,[255*(B*P[0]+Q),255*(B*P[1]+Q),255*(B*P[2]+Q)]},C.hcg.hsv=function(k){let _=k[1]/100,B=_+k[2]/100*(1-_),N=0;return B>0&&(N=_/B),[k[0],100*N,100*B]},C.hcg.hsl=function(k){let _=k[1]/100,B=k[2]/100*(1-_)+.5*_,N=0;return B>0&&B<.5?N=_/(2*B):B>=.5&&B<1&&(N=_/(2*(1-B))),[k[0],100*N,100*B]},C.hcg.hwb=function(k){let _=k[1]/100,B=_+k[2]/100*(1-_);return[k[0],100*(B-_),100*(1-B)]},C.hwb.hcg=function(k){let _=k[1]/100,B=1-k[2]/100,N=B-_,P=0;return N<1&&(P=(B-N)/(1-N)),[k[0],100*N,100*P]},C.apple.rgb=function(k){return[k[0]/65535*255,k[1]/65535*255,k[2]/65535*255]},C.rgb.apple=function(k){return[k[0]/255*65535,k[1]/255*65535,k[2]/255*65535]},C.gray.rgb=function(k){return[k[0]/100*255,k[0]/100*255,k[0]/100*255]},C.gray.hsl=function(k){return[0,0,k[0]]},C.gray.hsv=C.gray.hsl,C.gray.hwb=function(k){return[0,100,k[0]]},C.gray.cmyk=function(k){return[0,0,0,k[0]]},C.gray.lab=function(k){return[k[0],0,0]},C.gray.hex=function(k){let _=255&Math.round(k[0]/100*255),B=((_<<16)+(_<<8)+_).toString(16).toUpperCase();return"000000".substring(B.length)+B},C.rgb.gray=function(k){return[(k[0]+k[1]+k[2])/3/255*100]}},2085:(v,S,p)=>{let x=p(8168),D=p(4111),C={};Object.keys(x).forEach((k=>{C[k]={},Object.defineProperty(C[k],"channels",{value:x[k].channels}),Object.defineProperty(C[k],"labels",{value:x[k].labels});let _=D(k);Object.keys(_).forEach((B=>{let N=_[B];C[k][B]=(function(P){let V=function(...U){let Z=U[0];if(Z==null)return Z;Z.length>1&&(U=Z);let Q=P(U);if(typeof Q=="object")for(let se=Q.length,ge=0;ge<se;ge++)Q[ge]=Math.round(Q[ge]);return Q};return"conversion"in P&&(V.conversion=P.conversion),V})(N),C[k][B].raw=(function(P){let V=function(...U){let Z=U[0];return Z==null?Z:(Z.length>1&&(U=Z),P(U))};return"conversion"in P&&(V.conversion=P.conversion),V})(N)}))})),v.exports=C},4111:(v,S,p)=>{let x=p(8168);function D(_){let B=(function(){let P={},V=Object.keys(x);for(let U=V.length,Z=0;Z<U;Z++)P[V[Z]]={distance:-1,parent:null};return P})(),N=[_];for(B[_].distance=0;N.length;){let P=N.pop(),V=Object.keys(x[P]);for(let U=V.length,Z=0;Z<U;Z++){let Q=V[Z],se=B[Q];se.distance===-1&&(se.distance=B[P].distance+1,se.parent=P,N.unshift(Q))}}return B}function C(_,B){return function(N){return B(_(N))}}function k(_,B){let N=[B[_].parent,_],P=x[B[_].parent][_],V=B[_].parent;for(;B[V].parent;)N.unshift(B[V].parent),P=C(x[B[V].parent][V],P),V=B[V].parent;return P.conversion=N,P}v.exports=function(_){let B=D(_),N={},P=Object.keys(B);for(let V=P.length,U=0;U<V;U++){let Z=P[U];B[Z].parent!==null&&(N[Z]=k(Z,B))}return N}},8874:v=>{v.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},8180:(v,S,p)=>{p.d(S,{Z:()=>_});var x=p(4015),D=p.n(x),C=p(3645),k=p.n(C)()(D());k.push([v.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CAEvC,iBAAkB,CADlB,aAED,CAEA,0CACC,kCACD",sourcesContent:[`/*
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
|
+
import{a as tn}from"./ZTSOXL4L.js";import{a as m_}from"./G46ZZRHA.js";import{e as h_}from"./6F46EKAV.js";import{A as a_,B as l_,E as c_,H as d_,I as u_,g as i_,i as n_,q as hi,u as r_,z as s_}from"./P7UM2CD6.js";var ha=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function n4(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var ka={exports:{}};ka.exports;var g_;function r4(){return g_||(g_=1,(function(f,I){(function(E){let O=E.en=E.en||{};O.dictionary=Object.assign(O.dictionary||{},{"(may require <kbd>Fn</kbd>)":"(may require <kbd>Fn</kbd>)","%0 of %1":"%0 of %1",Accept:"Accept",Accessibility:"Accessibility","Accessibility help":"Accessibility help","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align center":"Align center","Align left":"Align left","Align right":"Align right","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background","Below, you can find a list of keyboard shortcuts that can be used in the editor.":"Below, you can find a list of keyboard shortcuts that can be used in the editor.",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold","Bold text":"Bold text",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Cannot upload file:":"Cannot upload file:","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Clear:"Clear","Click to edit block":"Click to edit block",Close:"Close","Close contextual balloons, dropdowns, and dialogs":"Close contextual balloons, dropdowns, and dialogs",Code:"Code","Code block":"Code block",Color:"Color","Color picker":"Color picker",Column:"Column","Content editing keystrokes":"Content editing keystrokes","Copy selected content":"Copy selected content","Could not insert image at the current position.":"Could not insert image at the current position.","Could not obtain resized image URL.":"Could not obtain resized image URL.","Create link":"Create link",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent","Decrease list item indent":"Decrease list item indent",Default:"Default","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc","Document colors":"Document colors",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Drag to move":"Drag to move","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor dialog":"Editor dialog","Editor editing area: %0":"Editor editing area: %0","Editor menu bar":"Editor menu bar","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.":"Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.","Font Background Color":"Font Background Color","Font Color":"Font Color","Font Family":"Font Family","Font Size":"Font Size","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height","Help Contents. To close this dialog press ESC.":"Help Contents. To close this dialog press ESC.",HEX:"HEX","Horizontal line":"Horizontal line","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","HTML object":"HTML object",Huge:"Huge","Image from computer":"Image from computer","Image or file":"Image or file","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent","Increase list item indent":"Increase list item indent",Insert:"Insert","Insert a hard break (a new paragraph)":"Insert a hard break (a new paragraph)","Insert a new paragraph directly after a widget":"Insert a new paragraph directly after a widget","Insert a new paragraph directly before a widget":"Insert a new paragraph directly before a widget","Insert a new table row (when in the last cell of a table)":"Insert a new table row (when in the last cell of a table)","Insert a soft break (a <code><br></code> element)":"Insert a soft break (a <code><br></code> element)","Insert code block":"Insert code block","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image or file":"Insert image or file","Insert image via URL":"Insert image via URL","Insert image with file manager":"Insert image with file manager","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table","Insert with file manager":"Insert with file manager","Inserting image failed":"Inserting image failed",Inset:"Inset","Invalid start index value.":"Invalid start index value.",Italic:"Italic","Italic text":"Italic text",Justify:"Justify","Justify cell text":"Justify cell text","Keystrokes that can be used in a list":"Keystrokes that can be used in a list","Keystrokes that can be used in a table cell":"Keystrokes that can be used in a table cell","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"Keystrokes that can be used when a widget is selected (for example: image, table, etc.)","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower\u2013roman":"Lower\u2013roman","Media URL":"Media URL","media widget":"media widget",MENU_BAR_MENU_EDIT:"Edit",MENU_BAR_MENU_FILE:"File",MENU_BAR_MENU_FONT:"Font",MENU_BAR_MENU_FORMAT:"Format",MENU_BAR_MENU_HELP:"Help",MENU_BAR_MENU_INSERT:"Insert",MENU_BAR_MENU_TEXT:"Text",MENU_BAR_MENU_TOOLS:"Tools",MENU_BAR_MENU_VIEW:"View","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells","Move focus between form fields (inputs, buttons, etc.)":"Move focus between form fields (inputs, buttons, etc.)","Move focus in and out of an active dialog window":"Move focus in and out of an active dialog window","Move focus to the menu bar, navigate between menu bars":"Move focus to the menu bar, navigate between menu bars","Move focus to the toolbar, navigate between toolbars":"Move focus to the toolbar, navigate between toolbars","Move out of a link":"Move out of a link","Move out of an inline code style":"Move out of an inline code style","Move the caret to allow typing directly after a widget":"Move the caret to allow typing directly after a widget","Move the caret to allow typing directly before a widget":"Move the caret to allow typing directly before a widget","Move the selection to the next cell":"Move the selection to the next cell","Move the selection to the previous cell":"Move the selection to the previous cell","Navigate through the table":"Navigate through the table","Navigate through the toolbar or menu bar":"Navigate through the toolbar or menu bar",Next:"Next","No results found":"No results found","No searchable items":"No searchable items",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab","Open media in new tab":"Open media in new tab","Open the accessibility help dialog":"Open the accessibility help dialog",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Paste content":"Paste content","Paste content as plain text":"Paste content as plain text","Paste the media URL in the input.":"Paste the media URL in the input.","Plain text":"Plain text","Press %0 for help.":"Press %0 for help.","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Remove Format":"Remove Format","Replace from computer":"Replace from computer","Replace image":"Replace image","Replace image from computer":"Replace image from computer","Replace image with file manager":"Replace image with file manager","Replace with file manager":"Replace with file manager","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Revert autoformatting action":"Revert autoformatting action","Rich Text Editor":"Rich Text Editor",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Selecting resized image failed":"Selecting resized image failed","Show more items":"Show more items","Show source":"Show source","Side image":"Side image",Small:"Small",Solid:"Solid",Source:"Source","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough","Strikethrough text":"Strikethrough text",Style:"Style",Subscript:"Subscript",Superscript:"Superscript",Table:"Table","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".',"The URL must not be empty.":"The URL must not be empty.",'The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"These keyboard shortcuts allow for quick access to content editing features.":"These keyboard shortcuts allow for quick access to content editing features.","This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.",Tiny:"Tiny","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower\u2013latin list style":"Toggle the lower\u2013latin list style","Toggle the lower\u2013roman list style":"Toggle the lower\u2013roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper\u2013latin list style":"Toggle the upper\u2013latin list style","Toggle the upper\u2013roman list style":"Toggle the upper\u2013roman list style",Turquoise:"Turquoise",Underline:"Underline","Underline text":"Underline text",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload from computer":"Upload from computer","Upload image from computer":"Upload image from computer","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.":"Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.","User interface and content navigation keystrokes":"User interface and content navigation keystrokes","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),(function(E,O){f.exports=O()})(self,(()=>(()=>{var E,O,H={8168:(v,S,p)=>{let x=p(8874),D={};for(let k of Object.keys(x))D[x[k]]=k;let C={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};v.exports=C;for(let k of Object.keys(C)){if(!("channels"in C[k]))throw new Error("missing channels property: "+k);if(!("labels"in C[k]))throw new Error("missing channel labels property: "+k);if(C[k].labels.length!==C[k].channels)throw new Error("channel and label counts mismatch: "+k);let{channels:_,labels:B}=C[k];delete C[k].channels,delete C[k].labels,Object.defineProperty(C[k],"channels",{value:_}),Object.defineProperty(C[k],"labels",{value:B})}C.rgb.hsl=function(k){let _=k[0]/255,B=k[1]/255,N=k[2]/255,P=Math.min(_,B,N),V=Math.max(_,B,N),U=V-P,Z,Q;V===P?Z=0:_===V?Z=(B-N)/U:B===V?Z=2+(N-_)/U:N===V&&(Z=4+(_-B)/U),Z=Math.min(60*Z,360),Z<0&&(Z+=360);let se=(P+V)/2;return Q=V===P?0:se<=.5?U/(V+P):U/(2-V-P),[Z,100*Q,100*se]},C.rgb.hsv=function(k){let _,B,N,P,V,U=k[0]/255,Z=k[1]/255,Q=k[2]/255,se=Math.max(U,Z,Q),ge=se-Math.min(U,Z,Q),ie=function(he){return(se-he)/6/ge+.5};return ge===0?(P=0,V=0):(V=ge/se,_=ie(U),B=ie(Z),N=ie(Q),U===se?P=N-B:Z===se?P=.3333333333333333+_-N:Q===se&&(P=.6666666666666666+B-_),P<0?P+=1:P>1&&(P-=1)),[360*P,100*V,100*se]},C.rgb.hwb=function(k){let _=k[0],B=k[1],N=k[2],P=C.rgb.hsl(k)[0],V=1/255*Math.min(_,Math.min(B,N));return N=1-.00392156862745098*Math.max(_,Math.max(B,N)),[P,100*V,100*N]},C.rgb.cmyk=function(k){let _=k[0]/255,B=k[1]/255,N=k[2]/255,P=Math.min(1-_,1-B,1-N);return[100*((1-_-P)/(1-P)||0),100*((1-B-P)/(1-P)||0),100*((1-N-P)/(1-P)||0),100*P]},C.rgb.keyword=function(k){let _=D[k];if(_)return _;let B,N=1/0;for(let U of Object.keys(x)){let Z=x[U],Q=(V=Z,((P=k)[0]-V[0])**2+(P[1]-V[1])**2+(P[2]-V[2])**2);Q<N&&(N=Q,B=U)}var P,V;return B},C.keyword.rgb=function(k){return x[k]},C.rgb.xyz=function(k){let _=k[0]/255,B=k[1]/255,N=k[2]/255;return _=_>.04045?((_+.055)/1.055)**2.4:_/12.92,B=B>.04045?((B+.055)/1.055)**2.4:B/12.92,N=N>.04045?((N+.055)/1.055)**2.4:N/12.92,[100*(.4124*_+.3576*B+.1805*N),100*(.2126*_+.7152*B+.0722*N),100*(.0193*_+.1192*B+.9505*N)]},C.rgb.lab=function(k){let _=C.rgb.xyz(k),B=_[0],N=_[1],P=_[2];return B/=95.047,N/=100,P/=108.883,B=B>.008856?B**.3333333333333333:7.787*B+.13793103448275862,N=N>.008856?N**.3333333333333333:7.787*N+.13793103448275862,P=P>.008856?P**.3333333333333333:7.787*P+.13793103448275862,[116*N-16,500*(B-N),200*(N-P)]},C.hsl.rgb=function(k){let _=k[0]/360,B=k[1]/100,N=k[2]/100,P,V,U;if(B===0)return U=255*N,[U,U,U];P=N<.5?N*(1+B):N+B-N*B;let Z=2*N-P,Q=[0,0,0];for(let se=0;se<3;se++)V=_+.3333333333333333*-(se-1),V<0&&V++,V>1&&V--,U=6*V<1?Z+6*(P-Z)*V:2*V<1?P:3*V<2?Z+(P-Z)*(.6666666666666666-V)*6:Z,Q[se]=255*U;return Q},C.hsl.hsv=function(k){let _=k[0],B=k[1]/100,N=k[2]/100,P=B,V=Math.max(N,.01);return N*=2,B*=N<=1?N:2-N,P*=V<=1?V:2-V,[_,100*(N===0?2*P/(V+P):2*B/(N+B)),100*((N+B)/2)]},C.hsv.rgb=function(k){let _=k[0]/60,B=k[1]/100,N=k[2]/100,P=Math.floor(_)%6,V=_-Math.floor(_),U=255*N*(1-B),Z=255*N*(1-B*V),Q=255*N*(1-B*(1-V));switch(N*=255,P){case 0:return[N,Q,U];case 1:return[Z,N,U];case 2:return[U,N,Q];case 3:return[U,Z,N];case 4:return[Q,U,N];case 5:return[N,U,Z]}},C.hsv.hsl=function(k){let _=k[0],B=k[1]/100,N=k[2]/100,P=Math.max(N,.01),V,U;U=(2-B)*N;let Z=(2-B)*P;return V=B*P,V/=Z<=1?Z:2-Z,V=V||0,U/=2,[_,100*V,100*U]},C.hwb.rgb=function(k){let _=k[0]/360,B=k[1]/100,N=k[2]/100,P=B+N,V;P>1&&(B/=P,N/=P);let U=Math.floor(6*_),Z=1-N;V=6*_-U,1&U&&(V=1-V);let Q=B+V*(Z-B),se,ge,ie;switch(U){default:case 6:case 0:se=Z,ge=Q,ie=B;break;case 1:se=Q,ge=Z,ie=B;break;case 2:se=B,ge=Z,ie=Q;break;case 3:se=B,ge=Q,ie=Z;break;case 4:se=Q,ge=B,ie=Z;break;case 5:se=Z,ge=B,ie=Q}return[255*se,255*ge,255*ie]},C.cmyk.rgb=function(k){let _=k[0]/100,B=k[1]/100,N=k[2]/100,P=k[3]/100;return[255*(1-Math.min(1,_*(1-P)+P)),255*(1-Math.min(1,B*(1-P)+P)),255*(1-Math.min(1,N*(1-P)+P))]},C.xyz.rgb=function(k){let _=k[0]/100,B=k[1]/100,N=k[2]/100,P,V,U;return P=3.2406*_+-1.5372*B+-.4986*N,V=-.9689*_+1.8758*B+.0415*N,U=.0557*_+-.204*B+1.057*N,P=P>.0031308?1.055*P**.4166666666666667-.055:12.92*P,V=V>.0031308?1.055*V**.4166666666666667-.055:12.92*V,U=U>.0031308?1.055*U**.4166666666666667-.055:12.92*U,P=Math.min(Math.max(0,P),1),V=Math.min(Math.max(0,V),1),U=Math.min(Math.max(0,U),1),[255*P,255*V,255*U]},C.xyz.lab=function(k){let _=k[0],B=k[1],N=k[2];return _/=95.047,B/=100,N/=108.883,_=_>.008856?_**.3333333333333333:7.787*_+.13793103448275862,B=B>.008856?B**.3333333333333333:7.787*B+.13793103448275862,N=N>.008856?N**.3333333333333333:7.787*N+.13793103448275862,[116*B-16,500*(_-B),200*(B-N)]},C.lab.xyz=function(k){let _,B,N;B=(k[0]+16)/116,_=k[1]/500+B,N=B-k[2]/200;let P=B**3,V=_**3,U=N**3;return B=P>.008856?P:(B-.13793103448275862)/7.787,_=V>.008856?V:(_-.13793103448275862)/7.787,N=U>.008856?U:(N-.13793103448275862)/7.787,_*=95.047,B*=100,N*=108.883,[_,B,N]},C.lab.lch=function(k){let _=k[0],B=k[1],N=k[2],P;return P=360*Math.atan2(N,B)/2/Math.PI,P<0&&(P+=360),[_,Math.sqrt(B*B+N*N),P]},C.lch.lab=function(k){let _=k[0],B=k[1],N=k[2]/360*2*Math.PI;return[_,B*Math.cos(N),B*Math.sin(N)]},C.rgb.ansi16=function(k,_=null){let[B,N,P]=k,V=_===null?C.rgb.hsv(k)[2]:_;if(V=Math.round(V/50),V===0)return 30;let U=30+(Math.round(P/255)<<2|Math.round(N/255)<<1|Math.round(B/255));return V===2&&(U+=60),U},C.hsv.ansi16=function(k){return C.rgb.ansi16(C.hsv.rgb(k),k[2])},C.rgb.ansi256=function(k){let _=k[0],B=k[1],N=k[2];return _===B&&B===N?_<8?16:_>248?231:Math.round((_-8)/247*24)+232:16+36*Math.round(_/255*5)+6*Math.round(B/255*5)+Math.round(N/255*5)},C.ansi16.rgb=function(k){let _=k%10;if(_===0||_===7)return k>50&&(_+=3.5),_=_/10.5*255,[_,_,_];let B=.5*(1+~~(k>50));return[(1&_)*B*255,(_>>1&1)*B*255,(_>>2&1)*B*255]},C.ansi256.rgb=function(k){if(k>=232){let B=10*(k-232)+8;return[B,B,B]}let _;return k-=16,[Math.floor(k/36)/5*255,Math.floor((_=k%36)/6)/5*255,_%6/5*255]},C.rgb.hex=function(k){let _=(((255&Math.round(k[0]))<<16)+((255&Math.round(k[1]))<<8)+(255&Math.round(k[2]))).toString(16).toUpperCase();return"000000".substring(_.length)+_},C.hex.rgb=function(k){let _=k.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!_)return[0,0,0];let B=_[0];_[0].length===3&&(B=B.split("").map((P=>P+P)).join(""));let N=parseInt(B,16);return[N>>16&255,N>>8&255,255&N]},C.rgb.hcg=function(k){let _=k[0]/255,B=k[1]/255,N=k[2]/255,P=Math.max(Math.max(_,B),N),V=Math.min(Math.min(_,B),N),U=P-V,Z,Q;return Z=U<1?V/(1-U):0,Q=U<=0?0:P===_?(B-N)/U%6:P===B?2+(N-_)/U:4+(_-B)/U,Q/=6,Q%=1,[360*Q,100*U,100*Z]},C.hsl.hcg=function(k){let _=k[1]/100,B=k[2]/100,N=B<.5?2*_*B:2*_*(1-B),P=0;return N<1&&(P=(B-.5*N)/(1-N)),[k[0],100*N,100*P]},C.hsv.hcg=function(k){let _=k[1]/100,B=k[2]/100,N=_*B,P=0;return N<1&&(P=(B-N)/(1-N)),[k[0],100*N,100*P]},C.hcg.rgb=function(k){let _=k[0]/360,B=k[1]/100,N=k[2]/100;if(B===0)return[255*N,255*N,255*N];let P=[0,0,0],V=_%1*6,U=V%1,Z=1-U,Q=0;switch(Math.floor(V)){case 0:P[0]=1,P[1]=U,P[2]=0;break;case 1:P[0]=Z,P[1]=1,P[2]=0;break;case 2:P[0]=0,P[1]=1,P[2]=U;break;case 3:P[0]=0,P[1]=Z,P[2]=1;break;case 4:P[0]=U,P[1]=0,P[2]=1;break;default:P[0]=1,P[1]=0,P[2]=Z}return Q=(1-B)*N,[255*(B*P[0]+Q),255*(B*P[1]+Q),255*(B*P[2]+Q)]},C.hcg.hsv=function(k){let _=k[1]/100,B=_+k[2]/100*(1-_),N=0;return B>0&&(N=_/B),[k[0],100*N,100*B]},C.hcg.hsl=function(k){let _=k[1]/100,B=k[2]/100*(1-_)+.5*_,N=0;return B>0&&B<.5?N=_/(2*B):B>=.5&&B<1&&(N=_/(2*(1-B))),[k[0],100*N,100*B]},C.hcg.hwb=function(k){let _=k[1]/100,B=_+k[2]/100*(1-_);return[k[0],100*(B-_),100*(1-B)]},C.hwb.hcg=function(k){let _=k[1]/100,B=1-k[2]/100,N=B-_,P=0;return N<1&&(P=(B-N)/(1-N)),[k[0],100*N,100*P]},C.apple.rgb=function(k){return[k[0]/65535*255,k[1]/65535*255,k[2]/65535*255]},C.rgb.apple=function(k){return[k[0]/255*65535,k[1]/255*65535,k[2]/255*65535]},C.gray.rgb=function(k){return[k[0]/100*255,k[0]/100*255,k[0]/100*255]},C.gray.hsl=function(k){return[0,0,k[0]]},C.gray.hsv=C.gray.hsl,C.gray.hwb=function(k){return[0,100,k[0]]},C.gray.cmyk=function(k){return[0,0,0,k[0]]},C.gray.lab=function(k){return[k[0],0,0]},C.gray.hex=function(k){let _=255&Math.round(k[0]/100*255),B=((_<<16)+(_<<8)+_).toString(16).toUpperCase();return"000000".substring(B.length)+B},C.rgb.gray=function(k){return[(k[0]+k[1]+k[2])/3/255*100]}},2085:(v,S,p)=>{let x=p(8168),D=p(4111),C={};Object.keys(x).forEach((k=>{C[k]={},Object.defineProperty(C[k],"channels",{value:x[k].channels}),Object.defineProperty(C[k],"labels",{value:x[k].labels});let _=D(k);Object.keys(_).forEach((B=>{let N=_[B];C[k][B]=(function(P){let V=function(...U){let Z=U[0];if(Z==null)return Z;Z.length>1&&(U=Z);let Q=P(U);if(typeof Q=="object")for(let se=Q.length,ge=0;ge<se;ge++)Q[ge]=Math.round(Q[ge]);return Q};return"conversion"in P&&(V.conversion=P.conversion),V})(N),C[k][B].raw=(function(P){let V=function(...U){let Z=U[0];return Z==null?Z:(Z.length>1&&(U=Z),P(U))};return"conversion"in P&&(V.conversion=P.conversion),V})(N)}))})),v.exports=C},4111:(v,S,p)=>{let x=p(8168);function D(_){let B=(function(){let P={},V=Object.keys(x);for(let U=V.length,Z=0;Z<U;Z++)P[V[Z]]={distance:-1,parent:null};return P})(),N=[_];for(B[_].distance=0;N.length;){let P=N.pop(),V=Object.keys(x[P]);for(let U=V.length,Z=0;Z<U;Z++){let Q=V[Z],se=B[Q];se.distance===-1&&(se.distance=B[P].distance+1,se.parent=P,N.unshift(Q))}}return B}function C(_,B){return function(N){return B(_(N))}}function k(_,B){let N=[B[_].parent,_],P=x[B[_].parent][_],V=B[_].parent;for(;B[V].parent;)N.unshift(B[V].parent),P=C(x[B[V].parent][V],P),V=B[V].parent;return P.conversion=N,P}v.exports=function(_){let B=D(_),N={},P=Object.keys(B);for(let V=P.length,U=0;U<V;U++){let Z=P[U];B[Z].parent!==null&&(N[Z]=k(Z,B))}return N}},8874:v=>{v.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},8180:(v,S,p)=>{p.d(S,{Z:()=>_});var x=p(4015),D=p.n(x),C=p(3645),k=p.n(C)()(D());k.push([v.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CAEvC,iBAAkB,CADlB,aAED,CAEA,0CACC,kCACD",sourcesContent:[`/*
|
|
5
5
|
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
6
6
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
7
7
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
4
|
function g(n){return a(n).length>0}function a(n,t){return l(n.target,t)}function l(n,t){let e=n.assignedElements({flatten:!0});return t?e.filter(s=>s.matches(t)):e}var E=(...n)=>{let t=[];for(let s=0;s<n.length;s++){let o=n[s];if(typeof o=="string")t.push(o);else if(Array.isArray(o))t.push.apply(t,o);else if(typeof o=="object")for(let r in o)o[r]&&t.push(r)}let e=t.join(" ");return t.length=0,e},d=(n,t)=>{let e=n;for(;e;){if(e===t)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},b=(n,t,e)=>{let s=f(t).subscribe;return s(o=>{o.some(i=>d(n,i.target))&&e()})},c={},f=n=>{let t=n.join(","),e=c[t];if(e!==void 0)return e;let s=new Set,o=new MutationObserver(i=>s.forEach(u=>u(i)));globalThis.document&&o.observe(document.documentElement,{attributes:!0,attributeFilter:n,subtree:!0});let r={subscribe:i=>(s.add(i),()=>{s.delete(i),s.size===0&&(o.disconnect(),c[t]=void 0)})};return c[t]=r,r},h=(n,t)=>{let e=n;for(;e;){let s=e.closest?.(t);if(s)return s;let o=e.getRootNode?.();if(o===globalThis.document)return;e=o.host}};var p=n=>m(n,"dir","ltr"),m=(n,t,e)=>h(n,`[${t}]`)?.getAttribute(t)??e;export{g as a,E as b,b as c,h as d,p as e,m as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as R,c as _}from"./AOYTSY5V.js";import{a as T}from"./XIDH7CJH.js";import{b as q}from"./CO6TDXJI.js";import"./6Z4VQPIH.js";import{A as D,B as A,C as F,H as L,g as C,i as m,m as N,n as $,q as E}from"./EZSZLYQ3.js";export default $arcgis.t(([G,w,y,I,P,U,k])=>{var u=(s=>(s.MISSING="missing",s.IN_PROGRESS="inProgress",s.SUCCESS="success",s.FAILED="failed",s))(u||{}),d=(s=>(s.DATE="date",s.DATE_ONLY="date-only",s.GUID="guid",s.NUMBER="number",s.OID="oid",s.STRING="string",s.TIME_ONLY="time-only",s.TIMESTAMP_OFFSET="timestamp-offset",s.UNKNOWN="unknown",s))(d||{});function g(s){return s!=null}function Z(s){return s.type==="scene"?s.associatedLayer?.url:s.url}var Y={dateStyle:"short",timeStyle:"short"},W={timeStyle:"medium"};function B(s){let{layer:e,fieldName:t}=s,i,a=_(e),r;"popupTemplate"in e&&(r=e.popupTemplate);let n=r?r.fieldInfos:[];return x(s)?.filter(o=>o.name===t).forEach(o=>{let c=!a&&n?n.filter(f=>f.fieldName===o.name):null,p=a?e.getFieldAlias(t):c?.length?c[0].label:o.alias;/^raster.(item|service)pixelvalue/iu.test(t)&&(o.type="double");let l={layerField:o,label:p||o.name};l.codedValues=j(t,s),Q(l),l.simpleFieldType&&(i=l)}),i}function x(s){let{layer:e}=s;return e.type==="imagery-tile"||e.type==="wcs"||e.type==="imagery"&&e.rasterFields.length?e.rasterFields:e.fields}async function M(s){s.statisticsStatus=u.IN_PROGRESS;let{layer:e,view:t}=s;if(e.type==="imagery-tile"||e.type==="wcs"||e.type==="stream"||e.type==="voxel")throw new Error("could not get feature count");try{return await z(e,t)}catch{return}}async function H(s){let{layer:e,view:t,fieldName:i,fieldInfo:a}=s;if(e.type==="imagery-tile"||e.type==="wcs"||e.type==="voxel")throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");if(!a||a.layerField.type==="oid"||a.layerField.type==="guid"||a.layerField.type==="global-id")return{totalCount:await M(s),nullcount:0};try{let r=await P({layer:e,view:t,field:i,outStatisticTypes:{exclude:["median"]}});if(!g(r.count))throw new Error("could not get statistics");let n="sourceJSON"in e&&e.sourceJSON.maxRecordCount===r.count;if(g(r.nullcount)&&!n)return{...r,totalCount:r.count+r.nullcount};{let o=await M(s);return{...r,totalCount:o}}}catch{throw new Error("could not get statistics")}}async function J(s){let{layer:e,view:t,fieldName:i}=s;if(e.type==="imagery-tile"||e.type==="wcs"||e.type==="voxel")throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");e.type==="feature"&&!e.url&&(e.outFields=["*"]);try{return await U({layer:e,view:t,field:i})}catch{throw new Error("could not get unique values")}}function Q(s){switch(s.layerField.type){case"string":s.simpleFieldType=d.STRING;break;case"date":s.simpleFieldType=d.DATE;break;case"timestamp-offset":s.simpleFieldType=d.TIMESTAMP_OFFSET;break;case"date-only":s.simpleFieldType=d.DATE_ONLY;break;case"time-only":s.simpleFieldType=d.TIME_ONLY;break;case"oid":s.simpleFieldType=d.OID;break;case"guid":case"global-id":s.simpleFieldType=d.GUID;break;case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":s.simpleFieldType=d.NUMBER;break}}function j(s,e){let{layer:t}=e;if(t.type==="subtype-sublayer"&&t.subtypeField===s){let c=t.parent?.subtypes?.find(p=>p.code===t.subtypeCode);if(c)return[{code:c.code,name:c.name}]}if(t.type!=="feature"&&t.type!=="imagery")return;let i=t.type==="feature"?t.typeIdField:void 0,a=t.type==="feature"?t.types:void 0,r,n=x(e)?.find(c=>c.name===s),o=n?.domain;return t.type==="feature"&&i&&a?(i===s?r=a.map(c=>({code:c.id,name:c.name})):(r=[],a.forEach(c=>{if(!c.domains[s]||c.domains[s].type==="inherited"){let p=o;p?.codedValues&&p.codedValues.forEach(async l=>{let f=!1;r.forEach(h=>{h.code===l.code&&(f=!0,`, ${h.name},`.includes(`, ${l.name},`)||(h.name+=`, ${l.name}`))}),f||r.push(I.clone(l))})}else c.domains[s].codedValues&&c.domains[s].codedValues.forEach(async p=>{let l=!1;r.forEach(f=>{f.code===p.code&&(l=!0,`, ${f.name},`.includes(`, ${p.name},`)||(f.name+=`, ${p.name}`))}),l||r.push(I.clone(p))})})),!r.length&&o?.codedValues&&(r=I.clone(o.codedValues))):o?.codedValues&&(r=n.domain.codedValues),r?.length?r:null}async function K(s){let{view:e,layer:t}=s;if(t.type==="imagery"||t.type==="imagery-tile"||t.type==="wcs")throw new Error("could not get feature");if(t.type==="feature"&&!t.url||t.type==="wfs"){let i=t.createQuery();i.start=0,i.num=5,i.outFields=["*"];let a=await t.queryFeatures(i);if(a.features.length)return a;throw new Error("could not get feature")}else{if(!e)return await b(s);let i;if(t.type==="subtype-sublayer"||t.type==="sublayer"){let a=t.parent;for(;["subtype-group","map-image"].includes(a.type);)a=a.parent;i=await e.whenLayerView(a)}else i=await e.whenLayerView(t);if(i.availableFields.length===t.fields.length||["stream","ogc-feature"].includes(t.type)&&i.availableFields.length>0){let a=t.createQuery();a.start=0,a.num=5,a.outFields=["*"];let r=await i.queryFeatures(a);return r.features?.length?r:await b(s)}else return await b(s)}}async function b(s){let{layer:e}=s;if(["imagery","imagery-tile","stream","ogc-feature"].includes(e.type))throw new Error("cannot get feature from service");let t=new k({where:"1=1",outFields:["*"],returnGeometry:!1});return"sourceJSON"in e&&e.sourceJSON?.advancedQueryCapabilities?.supportsPagination&&(t.num=1),await e.queryFeatures(t)}async function z(s,e){if(s.type==="feature"&&!s.url)return await X(s);if(s.type==="feature"||s.type==="csv"||s.type==="scene"||s.type==="wfs"||s.type==="geojson")return await s.queryFeatureCount();if(e&&(s.type==="stream"||s.type==="ogc-feature"))return await ee(s,e)}async function X(s){let e=s.createQuery();e.outFields=["*"];let t=await s.queryFeatures(e);if(t.features.length)return t.features.length;throw new Error("could not get feature count")}async function ee(s,e){return await(await e.whenLayerView(s)).queryFeatureCount()}var te=C`:host{height:100%}.container{padding:var(--calcite-space-xs);background-color:var(--calcite-color-foreground-1)}.title{font-weight:700;padding:5px 0}.missing,.data{color:#a9a9a9}.count{white-space:nowrap}.section{padding:var(--calcite-space-xs) 0}.statistics-row{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);padding:var(--calcite-space-xs) 0;display:flex;justify-content:space-between}.statistics-row-top-values{border-top:var(--calcite-border-width-sm) solid var(--calctie-color-border-2);padding:20px 0 var(--calcite-space-xs) 0;display:flex;justify-content:space-between}`,O=class extends A{constructor(){super(...arguments),this._messages=q({blocking:!0}),this._propWatcherTask=new R(this,{task:async([e,t])=>{let i=g(e)&&g(t);if(g(e)||N("error",this,$("layer")),g(t)||N("error",this,$("fieldName")),!i)throw new Error;await this.processProps(),this._propWatcherTask.autoRun=!1},args:()=>[this.layer,this.fieldName]}),this.oneFeatureResponseStatus=u.MISSING,this.statisticsStatus=u.MISSING,this.uniqueValuesStatus=u.MISSING,this.hideAlias=!1,this.hideNumericFormat=!1,this.hideStatistics=!1,this.arcgisComplete=E(),this.arcgisFieldInfoComplete=E()}static{this.properties={oneFeatureResponseStatus:16,oneFeatureResponse:16,statisticsStatus:16,statistics:16,uniqueValuesStatus:16,uniqueValues:16,view:0,layer:0,fieldName:1,hideAlias:5,hideNumericFormat:5,hideStatistics:5}}static{this.styles=te}async refresh(){await this.processProps(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),this.timeZoneHandle?.remove()}async processProps(){let{view:e,layer:t,fieldName:i,hideStatistics:a}=this;if(!t||!i)return;let r;if(t.declaredClass==="esri.layers.support.Sublayer"){let n=t;e&&await w.whenOnce(()=>!e.updating),r=await n.createFeatureLayer(),await r?.load()}this.props={view:e,layer:r??t,fieldName:i,hideStatistics:a},this.props.fieldInfo=B(this.props),t.type==="scene"&&G.request.interceptors?.push({urls:`${Z(t)}/${t.layerId}`,before(n){n.requestOptions.authMode="no-prompt"}}),this.oneFeatureResponseStatus=u.IN_PROGRESS;try{let n=await K(this.props);this.oneFeatureResponse=n,this.oneFeatureResponseStatus=u.SUCCESS}catch{this.oneFeatureResponseStatus=u.FAILED}if(t.type==="stream"){this.uniqueValuesStatus=u.FAILED,this.statisticsStatus=u.FAILED;return}if(a)this.uniqueValuesStatus=u.FAILED;else{this.uniqueValuesStatus=u.IN_PROGRESS;try{let n=await J(this.props);this.uniqueValues=n,n?.uniqueValueInfos?.length?this.uniqueValuesStatus=u.SUCCESS:this.uniqueValuesStatus=u.FAILED}catch{this.uniqueValuesStatus=u.FAILED}}if(a)this.statisticsStatus=u.FAILED;else{this.statisticsStatus=u.IN_PROGRESS;try{let n=await H(this.props);if(!g(n.totalCount)&&g(n.count)&&this.uniqueValuesStatus===u.SUCCESS){let o=this.uniqueValues?.uniqueValueInfos??[];for(let c=0;c<o.length;c++){let p=o[c];if(p.value===null){n.totalCount=p.count+n.count;break}}n.totalCount??=n.count}this.statistics=n,this.statisticsStatus=u.SUCCESS}catch{this.statisticsStatus=u.FAILED}}this.setUpTimeZoneHandle()}setUpTimeZoneHandle(){this.timeZoneHandle?.remove();let{props:e}=this,{view:t,fieldInfo:i}=e;[d.DATE,d.TIMESTAMP_OFFSET].includes(this._getStatisticsType(i))&&(this.timeZoneHandle=w.watch(()=>t?.timeZone,()=>{this.requestUpdate()}))}_getFieldTypeLabel(e){let{_messages:t}=this,i=t.fieldTypes;switch(e){case"big-integer":return i.bigInteger;case"date":return i.date;case"date-only":return i.dateOnly;case"double":return i.double;case"global-id":return i.globalId;case"guid":return i.guid;case"integer":return i.integer;case"long":return i.long;case"oid":return i.oid;case"single":return i.single;case"small-integer":return i.smallInteger;case"string":return i.string;case"time-only":return i.timeOnly;case"timestamp-offset":return i.timestampOffset;default:return i.string}}_getStatisticsType(e){switch(e.layerField.type){case"big-integer":case"double":case"integer":case"single":case"small-integer":{if(e.codedValues)return d.STRING;switch(e.layerField.valueType){case"binary":case"description":case"location-or-place-name":case"name-or-title":case"ordered-or-ranked":case"type-or-category":return d.STRING;default:return d.NUMBER}}case"date":return d.DATE;case"date-only":return d.DATE_ONLY;case"string":return d.STRING;case"time-only":return d.TIME_ONLY;case"timestamp-offset":return d.TIMESTAMP_OFFSET;default:return d.STRING}}_getFieldValueTypeCamelCase(e){switch(e.layerField.valueType){case"count-or-amount":return"countOrAmount";case"date-and-time":return"dateAndTime";case"location-or-place-name":return"locationOrPlaceName";case"name-or-title":return"nameOrTitle";case"ordered-or-ranked":return"orderedOrRanked";case"percentage-or-ratio":return"percentageOrRatio";case"type-or-category":return"typeOrCategory";case"unique-identifier":return"uniqueIdentifier";case"phone-number":return"phoneNumber";case"email-address":return"emailAddress";default:return e.layerField.valueType}}_getDisplayString(e,t){let{props:i}=this,{fieldInfo:a}=i;switch(a.simpleFieldType){case d.DATE:return this._getDateString(e,t);case d.DATE_ONLY:return this._getDateOnlyString(e,t);case d.GUID:return this._getGuidString(e);case d.NUMBER:return this._getNumberString(e,t);case d.TIME_ONLY:return this._getTimeOnlyString(e,t);case d.TIMESTAMP_OFFSET:return this._getTimestampOffsetString(e,t);default:return`${e}`}}_getDateString(e,t){let{view:i}=this.props;return i&&i.timeZone==="unknown"?y.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):y.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"})}_getTimestampOffsetString(e,t){let{view:i}=this.props;return typeof e=="string"?i&&i.timeZone==="unknown"?y.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):y.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"}):this._getDateString(e,t)}_getDateOnlyString(e,t){return y.formatDateOnly(e,this.getIntlDateTimeFormattingOptions("short-date",t))}_getTimeOnlyString(e,t){return typeof e=="string"?y.formatTimeOnly(e,this.getIntlDateTimeFormattingOptions("short-date-long-time",t)):y.formatDate(e,{...this.getIntlDateTimeFormattingOptions("long-time",{...t,isTimeOnly:!0}),timeZone:"utc"})}_getGuidString(e){return e.startsWith("{")?e:`{${e}}`}_getNumberString(e,t){let i=t?.useFieldFormatting?e:Math.round(e*100)/100;return y.formatNumber(i,this.getIntlNumberFormattingOptions(t))}_printNumValue(e,t){return g(e)?this._getNumberString(e,t):"--"}_setCompleteRef(){this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit()}getCurrentFieldFormat(){let{props:e}=this,{layer:t,fieldName:i}=e;return(this.originalLayerSupportsFieldConfiguration()?t.getFieldConfiguration(i):void 0)?.fieldFormat}getIntlNumberFormattingOptions(e){let t=this.getCurrentFieldFormat();if(!e?.useFieldFormatting)return t?{useGrouping:["always","auto"].includes(t.useGrouping)}:y.convertNumberFormatToIntlOptions({digitSeparator:this.getPopupTemplateFieldInfo()?.format?.digitSeparator??!0});let i=t?{minimumFractionDigits:t.minimumFractionDigits,maximumFractionDigits:t.maximumFractionDigits,useGrouping:["always","auto"].includes(t.useGrouping)}:void 0;if(i)return i;let a=this.getPopupTemplateFieldInfo();return y.convertNumberFormatToIntlOptions({digitSeparator:a?.format?.digitSeparator??!0,places:a?.format?.places??2})}getIntlDateTimeFormattingOptions(e,t){let i=this.getCurrentFieldFormat();if(!t?.useFieldFormatting)return i?t?.isTimeOnly?W:Y:y.convertDateFormatToIntlOptions(e);let a=i?{dateStyle:t?.isTimeOnly?void 0:i.dateStyle??void 0,year:i.dateStyle?void 0:i.year??void 0,month:i.dateStyle?void 0:i.month??void 0,timeStyle:i.timeStyle??void 0,hourCycle:i.hour12==="never"?"h23":"h11"}:void 0;if(a)return a;let r=this.getPopupTemplateFieldInfo();return y.convertDateFormatToIntlOptions(r?.format?.dateFormat??e)}originalLayerSupportsFieldConfiguration(){let{layer:e}=this;return _(e)}getPopupTemplateFieldInfo(){let{props:e}=this,{layer:t,fieldName:i}=e;return("popupTemplate"in t?t.popupTemplate:void 0)?.fieldInfos?.find(a=>a.fieldName===i)}render(){return this._propWatcherTask.render({complete:()=>{let{props:e}=this,{fieldInfo:t}=e;return t?m`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>`:""},error:()=>""})}renderFieldType(){let{_messages:e,props:t}=this,{fieldInfo:i}=t,a=this._getFieldTypeLabel(i.layerField.type);return m`<div class="section"><div class="title">${e.fieldType}</div><div>${a}</div></div>`}renderFieldAlias(){let{_messages:e,props:t,hideAlias:i}=this,{fieldInfo:a}=t;return i?"":m`<div class="section"><div class="title">${e.fieldAlias}</div><div>${a.label}</div></div>`}renderFieldDescription(){let{_messages:e,props:t}=this,{layer:i}=t;if(i.type!=="feature")return"";let{fieldInfo:a}=t,r=a.layerField.description;return m`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${F({missing:!r})}>${r||e.fieldDescriptionNotSet}</div></div>`}renderFieldValueType(){let{_messages:e,props:t}=this,{layer:i}=t;if(i.type!=="feature")return"";let{fieldInfo:a}=t,r=this._getFieldValueTypeCamelCase(a);return m`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${F(r?"":"missing")}>${r?e.fieldValueTypes[r]:e.fieldValueTypeNotSet}</div></div>`}renderFieldSampleValue(){let{oneFeatureResponse:e,oneFeatureResponseStatus:t,statisticsStatus:i,statistics:a,uniqueValuesStatus:r,uniqueValues:n,_messages:o,props:c}=this,{layer:p,fieldName:l,fieldInfo:f}=c,{statistics:h}=o,v;if(["imagery-tile","voxel"].includes(p.type)||p.type!=="stream"&&[d.STRING,d.OID,d.GUID].includes(this._getStatisticsType(f))&&r!==u.FAILED)return"";t===u.SUCCESS?e.features.forEach(S=>{(v===void 0||v===null&&S.attributes[l]!==null)&&(v=S.attributes[l])}):i===u.SUCCESS?v=a?.min:r===u.SUCCESS&&(v=n?.uniqueValueInfos?.[0]?.value||n?.uniqueValueInfos?.[1]?.value);let V=f.codedValues;return g(v)&&(V?v=V.find(S=>v===S.code)?.name||v:v=this._getDisplayString(v,{useFieldFormatting:!0})),m`<div class="section"><div class="title">${o.fieldSampleValue}</div><div class=${F(t===u.FAILED&&i===u.FAILED&&r===u.FAILED||!g(v)?"missing":"")}>${t===u.SUCCESS||i===u.SUCCESS||r===u.SUCCESS?v?.toString()??h.allNulls:t===u.FAILED&&i===u.FAILED&&r===u.FAILED?o.fieldSampleNotAvailable:o.fieldSampleRetrieving}</div></div>`}renderFieldNumericFormat(){let{_messages:e,props:t,hideNumericFormat:i}=this,{fieldName:a,fieldInfo:r,layer:n}=t;if(i||!["double","long","single"].includes(r.layerField.type))return"";let o=this.originalLayerSupportsFieldConfiguration()?n.getFieldConfiguration(a):void 0;if(o?.fieldFormat){let{minimumFractionDigits:p,maximumFractionDigits:l}=o.fieldFormat;return m`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}",p.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}",l.toString())}</div></div>`}let c="popupTemplate"in n?n.popupTemplate:void 0;if(c?.fieldInfos){let p=c.fieldInfos?.filter(l=>l.fieldName===a);if(p?.length){let l=p[0];if(g(l?.format?.places)){let f=l.format.places;return m`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}",f.toString())}</div></div>`}}}return m`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`}renderFieldStatistics(){let{statisticsStatus:e,uniqueValuesStatus:t,hideStatistics:i,_messages:a,props:r}=this,{layer:n,fieldInfo:o}=r;return i?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):["stream","imagery-tile","voxel"].includes(n.type)||["long"].includes(o.layerField.type)?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):m`<div class="section"><div class="title">${a.fieldStatistics}</div>${!e||e===u.MISSING||e===u.IN_PROGRESS?T("field-info-statistics-content",m`<div class="missing">${a.fieldStatisticsRetrieving}</div>`):e===u.FAILED&&t!==u.SUCCESS?this.renderNoStatistics():T("field-info-statistics-content",m`<div ${D(this._setCompleteRef)}>${this.renderStatistics()}</div>`)}</div>`}renderNoStatistics(){let{_messages:e}=this;return T("field-info-statistics-content",m`<div class="missing" ${D(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`)}renderStatistics(){let{props:e}=this,{fieldInfo:t}=e;switch(this._getStatisticsType(t)){case d.NUMBER:return this.renderNumberStatistics();case d.GUID:case d.OID:case d.STRING:return this.renderStringStatistics();case d.DATE:case d.DATE_ONLY:case d.TIME_ONLY:case d.TIMESTAMP_OFFSET:return this.renderDateStatistics();default:return""}}renderNumberStatistics(){let{statistics:e,_messages:t}=this;if(!e)return this.renderNoStatistics();let{statistics:i}=t;return m`<div><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${g(e.sum)?m`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>`:null}${g(e.min)?m`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>`:null}${g(e.max)?m`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>`:null}${g(e.avg)?m`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>`:null}${g(e.stddev)?m`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>`:null}${this.renderNullValues()}</div>`}renderStringStatistics(){let{statistics:e,uniqueValuesStatus:t,_messages:i}=this,{statistics:a}=i;return m`<div><div class="statistics-row"><div>${a.numberOfValues}</div>${t!==u.SUCCESS?m`<div class="missing">--</div>`:m`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`}renderDateStatistics(){let{statistics:e,view:t,props:i,_messages:a}=this,{fieldInfo:r}=i;if(!e||!g(e.max)||!g(e.min))return this.renderNoStatistics();let{statistics:n}=a,o=e.max-e.min,c=Math.floor(o/31536e6),p=Math.floor((o-c*31536e6)/2628e6),l=Math.ceil((o-p*2628e6)/864e5);l>=30&&(p+=1,l=0);let f=c===1?n.timeSpanOptions.year:c>1?n.timeSpanOptions.years.replace("${years}",c.toString()):"";f+=c>0&&(p>0||l>0)?", ":"",f+=p===1?n.timeSpanOptions.month:p>1?n.timeSpanOptions.months.replace("${months}",p.toString()):"",f+=p>0&&l>0?", ":"",f+=l===1?n.timeSpanOptions.day:l>1?n.timeSpanOptions.days.replace("${days}",l.toString()):"";let h=r.simpleFieldType!==d.TIMESTAMP_OFFSET||!t||t.timeZone!=="unknown",v=r.simpleFieldType===d.TIME_ONLY;return m`<div><div class="statistics-row"><div>${n.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${h&&g(e.min)?m`<div class="statistics-row"><div>${v?n.minimumTime:n.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>`:null}${h&&g(e.max)?m`<div class="statistics-row"><div>${v?n.maximumTime:n.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>`:null}${h&&g(e.avg)?m`<div class="statistics-row"><div>${v?n.averageTime:n.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>`:null}${h&&!v&&g(e.min)&&g(e.max)&&o>0?m`<div class="statistics-row"><div>${n.timespan}</div><div class="data">${f}</div></div>`:null}${this.renderNullValues()}</div>`}renderTopValues(){let{uniqueValues:e,uniqueValuesStatus:t,_messages:i,props:a}=this,{fieldInfo:r}=a,{statistics:n}=i;if(e?.uniqueValueInfos?.length){let o=e.uniqueValueInfos;o.sort((l,f)=>l.count<f.count?1:l.count>f.count?-1:0);let c=r.codedValues,p=o.filter(l=>l.value!==null).filter((l,f)=>l&&f<10).map(l=>{let f=l.value;return c?c.forEach(h=>{f===h.code&&(f=h.name)}):f=this._getDisplayString(f),m`<div class="statistics-row"><div class="data">${`${f}`}</div><div class="count">${this._printNumValue(l.count)}</div></div>`});return p.length?m`<div><div class="statistics-row-top-values"><div>${o.length>10?n.topTenValues:n.topValues}</div><div>${n.count}</div></div>${p}</div>`:""}else return m`<div><div class="statistics-row-top-values"><div>${n.topValues}</div><div>${n.count}</div></div><div class="statistics-row"><div class="missing">${t===u.FAILED?i.fieldUniqueValuesNotAvailable:i.fieldSampleRetrieving}</div></div></div>`}renderNullValues(){let{statistics:e,uniqueValues:t,_messages:i}=this,{statistics:a}=i,r=e?.nullcount;if(!g(r)&&t){let n=t.uniqueValueInfos;for(let o=0;o<n.length;o++){let c=n[o];if(c.value===null){r=c.count;break}}}return m`<div class="statistics-row"><div>${a.numberOfNulls}</div>${g(r)?m`<div class="data">${this._printNumValue(r)}</div>`:m`<div class="missing">--</div>`}</div>`}};L("arcgis-field-info",O);return O},"config","core/reactiveUtils","intl","core/lang","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/support/Query")
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
|
+
import{a as R,c as _}from"./XVG75NIN.js";import{a as T}from"./JDAVDYNR.js";import{b as q}from"./YKAKGUKV.js";import"./6F46EKAV.js";import{A as D,B as A,C as F,H as L,g as C,i as m,m as N,n as $,q as E}from"./P7UM2CD6.js";export default $arcgis.t(([G,w,y,I,P,U,k])=>{var u=(s=>(s.MISSING="missing",s.IN_PROGRESS="inProgress",s.SUCCESS="success",s.FAILED="failed",s))(u||{}),d=(s=>(s.DATE="date",s.DATE_ONLY="date-only",s.GUID="guid",s.NUMBER="number",s.OID="oid",s.STRING="string",s.TIME_ONLY="time-only",s.TIMESTAMP_OFFSET="timestamp-offset",s.UNKNOWN="unknown",s))(d||{});function g(s){return s!=null}function Z(s){return s.type==="scene"?s.associatedLayer?.url:s.url}var Y={dateStyle:"short",timeStyle:"short"},W={timeStyle:"medium"};function B(s){let{layer:e,fieldName:t}=s,i,a=_(e),r;"popupTemplate"in e&&(r=e.popupTemplate);let n=r?r.fieldInfos:[];return x(s)?.filter(o=>o.name===t).forEach(o=>{let c=!a&&n?n.filter(f=>f.fieldName===o.name):null,p=a?e.getFieldAlias(t):c?.length?c[0].label:o.alias;/^raster.(item|service)pixelvalue/iu.test(t)&&(o.type="double");let l={layerField:o,label:p||o.name};l.codedValues=j(t,s),Q(l),l.simpleFieldType&&(i=l)}),i}function x(s){let{layer:e}=s;return e.type==="imagery-tile"||e.type==="wcs"||e.type==="imagery"&&e.rasterFields.length?e.rasterFields:e.fields}async function M(s){s.statisticsStatus=u.IN_PROGRESS;let{layer:e,view:t}=s;if(e.type==="imagery-tile"||e.type==="wcs"||e.type==="stream"||e.type==="voxel")throw new Error("could not get feature count");try{return await z(e,t)}catch{return}}async function H(s){let{layer:e,view:t,fieldName:i,fieldInfo:a}=s;if(e.type==="imagery-tile"||e.type==="wcs"||e.type==="voxel")throw new Error("could not get statistics for ImageryTileLayer/WCSLayer/VoxelLayer");if(!a||a.layerField.type==="oid"||a.layerField.type==="guid"||a.layerField.type==="global-id")return{totalCount:await M(s),nullcount:0};try{let r=await P({layer:e,view:t,field:i,outStatisticTypes:{exclude:["median"]}});if(!g(r.count))throw new Error("could not get statistics");let n="sourceJSON"in e&&e.sourceJSON.maxRecordCount===r.count;if(g(r.nullcount)&&!n)return{...r,totalCount:r.count+r.nullcount};{let o=await M(s);return{...r,totalCount:o}}}catch{throw new Error("could not get statistics")}}async function J(s){let{layer:e,view:t,fieldName:i}=s;if(e.type==="imagery-tile"||e.type==="wcs"||e.type==="voxel")throw new Error("could not get unique values for ImageryLayer/ImageryTileLayer/WCSLayer/VoxelLayer");e.type==="feature"&&!e.url&&(e.outFields=["*"]);try{return await U({layer:e,view:t,field:i})}catch{throw new Error("could not get unique values")}}function Q(s){switch(s.layerField.type){case"string":s.simpleFieldType=d.STRING;break;case"date":s.simpleFieldType=d.DATE;break;case"timestamp-offset":s.simpleFieldType=d.TIMESTAMP_OFFSET;break;case"date-only":s.simpleFieldType=d.DATE_ONLY;break;case"time-only":s.simpleFieldType=d.TIME_ONLY;break;case"oid":s.simpleFieldType=d.OID;break;case"guid":case"global-id":s.simpleFieldType=d.GUID;break;case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":s.simpleFieldType=d.NUMBER;break}}function j(s,e){let{layer:t}=e;if(t.type==="subtype-sublayer"&&t.subtypeField===s){let c=t.parent?.subtypes?.find(p=>p.code===t.subtypeCode);if(c)return[{code:c.code,name:c.name}]}if(t.type!=="feature"&&t.type!=="imagery")return;let i=t.type==="feature"?t.typeIdField:void 0,a=t.type==="feature"?t.types:void 0,r,n=x(e)?.find(c=>c.name===s),o=n?.domain;return t.type==="feature"&&i&&a?(i===s?r=a.map(c=>({code:c.id,name:c.name})):(r=[],a.forEach(c=>{if(!c.domains[s]||c.domains[s].type==="inherited"){let p=o;p?.codedValues&&p.codedValues.forEach(async l=>{let f=!1;r.forEach(h=>{h.code===l.code&&(f=!0,`, ${h.name},`.includes(`, ${l.name},`)||(h.name+=`, ${l.name}`))}),f||r.push(I.clone(l))})}else c.domains[s].codedValues&&c.domains[s].codedValues.forEach(async p=>{let l=!1;r.forEach(f=>{f.code===p.code&&(l=!0,`, ${f.name},`.includes(`, ${p.name},`)||(f.name+=`, ${p.name}`))}),l||r.push(I.clone(p))})})),!r.length&&o?.codedValues&&(r=I.clone(o.codedValues))):o?.codedValues&&(r=n.domain.codedValues),r?.length?r:null}async function K(s){let{view:e,layer:t}=s;if(t.type==="imagery"||t.type==="imagery-tile"||t.type==="wcs")throw new Error("could not get feature");if(t.type==="feature"&&!t.url||t.type==="wfs"){let i=t.createQuery();i.start=0,i.num=5,i.outFields=["*"];let a=await t.queryFeatures(i);if(a.features.length)return a;throw new Error("could not get feature")}else{if(!e)return await b(s);let i;if(t.type==="subtype-sublayer"||t.type==="sublayer"){let a=t.parent;for(;["subtype-group","map-image"].includes(a.type);)a=a.parent;i=await e.whenLayerView(a)}else i=await e.whenLayerView(t);if(i.availableFields.length===t.fields.length||["stream","ogc-feature"].includes(t.type)&&i.availableFields.length>0){let a=t.createQuery();a.start=0,a.num=5,a.outFields=["*"];let r=await i.queryFeatures(a);return r.features?.length?r:await b(s)}else return await b(s)}}async function b(s){let{layer:e}=s;if(["imagery","imagery-tile","stream","ogc-feature"].includes(e.type))throw new Error("cannot get feature from service");let t=new k({where:"1=1",outFields:["*"],returnGeometry:!1});return"sourceJSON"in e&&e.sourceJSON?.advancedQueryCapabilities?.supportsPagination&&(t.num=1),await e.queryFeatures(t)}async function z(s,e){if(s.type==="feature"&&!s.url)return await X(s);if(s.type==="feature"||s.type==="csv"||s.type==="scene"||s.type==="wfs"||s.type==="geojson")return await s.queryFeatureCount();if(e&&(s.type==="stream"||s.type==="ogc-feature"))return await ee(s,e)}async function X(s){let e=s.createQuery();e.outFields=["*"];let t=await s.queryFeatures(e);if(t.features.length)return t.features.length;throw new Error("could not get feature count")}async function ee(s,e){return await(await e.whenLayerView(s)).queryFeatureCount()}var te=C`:host{height:100%}.container{padding:var(--calcite-space-xs);background-color:var(--calcite-color-foreground-1)}.title{font-weight:700;padding:5px 0}.missing,.data{color:#a9a9a9}.count{white-space:nowrap}.section{padding:var(--calcite-space-xs) 0}.statistics-row{border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);padding:var(--calcite-space-xs) 0;display:flex;justify-content:space-between}.statistics-row-top-values{border-top:var(--calcite-border-width-sm) solid var(--calctie-color-border-2);padding:20px 0 var(--calcite-space-xs) 0;display:flex;justify-content:space-between}`,O=class extends A{constructor(){super(...arguments),this._messages=q({blocking:!0}),this._propWatcherTask=new R(this,{task:async([e,t])=>{let i=g(e)&&g(t);if(g(e)||N("error",this,$("layer")),g(t)||N("error",this,$("fieldName")),!i)throw new Error;await this.processProps(),this._propWatcherTask.autoRun=!1},args:()=>[this.layer,this.fieldName]}),this.oneFeatureResponseStatus=u.MISSING,this.statisticsStatus=u.MISSING,this.uniqueValuesStatus=u.MISSING,this.hideAlias=!1,this.hideNumericFormat=!1,this.hideStatistics=!1,this.arcgisComplete=E(),this.arcgisFieldInfoComplete=E()}static{this.properties={oneFeatureResponseStatus:16,oneFeatureResponse:16,statisticsStatus:16,statistics:16,uniqueValuesStatus:16,uniqueValues:16,view:0,layer:0,fieldName:1,hideAlias:5,hideNumericFormat:5,hideStatistics:5}}static{this.styles=te}async refresh(){await this.processProps(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),this.timeZoneHandle?.remove()}async processProps(){let{view:e,layer:t,fieldName:i,hideStatistics:a}=this;if(!t||!i)return;let r;if(t.declaredClass==="esri.layers.support.Sublayer"){let n=t;e&&await w.whenOnce(()=>!e.updating),r=await n.createFeatureLayer(),await r?.load()}this.props={view:e,layer:r??t,fieldName:i,hideStatistics:a},this.props.fieldInfo=B(this.props),t.type==="scene"&&G.request.interceptors?.push({urls:`${Z(t)}/${t.layerId}`,before(n){n.requestOptions.authMode="no-prompt"}}),this.oneFeatureResponseStatus=u.IN_PROGRESS;try{let n=await K(this.props);this.oneFeatureResponse=n,this.oneFeatureResponseStatus=u.SUCCESS}catch{this.oneFeatureResponseStatus=u.FAILED}if(t.type==="stream"){this.uniqueValuesStatus=u.FAILED,this.statisticsStatus=u.FAILED;return}if(a)this.uniqueValuesStatus=u.FAILED;else{this.uniqueValuesStatus=u.IN_PROGRESS;try{let n=await J(this.props);this.uniqueValues=n,n?.uniqueValueInfos?.length?this.uniqueValuesStatus=u.SUCCESS:this.uniqueValuesStatus=u.FAILED}catch{this.uniqueValuesStatus=u.FAILED}}if(a)this.statisticsStatus=u.FAILED;else{this.statisticsStatus=u.IN_PROGRESS;try{let n=await H(this.props);if(!g(n.totalCount)&&g(n.count)&&this.uniqueValuesStatus===u.SUCCESS){let o=this.uniqueValues?.uniqueValueInfos??[];for(let c=0;c<o.length;c++){let p=o[c];if(p.value===null){n.totalCount=p.count+n.count;break}}n.totalCount??=n.count}this.statistics=n,this.statisticsStatus=u.SUCCESS}catch{this.statisticsStatus=u.FAILED}}this.setUpTimeZoneHandle()}setUpTimeZoneHandle(){this.timeZoneHandle?.remove();let{props:e}=this,{view:t,fieldInfo:i}=e;[d.DATE,d.TIMESTAMP_OFFSET].includes(this._getStatisticsType(i))&&(this.timeZoneHandle=w.watch(()=>t?.timeZone,()=>{this.requestUpdate()}))}_getFieldTypeLabel(e){let{_messages:t}=this,i=t.fieldTypes;switch(e){case"big-integer":return i.bigInteger;case"date":return i.date;case"date-only":return i.dateOnly;case"double":return i.double;case"global-id":return i.globalId;case"guid":return i.guid;case"integer":return i.integer;case"long":return i.long;case"oid":return i.oid;case"single":return i.single;case"small-integer":return i.smallInteger;case"string":return i.string;case"time-only":return i.timeOnly;case"timestamp-offset":return i.timestampOffset;default:return i.string}}_getStatisticsType(e){switch(e.layerField.type){case"big-integer":case"double":case"integer":case"single":case"small-integer":{if(e.codedValues)return d.STRING;switch(e.layerField.valueType){case"binary":case"description":case"location-or-place-name":case"name-or-title":case"ordered-or-ranked":case"type-or-category":return d.STRING;default:return d.NUMBER}}case"date":return d.DATE;case"date-only":return d.DATE_ONLY;case"string":return d.STRING;case"time-only":return d.TIME_ONLY;case"timestamp-offset":return d.TIMESTAMP_OFFSET;default:return d.STRING}}_getFieldValueTypeCamelCase(e){switch(e.layerField.valueType){case"count-or-amount":return"countOrAmount";case"date-and-time":return"dateAndTime";case"location-or-place-name":return"locationOrPlaceName";case"name-or-title":return"nameOrTitle";case"ordered-or-ranked":return"orderedOrRanked";case"percentage-or-ratio":return"percentageOrRatio";case"type-or-category":return"typeOrCategory";case"unique-identifier":return"uniqueIdentifier";case"phone-number":return"phoneNumber";case"email-address":return"emailAddress";default:return e.layerField.valueType}}_getDisplayString(e,t){let{props:i}=this,{fieldInfo:a}=i;switch(a.simpleFieldType){case d.DATE:return this._getDateString(e,t);case d.DATE_ONLY:return this._getDateOnlyString(e,t);case d.GUID:return this._getGuidString(e);case d.NUMBER:return this._getNumberString(e,t);case d.TIME_ONLY:return this._getTimeOnlyString(e,t);case d.TIMESTAMP_OFFSET:return this._getTimestampOffsetString(e,t);default:return`${e}`}}_getDateString(e,t){let{view:i}=this.props;return i&&i.timeZone==="unknown"?y.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):y.formatDate(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"})}_getTimestampOffsetString(e,t){let{view:i}=this.props;return typeof e=="string"?i&&i.timeZone==="unknown"?y.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:"utc"}):y.formatTimestamp(e,{...this.getIntlDateTimeFormattingOptions("short-date-short-time",t),timeZone:i?.timeZone||"system"}):this._getDateString(e,t)}_getDateOnlyString(e,t){return y.formatDateOnly(e,this.getIntlDateTimeFormattingOptions("short-date",t))}_getTimeOnlyString(e,t){return typeof e=="string"?y.formatTimeOnly(e,this.getIntlDateTimeFormattingOptions("short-date-long-time",t)):y.formatDate(e,{...this.getIntlDateTimeFormattingOptions("long-time",{...t,isTimeOnly:!0}),timeZone:"utc"})}_getGuidString(e){return e.startsWith("{")?e:`{${e}}`}_getNumberString(e,t){let i=t?.useFieldFormatting?e:Math.round(e*100)/100;return y.formatNumber(i,this.getIntlNumberFormattingOptions(t))}_printNumValue(e,t){return g(e)?this._getNumberString(e,t):"--"}_setCompleteRef(){this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit()}getCurrentFieldFormat(){let{props:e}=this,{layer:t,fieldName:i}=e;return(this.originalLayerSupportsFieldConfiguration()?t.getFieldConfiguration(i):void 0)?.fieldFormat}getIntlNumberFormattingOptions(e){let t=this.getCurrentFieldFormat();if(!e?.useFieldFormatting)return t?{useGrouping:["always","auto"].includes(t.useGrouping)}:y.convertNumberFormatToIntlOptions({digitSeparator:this.getPopupTemplateFieldInfo()?.format?.digitSeparator??!0});let i=t?{minimumFractionDigits:t.minimumFractionDigits,maximumFractionDigits:t.maximumFractionDigits,useGrouping:["always","auto"].includes(t.useGrouping)}:void 0;if(i)return i;let a=this.getPopupTemplateFieldInfo();return y.convertNumberFormatToIntlOptions({digitSeparator:a?.format?.digitSeparator??!0,places:a?.format?.places??2})}getIntlDateTimeFormattingOptions(e,t){let i=this.getCurrentFieldFormat();if(!t?.useFieldFormatting)return i?t?.isTimeOnly?W:Y:y.convertDateFormatToIntlOptions(e);let a=i?{dateStyle:t?.isTimeOnly?void 0:i.dateStyle??void 0,year:i.dateStyle?void 0:i.year??void 0,month:i.dateStyle?void 0:i.month??void 0,timeStyle:i.timeStyle??void 0,hourCycle:i.hour12==="never"?"h23":"h11"}:void 0;if(a)return a;let r=this.getPopupTemplateFieldInfo();return y.convertDateFormatToIntlOptions(r?.format?.dateFormat??e)}originalLayerSupportsFieldConfiguration(){let{layer:e}=this;return _(e)}getPopupTemplateFieldInfo(){let{props:e}=this,{layer:t,fieldName:i}=e;return("popupTemplate"in t?t.popupTemplate:void 0)?.fieldInfos?.find(a=>a.fieldName===i)}render(){return this._propWatcherTask.render({complete:()=>{let{props:e}=this,{fieldInfo:t}=e;return t?m`<div class="container">${this.renderFieldType()}${this.renderFieldAlias()}${this.renderFieldDescription()}${this.renderFieldValueType()}${this.renderFieldSampleValue()}${this.renderFieldNumericFormat()}${this.renderFieldStatistics()}</div>`:""},error:()=>""})}renderFieldType(){let{_messages:e,props:t}=this,{fieldInfo:i}=t,a=this._getFieldTypeLabel(i.layerField.type);return m`<div class="section"><div class="title">${e.fieldType}</div><div>${a}</div></div>`}renderFieldAlias(){let{_messages:e,props:t,hideAlias:i}=this,{fieldInfo:a}=t;return i?"":m`<div class="section"><div class="title">${e.fieldAlias}</div><div>${a.label}</div></div>`}renderFieldDescription(){let{_messages:e,props:t}=this,{layer:i}=t;if(i.type!=="feature")return"";let{fieldInfo:a}=t,r=a.layerField.description;return m`<div class="section"><div class="title">${e.fieldDescription}</div><div class=${F({missing:!r})}>${r||e.fieldDescriptionNotSet}</div></div>`}renderFieldValueType(){let{_messages:e,props:t}=this,{layer:i}=t;if(i.type!=="feature")return"";let{fieldInfo:a}=t,r=this._getFieldValueTypeCamelCase(a);return m`<div class="section"><div class="title">${e.fieldValueType}</div><div class=${F(r?"":"missing")}>${r?e.fieldValueTypes[r]:e.fieldValueTypeNotSet}</div></div>`}renderFieldSampleValue(){let{oneFeatureResponse:e,oneFeatureResponseStatus:t,statisticsStatus:i,statistics:a,uniqueValuesStatus:r,uniqueValues:n,_messages:o,props:c}=this,{layer:p,fieldName:l,fieldInfo:f}=c,{statistics:h}=o,v;if(["imagery-tile","voxel"].includes(p.type)||p.type!=="stream"&&[d.STRING,d.OID,d.GUID].includes(this._getStatisticsType(f))&&r!==u.FAILED)return"";t===u.SUCCESS?e.features.forEach(S=>{(v===void 0||v===null&&S.attributes[l]!==null)&&(v=S.attributes[l])}):i===u.SUCCESS?v=a?.min:r===u.SUCCESS&&(v=n?.uniqueValueInfos?.[0]?.value||n?.uniqueValueInfos?.[1]?.value);let V=f.codedValues;return g(v)&&(V?v=V.find(S=>v===S.code)?.name||v:v=this._getDisplayString(v,{useFieldFormatting:!0})),m`<div class="section"><div class="title">${o.fieldSampleValue}</div><div class=${F(t===u.FAILED&&i===u.FAILED&&r===u.FAILED||!g(v)?"missing":"")}>${t===u.SUCCESS||i===u.SUCCESS||r===u.SUCCESS?v?.toString()??h.allNulls:t===u.FAILED&&i===u.FAILED&&r===u.FAILED?o.fieldSampleNotAvailable:o.fieldSampleRetrieving}</div></div>`}renderFieldNumericFormat(){let{_messages:e,props:t,hideNumericFormat:i}=this,{fieldName:a,fieldInfo:r,layer:n}=t;if(i||!["double","long","single"].includes(r.layerField.type))return"";let o=this.originalLayerSupportsFieldConfiguration()?n.getFieldConfiguration(a):void 0;if(o?.fieldFormat){let{minimumFractionDigits:p,maximumFractionDigits:l}=o.fieldFormat;return m`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldMinimumFractionDigits.replace("${number}",p.toString())}</div><div>${e.fieldMaximumFractionDigits.replace("${number}",l.toString())}</div></div>`}let c="popupTemplate"in n?n.popupTemplate:void 0;if(c?.fieldInfos){let p=c.fieldInfos?.filter(l=>l.fieldName===a);if(p?.length){let l=p[0];if(g(l?.format?.places)){let f=l.format.places;return m`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div>${e.fieldNumDecimalPlaces.replace("${number}",f.toString())}</div></div>`}}}return m`<div class="section"><div class="title">${e.fieldDecimalPlaces}</div><div class="missing">${e.fieldDecimalPlacesNotAvailable}</div></div>`}renderFieldStatistics(){let{statisticsStatus:e,uniqueValuesStatus:t,hideStatistics:i,_messages:a,props:r}=this,{layer:n,fieldInfo:o}=r;return i?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):["stream","imagery-tile","voxel"].includes(n.type)||["long"].includes(o.layerField.type)?(this.arcgisComplete.emit(),this.arcgisFieldInfoComplete.emit(),""):m`<div class="section"><div class="title">${a.fieldStatistics}</div>${!e||e===u.MISSING||e===u.IN_PROGRESS?T("field-info-statistics-content",m`<div class="missing">${a.fieldStatisticsRetrieving}</div>`):e===u.FAILED&&t!==u.SUCCESS?this.renderNoStatistics():T("field-info-statistics-content",m`<div ${D(this._setCompleteRef)}>${this.renderStatistics()}</div>`)}</div>`}renderNoStatistics(){let{_messages:e}=this;return T("field-info-statistics-content",m`<div class="missing" ${D(this._setCompleteRef)}>${e.fieldStatisticsNotAvailable}</div>`)}renderStatistics(){let{props:e}=this,{fieldInfo:t}=e;switch(this._getStatisticsType(t)){case d.NUMBER:return this.renderNumberStatistics();case d.GUID:case d.OID:case d.STRING:return this.renderStringStatistics();case d.DATE:case d.DATE_ONLY:case d.TIME_ONLY:case d.TIMESTAMP_OFFSET:return this.renderDateStatistics();default:return""}}renderNumberStatistics(){let{statistics:e,_messages:t}=this;if(!e)return this.renderNoStatistics();let{statistics:i}=t;return m`<div><div class="statistics-row"><div>${i.numberOfValues}</div><div class="data">${this._printNumValue(e.totalCount)}</div></div>${g(e.sum)?m`<div class="statistics-row"><div>${i.sumOfValues}</div><div class="data">${this._printNumValue(e.sum)}</div></div>`:null}${g(e.min)?m`<div class="statistics-row"><div>${i.minimum}</div><div class="data">${this._printNumValue(e.min)}</div></div>`:null}${g(e.max)?m`<div class="statistics-row"><div>${i.maximum}</div><div class="data">${this._printNumValue(e.max)}</div></div>`:null}${g(e.avg)?m`<div class="statistics-row"><div>${i.average}</div><div class="data">${this._printNumValue(e.avg)}</div></div>`:null}${g(e.stddev)?m`<div class="statistics-row"><div>${i.standardDeviation}</div><div class="data">${this._printNumValue(e.stddev)}</div></div>`:null}${this.renderNullValues()}</div>`}renderStringStatistics(){let{statistics:e,uniqueValuesStatus:t,_messages:i}=this,{statistics:a}=i;return m`<div><div class="statistics-row"><div>${a.numberOfValues}</div>${t!==u.SUCCESS?m`<div class="missing">--</div>`:m`<div class="data">${this._printNumValue(e?.totalCount)}</div>`}</div>${this.renderNullValues()}${this.renderTopValues()}</div>`}renderDateStatistics(){let{statistics:e,view:t,props:i,_messages:a}=this,{fieldInfo:r}=i;if(!e||!g(e.max)||!g(e.min))return this.renderNoStatistics();let{statistics:n}=a,o=e.max-e.min,c=Math.floor(o/31536e6),p=Math.floor((o-c*31536e6)/2628e6),l=Math.ceil((o-p*2628e6)/864e5);l>=30&&(p+=1,l=0);let f=c===1?n.timeSpanOptions.year:c>1?n.timeSpanOptions.years.replace("${years}",c.toString()):"";f+=c>0&&(p>0||l>0)?", ":"",f+=p===1?n.timeSpanOptions.month:p>1?n.timeSpanOptions.months.replace("${months}",p.toString()):"",f+=p>0&&l>0?", ":"",f+=l===1?n.timeSpanOptions.day:l>1?n.timeSpanOptions.days.replace("${days}",l.toString()):"";let h=r.simpleFieldType!==d.TIMESTAMP_OFFSET||!t||t.timeZone!=="unknown",v=r.simpleFieldType===d.TIME_ONLY;return m`<div><div class="statistics-row"><div>${n.numberOfValues}</div><div class="data">${this._printNumValue(e?.totalCount)}</div></div>${h&&g(e.min)?m`<div class="statistics-row"><div>${v?n.minimumTime:n.minimumDate}</div><div class="data">${this._getDisplayString(e.min)}</div></div>`:null}${h&&g(e.max)?m`<div class="statistics-row"><div>${v?n.maximumTime:n.maximumDate}</div><div class="data">${this._getDisplayString(e.max)}</div></div>`:null}${h&&g(e.avg)?m`<div class="statistics-row"><div>${v?n.averageTime:n.averageDate}</div><div class="data">${this._getDisplayString(e.avg)}</div></div>`:null}${h&&!v&&g(e.min)&&g(e.max)&&o>0?m`<div class="statistics-row"><div>${n.timespan}</div><div class="data">${f}</div></div>`:null}${this.renderNullValues()}</div>`}renderTopValues(){let{uniqueValues:e,uniqueValuesStatus:t,_messages:i,props:a}=this,{fieldInfo:r}=a,{statistics:n}=i;if(e?.uniqueValueInfos?.length){let o=e.uniqueValueInfos;o.sort((l,f)=>l.count<f.count?1:l.count>f.count?-1:0);let c=r.codedValues,p=o.filter(l=>l.value!==null).filter((l,f)=>l&&f<10).map(l=>{let f=l.value;return c?c.forEach(h=>{f===h.code&&(f=h.name)}):f=this._getDisplayString(f),m`<div class="statistics-row"><div class="data">${`${f}`}</div><div class="count">${this._printNumValue(l.count)}</div></div>`});return p.length?m`<div><div class="statistics-row-top-values"><div>${o.length>10?n.topTenValues:n.topValues}</div><div>${n.count}</div></div>${p}</div>`:""}else return m`<div><div class="statistics-row-top-values"><div>${n.topValues}</div><div>${n.count}</div></div><div class="statistics-row"><div class="missing">${t===u.FAILED?i.fieldUniqueValuesNotAvailable:i.fieldSampleRetrieving}</div></div></div>`}renderNullValues(){let{statistics:e,uniqueValues:t,_messages:i}=this,{statistics:a}=i,r=e?.nullcount;if(!g(r)&&t){let n=t.uniqueValueInfos;for(let o=0;o<n.length;o++){let c=n[o];if(c.value===null){r=c.count;break}}}return m`<div class="statistics-row"><div>${a.numberOfNulls}</div>${g(r)?m`<div class="data">${this._printNumValue(r)}</div>`:m`<div class="missing">--</div>`}</div>`}};L("arcgis-field-info",O);return O},"config","core/reactiveUtils","intl","core/lang","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/support/Query")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as g}from"./2YW4NW5M.js";import{a as C,b as k}from"./AOYTSY5V.js";import{a as B}from"./XIDH7CJH.js";import{b as x}from"./CO6TDXJI.js";import"./6Z4VQPIH.js";import{A as h,B as w,C as $,D as m,E as c,F as v,H as S,g as y,i as s,m as p,n as F,q as n,z as r}from"./EZSZLYQ3.js";var o=new Map;o.set("oid","key");o.set("guid","key");o.set("global-id","key");o.set("blob","binary");o.set("integer","integer");o.set("small-integer","integer");o.set("big-integer","integer");o.set("single","number");o.set("double","number");o.set("long","number");o.set("number","number");o.set("date","date-time");o.set("date-only","calendar");o.set("time-only","clock");o.set("timestamp-offset","time-zone");o.set("string","string");var L=({fieldType:u})=>s`<calcite-icon scale=s .icon=${o.get(u)}></calcite-icon>`,E=y`.panel{min-height:250px}.content{max-height:50vh}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,f=class extends w{constructor(){super(...arguments),this._messages=x({blocking:!0}),this.popoverNode=r(),this.listNode=r(),this.flowElement=r(),this.panelElement=r(),this.dropdownNode=r(),this.fieldInfoFlowItemEl=r(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this._propWatcherTask=new C(this,{task:async([e])=>{if(!this.listOnly&&!k(e?.refElement))throw p("error",this,F("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=n(),this.arcgisClose=n(),this.arcgisFieldPickListChange=n(),this.arcgisFieldPickListDismissed=n(),this.arcgisFieldPickListSortByChange=n(),this.arcgisSortByChange=n(),this.arcgisEditField=n(),this.arcgisDeleteField=n()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=E}async reposition(){await this.popoverNode.value?.reposition()}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,p("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists()}willUpdate(e){(e.has("fields")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&this.updateGroupedLists()}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listNode.value?.getBoundingClientRect();t&&(this.listNode.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],i=t.filter(l=>l.type==="none");return t=t.filter(l=>l.type!=="none"),this.lastSortBy==="display"?t.sort((l,a)=>l.alias.localeCompare(a.alias)):this.lastSortBy==="field"?t.sort((l,a)=>l.name.localeCompare(a.name)):this.lastSortBy==="type"&&t.sort((l,a)=>l.type.localeCompare(a.type)),t=t.concat(i),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(g.expression)}canDeselectAll(){let e=this.getAllFields();return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(g.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],this.usingCustomGroups())for(let e of this.fields)this.allLists.push({title:e.title,fields:[...this.getSortedList(e.fields)]});else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:[...this.getSortedList(this.fields)]}]}addFieldInfoFlowItem(e,t){let i=this.flowElement.value,l=v(s`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${m(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${a=>{a.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${h(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??c} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);i.appendChild(l),this.panelElement.value.selected=!1,this.fieldInfoFlowItemEl?.value.setFocus()}usingCustomGroups(){return!!this.fields.length&&"fields"in this.fields[0]}getAllFields(){return this.allLists.map(e=>e.fields).flat()}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),s`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.popoverNode)}><calcite-flow style=${m({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${h(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot><div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?s`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:s`${this.renderAddButton()}${this.renderCancelButton()}`}</div></calcite-flow-item></calcite-flow></calcite-popover>`},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.getAllFields(),i=t.length>=this.showFilterLength;return s`${t.length?s`<calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} class=${$(this.listOnly?"":"content")} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>{let l=this.listNode.value.selectedItems.map(d=>d.value),a=this.selectedFields.filter(d=>l.includes(d)),b=l.filter(d=>!this.selectedFields.includes(d));this.selectedFields=[...new Set([...a,...b])],this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}} @calciteListFilter=${l=>{l.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(a=>a.value),this.filterText=this.listNode.value.filterText}} ${h(this.listNode)}>${this.renderSortButton()}<slot name=content-center></slot>${this.multiple&&this.showSelectionAll&&(!i||!this.filterText||this.filterFields?.length)?this.renderSelectionButton():null}${this.renderListItems()}</calcite-list>`:s`<slot name=no-fields></slot>`}${this.filterFields&&!this.filterFields.length&&this.listNode.value&&this.filterNoResultsText?.length!==0?s`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSortButton(){let e=this.getAllFields();if(!(e.length>=this.showFilterLength&&!this.hideSort))return;let t=e.every(i=>!!i.type);return s`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed .disabled=${this.filterFields?this.filterFields.length<4:!1} @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${h(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??c}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @click=${()=>{this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @click=${()=>{this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.displayName}</calcite-dropdown-item>${t&&s`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @click=${()=>{this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @click=${()=>{this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return s`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=this.getAllFields();this.selectedFields=e.map(t=>t.name)}this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderListItems(){let e=this.allLists.filter(t=>!!t.fields.length);return e.length===1&&!e[0].title?e[0].fields.map(t=>this.renderCalciteListItem(t)):e.map(t=>s`<calcite-list-item-group .heading=${t.title}>${t.fields.map(i=>this.renderCalciteListItem(i))}</calcite-list-item-group>`)}renderCalciteListItem(e){let t=this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return B(e.name,s`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&s`<div slot=actions-end class="field-icons">${L({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,t)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:i}=this;return t?s`<calcite-action slot=actions-end .text=${i.info} title=${i.info??c} scale=s icon=information @click=${l=>{l.stopPropagation();let a=l.currentTarget;this.addFieldInfoFlowItem(e,a)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?s`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??c} scale=s icon=pencil @click=${i=>{i.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?s`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??c} scale=s icon=trash @click=${i=>{i.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){if(this.multiple)return s`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`}renderCancelButton(){if(!this.hideCancel)return s`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};S("arcgis-field-pick-list",f);export{f as ArcgisFieldPickList};
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
|
+
import{a as g}from"./G46ZZRHA.js";import{a as C,b as k}from"./XVG75NIN.js";import{a as B}from"./JDAVDYNR.js";import{b as x}from"./YKAKGUKV.js";import"./6F46EKAV.js";import{A as h,B as w,C as $,D as m,E as c,F as v,H as S,g as y,i as s,m as p,n as F,q as n,z as r}from"./P7UM2CD6.js";var o=new Map;o.set("oid","key");o.set("guid","key");o.set("global-id","key");o.set("blob","binary");o.set("integer","integer");o.set("small-integer","integer");o.set("big-integer","integer");o.set("single","number");o.set("double","number");o.set("long","number");o.set("number","number");o.set("date","date-time");o.set("date-only","calendar");o.set("time-only","clock");o.set("timestamp-offset","time-zone");o.set("string","string");var L=({fieldType:u})=>s`<calcite-icon scale=s .icon=${o.get(u)}></calcite-icon>`,E=y`.panel{min-height:250px}.content{max-height:50vh}.field-icons{display:flex;align-items:center;padding:0 var(--calcite-space-sm)}.selection-button-div{padding:var(--calcite-space-2xs) var(--calcite-space-sm-plus)}.no-match-text{padding:var(--calcite-space-md)}.footer{width:100%}.add-cancel-buttons{display:flex;align-content:space-between}`,f=class extends w{constructor(){super(...arguments),this._messages=x({blocking:!0}),this.popoverNode=r(),this.listNode=r(),this.flowElement=r(),this.panelElement=r(),this.dropdownNode=r(),this.fieldInfoFlowItemEl=r(),this.allLists=[],this.filterText="",this.panelCutOffHeight=0,this._propWatcherTask=new C(this,{task:async([e])=>{if(!this.listOnly&&!k(e?.refElement))throw p("error",this,F("popoverProps")),new Error;this._propWatcherTask.autoRun=!1},args:()=>[this.popoverProps]}),this.fields=[],this.selectedFields=[],this.listOnly=!1,this.showFieldInfo=!1,this.showFieldTypeIcon=!1,this.showFieldName=!1,this.showDescription=!1,this.showSelectionAll=!1,this.showCancel=!0,this.hideCancel=!1,this.showSort=!0,this.hideSort=!1,this.showFilterLength=10,this.multiple=!1,this.sortBy="default",this.groupFieldsAndExpressions=!1,this.arcgisChange=n(),this.arcgisClose=n(),this.arcgisFieldPickListChange=n(),this.arcgisFieldPickListDismissed=n(),this.arcgisFieldPickListSortByChange=n(),this.arcgisSortByChange=n(),this.arcgisEditField=n(),this.arcgisDeleteField=n()}static{this.properties={lastSortBy:16,filterFields:16,mapView:0,view:0,layer:0,fields:0,selectedFields:0,listOnly:5,popoverProps:0,showFieldInfo:5,showFieldTypeIcon:5,showFieldName:5,showDescription:5,showSelectionAll:5,showCancel:5,hideCancel:5,showSort:5,hideSort:5,showFilterLength:9,multiple:5,heading:1,okBtnText:1,filterPlaceholderText:1,filterNoResultsText:1,sortBy:1,groupFieldsAndExpressions:5,fieldsGroupHeading:1,expressionsGroupHeading:1,customExpressionCheck:0}}static{this.styles=E}async reposition(){await this.popoverNode.value?.reposition()}async setFocus(){setTimeout(()=>requestAnimationFrame(()=>{this.listOnly?this.listNode.value?.setFocus():this.panelElement.value?.setFocus()}),1)}async setDisabled(e){this.panelElement.value&&(this.panelElement.value.disabled=e)}load(){!this.view&&this.mapView&&(this.view=this.mapView),!this.showCancel&&!this.hideCancel&&(this.hideCancel=!0),!this.showSort&&!this.hideSort&&(this.hideSort=!0),this.listOnly&&this.showFieldInfo&&(this.showFieldInfo=!1,p("info",this,"showFieldInfo is not supported if listOnly is true.")),!this.multiple&&this.selectedFields.length>1&&(this.selectedFields=[this.selectedFields[0]]),this.lastSortBy=this.sortBy??this.lastSortBy,this.updateGroupedLists()}willUpdate(e){(e.has("fields")||e.has("lastSortBy")||e.has("customExpressionCheck"))&&this.updateGroupedLists()}loaded(){this.setUpObserver(),this.listOnly?this.listNode.value?.setFocus():(this.flowElement.value?.setFocus(),this.checkMaxHeight())}disconnectedCallback(){super.disconnectedCallback(),this.observer?.disconnect()}setUpObserver(){this.observer=new MutationObserver(e=>{for(let t of e)t.attributeName==="style"&&this.popoverNode.value&&this.dropdownNode.value&&this.popoverNode.value.style.visibility==="hidden"&&(this.dropdownNode.value.open=!1)})}checkMaxHeight(){setTimeout(()=>this.checkPanelMaxHeight(),200),setTimeout(()=>this.checkPanelMaxHeight(),500),setTimeout(()=>this.checkPanelMaxHeight(),1e3),setTimeout(()=>this.checkPanelMaxHeight(),1500)}checkPanelMaxHeight(){if(this.panelCutOffHeight===0){let e=this.panelElement.value?.getBoundingClientRect();if(e&&e.bottom>window.innerHeight){this.panelCutOffHeight=e.height-(e.bottom-window.innerHeight)-5;let t=this.listNode.value?.getBoundingClientRect();t&&(this.listNode.value.style.maxHeight=`${t.height-(e.bottom-window.innerHeight)-5}px`)}}}getSortedList(e){let t=[...e],i=t.filter(l=>l.type==="none");return t=t.filter(l=>l.type!=="none"),this.lastSortBy==="display"?t.sort((l,a)=>l.alias.localeCompare(a.alias)):this.lastSortBy==="field"?t.sort((l,a)=>l.name.localeCompare(a.name)):this.lastSortBy==="type"&&t.sort((l,a)=>l.type.localeCompare(a.type)),t=t.concat(i),t}isExpression(e){return this.customExpressionCheck?this.customExpressionCheck(e):e.name.includes(g.expression)}canDeselectAll(){let e=this.getAllFields();return this.filterFields?.length?this.filterContainsAll():this.selectedFields.length===e.length}filterContainsAll(){return!!this.filterFields?.every(e=>this.selectedFields.some(t=>t===e))}showFieldInfoCheck(e){let{layer:t}=this;return this.showFieldInfo?!(!t||this.isExpression(e)||e.name.includes(g.relationship)||e.type==="none"):!1}updateGroupedLists(){if(this.fields)if(this.allLists=[],this.usingCustomGroups())for(let e of this.fields)this.allLists.push({title:e.title,fields:[...this.getSortedList(e.fields)]});else this.allLists=this.groupFieldsAndExpressions?[{title:this.expressionsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>this.isExpression(e))},{title:this.fieldsGroupHeading,fields:[...this.getSortedList(this.fields)].filter(e=>!this.isExpression(e))}]:[{title:void 0,fields:[...this.getSortedList(this.fields)]}]}addFieldInfoFlowItem(e,t){let i=this.flowElement.value,l=v(s`<calcite-flow-item selected .heading=${e.alias??e.name} .description=${e.name} class="panel" style=${m(this.panelCutOffHeight>0?`max-height: ${this.panelCutOffHeight}px`:"max-height: 50vh")} @calciteFlowItemBack=${a=>{a.currentTarget.remove(),this.fieldInfoFlowItemEl.value.selected=!1,this.panelElement.value.selected=!0,setTimeout(()=>{t.setFocus()},300)}} ${h(this.fieldInfoFlowItemEl)}><arcgis-field-info lang=${this._messages._lang??c} .fieldName=${e.name} .layer=${this.layer} .view=${this.view} class="content"></arcgis-field-info></calcite-flow-item>`);i.appendChild(l),this.panelElement.value.selected=!1,this.fieldInfoFlowItemEl?.value.setFocus()}usingCustomGroups(){return!!this.fields.length&&"fields"in this.fields[0]}getAllFields(){return this.allLists.map(e=>e.fields).flat()}render(){return this._propWatcherTask.render({complete:()=>{if(this.listOnly)return this.renderList();let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.popoverProps;return this.el.classList.add("js-app-flyout"),s`<calcite-popover .placement=${t.placement??"leading-start"} open pointer-disabled .referenceElement=${t.refElement} .offsetDistance=${t.offsetDistance??-Math.round(t.refElement.getBoundingClientRect().width)} .offsetSkidding=${t.offsetSkidding??0} .overlayPositioning=${t.overlayPositioning} trigger-disabled .autoClose=${t.autoClose} .label=${this.heading??(this.multiple?this._messages.headerSelect:this._messages.header)??""} @calcitePopoverClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.popoverNode)}><calcite-flow style=${m({width:`${t.popoverWidth??t.refElement.getBoundingClientRect().width}px`,...t.maxHeight&&{maxHeight:t.maxHeight}})} ${h(this.flowElement)}><calcite-flow-item class="panel" .heading=${e} closable @calciteFlowItemClose=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}} ${h(this.panelElement)}><slot slot=content-top name=content-top></slot>${this.renderList()}<slot slot=content-bottom name=content-bottom></slot><div slot=footer class="footer"><slot name=content-footer></slot>${this.multiple&&!this.hideCancel?s`<div class="add-cancel-buttons">${this.renderAddButton()}${this.renderCancelButton()}</div>`:s`${this.renderAddButton()}${this.renderCancelButton()}`}</div></calcite-flow-item></calcite-flow></calcite-popover>`},error:()=>""})}renderList(){let e=this.heading||(this.multiple?this._messages.headerSelect:this._messages.header),t=this.getAllFields(),i=t.length>=this.showFilterLength;return s`${t.length?s`<calcite-list .label=${e} .selectionMode=${this.multiple?"multiple":"single"} class=${$(this.listOnly?"":"content")} .filterEnabled=${i} .filterPlaceholder=${this.filterPlaceholderText??this._messages.filter} @calciteListChange=${()=>{let l=this.listNode.value.selectedItems.map(d=>d.value),a=this.selectedFields.filter(d=>l.includes(d)),b=l.filter(d=>!this.selectedFields.includes(d));this.selectedFields=[...new Set([...a,...b])],this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields}),this.multiple||(this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields}))}} @calciteListFilter=${l=>{l.stopPropagation(),this.filterFields=this.listNode.value.filteredItems?.map(a=>a.value),this.filterText=this.listNode.value.filterText}} ${h(this.listNode)}>${this.renderSortButton()}<slot name=content-center></slot>${this.multiple&&this.showSelectionAll&&(!i||!this.filterText||this.filterFields?.length)?this.renderSelectionButton():null}${this.renderListItems()}</calcite-list>`:s`<slot name=no-fields></slot>`}${this.filterFields&&!this.filterFields.length&&this.listNode.value&&this.filterNoResultsText?.length!==0?s`<div class="no-match-text">${this.filterNoResultsText??this._messages.noMatches}</div>`:null}`}renderSortButton(){let e=this.getAllFields();if(!(e.length>=this.showFilterLength&&!this.hideSort))return;let t=e.every(i=>!!i.type);return s`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed .disabled=${this.filterFields?this.filterFields.length<4:!1} @calciteDropdownOpen=${()=>{this.observer?.disconnect(),this.popoverNode.value&&this.observer?.observe(this.popoverNode.value,{attributes:!0})}} @calciteDropdownClose=${()=>this.observer?.disconnect()} ${h(this.dropdownNode)}><calcite-action slot=trigger .text=${this._messages.sort??""} title=${this._messages.sort??c}><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${this.lastSortBy==="default"} @click=${()=>{this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="default",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.default}</calcite-dropdown-item><calcite-dropdown-item .selected=${this.lastSortBy==="display"} @click=${()=>{this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="display",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.displayName}</calcite-dropdown-item>${t&&s`<calcite-dropdown-item .selected=${this.lastSortBy==="type"} @click=${()=>{this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="type",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.type}</calcite-dropdown-item>`||""}<calcite-dropdown-item .selected=${this.lastSortBy==="field"} @click=${()=>{this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy)}} @keydown=${i=>{i.stopPropagation(),(i.key===" "||i.key==="Enter")&&(this.lastSortBy="field",this.arcgisSortByChange.emit(this.lastSortBy),this.arcgisFieldPickListSortByChange.emit(this.lastSortBy))}}>${this._messages.fieldName}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderSelectionButton(){return s`<div class="selection-button-div"><calcite-button appearance=transparent scale=s width=full @click=${()=>{if(this.canDeselectAll())this.selectedFields=this.filterFields?.length?this.selectedFields.filter(e=>!this.filterFields?.includes(e)):[];else if(this.filterFields?.length)this.selectedFields=[...new Set([...this.selectedFields,...this.filterFields])];else{let e=this.getAllFields();this.selectedFields=e.map(t=>t.name)}this.arcgisChange.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListChange.emit({selectedFields:this.selectedFields})}}>${this.canDeselectAll()?this._messages.deselectAll:this._messages.selectAll}</calcite-button></div>`}renderListItems(){let e=this.allLists.filter(t=>!!t.fields.length);return e.length===1&&!e[0].title?e[0].fields.map(t=>this.renderCalciteListItem(t)):e.map(t=>s`<calcite-list-item-group .heading=${t.title}>${t.fields.map(i=>this.renderCalciteListItem(i))}</calcite-list-item-group>`)}renderCalciteListItem(e){let t=this.showFieldInfoCheck(e),i=this.showFieldTypeIcon&&!!e.type;return B(e.name,s`<calcite-list-item .label=${e.alias||e.name} .description=${(()=>{if(this.showFieldName&&e.hideFieldName!==!0)return`{${e.name}}`;if(this.showDescription&&e.hideDescription!==!0&&e.description)return e.description})()} .value=${e.name} .selected=${!this.multiple&&e.name===this.selectedFields[0]||this.multiple&&this.selectedFields.includes(e.name)} .metadata=${{label:e.alias,fieldName:e.name}}>${i&&s`<div slot=actions-end class="field-icons">${L({fieldType:e.type})}</div>`||""}${this.renderInfoAction(e,t)}${this.renderEditAction(e)}${this.renderDeleteAction(e)}</calcite-list-item>`)}renderInfoAction(e,t){let{_messages:i}=this;return t?s`<calcite-action slot=actions-end .text=${i.info} title=${i.info??c} scale=s icon=information @click=${l=>{l.stopPropagation();let a=l.currentTarget;this.addFieldInfoFlowItem(e,a)}}></calcite-action>`:""}renderEditAction(e){let{_messages:t}=this;return e.showEditAction?s`<calcite-action slot=actions-end .text=${t.edit} title=${t.edit??c} scale=s icon=pencil @click=${i=>{i.stopPropagation(),this.arcgisEditField.emit({fieldName:e.name})}}></calcite-action>`:""}renderDeleteAction(e){let{_messages:t}=this;return e.showDeleteAction?s`<calcite-action slot=actions-end .text=${t.delete} title=${t.delete??c} scale=s icon=trash @click=${i=>{i.stopPropagation(),this.arcgisDeleteField.emit({fieldName:e.name})}}></calcite-action>`:""}renderAddButton(){if(this.multiple)return s`<calcite-button .appearance=${this.hideCancel?"outline-fill":"solid"} .width=${this.hideCancel?"full":"half"} @click=${()=>{this.arcgisClose.emit({selectedFields:this.selectedFields}),this.arcgisFieldPickListDismissed.emit({selectedFields:this.selectedFields})}}>${this.okBtnText||(this.multiple?this._messages.done:this._messages.ok)}</calcite-button>`}renderCancelButton(){if(!this.hideCancel)return s`<calcite-button appearance=outline-fill .width=${this.multiple?"half":"full"} @click=${()=>{this.arcgisClose.emit(),this.arcgisFieldPickListDismissed.emit()}}>${this._messages.cancel}</calcite-button>`}};S("arcgis-field-pick-list",f);export{f as ArcgisFieldPickList};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as E}from"./
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
|
+
import{a as E}from"./L5CKYMQ2.js";import{a as n}from"./JDAVDYNR.js";import{b as k}from"./YKAKGUKV.js";import{e as f}from"./6F46EKAV.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"./P7UM2CD6.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.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()}load(){this.setRecentColorsFromStorage()}disconnectedCallback(){super.disconnectedCallback(),this.removeTooltip()}async handleOpen(){await this.colorPickerEl?.setFocus(),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.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
4
|
var e=(r=>(r.expression="expression/",r.raster="Raster.",r.relationship="relationships/",r))(e||{});export{e as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{A as s,B as u,H as h,g as r,i as n,q as o,z as a}from"./
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
|
+
import{A as s,B as u,H as h,g as r,i as n,q as o,z as a}from"./P7UM2CD6.js";export default $arcgis.t(([{formatNumber:c}])=>{var d=r`:host{display:block}:host([hidden]){display:none}.readOnlyLabel{display:block;font-size:var(--calcite-font-size-sm);font-variant-numeric:tabular-nums;line-height:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-inline:.5rem;padding-block:3px;border-color:var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px);color:var(--calcite-color-text-1)}:host(:not([read-only])) .readOnlyLabel{position:absolute;opacity:0}:host([alignment="start"]){.readOnlyLabel{text-align:start}}:host([alignment="end"]){.readOnlyLabel{text-align:end}}:host([alignment="center"]){.readOnlyLabel{text-align:center}}calcite-button{inline-size:100%;--calcite-offset-invert-focus: 1;--calcite-internal-animation-timing-fast: 0}calcite-input-number{inline-size:100%;--calcite-internal-animation-timing-fast: 0}`,l=class extends u{constructor(){super(...arguments),this._buttonRef=a(),this._inputRef=a(),this._labelRef=a(),this._formatOptions={style:"decimal",useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:2},this._formatValue=t=>c(t,this._formatOptions),this._pointerDownPosition=null,this._displayedValue="",this._editing=!1,this.alignment="center",this.readOnly=!1,this.value=0,this.arcgisChange=o({cancelable:!1})}static{this.properties={_displayedValue:16,_editing:16,alignment:3,editing:39,labelFormatter:0,readOnly:7,value:11}}static{this.styles=d}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}get editing(){return this._editing}async edit(){this._enterEdit()}getLabelBoundingClientRect(){return this._labelRef.value?this._labelRef.value.getBoundingClientRect():this.el.getBoundingClientRect()}willUpdate(t){if(t.has("value")||t.has("labelFormatter")){let e=this.value;this._displayedValue=this._internalLabelFormatter(e)}}updated(t){let e=this._inputRef.value,i=this.renderRoot.querySelector(".readOnlyLabel");e&&i&&(e.style.width=`${i.offsetWidth}px`)}_enterEdit(){this._editing||this.readOnly||(this._editing=!0,this.requestUpdate("editing",!1),this.updateComplete.then(async()=>{let t=this._inputRef.value;await t?.setFocus(),await t?.selectText()}))}_exitEdit(t,e=!1){this._editing&&(t?this._commitValue(this._inputRef.value):this._inputRef.value&&(this._displayedValue=this._internalLabelFormatter(this.value),this._inputRef.value.value=`${this.value}`),this._editing=!1,this.requestUpdate("editing",!0),e||this.updateComplete.then(async()=>{await this._buttonRef.value?.setFocus()}))}_commitValue(t){let e=this._parseNumber(t?.value??"");e!==null&&this.value!==e&&(this.value=e,this.arcgisChange.emit())}_parseNumber(t){if(t.trim()==="")return null;let e=Number(t);return Number.isFinite(e)?e:this.value??null}_internalLabelFormatter(t){let e=this.labelFormatter;return e?e(t,this._formatValue)??this._formatValue(t):this._formatValue(t)}_onBlur(){this._exitEdit(!0,!0)}_onValueChange(t){this._commitValue(t.currentTarget)}_onKeyDown(t){t.key==="Enter"?(this._exitEdit(!0),t.stopPropagation(),t.preventDefault()):t.key==="Escape"&&(this._exitEdit(!1),t.stopPropagation(),t.preventDefault())}_onPointerDown(t){this._pointerDownPosition={x:t.clientX,y:t.clientY}}_onClick(t){if(this._pointerDownPosition){let e=t.clientX-this._pointerDownPosition.x,i=t.clientY-this._pointerDownPosition.y;if(Math.sqrt(e*e+i*i)>2)return}this._enterEdit(),this._pointerDownPosition=null}_onInput(t){let e=this._parseNumber(t.currentTarget.value??"");if(e===null){this._displayedValue="";return}this._displayedValue=this._internalLabelFormatter(e)}render(){let{alignment:t,_displayedValue:e}=this,i=[n`<span class="readOnlyLabel"><span ${s(this._labelRef)}>${e}</span></span>`];return this.readOnly||i.push(n`<calcite-button .alignment=${t} appearance=transparent .hidden=${this._editing} @pointerdown=${this._onPointerDown} @click=${this._onClick} scale=s width=full ${s(this._buttonRef)}>${e}</calcite-button>`,n`<calcite-input-number .alignment=${t} group-separator .hidden=${!this._editing} number-button-type=none @calciteInputNumberChange=${this._onValueChange} @keydown=${this._onKeyDown} @blur=${this._onBlur} @input=${this._onInput} scale=s status=idle .value=${`${this.value}`} ${s(this._inputRef)}></calcite-input-number>`),i}};h("arcgis-label-input",l);return l},"intl")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as k,b as m}from"./AOYTSY5V.js";import{a as R}from"./XIDH7CJH.js";import{b as B}from"./CO6TDXJI.js";import"./6Z4VQPIH.js";import{A as F,B as S,H as O,g as L,i as w,m as $,n as q,q as Z,z as U}from"./EZSZLYQ3.js";export default $arcgis.t(([{formatDate:N,convertDateFormatToIntlOptions:y,formatDateOnly:K,formatTimeOnly:Q,formatTimestamp:C,formatNumber:X},Y,{clone:I}])=>{function _(i){return new Date(`1970-01-01T${i}Z`).getTime()}function M(i){return new Date(`${i} 00:00:00`).getTime()}function ee(i,e,t){let o;return e==="unknown"?o=N(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):o=N(i,{...y("short-date-short-time"),timeZone:e}),o}function te(i){return i?K(i,y("short-date")):""}function ie(i){let e;return typeof i=="string"?e=Q(i,y("short-date-long-time")):e=N(i,{...y("long-time"),timeZone:"utc"}),e}function se(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?C(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):C(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?N(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):N(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function A(i,e){if(i.type!=="feature"&&i.type!=="subtype-group"&&i.type!=="subtype-sublayer"&&i.type!=="imagery")return;let t;return i.fields.forEach(o=>{let s=o.name,r=o.domain;if(i.type!=="imagery"&&i.subtypeField===s){let f;i.type==="subtype-group"||i.type==="feature"?f=i.subtypes:f=i.parent.subtypes,f.forEach(l=>{i.type==="subtype-sublayer"&&i.subtypeCode!==l.code||(e.name===s&&(t=t||[],t.push({code:l.code,name:l.name})),l.domains&&Object.keys(l.domains).forEach(a=>{if(e.name===a){let n=l.domains[a];n?.type==="coded-value"&&n?.codedValues&&n.codedValues.forEach(u=>{let p=!1;t=t||[],t.forEach(c=>{c.code===u.code&&(p=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),p||t.push({code:u.code,name:u.name})})}}))})}if(e.name===s&&(i.type==="feature"||i.type==="imagery")){let f=i.type==="feature"?i.typeIdField:void 0,l=i.type==="feature"?i.types:void 0;i.type==="feature"&&f&&l?(f===s?t=l.map(a=>({code:a.id,name:a.name})):(t=t||[],l.forEach(a=>{if(!a.domains?.[s]||a.domains[s].type==="inherited"){let n=r;n?.codedValues&&n.codedValues.forEach(u=>{let p=!1;t.forEach(c=>{c.code===u.code&&(p=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),p||t.push(I(u))})}else a.domains?.[s]?.codedValues&&a.domains[s].codedValues.forEach(n=>{let u=!1;t.forEach(p=>{p.code===n.code&&(u=!0,`| ${p.name} |`.includes(`| ${n.name} |`)||(p.name+=` | ${n.name}`))}),u||t.push(I(n))})})),!t?.length&&r?.codedValues&&(t=I(r.codedValues))):r?.codedValues&&(t=r.codedValues)}}),t}function E(i,e){let t=e;if(t){let o="";for(let s=0;s<t.length;s++){let r=t[s];r.code==i&&(o+=(o.length?" | ":"")+r.name)}return o.length||(o=`${i}`),o}return i}function W(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function P(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 ne=L`: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}`,D=class extends S{constructor(){super(...arguments),this.dropdownNode=U(),this._messages=B({blocking:!0}),this._propWatcherTask=new k(this,{task:async([e,t,o,s])=>{let r=m(t)&&m(o)&&m(e)||m(s);if(!m(s)&&!m(t)&&!m(o)&&!m(e)?$("error",this,q("uniqueValues")):m(s)||(m(t)||$("error",this,q("layer")),m(o)||$("error",this,q("fieldName")),m(e)||$("error",this,q("view"))),m(t)&&m(o)&&!t.fields?.filter(f=>f.name===o))throw $("error",this,"Field could not be found."),new Error;if(!r)throw new Error;await this.processProps()},args:()=>[this.view,this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=Z(),this.arcgisSortByChange=Z(),this.arcgisLoad=Z()}static{this.properties={initialRender:16,view:0,layer:0,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ne}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(m(e?.uniqueValueInfos)){let{uniqueValueInfos:t,partialUniqueValues:o}=e;return{uniqueValues:t,partialUniqueValues:o}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:t,view:o}=this,s=e?.fields?.filter(r=>r.name===t)?.[0];if(m(this.uniqueValues))this.fieldInfo={layerField:s,fieldDomains:e&&s?A(e,s):void 0,simpleType:e&&s?P(s):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&s){this.fieldInfo={layerField:s,fieldDomains:A(e,s),simpleType:P(s),partialUniqueValues:!1};let{fieldInfo:r}=this;try{let f=await Y({layer:e,view:o,field:t,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),l=W(s),a=f.uniqueValueInfos.filter(n=>m(n.value)?s.type==="string"&&!l||s.type==="guid"?n.value!=="<Null>"&&`${n.value}`.trim()!=="":(W(s)||s.type,n.value!=="<Null>"&&n.value!==""):!1);a.sort((n,u)=>n.count>u.count?-1:n.count<u.count?1:0),r.fieldDomains?.length&&r.fieldDomains.forEach(n=>{a.find(u=>u.value===n.code)||a.push({value:n.code,count:0})}),r.uniqueValueInfos=a,r.partialUniqueValues=f.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(f){if($("error",this,`uniqueValues() - ${f.message}`),this.hasFieldDomains(r)){let l=[];r.fieldDomains.forEach(a=>{l.find(n=>n.value===a.code)||l.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:t}=this;this.listNode=e,t&&e?.setAttribute("style",`max-height: ${t||400}px`)}onSortMenuSelect(e){let t=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=t||void 0,this.arcgisSortByChange.emit(t||void 0)}isSameLists(e,t){if(!e&&!t)return!0;if(!e||!t||e?.length!==t?.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:t,sortBy:o,multiple:s,initialRender:r,showFilterLength:f,_messages:l}=this,{fieldDomains:a,uniqueValueInfos:n,partialUniqueValues:u,layerField:p}=e,c=p?.type;if(!n?.length)return"";let x=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,z=c?["date","date-only","time-only"].includes(c):!1,H=g=>{g.sort((d,h)=>d.count<=h.count?1:-1)},j=g=>{let d=a?.length;g.sort((h,v)=>{if(!d&&x)return(typeof h.value=="string"?Number.parseFloat(h.value):h.value)-(typeof v.value=="string"?Number.parseFloat(v.value):v.value);{let V=d?E(h.value,a):h.value,b=d?E(v.value,a):v.value;return`${V}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${V}`.localeCompare(`${b}`)}})},G=(g,d)=>{g.sort((h,v)=>{let V=d?.indexOf(h.value)??-1,b=d?.indexOf(v.value)??-1;return V===b||V>-1&&b>-1?0:V>b?-1:1})};j(n),!o||o==="count"?H(n):o==="selected"&&G(n,t);let J=n.map(g=>this.renderUniqueValue(g)),T;return u&&!r&&(T=w`<div class="unique-values-content-list-msg">${l.errors.tooManyUniqueValues}</div>`),w`<div class="container"><calcite-list .label=${l.values} class="popover-unique-list" .filterEnabled=${n.length>=f} .selectionMode=${s?"multiple":"single"} .filterPlaceholder=${l.searchValues} @calciteListChange=${g=>{let d=g.target.selectedItems.map(h=>h.value);!a&&c==="date-only"?d=d?.map(h=>M(h)):!a&&c==="time-only"?d=d?.map(h=>_(h)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?d=d?.map(h=>Number.parseInt(h)):c&&["single","double"].includes(c)&&(d=d?.map(h=>Number.parseFloat(h))),!this.isSameLists(d,this.selectedValues)&&(this.selectedValues=d,this.arcgisChange.emit(d))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${F(this.setListRef)}>${n.length>=f&&!r?this.renderSort(x,z):null}${J}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,t){let{sortBy:o,_messages:s}=this;return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${F(this.dropdownNode)}><calcite-action slot=trigger .label=${s.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${o==="count"||!m(o)} data-value=count>${s.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="name"} data-value=name>${e||t?s.sortAscending:s.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="selected"} data-value=selected>${s.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:t,initialRender:o,view:s,fieldInfo:r,numberFormatOptions:f}=this,{fieldDomains:l,uniqueValueInfos:a,simpleType:n}=r,u=s&&"timeZone"in s&&s.timeZone||"system",p=l?.length?E(e.value,l):n==="date"?ee(e.value,u):n==="date-only"?te(e.value):n==="time-only"?ie(e.value):n==="timestamp-offset"?se(e.value,s):typeof e.value=="number"?X(e.value,f):e.value,c=t?n==="date-only"?t.includes(l?.length?e.value:M(e.value)):n==="time-only"?t.includes(l?.length?e.value:_(e.value)):t.includes(e.value):!1;return R(`list-item_${e.value}`,w`<calcite-list-item .label=${`${p}`} .value=${`${e.value}`} .selected=${c}>${m(e.count)&&(a.length>200&&!o||a.length<=200)?w`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};O("arcgis-unique-values-list",D);return D},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
|
+
import{a as k,b as m}from"./XVG75NIN.js";import{a as R}from"./JDAVDYNR.js";import{b as B}from"./YKAKGUKV.js";import"./6F46EKAV.js";import{A as F,B as S,H as O,g as L,i as w,m as $,n as q,q as Z,z as U}from"./P7UM2CD6.js";export default $arcgis.t(([{formatDate:N,convertDateFormatToIntlOptions:y,formatDateOnly:K,formatTimeOnly:Q,formatTimestamp:C,formatNumber:X},Y,{clone:I}])=>{function _(i){return new Date(`1970-01-01T${i}Z`).getTime()}function M(i){return new Date(`${i} 00:00:00`).getTime()}function ee(i,e,t){let o;return e==="unknown"?o=N(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):o=N(i,{...y("short-date-short-time"),timeZone:e}),o}function te(i){return i?K(i,y("short-date")):""}function ie(i){let e;return typeof i=="string"?e=Q(i,y("short-date-long-time")):e=N(i,{...y("long-time"),timeZone:"utc"}),e}function se(i,e){return typeof i=="string"?e&&"timeZone"in e&&e.timeZone==="unknown"?C(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):C(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"}):e&&"timeZone"in e&&e.timeZone==="unknown"?N(i,{...y("short-date-short-time"),timeZone:"utc",timeZoneName:"shortOffset"}):N(i,{...y("short-date-short-time"),timeZone:e&&"timeZone"in e&&e.timeZone?e.timeZone:"system"})}function A(i,e){if(i.type!=="feature"&&i.type!=="subtype-group"&&i.type!=="subtype-sublayer"&&i.type!=="imagery")return;let t;return i.fields.forEach(o=>{let s=o.name,r=o.domain;if(i.type!=="imagery"&&i.subtypeField===s){let f;i.type==="subtype-group"||i.type==="feature"?f=i.subtypes:f=i.parent.subtypes,f.forEach(l=>{i.type==="subtype-sublayer"&&i.subtypeCode!==l.code||(e.name===s&&(t=t||[],t.push({code:l.code,name:l.name})),l.domains&&Object.keys(l.domains).forEach(a=>{if(e.name===a){let n=l.domains[a];n?.type==="coded-value"&&n?.codedValues&&n.codedValues.forEach(u=>{let p=!1;t=t||[],t.forEach(c=>{c.code===u.code&&(p=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),p||t.push({code:u.code,name:u.name})})}}))})}if(e.name===s&&(i.type==="feature"||i.type==="imagery")){let f=i.type==="feature"?i.typeIdField:void 0,l=i.type==="feature"?i.types:void 0;i.type==="feature"&&f&&l?(f===s?t=l.map(a=>({code:a.id,name:a.name})):(t=t||[],l.forEach(a=>{if(!a.domains?.[s]||a.domains[s].type==="inherited"){let n=r;n?.codedValues&&n.codedValues.forEach(u=>{let p=!1;t.forEach(c=>{c.code===u.code&&(p=!0,`| ${c.name} |`.includes(`| ${u.name} |`)||(c.name+=` | ${u.name}`))}),p||t.push(I(u))})}else a.domains?.[s]?.codedValues&&a.domains[s].codedValues.forEach(n=>{let u=!1;t.forEach(p=>{p.code===n.code&&(u=!0,`| ${p.name} |`.includes(`| ${n.name} |`)||(p.name+=` | ${n.name}`))}),u||t.push(I(n))})})),!t?.length&&r?.codedValues&&(t=I(r.codedValues))):r?.codedValues&&(t=r.codedValues)}}),t}function E(i,e){let t=e;if(t){let o="";for(let s=0;s<t.length;s++){let r=t[s];r.code==i&&(o+=(o.length?" | ":"")+r.name)}return o.length||(o=`${i}`),o}return i}function W(i){return["small-integer","big-integer","integer","single","double","long"].includes(i.type)}function P(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 ne=L`: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}`,D=class extends S{constructor(){super(...arguments),this.dropdownNode=U(),this._messages=B({blocking:!0}),this._propWatcherTask=new k(this,{task:async([e,t,o,s])=>{let r=m(t)&&m(o)&&m(e)||m(s);if(!m(s)&&!m(t)&&!m(o)&&!m(e)?$("error",this,q("uniqueValues")):m(s)||(m(t)||$("error",this,q("layer")),m(o)||$("error",this,q("fieldName")),m(e)||$("error",this,q("view"))),m(t)&&m(o)&&!t.fields?.filter(f=>f.name===o))throw $("error",this,"Field could not be found."),new Error;if(!r)throw new Error;await this.processProps()},args:()=>[this.view,this.layer,this.fieldName,this.uniqueValues]}),this.initialRender=!0,this.multiple=!1,this.partialUniqueValues=!1,this.showFilterLength=10,this.arcgisChange=Z(),this.arcgisSortByChange=Z(),this.arcgisLoad=Z()}static{this.properties={initialRender:16,view:0,layer:0,fieldName:1,uniqueValues:0,numberFormatOptions:0,selectedValues:0,sortBy:1,multiple:5,partialUniqueValues:5,showFilterLength:9,maxHeight:9}}static{this.styles=ne}async setFocus(){this.listNode?.setFocus()}async getUniqueValues(){let{fieldInfo:e}=this;if(m(e?.uniqueValueInfos)){let{uniqueValueInfos:t,partialUniqueValues:o}=e;return{uniqueValues:t,partialUniqueValues:o}}}loaded(){this.layer&&this.fieldInfo&&(setTimeout(()=>this.initialRender=!1,800),this.listNode?.setFocus())}async processProps(){let{layer:e,fieldName:t,view:o}=this,s=e?.fields?.filter(r=>r.name===t)?.[0];if(m(this.uniqueValues))this.fieldInfo={layerField:s,fieldDomains:e&&s?A(e,s):void 0,simpleType:e&&s?P(s):void 0,partialUniqueValues:this.partialUniqueValues??!1,uniqueValueInfos:this.uniqueValues},this.arcgisLoad.emit();else if(e&&s){this.fieldInfo={layerField:s,fieldDomains:A(e,s),simpleType:P(s),partialUniqueValues:!1};let{fieldInfo:r}=this;try{let f=await Y({layer:e,view:o,field:t,sqlWhere:"definitionExpression"in e?e.definitionExpression??void 0:void 0,forBinning:!1}),l=W(s),a=f.uniqueValueInfos.filter(n=>m(n.value)?s.type==="string"&&!l||s.type==="guid"?n.value!=="<Null>"&&`${n.value}`.trim()!=="":(W(s)||s.type,n.value!=="<Null>"&&n.value!==""):!1);a.sort((n,u)=>n.count>u.count?-1:n.count<u.count?1:0),r.fieldDomains?.length&&r.fieldDomains.forEach(n=>{a.find(u=>u.value===n.code)||a.push({value:n.code,count:0})}),r.uniqueValueInfos=a,r.partialUniqueValues=f.uniqueValueInfos.length===2e3,this.arcgisLoad.emit()}catch(f){if($("error",this,`uniqueValues() - ${f.message}`),this.hasFieldDomains(r)){let l=[];r.fieldDomains.forEach(a=>{l.find(n=>n.value===a.code)||l.push({value:a.code,count:void 0})})}}setTimeout(()=>{this.initialRender=!1,this.listNode?.setFocus()},800)}}setListRef(e){let{maxHeight:t}=this;this.listNode=e,t&&e?.setAttribute("style",`max-height: ${t||400}px`)}onSortMenuSelect(e){let t=e.currentTarget.selectedItems?.[0].getAttribute("data-value");this.sortBy=t||void 0,this.arcgisSortByChange.emit(t||void 0)}isSameLists(e,t){if(!e&&!t)return!0;if(!e||!t||e?.length!==t?.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}hasFieldDomains(e){return!!e.fieldDomains?.length}render(){return this._propWatcherTask.render({complete:()=>{let{fieldInfo:e,selectedValues:t,sortBy:o,multiple:s,initialRender:r,showFilterLength:f,_messages:l}=this,{fieldDomains:a,uniqueValueInfos:n,partialUniqueValues:u,layerField:p}=e,c=p?.type;if(!n?.length)return"";let x=c?["small-integer","big-integer","integer","single","double","long","oid"].includes(c):!1,z=c?["date","date-only","time-only"].includes(c):!1,H=g=>{g.sort((d,h)=>d.count<=h.count?1:-1)},j=g=>{let d=a?.length;g.sort((h,v)=>{if(!d&&x)return(typeof h.value=="string"?Number.parseFloat(h.value):h.value)-(typeof v.value=="string"?Number.parseFloat(v.value):v.value);{let V=d?E(h.value,a):h.value,b=d?E(v.value,a):v.value;return`${V}`.startsWith("_")?1:`${b}`.startsWith("_")?-1:`${V}`.localeCompare(`${b}`)}})},G=(g,d)=>{g.sort((h,v)=>{let V=d?.indexOf(h.value)??-1,b=d?.indexOf(v.value)??-1;return V===b||V>-1&&b>-1?0:V>b?-1:1})};j(n),!o||o==="count"?H(n):o==="selected"&&G(n,t);let J=n.map(g=>this.renderUniqueValue(g)),T;return u&&!r&&(T=w`<div class="unique-values-content-list-msg">${l.errors.tooManyUniqueValues}</div>`),w`<div class="container"><calcite-list .label=${l.values} class="popover-unique-list" .filterEnabled=${n.length>=f} .selectionMode=${s?"multiple":"single"} .filterPlaceholder=${l.searchValues} @calciteListChange=${g=>{let d=g.target.selectedItems.map(h=>h.value);!a&&c==="date-only"?d=d?.map(h=>M(h)):!a&&c==="time-only"?d=d?.map(h=>_(h)):c&&["date","oid","small-integer","big-integer","integer","long"].includes(c)?d=d?.map(h=>Number.parseInt(h)):c&&["single","double"].includes(c)&&(d=d?.map(h=>Number.parseFloat(h))),!this.isSameLists(d,this.selectedValues)&&(this.selectedValues=d,this.arcgisChange.emit(d))}} @calciteListFilter=${()=>{this.dropdownNode.value&&(this.dropdownNode.value.disabled=this.listNode.filteredItems.length<4)}} ${F(this.setListRef)}>${n.length>=f&&!r?this.renderSort(x,z):null}${J}</calcite-list>${T}</div>`},error:()=>""})}renderSort(e,t){let{sortBy:o,_messages:s}=this;return w`<calcite-dropdown slot=filter-actions-end placement=bottom-end overlay-positioning=fixed @calciteDropdownSelect=${this.onSortMenuSelect} ${F(this.dropdownNode)}><calcite-action slot=trigger .label=${s.sortValues} text><calcite-icon scale=s icon=sortDescending flip-rtl></calcite-icon></calcite-action><calcite-dropdown-group><calcite-dropdown-item .selected=${o==="count"||!m(o)} data-value=count>${s.sortByCount}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="name"} data-value=name>${e||t?s.sortAscending:s.sortAlphabetical}</calcite-dropdown-item><calcite-dropdown-item .selected=${o==="selected"} data-value=selected>${s.sortSelected}</calcite-dropdown-item></calcite-dropdown-group></calcite-dropdown>`}renderUniqueValue(e){let{selectedValues:t,initialRender:o,view:s,fieldInfo:r,numberFormatOptions:f}=this,{fieldDomains:l,uniqueValueInfos:a,simpleType:n}=r,u=s&&"timeZone"in s&&s.timeZone||"system",p=l?.length?E(e.value,l):n==="date"?ee(e.value,u):n==="date-only"?te(e.value):n==="time-only"?ie(e.value):n==="timestamp-offset"?se(e.value,s):typeof e.value=="number"?X(e.value,f):e.value,c=t?n==="date-only"?t.includes(l?.length?e.value:M(e.value)):n==="time-only"?t.includes(l?.length?e.value:_(e.value)):t.includes(e.value):!1;return R(`list-item_${e.value}`,w`<calcite-list-item .label=${`${p}`} .value=${`${e.value}`} .selected=${c}>${m(e.count)&&(a.length>200&&!o||a.length<=200)?w`<div class="count" slot=actions-end>${`${e.count}`}</div>`:null}</calcite-list-item>`)}};O("arcgis-unique-values-list",D);return D},"intl","smartMapping/statistics/uniqueValues","core/lang")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{k as r,w as s,x as i,y as o}from"./
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
|
+
import{k as r,w as s,x as i,y as o}from"./P7UM2CD6.js";var u=s(class extends i{constructor(){super(...arguments),this.key=r}render(t,e){return this.key=t,e}update(t,[e,m]){return e!==this.key&&(o(t),this.key=e),m}});export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as b}from"./
|
|
3
|
+
v5.0.0-next.117 */
|
|
4
|
+
import{a as b}from"./L5CKYMQ2.js";import{B as m,H as o,g as h,i as d,q as r}from"./P7UM2CD6.js";var $=h`.container{display:flex;align-items:center;justify-content:space-between;position:relative}.slider{width:50%}.input{width:45%}`,p=class extends m{constructor(){super(...arguments),this.debouncedApplyValueOnChange=b(e=>this.applyValueOnChange(e),800),this.disabled=!1,this.flipLabels=!1,this.min=0,this.max=100,this.value=50,this.step=1,this.withSteppers=!1,this.arcgisSliderInputValueChange=r(),this.arcgisValueChange=r()}static{this.properties={disabled:5,label:1,flipLabels:5,min:9,max:9,value:9,step:9,unitsLabel:1,withSteppers:5}}static{this.styles=$}applyValueOnChange(e){let{min:i,max:a,value:n}=this,s=Number(e.value),t=i!==void 0&&a!==void 0?Math.min(a,Math.max(i,s)):s;s!==n&&(e.value=`${t}`,this.arcgisValueChange.emit(t),this.arcgisSliderInputValueChange.emit(t),this.value=t)}render(){let{disabled:e,min:i,max:a,value:n,step:s,withSteppers:t,flipLabels:c,unitsLabel:u,label:g}=this;return d`<div class="container"><calcite-slider class="slider" .disabled=${e} .min=${i} .max=${a} .value=${n} .step=${s} @calciteSliderInput=${l=>this.debouncedApplyValueOnChange(l.currentTarget)}></calcite-slider><calcite-input class="input" .disabled=${e} .min=${i} .max=${a} .numberButtonType=${t?"vertical":"none"} .prefixText=${c?u:""} @calciteInputInput=${l=>this.debouncedApplyValueOnChange(l.target)} @click=${l=>l.stopPropagation()} scale=s step=any .suffixText=${c?"":u} type=number .value=${`${n}`} .label=${g}></calcite-input></div>`}};o("arcgis-slider-input",p);export{p as ArcgisSliderInput};
|