@arcgis/core 5.0.0-next.27 → 5.0.0-next.29
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/Map.js +1 -1
- package/WebScene.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{aca72ca7f43f70eb8077.js → 0bfb7db0a151a5e85dd1.js} +1 -1
- package/assets/esri/core/workers/chunks/2d0d8243ed0c21f8a498.js +1 -0
- package/assets/esri/core/workers/chunks/{e873359e00e0866d4ef6.js → 66853ecdebfc2aa68ce7.js} +21 -22
- package/assets/esri/core/workers/chunks/6c8f5a56e94fdbe6a4a5.js +1 -0
- package/assets/esri/core/workers/chunks/6ce7ca6bebdc61d8eada.js +1 -0
- package/assets/esri/core/workers/chunks/{8b33732e3c2924c1f60d.js → e615983fab688d515205.js} +1 -1
- package/assets/esri/core/workers/chunks/e6fa6f9c278589c8a713.js +1 -0
- package/chunks/CheckerBoard.glsl.js +2 -2
- package/chunks/ColorMaterial.glsl.js +2 -2
- package/chunks/ComponentShader.glsl.js +2 -2
- package/chunks/DefaultMaterial.glsl.js +2 -2
- package/chunks/ImageMaterial.glsl.js +2 -2
- package/chunks/LineMarker.glsl.js +2 -2
- package/chunks/NativeLine.glsl.js +2 -2
- package/chunks/Path.glsl.js +3 -3
- package/chunks/Pattern.glsl.js +2 -2
- package/chunks/RealisticTree.glsl.js +2 -2
- package/chunks/RibbonLine.glsl.js +2 -2
- package/chunks/ShadedColorMaterial.glsl.js +2 -2
- package/chunks/Terrain.glsl.js +27 -37
- package/chunks/WaterSurface.glsl.js +2 -2
- package/config.js +1 -1
- package/core/accessorSupport/decorators/property.js +1 -1
- package/core/has.js +1 -1
- package/geometry/Circle.js +1 -1
- package/geometry/support/MeshMaterial.js +1 -1
- package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
- package/interfaces.d.ts +29 -23
- package/kernel.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/package.json +2 -2
- package/renderers/support/UniqueValueClass.js +1 -1
- package/renderers/visualVariables/SizeVariable.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/{OutputColorHighlightOID.glsl.js → OutputColorHighlightOLID.glsl.js} +2 -3
- package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/Viewport2DMixin.js +1 -1
- package/views/navigation/Momentum.js +1 -1
- package/views/video/VideoOperationalDataView.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/Widget.js +1 -1
- package/assets/esri/core/workers/chunks/3f2b1d2102eef7ac29b4.js +0 -1
- package/assets/esri/core/workers/chunks/7532e819d2f4ee4813be.js +0 -1
- package/assets/esri/core/workers/chunks/76f2ce14d0d3001620a9.js +0 -1
- package/assets/esri/core/workers/chunks/ab5c386100b84bc564dd.js +0 -1
- package/views/3d/webgl-engine/lib/ComponentUtils.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5125],{13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},16494:(e,t,r)=>{r.d(t,{Nd:()=>a,W5:()=>o});var s=r(37330);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),n=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new s.I({whiteList:i,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(n.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new s.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},18047:(e,t,r)=>{r.d(t,{Up:()=>l,ZV:()=>h,yx:()=>a});var s=r(73444);const i={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let n=new WeakMap,o={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e){const{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:s}=e;return{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:"auto"===s?"auto":"always"===s}}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const r=(0,s.lR)(),o=r&&i[r]||(0,s.QC)();n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,s.Ml)(()=>{n=new WeakMap,o={}}),new Map},36708:(e,t,r)=>{r.d(t,{C_:()=>u,OH:()=>g,Vh:()=>m,on:()=>c,pc:()=>v,wB:()=>l,z7:()=>h});var s=r(37955),i=r(36563),n=r(97768),o=r(74887),a=r(14012);function l(e,t,r={}){return d(e,t,r,p)}function h(e,t,r={}){return d(e,t,r,f)}function d(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.xt)(d),r(e)}const p=l(e,(e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return d=(0,i.hA)(()=>{p.remove(),c()}),d}function u(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,()=>{l(),n((0,o.NK)())}),d(e,e=>{l(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(80559);const g={sync:!0},m={initial:!0},v={sync:!0,initial:!0}},55125:(e,t,r)=>{r.r(t),r.d(t,{default:()=>at});var s=r(70333),i=r(92602),n=r(11254),o=r(49186),a=r(65529),l=r(37955),h=r(4718),d=r(93637),c=r(74887),u=r(84952),p=r(31635),f=r(91429),g=r(64108);let m=class extends a.nJ{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){return s.id.refreshToken(this)}refreshServerTokens(){return s.id.refreshServerTokens(this)}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=s.id,r=this.server?t.findServerInfo(this.server):null,i=r?.owningSystemUrl,n=i?t.findServerInfo(i):null;!1===e||i&&"portal"!==this.scope&&(!n?.webTierAuth||t.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,h.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,p.Cg)([(0,f.MZ)()],m.prototype,"creationTime",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"expires",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"isAdmin",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"oAuthState",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"resources",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"scope",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"ssl",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"token",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"tokenRefreshBuffer",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"userId",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"validity",void 0),m=(0,p.Cg)([(0,g.$)("esri.identity.Credential")],m);const v=m;var _=r(79783),y=r(20150);function w(e){return function(){const e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\W/g,"").toLowerCase();return"dark"===e||"light"===e?e:void 0}()??(0,y.eg)(e??document.body)}function S(e){return`calcite-mode-${w(e)}`}r(44208);var I=r(53966),A=r(97768),k=r(61893),U=r(36708),C=r(13069),b=r(62788),P=r(71429),T=r(16494);const x="http://www.w3.org/",R=`${x}2000/svg`,O=`${x}1999/xlink`;let N=[],M=(e,t)=>{let r={};return Object.keys(e).forEach(t=>{r[t]=e[t]}),t&&Object.keys(t).forEach(e=>{r[e]=t[e]}),r},D=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),j=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},E=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(D(e[s],t))return s;return-1},L=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(D(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},q=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},$=[],Z=!1,F=e=>{(e.children||[]).forEach(F),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},V=()=>{Z=!1,$.forEach(F),$.length=0},B=e=>{$.push(e),Z||(Z=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(V,{timeout:16}):setTimeout(V,16))},H=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),B(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),B(e))},z=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)X(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(j(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===R?"href"===n?e.setAttributeNS(O,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=T.W5.sanitize(a):W(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function W(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let J,G=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)K(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),z(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},K=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),d=o.slice(n,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=M(s,{namespace:R})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,d):(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}G(i,e,s)}},X=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},Y=(e,t,r,s,i)=>{if(r===s)return!1;s=s||N;let n,o=(r=r||N).length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<o?r[l]:void 0,c=s[h];if(void 0!==a&&D(a,c))d=J(a,c,i)||d,l++;else{let a=E(r,c,l+1);if(a>=0){for(n=l;n<a;n++)H(r[n]),L(r,n,e,"removed");d=J(r[a],c,i)||d,l=a+1}else K(c,t,l<o?r[l].domNode:void 0,i),q(c),L(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)H(r[n]),L(r,n,e,"removed");return d};J=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=M(r,{namespace:R})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=Y(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(X(e,h,!1),X(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(j(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"!==o||W(e)){if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===R?"href"===o?e.setAttributeNS(O,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=T.W5.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):W(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}else{let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let Q=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,J(s,r,t)},domNode:e.domNode});const ee={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let te,re=e=>M(ee,e),se=(e,t,r)=>(r=re(r),K(t,e,void 0,r),Q(t,r)),ie=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),Q(t,r)),ne=(e,t,r)=>(r=re(r),t.domNode=e,G(e,t,r),Q(t,r)),oe=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),e.parentNode.removeChild(e),Q(t,r));te=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ae={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},le={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.startsWith("-")?e.style.setProperty(t,r):e.style[t]=r}},he=(e,t,r=!1)=>{let s=e;return t.forEach((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,t=>t.domNode===e):void 0;r&&!n&&i!==t.length-1||(s=n)}),s};var de=r(14813),ce=r(2741);let ue;ue="components/assets";var pe=r(36563);const fe=Symbol("widget"),ge=Symbol("widget-test-data"),me=[],ve={},_e=new WeakMap;function ye(e,t){let r=t.children;if(r?.length)for(let t=0;t<r.length;++t)r[t]=ye(e,r[t]);else r=me;const s=t.vnodeSelector;if(Ae(s)){const i=t.properties||ve,n=i.key||s,o={key:n,afterCreate:we,afterUpdate:Se,afterRemoved:Ie,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}};return{vnodeSelector:s.vnodeSelector,properties:o,children:void 0,text:void 0,domNode:null}}return t}function we(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,_e.set(e,o),o.afterCreate?.(o,e),s.addHandles((0,pe.hA)(()=>Ie(e))),queueMicrotask(()=>{o[ge].projector?.renderNow()})}function Se(e,t,r,{widgetProperties:s}){const i=_e.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Ie(e){const t=_e.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),_e.delete(e))}function Ae(e){return"function"==typeof e&&e[fe]}const ke=new Set;new Map;const Ue=new Map;function Ce(){Ue.clear()}function be(e){Ue.delete(e)}var Pe=r(98291),Te=r(76030);(()=>{const e=new Map;new ResizeObserver(t=>{Ce();for(const r of t)e.get(r.target)?.(r)})})();var xe=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Re=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Re(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=xe(i)),t.push(i))}};const Oe=function(...e){const t=Pe.A.acquire();for(let r=0;r<e.length;r++){const s=e[r],i=typeof s;if("string"===i)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===i)for(const e in s)s[e]&&t.push(e)}const r=t.join(" ");return Pe.A.release(t),r},Ne=function(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}};function Me(e,t,...r){return"function"!=typeof e||Ae(e)?function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return Re(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}var De;let je=0;function Ee(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?Ee(e[s],t[s]):e[s]=t[s]);return e}const Le=(e=>{let t;const r={...ae,...e},s=(n=r,{...le,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],d=[],c=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some(e=>customElements.get(e?.tagName?.toLowerCase()));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();s=he(a.getLastRender(),r,!0)}else n.reverse(),s=he(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),s.eventHandlerInterceptor=void 0,h.push(a),d.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=d[e]();i("rendered",void 0);try{h[e].update(t)}catch(e){console.error(e)}i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,d)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{c(se,e,t)},insertBefore:(e,t)=>{c(ie,e,t)},merge:(e,t)=>{c(ne,e,t)},replace:(e,t)=>{c(oe,e,t)},detach:e=>{for(let t=0;t<d.length;t++)if(d[t]===e)return d.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(Ce(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let qe=!1,$e=class extends((0,k.g)(a.nJ)){static{this[De]=!0}constructor(e,t){super(e,t),this._attached=!1,this._projector=Le,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this._loadLocale=(0,c.sg)(async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,_.ud)(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=Ee((0,h.o8)(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&I.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles((0,pe.hA)()),de.qu||(0,de.Qu)((0,u.s2)((0,ce.s)("components/assets")));const r="esri-widget-uid-"+(0,C.lk)(),s=this.render.bind(this);this._trackingTarget=new P.r(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const i=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),n=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??i(),t=e.properties??={};if(t.key??=r,Ae(e.vnodeSelector)){if(!this.visible)return i()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let n=0;return e.children?.forEach(e=>{Ae(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${n++}`)}),ye(this,e)};this.render=()=>{if(qe)return n();let e=(t=this,Ue.get(t)??null);var t;if(e)return e;this._trackingTarget.clear(),qe=!0;try{e=(0,b.a)(this._trackingTarget,n)}catch(t){throw I.A.getLogger(this).error(t),t}finally{qe=!1}return e&&function(e,t){Ue.set(e,t)}(this,e),e};const o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),function(e){ke.add(e),e.finally(()=>ke.delete(e))}(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(c.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,A.pR)(this._trackingTarget),(0,A.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,be(this))}get container(){return this._get("container")}set container(e){var t;this._get("container")||this._set("container","string"==typeof(t=e)?document.getElementById(t):t??null)}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+je++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(De=fe,ge)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(be(this),this._projector.scheduleRender())}classes(...e){return Oe.apply(this,e)}renderNow(){be(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,U.wB)(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,l.wb)(e)&&this.addHandles(this._delegatedEventNames.map(t=>(0,l.on)(e,t,e=>{this.emit(t,e)})),"delegated-events")},U.pc)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(c.jH),this.scheduleRender()};this.addHandles([(0,_.oQ)(e),(0,U.wB)(()=>this.uiStrings,e)]),this.addHandles((0,U.z7)(()=>this.container,e=>{this.destroyed||this._attach(e)},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};(0,p.Cg)([(0,f.MZ)()],$e.prototype,"_readyForTrueRender",void 0),(0,p.Cg)([(0,f.MZ)({value:null})],$e.prototype,"container",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"icon",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"id",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"label",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"renderable",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"uiStrings",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"viewModel",void 0),(0,p.Cg)([(0,f.MZ)({value:!0})],$e.prototype,"visible",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"key",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"children",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"afterCreate",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"afterUpdate",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"afterRemoved",void 0),$e=(0,p.Cg)([(0,f.$K)("esri.widgets.Widget")],$e);const Ze=$e,Fe="esri-identity-modal",Ve={base:Fe,info:`${Fe}__info`,notice:`${Fe}__notice`};let Be=class extends Ze{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){const t=[];for(const r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(9e3),r.e(1436),r.e(6395),r.e(5455)]).then(r.bind(r,37836)),dialog:()=>Promise.all([r.e(9e3),r.e(1436),r.e(6395),r.e(985)]).then(r.bind(r,70985)),input:()=>Promise.all([r.e(9e3),r.e(1436),r.e(3263)]).then(r.bind(r,63263)),label:()=>Promise.all([r.e(9e3),r.e(224)]).then(r.bind(r,87843)),notice:()=>Promise.all([r.e(9e3),r.e(1436),r.e(8098)]).then(r.bind(r,48098))})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:n,resource:o,error:a}=this,{info:l,oAuthInfo:h,lblItem:d,invalidUser:c,noAuthService:u,lblUser:p,lblPwd:f,lblCancel:g,lblSigning:m,lblOk:v}=r;return Me("div",{class:this.classes(Ve.base,S(this.container))},Me("form",{bind:this,onsubmit:this._submit},Me("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",widthScale:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},Me("div",{class:Ve.info},(0,_.V2)(i?h:l,{server:n&&/\.arcgis\.com/i.test(n)?"ArcGIS Online":n,resource:`(${o||d})`})),a?Me("calcite-notice",{class:Ve.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Me("div",{slot:"message"},a.details?.httpStatus?c:u)):null,i?null:[Me("calcite-label",null,p,Me("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Me("calcite-label",null,f,Me("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],Me("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"footer-end",type:"button"},g),Me("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?m:v))))}_focusUsernameInput(){return async function(e){await(0,Te.$m)((0,c.Mq)(void 0));const t=e();t&&("setFocus"in t&&"function"==typeof t.setFocus?await t.setFocus():t instanceof HTMLElement&&t.focus())}(()=>this._usernameInputNode)}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"container",void 0),(0,p.Cg)([(0,f.MZ)(),Ne("esri/t9n/common")],Be.prototype,"commonMessages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"error",void 0),(0,p.Cg)([(0,f.MZ)(),Ne("esri/identity/t9n/identity")],Be.prototype,"messages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"oAuthPrompt",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"open",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"signingIn",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"title",null),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"resource",void 0),Be=(0,p.Cg)([(0,f.$K)("esri.identity.IdentityModal")],Be);const He=Be,ze="esriJSAPIOAuth";class We{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(ze,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken";(0,n.A)(e,{authMode:"anonymous",keepAlive:!0,method:"post",query:{f:"json",auth_token:this.refreshToken||this.token,client_id:t.appId,token_type_hint:this.refreshToken?"refresh_token":"access_token"}})}if(t?.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(ze,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(ze);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}We.prototype.declaredClass="esri.identity.OAuthCredential";var Je,Ge=r(25482);let Ke=class extends Ge.o{static{Je=this}constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Je.fromJSON(this.toJSON())}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"appId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"authNamespace",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"expiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"flowType",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"forceLogin",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"forceUserId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"locale",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"minTimeUntilExpiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"popup",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"popupCallbackUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"popupWindowFeatures",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"portalUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"preserveUrlHash",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"userId",void 0),Ke=Je=(0,p.Cg)([(0,f.$K)("esri.identity.OAuthInfo")],Ke);const Xe=Ke;let Ye=class extends Ge.o{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"adminTokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"currentVersion",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"hasPortal",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"hasServer",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"owningSystemUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"owningTenant",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"shortLivedTokenValidity",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"tokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"webTierAuth",void 0),Ye=(0,p.Cg)([(0,f.$K)("esri.identity.ServerInfo")],Ye);const Qe=Ye;var et=r(39131);const tt={},rt=e=>{const t=new u.s0(e.owningSystemUrl).host,r=new u.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},st=(e,t)=>!!(rt(e)&&t&&t.some(t=>t.test(e.server)));let it=null,nt=null;try{it=window.localStorage,nt=window.sessionStorage}catch{}class ot extends a.a${constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,u.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new Qe,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new v({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,h.oy)({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new Qe(t))}),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new Xe(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new v(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s=!1,i=!0;t&&(s=!(!t.token&&!t.credential),r=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,a=(0,c.Tw)();if(t.signal&&(0,c.u7)(t.signal,()=>{n.abort()}),(0,c.u7)(n,()=>{a.reject(new o.A("identity-manager:user-aborted","ABORTED"))}),(0,c.G4)(n))return a.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=s?this.findCredential(e):null;let d;if(h&&498===r?.details?.httpStatus)h.destroy();else if(h)return d=new o.A("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:r}),a.reject(d),a.promise;const p=this._findCredential(e,t);if(p)return a.resolve(p),a.promise;let f=this.findServerInfo(e);if(f)!f.hasPortal&&f.server&&f.owningSystemUrl&&this._hasSameServerInstance(f.server,f.owningSystemUrl)&&(f.hasPortal=!0),!f.hasServer&&this._isServerRsrc(e)&&(f._restInfoPms=this._getTokenSvcUrl(e),f.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return d=new o.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(d),a.promise;f=new Qe,f.server=this._getServerInstanceRoot(e),"string"==typeof t?(f.tokenServiceUrl=t,f.hasPortal=!0):(f._restInfoPms=t,f.hasServer=!0),this.registerServers([f])}return f.hasPortal&&void 0===f._selfReq&&(i||(0,u.FX)(f.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===f.tokenServiceUrl))&&(f._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(f.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,f,t,a,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new u.s0(this._appOrigin),a=e.shortLivedTokenValidity;let l,h,d,c,p,f,g,m;t&&(m=this.tokenValidity||a||this._defaultTokenValidity,m>a&&a>0&&(m=a)),r&&(l=r.isAdmin,h=r.serverUrl,d=r.token,f=r.signal,g=r.ssl,e.customParameters=r.customParameters),l?c=e.adminTokenServiceUrl:(c=e.tokenServiceUrl,p=new u.s0(c.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!g&&"http"===i.scheme&&((0,u.FX)(i.uri,c,!0)||"https"===p.scheme&&i.host===p.host&&"7080"===i.port&&"7443"===p.port)&&(c=c.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const v={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:d,expiration:m,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:f};return s||(v.withCredentials=!1),(0,n.A)(c,v).then(r=>{const s=r.data;if(!s?.token)return new o.A("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return tt[i]||(tt[i]={}),t&&(tt[i][t.username]=t.password),s.validity=m,s})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then(i=>{let a;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r?.force))a=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};a=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};a=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,n.A)(a,{query:l,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new o.A("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw i.destroy(),new o.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new o.A("identity-manager:invalid-request","Bad request");return{credential:i}})}).then(e=>({credential:e.credential,viewOnly:s}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=(0,c.Tw)(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new o.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,c.u7)(r.signal,()=>{n()});const a=new He({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",n),h=a.on("submit",e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then(n=>{i();const o=new v({userId:e.username,server:t.server??void 0,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)}).catch(e=>{a.error=e,a.signingIn=!1})});return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=(0,c.Tw)();const i=this._oAuthDfd;let n;s?.signal&&(0,c.u7)(s.signal,()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const a=r._oAuthCred;if(a.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,u.$1)(e),a.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=(0,u.$1)(e),a.save()||(a.codeVerifier=n=null)}else a.codeVerifier=null;let l,h;this._getCodeChallenge(n).then(i=>{const n=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!n)return void this._doOAuthSignIn(e,t,r,i);const o=new He({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",d),h=o.on("submit",()=>{p(),this._doOAuthSignIn(e,t,r,i)})});const d=()=>{p(),this._oAuthDfd=null,i.reject(new o.A("identity-manager:user-aborted","ABORTED"))},p=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}async refreshToken(e){const t=this.findServerInfo(e.server),r=t?.owningSystemUrl,s=!!r&&"server"===e.scope,i=s&&st(t,this._legacyFed),n=t.webTierAuth,o=n&&this.normalizeWebTierAuth,a=tt[e.server],l=a?.[e.userId];let h,d=e.resources&&e.resources[0],c=s?this.findServerInfo(r):null,u={username:e.userId,password:l};if(n&&!o)return;s&&!c&&this.serverInfos.some(e=>(this._isIdProvider(r,e.server)&&(c=e),!!c));const p=c?this.findCredential(c.server,e.userId):null;if(!s||p){if(!i){if(s)h={serverUrl:d,token:p?.token,ssl:p?.ssl};else if(o)u=null,h={ssl:e.ssl};else{if(!l){let r;return d&&(d=this._sanitizeUrl(d),e._enqueued=1,r=this._enqueue(d,t,null,null,e.isAdmin,e),r.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),r}e.isAdmin&&(h={isAdmin:!0})}return this.generateToken(s?c:t,s?null:u,h).then(t=>{e.token=t.token,e.expires=null!=t.expires?Number(t.expires):null,e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}p?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{const r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(st(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,l.on)(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));const t=(0,u.zf)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));const e=(0,u.zf)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});const r=(0,u.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,n.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,u.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new o.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",d=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===h);if(e=l||e,d.length)if(1===d.length){if(r=d[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(d.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,u.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,u.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new u.s0(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,et.$E)(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,et.qG)(e),t=(0,et.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){const t=(i.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,u.S8)(e),(0,u.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new u.s0(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some(e=>e.regex.test(t.uri));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||i.A.portalUrl&&(s=(0,u.FX)(t,i.A.portalUrl,!0)),s||(s=this._portals.some(e=>this._hasSameServerInstance(e,t.uri))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)});let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&rt(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,n.A)(e=s+"/rest/info",{query:{f:"json"}}).then(e=>e.data),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new u.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then(i=>{const n=new v({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?it:nt,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n})}const i=new v({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?it:nt,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new o.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,n.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const r=await(0,n.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some(t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r)),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,n.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,u.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,u.zs)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new o.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=(0,c.Tw)()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach(e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),o.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,a,h)=>{const d=e.sinfo_,p=!e.options_||!1!==e.options_.prompt,f=d.hasPortal&&this._findOAuthInfo(e.resUrl_);let g,m;if(i)t(new v({userId:i,server:d.server??void 0,token:a??void 0,expires:null!=h?Number(h):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,l.on)(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new v(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(o.A.fromJSON(e.data.error))))});(0,c.u7)(e.options_?.signal,()=>{s.remove()})}else if(f){let i=f._oAuthCred;if(!i){const e=new We(f,it),t=new We(f,nt);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,f._oAuthCred=i}if(i.isValid()){g=new v({userId:i.userId??void 0,server:d.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const n=f.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);n||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(d.server,i.refreshToken,i.appId).then(e=>(g.expires=Date.now()+1e3*e.expires_in,g.token=e.access_token,g)):Promise.resolve(g),e._pendingDfd.then(e=>n?this._exchangeToken(e.server,f.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)})):t(g)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(f.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,f,d).then(e=>{t(e)}).catch(r)}else{const s=()=>{p?e._pendingDfd=this.oAuthSignIn(e.resUrl_,d,f,e.options_).then(t,r):(m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(d.server,f.appId).then(e=>{(0,u.FX)(e.portalUrl,this._appOrigin,!0)?(g=new v({userId:e.username,server:d.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(g)):s()}).catch(s):s()}}else if(p){if(this._checkProtocol(e.resUrl_,d,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,d,s).then(t,r)}}else m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l,h;if(n&&(o=n.token,a=n.error,l=n.prompt),h=this._findCredential(i,{token:o,resource:e.resUrl_}),!h)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){h=e;break}if(h){const i=this.findCredential(e.resUrl_,h.userId);if(i)t(i);else if(st(s,this._legacyFed)){const e=h.toJSON();e.server=s.server,e.resources=null,t(new v(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(h.server),null,{serverUrl:e.resUrl_,token:h.token,signal:e.options_.signal,ssl:h.ssl})).then(r=>{t(new v({userId:h?.userId,server:s.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))},r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,token:o,error:a,prompt:l})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),h=e.sinfo_._restInfoPms;h?h.promise.then(t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,d.wc)("authInfo.tokenServicesUrl",t)||(0,d.wc)("authInfo.tokenServiceUrl",t)||(0,d.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,d.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}a&&r.owningSystemUrl?i():s()},()=>{e.sinfo_._restInfoPms=null;const t=new o.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)}):a&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch(()=>null).then(e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r)):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>r):r}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()}):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,o=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;const e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,n.A)(r+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new Xe({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})})):t=Promise.resolve(),t.then(()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,n.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,u.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,u.FX)(s,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(s)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const a={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(a.force_login=!0),r.forceUserId&&r.userId&&(a.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(a.redirectToUserOrgUrl=!0),i.codeVerifier&&(a.code_challenge=s||i.codeVerifier,a.code_challenge_method=s?"S256":"plain");const h=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",d=h+"?"+(0,u.x0)(a);if(r.popup){const e=window.open(d,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new o.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=(0,l.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{const e=new o.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:h,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=d}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,u.s2)(e.popupCallbackUrl);if(t){const e=(0,u.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),(0,u.a6)(e.path,e.query)}return r}}ot.prototype.declaredClass="esri.identity.IdentityManagerBase";const at=new ot;(0,s.Aq)(at)},61893:(e,t,r)=>{r.d(t,{Z:()=>d,g:()=>h});var s=r(31635),i=r(69622),n=r(36563),o=r(74887),a=r(64108);class l{constructor(){this._resolver=(0,o.Tw)(),this._status=0,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=1,this._cleanUp()},()=>{this._status=2,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return 1===this._status}isRejected(){return 2===this._status}isFulfilled(){return 0!==this._status}abort(){this._resolver.reject((0,o.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=(0,o.Tw)(),t=[...this._resolvingPromises,e.promise],r=this._allPromise=Promise.all(t);r.then(()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()},e=>{this.isFulfilled()||this._allPromise!==r||(0,o.zf)(e)||this._resolver.reject(e)}),e.resolve()}}const h=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this._promiseProps=new l,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return this._promiseProps.promise.then(()=>this).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}addResolvingTask(e){e&&!this._promiseProps.isFulfilled()&&(this.addHandles((0,n.rE)(e)),this._promiseProps.addResolvingPromise(e.promise))}};return r=(0,s.Cg)([(0,a.$)("esri.core.Promise")],r),r},d=h(i.A)},79783:(e,t,r)=>{r.d(t,{ud:()=>w,JK:()=>S,oQ:()=>I,V2:()=>k});var s=r(2741),i=r(97770),n=r(73444),o=r(10838),a=r(18047),l=r(53966),h=r(93637),d=r(799);const c=()=>l.A.getLogger("esri.intl.substitute");function u(e,t){switch(t.type){case"date":return(0,i.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return c().warn("missing format descriptor for key {key}"),f(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return c().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.Yq)(e):""}}var g=r(11254),m=r(49186);async function v(e){if(null!=y.fetchBundleAsset)return y.fetchBundleAsset(e);const t=await(0,g.A)(e,{responseType:"text"});return JSON.parse(t.data)}class _{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const i=t.exec(r);if(!i)throw new m.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const n=i[1]?`${i[1]}/`:"",a=i[2],l=(0,o.xO)(s),h=`${n}${a}.json`,d=l?`${n}${a}_${l}.json`:h;let c;try{c=await v(e(d))}catch(t){if(d===h)throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{c=await v(e(h))}catch(e){throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return c}(this.getAssetUrl,this.matcher,e,t)}}const y={},w=o.ud,S=n.JK,I=n.oQ,A=o.ao,k=function(e,t,r={}){const{format:s={}}=r;return(0,d.HC)(e,e=>function(e,t,r){let s,i;const n=e.indexOf(":");if(-1===n?s=e.trim():(s=e.slice(0,n).trim(),i=e.slice(n+1).trim()),!s)return"";const o=(0,h.wc)(s,t);if(null==o)return"";const a=(i?r?.[i]:null)??r?.[s];return a?u(o,a):i?p(o,i):f(o)}(e,t,s))};var U;A((U={pattern:"esri/",location:s.s},new _(U)))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(76591),l(76597),l(24321),l(60864),l(43519),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(14527),l(89390),l(98619),l(62602),l(22393),l(59469),l(32482),l(96598),l(51406),l(42398),l(58614),l(27950),l(25178),l(33079),l(71988),l(20304),l(31821),l(63761),l(10906),l(43616),l(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(76591),l(76597),l(24321),l(60864),l(43519),l(96336),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(14527),l(89390),l(98619),l(62602),l(22393),l(59469),l(32482),l(96598),l(51406),l(42398),l(58614),l(27950),l(25178),l(33079),l(71988),l(20304),l(31821),l(63761),l(10906),l(43616),l(51255),l(14113);var s=l(28491)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9466],{7142:(t,e,r)=>{function n(t,e){return s(t,"any",e?.origin)}function o(t,e){return s(t,"read",e?.origin)}function i(t,e){return s(t,"write",e?.origin)}function s(t,e,r){let n=t?.json;if(n?.origins&&r){let t;t="link-chart"===r?n.origins[r]&&("any"===e||e in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],t&&("any"===e||e in t)&&(n=t)}return n}r.d(e,{N5:()=>o,k4:()=>i,xF:()=>n})},10107:(t,e,r)=>{r.d(e,{MZ:()=>c,rM:()=>l});var n=r(53966),o=r(56507),i=r(16649),s=r(96156),a=r(47821);function c(t={}){return(e,r)=>{if(e===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${e.name}.${r}. Accessor does not support static properties.`);const c=Object.getOwnPropertyDescriptor(e,r),l=(0,s.z4)(e,r);c&&(c.get||c.set?(l.get=c.get||l.get,l.set=c.set||l.set):"value"in c&&("value"in t&&n.A.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${e.constructor.name}" already defined in the metadata`,t),l.value=t.value=c.value)),null!=t.readOnly&&(l.readOnly=t.readOnly);const u=t.aliasOf;if(u){const t="string"==typeof u?u:u.source,e="string"==typeof u?null:!0===u.overridable;let n;l.dependsOn=[t],l.get=function(){let e=(0,i.Jt)(this,t);if("function"==typeof e){n||(n=t.split(".").slice(0,-1).join("."));const r=(0,i.Jt)(this,n);r&&(e=e.bind(r))}return e},l.readOnly||(l.set=e?function(t){this._override(r,t)}:function(e){(0,a.h)(this,t,e)})}const f=t.type,h=t.types;if(!l.cast){let e;f&&!1!==t.useTypeForAutocast?e=function(t){let e=0,r=t;if((0,o.Zu)(t))return(0,o.Nd)(t);for(;Array.isArray(r)&&1===r.length&&"string"!=typeof r[0]&&"number"!=typeof r[0];)r=r[0],e++;const n=r;if((0,o.EK)(n))return 0===e?(0,o.MB)(n):(0,o._e)((0,o.MB)(n),e);if(1===e)return(0,o.eC)(n);if(e>1)return(0,o.e6)(n,e);const i=t;return i.from?i.from:(0,o.dp)(i)}(f):h&&(e=Array.isArray(h)?(0,o.wB)((0,o.aq)(h[0])):(0,o.aq)(h)),t.cast=function(t,e){if(t||e)return t?e?(r,n)=>e(t(r,n),n):t:e}(t.cast,e)}(0,s.CX)(l,t),t.range&&(l.cast=(0,o.Qp)(l.cast,t.range))}}function l(t,e,r){const n=(0,s.z4)(t,r);n.json||(n.json={});let o=n.json;return void 0!==e&&(o.origins||(o.origins={}),o.origins[e]||(o.origins[e]={}),o=o.origins[e]),o}},15142:(t,e,r)=>{r.d(e,{A:()=>l});var n=r(4576),o=r(21818);const i=(t,e,r,n)=>{let o=e,i=e;const s=r>>>1,a=t[o-1];for(;i<=s;){i=o<<1,i<r&&n(t[i-1],t[i])<0&&++i;const e=t[i-1];if(n(e,a)<=0)break;t[o-1]=e,o=i}t[o-1]=a},s=(t,e)=>t<e?-1:t>e?1:0;function a(t,e,r,n){void 0===e&&(e=0),void 0===r&&(r=t.length),void 0===n&&(n=s);for(let o=r>>>1;o>e;o--)i(t,o,r,n);const o=e+1;for(let s=r-1;s>e;s--){const r=t[e];t[e]=t[s],t[s]=r,i(t,o,s,n)}}function*c(t,e,r,n){void 0===e&&(e=0),void 0===r&&(r=t.length),void 0===n&&(n=s);for(let o=r>>>1;o>e;o--)i(t,o,r,n),yield;const o=e+1;for(let s=r-1;s>e;s--){const r=t[e];t[e]=t[s],t[s]=r,i(t,o,s,n),yield}}class l{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new n.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>u(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const e=new Array;for(let r=0;r<this._length;r++){const n=this.data[r];t(n)&&e.push(n)}return e}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,e){const r=this.data.indexOf(t,e);return-1!==r&&r<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let e=t;e<this._length;++e)this.data[e]=this._deallocator(this.data[e]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,e=t.length){for(let r=0;r<e;r++)this.data[this._length++]=t[r]}fill(t,e){for(let r=0;r<e;r++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,u(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const e=(0,n.qh)(this.data,(0,o.zI)(t),this.length,this._hint);if(-1!==e)return this.data.splice(e,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,n.qh)(this.data,(0,o.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,e=t.length,r){this.length=(0,n.mW)(this.data,t,this.length,e,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,e){if(t>=this.length||e>=this.length||t===e)return;const r=this.data[t];this.data[t]=this.data[e],this.data[e]=r}sort(t){a(this.data,0,this.length,t)}iterableSort(t){return c(this.data,0,this.length,t)}some(t,e){for(let r=0;r<this.length;++r)if(t.call(e,this.data[r],r,this.data))return!0;return!1}find(t,e){const{data:r,length:n}=this;for(let o=0;o<n;++o)if(t.call(e,r[o]))return r[o]}filterInPlace(t,e){let r=0;for(let n=0;n<this._length;++n){const o=this.data[n];t.call(e,o,n,this.data)&&(this.data[n]=this.data[r],this.data[r]=o,r++)}if(this._deallocator)for(let t=r;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=r,this._shrink(),this}forAll(t,e){const{data:r,length:n}=this;for(let o=0;o<n;++o)t.call(e,r[o],o,r)}forEach(t,e){this.data.slice(0,this.length).forEach(t,e)}map(t,e){const r=new Array(this.length);for(let n=0;n<this.length;++n)r[n]=t.call(e,this.data[n],n,this.data);return r}reduce(t,e){let r=e;for(let e=0;e<this.length;++e)r=t(r,this.data[e],e,this.data);return r}has(t){const e=this.length,r=this.data;for(let n=0;n<e;++n)if(r[n]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function u(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},15903:(t,e,r)=>{function n(t){return!!t&&t.prototype?.declaredClass&&0===t.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(e,{P:()=>n})},16649:(t,e,r)=>{r.d(e,{Jt:()=>a,RP:()=>s,t2:()=>c});var n=r(88620);function o(t,e){const r=t.endsWith("?")?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(r,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.at(t)}const o=(0,n.oY)(e);return(0,n.yh)(o,r)?o.get(r):e[r]}function i(t,e,r){if(null==t)return t;const n=o(e[r],t);return!n&&r<e.length-1?void 0:r===e.length-1?n:i(n,e,r+1)}function s(t,e,r=0){return"string"!=typeof e||e.includes(".")?i(t,(0,n.AH)(e),r):o(e,t)}function a(t,e){return s(t,e)}function c(t,e){return void 0!==s(e,t)}},24326:(t,e,r)=>{r.d(e,{c:()=>o});let n=0;function o(){return++n}},26390:(t,e,r)=>{r.d(e,{d:()=>o});const n=[];function o(t){n.push(t),1===n.length&&queueMicrotask(()=>{const t=n.slice();n.length=0;for(const e of t)e()})}},36005:(t,e,r)=>{r.d(e,{w:()=>o});var n=r(10107);function o(t,e,r){let o,i;return void 0===e||Array.isArray(e)?(i=t,r=e,o=[void 0]):(i=e,o=Array.isArray(t)?t:[t]),(t,e)=>{const s=t.constructor.prototype;o.forEach(o=>{const a=(0,n.rM)(t,o,i);a.read&&"object"==typeof a.read||(a.read={}),a.read.reader=s[e],r&&(a.read.source=(a.read.source||[]).concat(r))})}}},43937:(t,e,r)=>{r.d(e,{K:()=>o});var n=r(10107);function o(t,e,r){let o,i;return void 0===e?(i=t,o=[void 0]):"string"!=typeof e?(i=t,o=[void 0],r=e):(i=e,o=Array.isArray(t)?t:[t]),(t,e)=>{const s=t.constructor.prototype;for(const a of o){const o=(0,n.rM)(t,a,i);o.write&&"object"==typeof o.write||(o.write={}),r&&(o.write.target=r),o.write.writer=s[e]}}}},47328:(t,e,r)=>{r.d(e,{i:()=>n});const n={Dirty:1,Overridden:2,Computing:4,NonNullable:8,HasDefaultValue:16,DepTrackingInitialized:32,AutoTracked:64,ExplicitlyTracking:128}},47821:(t,e,r)=>{r.d(e,{h:()=>s});var n=r(49186),o=r(44208),i=(r(53966),r(16649));function s(t,e,r){if(t&&e)if("object"==typeof e)for(const r of Object.getOwnPropertyNames(e))s(t,r,e[r]);else{if(e.includes(".")){const n=e.split("."),o=n.splice(-1,1)[0];return void s((0,i.Jt)(t,n),o,r)}const a=t.__accessor__;null!=a&&function(t,e){if((0,o.A)("esri-unknown-property-errors")&&!function(t,e){return null!=e.metadata[t]}(t,e))throw new n.A("set:unknown-property",function(t,e){return"setting unknown property '"+t+"' on instance of "+e.host.declaredClass}(t,e))}(e,a),t[e]=r}}},56454:(t,e,r)=>{r.d(e,{G:()=>n});const n=Symbol("Accessor-beforeDestroy")},56507:(t,e,r)=>{r.d(e,{EK:()=>S,GB:()=>l,GX:()=>c,MB:()=>T,Nd:()=>z,PZ:()=>v,Qp:()=>h,Uv:()=>E,Vr:()=>u,Zu:()=>C,_e:()=>k,aq:()=>M,dp:()=>A,e6:()=>N,eC:()=>j,gK:()=>P,jz:()=>$,wB:()=>m}),r(44208);var n=r(53966),o=r(91869);const i=()=>n.A.getLogger("esri.core.accessorSupport.ensureTypes");function s(t){if(null==t)return t;const e=new Date(t);return isNaN(e.getTime())?(i().error("Accessor#set",`Invalid date value: '${t}', falling back to current date`),new Date):e}function a(t){return null==t?t:!!t}function c(t){return null==t?t:t.toString()}function l(t,e=0){return null==t?t:(t=parseFloat(t),isNaN(t)?e:t)}function u(t){return null==t?t:Math.round(parseFloat(t))}function f(t){return null}function h(t,e){return r=>{let n=t(r);return null!=e.step&&(n=Math.round(n/e.step)*e.step),null!=e.min&&(n=Math.max(e.min,n)),null!=e.max&&(n=Math.min(e.max,n)),n}}function p(t){return t?.constructor&&void 0!==t.constructor.__accessorMetadata__}function d(t,e){return null!=e&&t&&!(e instanceof t)}function y(t){return t&&"isCollection"in t}function g(t){return t?.Type?"function"==typeof t.Type?t.Type:t.Type.base:null}function _(t,e){return!!p(e)&&(i().error("Accessor#set","Assigning an instance of '"+(e.declaredClass||"unknown")+"' which is not a subclass of '"+w(t)+"'"),!0)}function v(t,e){return null==e?e:y(t)?function(t,e){if(!e?.constructor||!y(e.constructor))return _(t,e)?e:new t(e);const r=g(t.prototype.itemType),n=g(e.constructor.prototype.itemType);return r?n?r===n?e:r.prototype.isPrototypeOf(n.prototype)?new t(e):(_(t,e),e):new t(e):e}(t,e):d(t,e)?_(t,e)?e:new t(e):e}function w(t){return t?.prototype?.declaredClass||"unknown"}const b=new WeakMap;function A(t,e){const r=function(t){switch(t){case Number:return t=>l(t);case $:return u;case Boolean:return a;case String:return c;case Date:return s;case E:return f;default:return(0,o.tE)(b,t,()=>v.bind(null,t))}}(t);return 1===arguments.length?r:r(e)}function m(t,e,r){return 1===arguments.length?m.bind(null,t):e?Array.isArray(e)?e.map(e=>t(e,r)):[t(e,r)]:e}function j(t,e){return 1===arguments.length?m(e=>A(t,e)):m(e=>A(t,e),e)}function O(t,e,r){return 0!==e&&Array.isArray(r)?r.map(r=>O(t,e-1,r)):t(r)}function k(t,e,r){if(2===arguments.length)return r=>k(t,e,r);if(!r)return r;r=O(t,e,r);let n=e,o=r;for(;n>0&&Array.isArray(o);)n--,o=o[0];if(void 0!==o)for(let t=0;t<n;t++)r=[r];return r}function N(t,e,r){return 2===arguments.length?k(e=>A(t,e),e):k(e=>A(t,e),e,r)}function S(t){return!!Array.isArray(t)&&!t.some(e=>{const r=typeof e;return!("string"===r||"number"===r||"function"===r&&t.length>1)})}function T(t,e){if(2===arguments.length)return T(t).call(null,e);const r=new Set,n=t.filter(t=>"function"!=typeof t),o=t.filter(t=>"function"==typeof t);for(const e of t)"string"!=typeof e&&"number"!=typeof e||r.add(e);let s=null,a=null;return(t,e)=>{if(null==t)return t;const c=typeof t,l="string"===c||"number"===c;return l&&(r.has(t)||o.some(t=>"string"===c&&t===String||"number"===c&&t===Number))||"object"===c&&o.some(e=>!d(e,t))?t:(l&&n.length?(s||(s=n.map(t=>"string"==typeof t?`'${t}'`:`${t}`).join(", ")),i().error("Accessor#set",`'${t}' is not a valid value for this property, only the following values are valid: ${s}`)):"object"==typeof t&&o.length?(a||(a=o.map(t=>w(t)).join(", ")),i().error("Accessor#set",`'${t}' is not a valid value for this property, value must be one of ${a}`)):i().error("Accessor#set",`'${t}' is not a valid value for this property`),e&&(e.valid=!1),null)}}function M(t,e){if(2===arguments.length)return M(t).call(null,e);const r={},n=[],o=[];for(const e in t.typeMap){const i=t.typeMap[e];r[e]=A(i),n.push(w(i)),o.push(e)}const s=()=>`'${n.join("', '")}'`,a=()=>`'${o.join("', '")}'`,c="string"==typeof t.key?e=>e[t.key]:t.key;return e=>{if(t.base&&!d(t.base,e))return e;if(null==e)return e;const n=c(e)||t.defaultKeyValue,o=r[n];if(!o)return i().error("Accessor#set",`Invalid property value, value needs to be one of ${s()}, or a plain object that can autocast (having .type = ${a()})`),null;if(!d(t.typeMap[n],e))return e;if("string"==typeof t.key&&!p(e)){const r={};for(const n in e)n!==t.key&&(r[n]=e[n]);return o(r)}return o(e)}}class ${}class E{}const P={native:t=>({type:"native",value:t}),array:t=>({type:"array",value:t}),oneOf:t=>({type:"one-of",values:t})};function C(t){if(!t||"object"!=typeof t&&"function"!=typeof t||!("type"in t))return!1;switch(t.type){case"native":case"array":case"one-of":return!0}return!1}function z(t){switch(t.type){case"native":return A(t.value);case"array":return m(z(t.value));case"one-of":return function(t){let e=null;return(r,n)=>D(r,t)?r:(null==e&&(e=I(t)),i().error("Accessor#set",`Invalid property value, value needs to be of type ${e}`),n&&(n.valid=!1),null)}(t);default:return null}}function I(t){switch(t.type){case"native":switch(t.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case $:return"integer";case Date:return"date";case E:return"null";default:return w(t.value)}case"array":return`array of ${I(t.value)}`;case"one-of":{const e=t.values.map(t=>I(t));return`one of ${e.slice(0,-1)} or ${e[e.length-1]}`}}return"unknown"}function D(t,e){if(null==t)return!0;switch(e.type){case"native":switch(e.value){case Number:case $:return"number"==typeof t;case Boolean:return"boolean"==typeof t;case String:return"string"==typeof t;case E:return null===t}return t instanceof e.value;case"array":return!!Array.isArray(t)&&!t.some(t=>!D(t,e.value));case"one-of":return e.values.some(e=>D(t,e))}}},62788:(t,e,r)=>{r.d(e,{F_:()=>p,Xr:()=>w,a:()=>h,fE:()=>_,gc:()=>l}),r(44208);var n=r(53966),o=r(88620),i=r(47328);const s=new(r(67867).R),a=[];let c=s;function l(t){c.onAccessed(t)}let u=!1,f=!1;function h(t,e,r){if(u)return d(t,e,r);let n=null;return y(t),n=e.call(r),g(),n}function p(t,e){return h(s,t,e)}function d(t,e,r){const o=u;u=!0,y(t);let i=null;try{i=e.call(r)}catch(t){f&&n.A.getLogger("esri.core.accessorSupport.tracking").error(t)}return g(),u=o,i}function y(t){c=t,a.push(t)}function g(){const t=a.length;if(t>1){const e=a.pop();c=a[t-2],e.onTrackingEnd()}else if(1===t){const t=a.pop();c=s,t.onTrackingEnd()}else c=s}function _(t,e){if(e.flags&i.i.DepTrackingInitialized)return;e.flags|=i.i.DepTrackingInitialized;const r=f;f=!1,e.flags&i.i.AutoTracked?d(e.trackingTarget,e.metadata.get,t):w(t,e),f=r}const v=[];function w(t,e){e.flags&i.i.ExplicitlyTracking||(e.flags|=i.i.ExplicitlyTracking,d(e.trackingTarget,()=>{const r=e.metadata.dependsOn||v;for(const e of r)if("string"!=typeof e||e.includes(".")){const r=(0,o.AH)(e);for(let e=0,n=t;e<r.length&&null!=n&&"object"==typeof n;++e)n=b(n,r[e],e!==r.length-1)}else b(t,e,!1)}),e.flags&=~i.i.ExplicitlyTracking)}function b(t,e,r){const n=e.endsWith("?")?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(n,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const i=(0,o.oY)(t);if(i){const e=i.propertiesByName.get(n);e&&(l(e),_(t,e))}return r?t[n]:void 0}},64108:(t,e,r)=>{r.d(e,{$:()=>A}),r(44208);var n=r(53966),o=r(56454),i=r(85537),s=r(96156),a=r(62788),c=r(56507),l=r(90360);function u(t){if(t.json||(t.json={}),h(t.json),p(t.json),f(t.json),t.json.origins)for(const e in t.json.origins)h(t.json.origins[e]),p(t.json.origins[e]),f(t.json.origins[e]);return!0}function f(t){t.name&&(t.read&&"object"==typeof t.read?void 0===t.read.source&&(t.read.source=t.name):t.read={source:t.name},t.write&&"object"==typeof t.write?void 0===t.write.target&&(t.write.target=t.name):t.write={target:t.name})}function h(t){"boolean"==typeof t.read?t.read={enabled:t.read}:"function"==typeof t.read?t.read={enabled:!0,reader:t.read}:t.read&&"object"==typeof t.read&&void 0===t.read.enabled&&(t.read.enabled=!0)}function p(t){"boolean"==typeof t.write?t.write={enabled:t.write}:"function"==typeof t.write?t.write={enabled:!0,writer:t.write}:t.write&&"object"==typeof t.write&&void 0===t.write.enabled&&(t.write.enabled=!0)}var d=r(67124);function y(t){return t.type?g(t):_(t)}function g(t){if(!t.type)return;let e=0,r=t.type;for(;Array.isArray(r)&&!(0,c.EK)(r);)r=r[0],e++;return{type:r,ndimArray:e}}function _(t){if(!t.types)return;let e=0,r=t.types;for(;Array.isArray(r);)r=r[0],e++;return{types:r,ndimArray:e}}function v(t){u(t)&&(function(t){if(t.json&&t.json.origins){const e=t.json.origins,r={"web-document":["web-scene","web-map"]};for(const t in r)if(e[t]){const n=e[t];r[t].forEach(t=>{e[t]=n}),delete e[t]}}}(t),function(t){const e=function(t){return t.json.types?_(t.json):t.type?g(t):_(t)}(t);if(t.json.origins)for(const r in t.json.origins){const n=t.json.origins[r],o=n.types?y(n):e;(0,l.v)(o,n,!1),n.types&&!n.write&&t.json.write?.enabled&&(n.write={...t.json.write}),(0,d.v)(o,n)}(0,l.v)(e,t.json,!0),(0,d.v)(e,t.json)}(t))}const w=new Set,b=new Set;function A(t){return e=>{t??="esri.core.Accessor",e.prototype.declaredClass=t,j(e);const r=[],n=[];let a=e.prototype;for(;a;)a.hasOwnProperty("initialize")&&!w.has(a.initialize)&&(w.add(a.initialize),r.push(a.initialize)),a.hasOwnProperty("destroy")&&!b.has(a.destroy)&&(b.add(a.destroy),n.push(a.destroy)),a=Object.getPrototypeOf(a);w.clear(),b.clear();const c=class extends e{constructor(...t){if(super(...t),this.constructor===c&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let t=r.length-1;t>=0;t--)r[t].call(this)}}),n.length){let t=!1;const e=this[o.G];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!t){this.__accessor__.lifecycle=i.v.DESTROYING,t=!0,e.call(this);for(let t=0;t<n.length;t++)n[t].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};c.__accessorMetadata__=(0,s.tD)(e.prototype),c.prototype.declaredClass=t;const l=(t||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(c,"name",{value:l,configurable:!0}),c}}function m(t,e){return null==e.get?function(){const e=this.__accessor__,r=e.propertiesByName.get(t);if(void 0===r)return;e.mutable&&(0,a.gc)(r);const n=e.store;return n.has(t)?n.get(t):r.metadata.value}:function(){const e=this.__accessor__,r=e.propertiesByName.get(t);if(void 0!==r)return r.getComputed(e)}}function j(t){const e=t.prototype,r=(0,s.tD)(e),n={};for(const t of Object.getOwnPropertyNames(r)){const e=r[t];v(e),n[t]={enumerable:!0,configurable:!0,get:m(t,e),set(r){const n=this.__accessor__;if(void 0!==n){if(n.mutable)return n.initialized&&e.readOnly?O("read-only",t):n.lifecycle===i.v.CONSTRUCTED&&e.constructOnly?O("construct-only",t):void n.set(t,r)}else Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(t.prototype,n)}const O=(t,e)=>{n.A.getLogger("esri.core.Accessor").error(`cannot assign to ${t} property '${e}'`)}},66552:(t,e,r)=>{r.d(e,{J:()=>o,O:()=>s});var n=r(93637);class o{constructor(t,e={ignoreUnknown:!1,useNumericKeys:!1}){this._jsonToAPI=t,this._options=e,this.apiValues=[],this.jsonValues=[],this._apiToJSON=function(t){const e={};for(const r in t)e[t[r]]=r;return e}(t),this.apiValues=i(this._apiToJSON),this.jsonValues=i(this._jsonToAPI),this.read=t=>this.fromJSON(t),this.write=(t,e,r)=>{const o=this.toJSON(t);void 0!==o&&(0,n.sM)(r,o,e)},this.write.isJSONMapWriter=!0}toJSON(t){if(null==t)return null;if(this._apiToJSON.hasOwnProperty(t)){const e=this._apiToJSON[t];return this._options.useNumericKeys?+e:e}return this._options.ignoreUnknown?null:t}fromJSON(t){return null!=t&&this._jsonToAPI.hasOwnProperty(t)?this._jsonToAPI[t]:this._options.ignoreUnknown?void 0:t}}function i(t){const e=[];for(const r in t)e.push(r);return e.sort(),e}function s(){return function(t,e){return new o(t,{ignoreUnknown:!0,...e})}}},67076:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(79907);class o extends n.A{constructor(t,e,r){super(t,e,r)}}o.prototype.type="warning"},67124:(t,e,r)=>{r.d(e,{B:()=>f,v:()=>a});var n=r(49186),o=r(53966),i=r(93637),s=r(15903);function a(t,e){if(!e.write||e.write.writer||!1===e.write.enabled&&!e.write.overridePolicy)return;const r=t?.ndimArray??0;t&&(1===r||"type"in t&&(0,s.P)(t.type))?e.write.writer=h:r>1?e.write.writer=function(t){return(e,r,n,o)=>{let s;if(null===e)s=null;else{s=p(e,o,t);let r=t,n=s;for(;r>0&&Array.isArray(n);)r--,n=n[0];if(void 0!==n)for(let t=0;t<r;t++)s=[s]}(0,i.sM)(n,s,r)}}(r):e.types?Array.isArray(e.types)?e.write.writer=function(t){return(e,r,n,o)=>e&&Array.isArray(e)?l(e.filter(e=>c(e,t,o)),r,n,o):l(e,r,n,o)}(e.types[0]):e.write.writer=function(t){return(e,r,n,o)=>e?c(e,t,o)?l(e,r,n,o):void 0:l(e,r,n,o)}(e.types):e.write.writer=l}function c(t,e,r){for(const r in e.typeMap)if(t instanceof e.typeMap[r])return!0;if(r?.messages){const i=e.errorContext??"type",s=`Values of type '${("function"!=typeof e.key?t[e.key]:t.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&t&&r.messages.push(new n.A(`${i}:unsupported`,s,{definition:t,context:r})),o.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(s)}return!1}function l(t,e,r,n){(0,i.sM)(r,u(t,n),e)}function u(t,e){return t&&"function"==typeof t.write?t.write({},e):t&&"function"==typeof t.toJSON?t.toJSON():"number"==typeof t?f(t):t}function f(t){return t===-1/0?-Number.MAX_VALUE:t===1/0?Number.MAX_VALUE:isNaN(t)?null:t}function h(t,e,r,n){let o;null===t?o=null:t&&"function"==typeof t.map?(o=t.map(t=>u(t,n)),"function"==typeof o.toArray&&(o=o.toArray())):o=[u(t,n)],(0,i.sM)(r,o,e)}function p(t,e,r){return 0!==r&&Array.isArray(t)?t.map(t=>p(t,e,r-1)):u(t,e)}},67867:(t,e,r)=>{r.d(e,{R:()=>n});class n{constructor(t){this.accessed=void 0,this._handles=void 0,this._observer=t}destroy(){this.accessed?.clear(),this.clear()}onAccessed(t){null!=this._observer&&t!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(t))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach(t=>{this._handles.push(t.observe(this._observer))}),this.accessed.clear()))}clear(){if(null!=this._handles){for(let t=0;t<this._handles.length;++t)this._handles[t].remove();this._handles.length=0}}}},79901:(t,e,r)=>{r.d(e,{w:()=>c});var n=r(56507),o=r(96156);const i=Object.prototype.toString;function s(t){const e="__accessorMetadata__"in t?(0,n.dp)(t):t;return function(...t){if(t.push(e),"number"==typeof t[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return a.apply(this,t)}}function a(t,e,r,n){(0,o.z4)(t,e).cast=n}function c(...t){if(3!==t.length||"string"!=typeof t[1])return 1===t.length&&"[object Function]"===i.call(t[0])?s(t[0]):1===t.length&&"string"==typeof t[0]?function(t){return(e,r)=>{(0,o.z4)(e,t).cast=e[r]}}(t[0]):void 0}},85537:(t,e,r)=>{r.d(e,{v:()=>n});const n={INITIALIZING:0,CONSTRUCTING:1,CONSTRUCTED:2,DESTROYING:3,DESTROYED:4}},88620:(t,e,r)=>{r.d(e,{AH:()=>l,h1:()=>a,oY:()=>i,qg:()=>f,yh:()=>s});var n=r(36563),o=r(4718);function i(t){return t.__accessor__??null}function s(t,e){return null!=t?.metadata?.[e]}function a(t,e,r){return c(t,e,r?{policy:r,path:""}:null)}function c(t,e,r){return e?Object.keys(e).reduce((t,n)=>{const i=n;if("__proto__"===i)return t;let s=null,a="merge";if(r&&(s=r.path?`${r.path}.${n}`:n,a=r.policy(s)),"replace"===a)return t[i]=e[i],t;if("replace-arrays"===a&&Array.isArray(t[i]))return t[i]=e[i],t;if(void 0===t[i])return t[i]=(0,o.o8)(e[i]),t;let l=t[i],u=e[i];if(l===u)return t;if(Array.isArray(u)||Array.isArray(t))l=l?Array.isArray(l)?t[i]=l.slice():t[i]=[l]:t[i]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach(t=>{l.includes(t)||l.push(t)}));else if(u&&"object"==typeof u)if(r){const e=r.path;r.path=s,t[i]=c(l,u,r),r.path=e}else t[i]=c(l,u,null);else t.hasOwnProperty(n)&&!e.hasOwnProperty(n)||(t[i]=u);return t},t||{}):t}function l(t){return Array.isArray(t)?t:t.split(".")}function u(t){return t.includes(",")?t.split(",").map(t=>t.trim()):[t.trim()]}function f(t,e,r,o){const i=function(t){if(Array.isArray(t)){const e=[];for(const r of t)e.push(...u(r));return e}return u(t)}(e);if(1!==i.length){const e=i.map(e=>o(t,e,r));return(0,n.vE)(e)}return o(t,i[0],r)}},90360:(t,e,r)=>{r.d(e,{C:()=>f,v:()=>u});var n=r(53966),o=r(93637),i=r(67076),s=r(96156),a=r(15903),c=r(7142);const l=()=>n.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function u(t,e,r){t&&(!r&&!e.read||e.read?.reader||!1===e.read?.enabled||function(t){return"types"in t?_(t.types):g(t.type)}(t)&&(0,o.sM)("read.reader",f(t),e))}function f(t){const e=t.ndimArray??0;if(e>1)return function(t){const e=h(t),r=p.bind(null,e),n=t.ndimArray??0;return(t,e,o)=>{if(null==t)return t;t=r(t,o,n);let i=n,s=t;for(;i>0&&Array.isArray(s);)i--,s=s[0];if(void 0!==s)for(let e=0;e<i;e++)t=[t];return t}}(t);if(1===e)return d(t);if("type"in t&&y(t.type)){const e=t.type.prototype?.itemType?.Type,r=d("function"==typeof e?{type:e}:{types:e});return(e,n,o)=>{const i=r(e,n,o);return i?new t.type(i):i}}return h(t)}function h(t){return"type"in t?function(t){return t.prototype.read?(e,r,n)=>{if(null==e)return e;const o=typeof e;if("object"!==o)return void l().error(`Expected JSON value of type 'object' to deserialize type '${t.prototype.declaredClass}', but got '${o}'`);const i=new t;return i.read(e,n),i}:t.fromJSON}(t.type):function(t){let e=null;const r=t.errorContext??"type",n=t.validate;return(o,a,u)=>{if(null==o)return o;const f=typeof o;if("object"!==f)return void l().error(`Expected JSON value of type 'object' to deserialize, but got '${f}'`);e||(e=function(t){const e={};for(const r in t.typeMap){const n=t.typeMap[r],o=(0,s.tD)(n.prototype);if("function"==typeof t.key)continue;const i=o[t.key];if(!i)continue;if(i.json?.type&&Array.isArray(i.json.type)&&1===i.json.type.length&&"string"==typeof i.json.type[0]){e[i.json.type[0]]=n;continue}const a=i.json?.write;if(!a?.writer){e[r]=n;continue}const c=a.target,l="string"==typeof c?c:t.key,u={};a.writer(r,u,l),u[l]&&(e[u[l]]=n)}return e}(t));const h=t.key;if("string"!=typeof h)return;const p=o[function(t,e,r){const n=Object.values(e)[0],o=(0,s.tD)(n.prototype)[t],i=(0,c.N5)(o,r),a=i?.read?.source;return a&&"string"==typeof a?a:t}(h,e,u)],d=p?e[p]:t.defaultKeyValue?t.typeMap[t.defaultKeyValue]:void 0;if(!d){const t=`Type '${p||"unknown"}' is not supported`;return u?.messages&&o&&u.messages.push(new i.A(`${r}:unsupported`,t,{definition:o,context:u})),void l().error(t)}const y=new d;return y.read(o,u),n?n(y):y}}(t.types)}function p(t,e,r,n){return 0!==n&&Array.isArray(e)?e.map(e=>p(t,e,r,n-1)):t(e,void 0,r)}function d(t){const e=h(t);return(t,r,n)=>{if(null==t)return t;if(Array.isArray(t)){const r=[];for(const o of t){const t=e(o,void 0,n);void 0!==t&&r.push(t)}return r}const o=e(t,void 0,n);return void 0!==o?[o]:void 0}}function y(t){if(!(0,a.P)(t))return!1;const e=t.prototype.itemType;return!(!e||!e.Type)&&("function"==typeof e.Type?g(e.Type):_(e.Type))}function g(t){return!Array.isArray(t)&&!!t&&("object"==typeof t||"function"==typeof t)&&t.prototype&&("read"in t.prototype||"fromJSON"in t||y(t))}function _(t){for(const e in t.typeMap)if(!g(t.typeMap[e]))return!1;return!0}},91429:(t,e,r)=>{r.d(e,{wg:()=>c,MZ:()=>s,$K:()=>a});var n=r(10107),o=r(79901),i=r(64108);r(93223),r(36005),r(43937);const s=n.MZ,a=i.$;function c(...t){return(0,o.w)(...t)}},93223:(t,e,r)=>{r.d(e,{e:()=>i});var n=r(66552),o=r(10107);function i(t,e={}){const r=t instanceof n.J?t:new n.J(t,e),{alwaysWriteDefaults:i,default:s,ignoreUnknown:a=!0,name:c,nonNullable:l,readOnly:u=!1}=e;return(0,o.MZ)({type:a?r.apiValues:String,json:{type:r.jsonValues,default:s,name:c,read:!u&&{reader:r.read},write:{writer:r.write,alwaysWriteDefaults:i}},nonNullable:l,readOnly:u})}},93687:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(44208);class o{constructor(t,e,r,n=1,o=0){this._creator=t,this._acquireFunction=e,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(o),this._initialSize=o;for(let t=0;t<o;t++)this._pool[t]=this._creator();this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...t){let e;if(o.test.disabled)e=this._creator();else{if(0===this._pool.length){const t=this.allocationSize;for(let e=0;e<t;e++)this._pool[e]=this._creator()}e=this._pool.pop()}return this._acquireFunction?this._acquireFunction(e,...t):function(t){return t?.acquire&&"function"==typeof t.acquire}(e)&&e.acquire(...t),e}release(t){var e;t&&!o.test.disabled&&(this._releaseFunction?this._releaseFunction(t):(e=t,e?.release&&"function"==typeof e.release&&t.release()),this._pool.push(t))}prune(t=this._initialSize){if(!(t>=this._pool.length)){for(let e=t;e<this._pool.length;++e){const t=this._pool[e];this._dispose(t)}this._pool.length=t}}_dispose(t){t.dispose&&"function"==typeof t.dispose&&t.dispose()}static{this.test={disabled:!!(0,n.A)("esri-tests-disable-memory-pools")}}}},96156:(t,e,r)=>{r.d(e,{CX:()=>a,tD:()=>i,z4:()=>s});var n=r(4718),o=r(88620);function i(t){let e=t.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(t.constructor,"__accessorMetadata__");if(e){if(!r){e=Object.create(e);for(const t in e)e[t]=(0,n.o8)(e[t]);Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0})}}else e={},Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0});return t.constructor.__accessorMetadata__}function s(t,e){const r=i(t);let n=r[e];return n||(n=r[e]={}),n}function a(t,e){return(0,o.h1)(t,e,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(t){return c.test(t)?"replace":"merge"}}}]);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{terrainDepthTest as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4PassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{
|
|
5
|
+
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{terrainDepthTest as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float4PassUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOLID as d}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as t}from"../views/webgl/ShaderBuilder.js";function n(n){const c=new t,{vertex:v,fragment:g,varyings:u}=c;return c.fragment.include(e,n),c.include(o,n),c.include(d,n),i(v,n),c.attributes.add("position","vec3"),c.attributes.add("uv0","vec2"),u.add("vUV","vec2"),u.add("vpos","vec3"),v.main.add(a`vUV = uv0;
|
|
6
6
|
vpos = position;
|
|
7
7
|
forwardViewPosDepth((view * vec4(position, 1.0)).xyz);
|
|
8
8
|
gl_Position = proj * view * vec4(position, 1.0);`),g.uniforms.add(new s("size",e=>e.size)),g.uniforms.add(new l("color1",e=>e.color1)),g.uniforms.add(new l("color2",e=>e.color2)),g.include(r),g.main.add(a`discardByTerrainDepth();
|
|
@@ -12,4 +12,4 @@ vec2 ab = clamp((abs(uv - 0.5) - 0.25) / fwidth(uvScaled), -0.5, 0.5);
|
|
|
12
12
|
float fade = smoothstep(0.25, 0.5, max(fwidth(uvScaled.x), fwidth(uvScaled.y)));
|
|
13
13
|
float t = mix(abs(ab.x + ab.y), 0.5, fade);
|
|
14
14
|
fragColor = mix(color2, color1, t);
|
|
15
|
-
|
|
15
|
+
outputColorHighlightOLID(fragColor, vpos, fragColor.rgb);`),c}const c=Object.freeze(Object.defineProperty({__proto__:null,build:n},Symbol.toStringTag,{value:"Module"}));export{c as C,n as b};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as a}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{
|
|
5
|
+
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as o}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as a}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOLID as g}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as c}from"../views/webgl/ShaderBuilder.js";function u(u){const v=new c,{vertex:b,fragment:m,attributes:w,varyings:p}=v,{hasVVColor:f,hasVertexColors:h}=u;return a(b,u),v.include(r),v.include(i,u),v.include(s,u),v.include(o,u),m.include(e,u),v.include(g,u),v.include(l,u),w.add("position","vec3"),f&&w.add("colorFeatureAttribute","float"),h||p.add("vColor","vec4"),p.add("vpos","vec3",{invariant:!0}),b.uniforms.add(new d("uColor",e=>e.color)),b.main.add(n`
|
|
6
6
|
vpos = position;
|
|
7
7
|
forwardNormalizedVertexColor();
|
|
8
8
|
forwardObjectAndLayerIdColor();
|
|
@@ -11,4 +11,4 @@ import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.gls
|
|
|
11
11
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
12
12
|
gl_Position = transformPosition(proj, view, vpos);`),m.include(t),m.main.add(n`discardBySlice(vpos);
|
|
13
13
|
discardByTerrainDepth();
|
|
14
|
-
|
|
14
|
+
outputColorHighlightOLID(vColor, vpos, vColor.rgb);`),v}const v=Object.freeze(Object.defineProperty({__proto__:null,build:u},Symbol.toStringTag,{value:"Module"}));export{v as C,u as b};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o,mars as r,moon as a}from"../geometry/support/Ellipsoid.js";import{ComponentData as l}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as i}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as m}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{ReadDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as f,addLightingGlobalFactor as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as C,addMainLightDirection as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{ReadBaseColorTexture as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as N}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as $}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{BooleanDrawUniform as D}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{If as M,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as W}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{
|
|
5
|
+
import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o,mars as r,moon as a}from"../geometry/support/Ellipsoid.js";import{ComponentData as l}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as i}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as m}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{ReadDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as f,addLightingGlobalFactor as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as C,addMainLightDirection as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{ReadBaseColorTexture as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as N}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as $}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{BooleanDrawUniform as D}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{If as M,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as W}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOLID as A}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{sphereDepthInterpolate as F}from"../views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js";import{ShaderBuilder as U}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as V}from"../webscene/support/AlphaCutoff.js";function z(z){const B=new U,{vertex:E,fragment:_}=B;B.include(c,z),B.include(g,z),B.include(d,z),B.include(s,z),B.include(l,z),B.include(T,z),_.include(n,z),B.include(O,z),B.include(N,z);const{output:I,pbrMode:G,hasNormalTexture:H,snowCover:k,receiveShadows:q,shadeNormals:J,spherical:K,sphericalSR:Q,ellipsoidMode:X,overlayEnabled:Y,componentData:Z,vertexDiscardMode:ee,renderOccluded:oe}=z,re=1===G||2===G;re&&(B.include(L,z),H&&B.include(b,z));const ae=3===I||4===I||5===I,le=ae&&1===Z,ie=1===X,te=1===X?o.radius:ie?r.radius:a.radius;Y&&(B.include(f,z),B.include($,z),E.include(j),E.uniforms.add(new D("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),_.uniforms.add(new D("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),E.code.add(`\n ${M(K,`const float invRadius = ${R.float(1/te)};`)}\n vec2 projectOverlay(vec3 pos) { return pos.xy ${M(K,"/ (1.0 + invRadius * pos.z);")}; }\n `));const ne=Y&&t(I)&&4===G;ne&&(B.varyings.add("tbnTangent","vec3"),B.varyings.add("tbnBiTangent","vec3"),B.varyings.add("groundNormal","vec3"));const se=0===ee,de=2===ee,ge=1-1/255;if(B.include(S,z),B.include(i,z),E.main.add(R`
|
|
6
6
|
bool castShadows;
|
|
7
7
|
vec4 externalColor = forwardExternalColor(castShadows);
|
|
8
8
|
${M(le,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")}
|
|
@@ -141,7 +141,7 @@ import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o
|
|
|
141
141
|
// un-gamma the ground color to mix in linear space
|
|
142
142
|
shadedColor = mix(shadedColor, waterColorNonLinear, waterColorLinear.w);
|
|
143
143
|
}`)}
|
|
144
|
-
`)),_.main.add(`
|
|
144
|
+
`)),_.main.add(`outputColorHighlightOLID(shadedColor, vPositionWorldCameraRelative, materialColor.rgb ${M(k,", snow")});`),z.sphereDepthInterpolate&&(B.include(F,{radius:te*e}),B.fragment.include(h),_.main.add(R`if (sphereFade()>0.0) {
|
|
145
145
|
vec3 worldRay = normalize(vPositionWorldCameraRelative);
|
|
146
146
|
vec3 viewRay = normalize(vPosition_view);
|
|
147
147
|
gl_FragDepth = delinearizeDepth(sphereDepthInterpolate(worldRay, viewRay, linearizeDepth(gl_FragCoord.z)));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as s,CreateMaskedFromNaNColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as f,addLightingGlobalFactor as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as j,ReadShadowMapDraw as P}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{colorTextureUV as N,normalTextureUV as T,emissiveTextureUV as O,occlusionTextureUV as S,metallicRoughnessTextureUV as V}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as U,addCameraPosition as I}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as B}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as k}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{If as _,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as F}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnowCover as z}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{colorMixModes as W}from"../views/3d/webgl-engine/materials/internal/MaterialUtil.js";import{
|
|
5
|
+
import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstanceColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{MaskedColorDefinition as s,CreateMaskedFromNaNColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VerticalOffset as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as v}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{ComputeNormalTexture as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateAmbientOcclusion as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as f,addLightingGlobalFactor as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{PhysicallyBasedRendering as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as j,ReadShadowMapDraw as P}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{colorTextureUV as N,normalTextureUV as T,emissiveTextureUV as O,occlusionTextureUV as S,metallicRoughnessTextureUV as V}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js";import{VisualVariables as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as U,addCameraPosition as I}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as B}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as k}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{If as _,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as F}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnowCover as z}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{colorMixModes as W}from"../views/3d/webgl-engine/materials/internal/MaterialUtil.js";import{outputColorHighlightOLID as G}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as H}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as q}from"../webscene/support/AlphaCutoff.js";function J(J){const K=new H,{attributes:Q,vertex:X,fragment:Y,varyings:Z}=K,{output:ee,normalType:re,offsetBackfaces:oe,spherical:ie,snowCover:ae,pbrMode:le,textureAlphaPremultiplied:se,instancedDoublePrecision:ne,hasVertexColors:te,hasVertexTangents:de,hasColorTexture:ce,hasNormalTexture:me,hasNormalTextureTransform:ge,hasColorTextureTransform:ue}=J;if(U(X,J),Q.add("position","vec3"),Z.add("vpos","vec3",{invariant:!0}),K.include($,J),K.include(l,J),K.include(u,J),K.include(N,J),!r(ee))return K.include(v,J),K;K.include(T,J),K.include(O,J),K.include(S,J),K.include(V,J),I(X,J),K.include(t,J),K.include(i);const ve=0===re||1===re;return ve&&oe&&K.include(e),K.include(w,J),K.include(g,J),K.include(a,J),Z.add("vPositionLocal","vec3"),K.include(c,J),K.include(d,J),K.include(m,J),X.uniforms.add(new E("externalColor",e=>e.externalColor,{supportsNaN:!0})),Z.add("vcolorExt","vec4"),K.include(M,J),X.include(s),X.include(n),K.include(ne?j:P,J),X.main.add(R`
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
|
|
8
8
|
MaskedColor maskedColor =
|
|
@@ -70,5 +70,5 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
|
|
|
70
70
|
${_(ae,"mrr = applySnowToMRR(mrr, snow);")}
|
|
71
71
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:R`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
72
72
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
73
|
-
|
|
73
|
+
outputColorHighlightOLID(finalColor, vpos, albedo ${_(ae,", snow")});
|
|
74
74
|
`),K}const K=Object.freeze(Object.defineProperty({__proto__:null,build:J},Symbol.toStringTag,{value:"Module"}));export{K as D,J as b};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{terrainDepthTest as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{FloatPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{If as l,glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{
|
|
5
|
+
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as r}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{terrainDepthTest as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{FloatPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{If as l,glsl as n}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{outputColorHighlightOLID as g}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{NoParameters as v}from"../views/webgl/NoParameters.js";import{ShaderBuilder as p}from"../views/webgl/ShaderBuilder.js";class c extends v{}function m(v){const c=new p,{vertex:m,fragment:u,varyings:w}=c,{output:b,perspectiveInterpolation:f}=v;return t(m,v),c.include(r),c.include(o,v),c.fragment.include(e,v),c.include(i,v),c.include(g,v),c.attributes.add("position","vec3"),c.attributes.add("uv0","vec2"),f&&c.attributes.add("perspectiveDivide","float"),m.main.add(n`
|
|
6
6
|
vpos = position;
|
|
7
7
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
8
8
|
vTexCoord = uv0;
|
|
@@ -12,4 +12,4 @@ import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.gls
|
|
|
12
12
|
discardByTerrainDepth();
|
|
13
13
|
${l(9===b,"fragColor = vec4(0, 0, 0, 1); return;")}
|
|
14
14
|
vec4 finalColor = texture(tex, vTexCoord) * opacity;
|
|
15
|
-
|
|
15
|
+
outputColorHighlightOLID(finalColor, vpos, finalColor.rgb);`),c}const u=Object.freeze(Object.defineProperty({__proto__:null,ImageMaterialPassParameters:c,build:m},Symbol.toStringTag,{value:"Module"}));export{u as I,c as a,m as b};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{markerTextureSize as e,markerSymbolSize as r,markerTipThicknessFactor as i}from"../views/3d/support/engineContent/marker.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{OutputHighlight as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{MarkerSizing as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{terrainDepthTest as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as l,NoPerspectiveRead as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as d,addViewNormal as v,addPixelRatio as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as w,If as y}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DPassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{
|
|
5
|
+
import{markerTextureSize as e,markerSymbolSize as r,markerTipThicknessFactor as i}from"../views/3d/support/engineContent/marker.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{RibbonVertexPosition as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js";import{OutputHighlight as a}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{MarkerSizing as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js";import{terrainDepthTest as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{NoPerspectiveWrite as l,NoPerspectiveRead as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/NoPerspective.glsl.js";import{addProjViewLocalOrigin as d,addViewNormal as v,addPixelRatio as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float2BindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float4BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as w,If as y}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as S}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DPassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{outputColorHighlightOLID as P}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as z}from"../views/webgl/ShaderBuilder.js";function b(b){const j=new z,{space:L,anchor:D,hasTip:k,hasScreenSizePerspective:M}=b,C=2===L,$=1===L;j.include(t,b),j.include(n,b),j.include(s,b);const{vertex:W,fragment:U,varyings:O}=j;d(W,b),j.attributes.add("position","vec3"),j.attributes.add("previousDelta","vec4"),j.attributes.add("uv0","vec2"),O.add("vColor","vec4"),O.add("vpos","vec3",{invariant:!0}),O.add("vUV","vec2"),O.add("vSize","float"),k&&O.add("vLineWidth","float"),W.uniforms.add(new h("nearFar",({camera:e})=>e.nearFar),new f("viewport",({camera:e})=>e.fullViewport)).code.add(w`vec4 projectAndScale(vec4 pos) {
|
|
6
6
|
vec4 posNdc = proj * pos;
|
|
7
7
|
posNdc.xy *= viewport.zw / posNdc.w;
|
|
8
8
|
return posNdc;
|
|
@@ -161,4 +161,4 @@ return clamp(0.5 - pixelDistance, 0.0, 1.0);
|
|
|
161
161
|
// Cancel out perspective correct interpolation if in screen space or draped
|
|
162
162
|
vec2 samplePos = ${y(!C,"noPerspectiveRead(vUV)","vUV")};
|
|
163
163
|
finalColor.a *= ${k?"max(markerAlpha(samplePos), tipAlpha(samplePos))":"markerAlpha(samplePos)"};
|
|
164
|
-
|
|
164
|
+
outputColorHighlightOLID(finalColor, vpos, finalColor.rgb);`),j}const j=Object.freeze(Object.defineProperty({__proto__:null,build:b},Symbol.toStringTag,{value:"Module"}));export{j as L,b};
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{VertexColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{addProjViewLocalOrigin as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{
|
|
5
|
+
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{VertexColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{addProjViewLocalOrigin as i}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{glsl as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOLID as t}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";function a(a){const d=new n,{vertex:g,fragment:c,varyings:m}=d;return d.fragment.include(e,a),d.include(o),d.include(r,a),d.include(t,a),i(g,a),d.attributes.add("position","vec3"),m.add("vpos","vec3",{invariant:!0}),g.main.add(l`vpos = position;
|
|
6
6
|
forwardNormalizedVertexColor();
|
|
7
7
|
gl_Position = transformPosition(proj, view, vpos);`),a.hasVertexColors||c.uniforms.add(new s("constantColor",e=>e.color)),c.main.add(l`
|
|
8
8
|
discardBySlice(vpos);
|
|
9
9
|
vec4 color = ${a.hasVertexColors?"vColor":"constantColor"};
|
|
10
|
-
|
|
10
|
+
outputColorHighlightOLID(color, vpos, color.rgb);
|
|
11
11
|
`),d}const d=Object.freeze(Object.defineProperty({__proto__:null,build:a},Symbol.toStringTag,{value:"Module"}));export{d as N,a as b};
|
package/chunks/Path.glsl.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{PathVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{OutputDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as c,addLightingGlobalFactor as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as f,addViewNormal as y,addCameraPosition as
|
|
5
|
+
import{addNearFar as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{PathVertexPosition as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js";import{OutputDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as d}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as t,addAmbientBoostFactor as c,addLightingGlobalFactor as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{Normals as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js";import{NormalUtils as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PhysicallyBasedRenderingParameters as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{ColorConversion as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as f,addViewNormal as y,addCameraPosition as L}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as P}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as S,If as O}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{SnowCover as C}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOLID as A}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as D}from"../views/webgl/ShaderBuilder.js";function B(B){const I=new D,{vertex:M,fragment:_,varyings:F}=I;f(M,B),F.add("vpos","vec3",{invariant:!0}),I.include(n,B);const{output:V,spherical:x,pbrMode:z,snowCover:T}=B;switch((i(V)||9===V)&&(I.include(a),I.include(u,B),I.include(r,B),I.include(h,B),F.add("vnormal","vec3"),F.add("vcolor","vec4"),M.main.add(S`vpos = calculateVPos();
|
|
6
6
|
vnormal = normalize(localNormal());
|
|
7
7
|
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
8
8
|
gl_Position = transformPosition(proj, view, vpos);
|
|
9
9
|
forwardObjectAndLayerIdColor();
|
|
10
10
|
vcolor = getColor();
|
|
11
|
-
forwardLinearDepthToReadShadowMap();`)),V){case 0:I.include(w,B),I.include(t,B),_.include(d,B),I.include(v,B),_.include(o,B),I.include(A,B),
|
|
11
|
+
forwardLinearDepthToReadShadowMap();`)),V){case 0:I.include(w,B),I.include(t,B),_.include(d,B),I.include(v,B),_.include(o,B),I.include(A,B),L(_,B),c(_),m(_),_.uniforms.add(M.uniforms.get("localOrigin"),new j("ambient",e=>e.ambient),new j("diffuse",e=>e.diffuse),new P("opacity",e=>e.opacity)),_.include(b),_.include(C,B),g(_),_.main.add(S`
|
|
12
12
|
discardBySlice(vpos);
|
|
13
13
|
discardByTerrainDepth();
|
|
14
14
|
|
|
@@ -35,7 +35,7 @@ forwardLinearDepthToReadShadowMap();`)),V){case 0:I.include(w,B),I.include(t,B),
|
|
|
35
35
|
|
|
36
36
|
vec3 shadedColor = ${2===z?"evaluateSceneLightingPBR(normal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);":"evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight);"}
|
|
37
37
|
vec4 finalColor = vec4(shadedColor, combinedOpacity);
|
|
38
|
-
|
|
38
|
+
outputColorHighlightOLID(finalColor, vpos, albedo ${O(T,", snow")});`);break;case 1:I.include(a),M.main.add(S`vpos = calculateVPos();
|
|
39
39
|
gl_Position = transformPosition(proj, view, vpos);`),I.fragment.include(o,B),_.main.add(S`discardBySlice(vpos);`);break;case 3:case 4:case 5:case 6:I.include(a),e(I),F.add("depth","float"),M.main.add(S`vpos = calculateVPos();
|
|
40
40
|
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);`),I.fragment.include(o,B),I.include(l,B),_.main.add(S`discardBySlice(vpos);
|
|
41
41
|
outputDepth(depth);`);break;case 9:I.fragment.include(o,B),_.main.add(S`discardBySlice(vpos);
|
package/chunks/Pattern.glsl.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as l,addCameraPosition as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as v,If as p}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{
|
|
5
|
+
import{SliceDraw as e}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as o}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as r}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{VertexColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{terrainDepthTest as a}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{ColorConversion as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as l,addCameraPosition as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatBindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as v,If as p}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{outputColorHighlightOLID as m}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{ShaderBuilder as g}from"../views/webgl/ShaderBuilder.js";const u=.70710678118,f=u,w=.08715574274,b=10,h=1;function y(y){const x=new g,{vertex:j,fragment:C,attributes:V,varyings:R}=x,P=8===y.output;l(j,y),x.include(o),x.include(t,y),x.include(i,y),x.include(r,y),x.fragment.include(e,y),x.include(m,y),x.include(a,y),y.draped?j.uniforms.add(new s("worldToScreenRatio",e=>1/e.screenToPCSRatio)):V.add("boundingRect","mat3"),V.add("position","vec3"),V.add("uvMapSpace","vec4"),y.hasVVColor&&V.add("colorFeatureAttribute","float"),y.hasVertexColors||R.add("vColor","vec4"),R.add("vpos","vec3",{invariant:!0}),R.add("vuv","vec2"),j.uniforms.add(new d("uColor",e=>e.color));const T=3===y.style||4===y.style||5===y.style;return T&&j.code.add(v`
|
|
6
6
|
const mat2 rotate45 = mat2(${v.float(u)}, ${v.float(-f)},
|
|
7
7
|
${v.float(f)}, ${v.float(u)});
|
|
8
8
|
`),y.draped||(c(j,y),j.uniforms.add(new s("worldToScreenPerDistanceRatio",e=>1/e.camera.perScreenPixelRatio)),j.code.add(v`vec3 projectPointToLineSegment(vec3 center, vec3 halfVector, vec3 point) {
|
|
@@ -112,5 +112,5 @@ return accumulator;
|
|
|
112
112
|
discardByTerrainDepth();
|
|
113
113
|
vec4 color = vColor;
|
|
114
114
|
${p(!P,v`color.a *= ${S(y)};`)}
|
|
115
|
-
|
|
115
|
+
outputColorHighlightOLID(color, vpos, color.rgb);
|
|
116
116
|
`),x}function S(e){function o(o){return e.draped?v`coverage(vuv.${o}, texelSize)`:v`sampleAA(vuv.${o})`}switch(e.style){case 3:case 0:return o("y");case 4:case 1:return o("x");case 5:case 2:return v`1.0 - (1.0 - ${o("x")}) * (1.0 - ${o("y")})`;default:return"0.0"}}const x=Object.freeze(Object.defineProperty({__proto__:null,build:y},Symbol.toStringTag,{value:"Module"}));export{x as P,y as b};
|