@arcgis/core 4.28.6 → 4.28.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +15 -25
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0c08d59c5d65921ba5ae.js +1 -0
  4. package/assets/esri/core/workers/chunks/0dbf3fa096d02d83b222.js +1 -0
  5. package/assets/esri/core/workers/chunks/16453ca31cc3e09fde46.js +1 -0
  6. package/assets/esri/core/workers/chunks/{1da721608993783dc9cf.js → 24d04cca452ba2fec5d4.js} +1 -1
  7. package/assets/esri/core/workers/chunks/2c121541cde5c24b1fbe.js +1 -0
  8. package/assets/esri/core/workers/chunks/2efd2496f7310142f928.js +1 -0
  9. package/assets/esri/core/workers/chunks/42880f0fac5f1606201c.js +1 -0
  10. package/assets/esri/core/workers/chunks/70eba80261d7fdc624ad.js +1 -0
  11. package/assets/esri/core/workers/chunks/{3dcb2a82e1e4b520c9c9.js → 7b901d0b68e5cc17533a.js} +1 -1
  12. package/assets/esri/core/workers/chunks/7f68c2cc1048d136fd1b.js +1 -0
  13. package/assets/esri/core/workers/chunks/85d6dd6703b228248e30.js +1 -0
  14. package/assets/esri/core/workers/chunks/adc138e5d9983a5752d4.js +1 -0
  15. package/assets/esri/core/workers/chunks/b35e87cf2b8244e3584f.js +1 -0
  16. package/assets/esri/core/workers/chunks/b49f830a8d74c4564ed8.js +1 -0
  17. package/assets/esri/core/workers/chunks/b6d77edf9eec757e88da.js +1 -0
  18. package/assets/esri/core/workers/chunks/c9306fb3ec1a2d5e137a.js +1 -0
  19. package/assets/esri/core/workers/chunks/cd201c627e9396edf6b9.js +1 -0
  20. package/assets/esri/core/workers/chunks/ceeaa8d1b0034b59eae7.js +1 -0
  21. package/assets/esri/core/workers/chunks/dc4a71e72e56cbdff49a.js +1 -0
  22. package/assets/esri/core/workers/chunks/f78b1bfacd95a6ccf7b4.js +1 -0
  23. package/assets/esri/themes/base/widgets/_LabeledSwitch.scss +6 -1
  24. package/assets/esri/themes/dark/main.css +1 -1
  25. package/assets/esri/themes/light/main.css +1 -1
  26. package/assets/esri/themes/light/view.css +1 -1
  27. package/core/sql/WhereClause.js +1 -1
  28. package/core/sql/sqlCompareUtils.js +1 -1
  29. package/core/sql/sqlDateParsingUtils.js +1 -1
  30. package/kernel.js +1 -1
  31. package/layers/support/FieldsIndex.js +1 -1
  32. package/package.json +1 -1
  33. package/support/revision.js +1 -1
  34. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  35. package/views/webgl/FramebufferObject.js +1 -1
  36. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  37. package/widgets/Editor/workflowUtils.js +1 -1
  38. package/widgets/Features.js +1 -1
  39. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  40. package/widgets/support/LabeledSwitch.js +1 -1
  41. package/assets/esri/core/workers/chunks/16b56e541afa438dfb7f.js +0 -1
  42. package/assets/esri/core/workers/chunks/340ab726ba40fe3a99c8.js +0 -1
  43. package/assets/esri/core/workers/chunks/46b4a17ec898ab744861.js +0 -1
  44. package/assets/esri/core/workers/chunks/4f0412b52844aa9c7bd4.js +0 -1
  45. package/assets/esri/core/workers/chunks/5b80ae1eb79f1db75dc6.js +0 -1
  46. package/assets/esri/core/workers/chunks/80fcb63476829b6a48d2.js +0 -1
  47. package/assets/esri/core/workers/chunks/84725021c43f1122056a.js +0 -1
  48. package/assets/esri/core/workers/chunks/8cdece03397d01767593.js +0 -1
  49. package/assets/esri/core/workers/chunks/9607460895182d31aef9.js +0 -1
  50. package/assets/esri/core/workers/chunks/a0a86383e69932a25e50.js +0 -1
  51. package/assets/esri/core/workers/chunks/a3bf50d9e24ad1de9847.js +0 -1
  52. package/assets/esri/core/workers/chunks/a5db3be5eeb3005df3c1.js +0 -1
  53. package/assets/esri/core/workers/chunks/a87ab14d6a6ccc9004a0.js +0 -1
  54. package/assets/esri/core/workers/chunks/a8cf23c3a55c1834178c.js +0 -1
  55. package/assets/esri/core/workers/chunks/ba00df2e707550939a6f.js +0 -1
  56. package/assets/esri/core/workers/chunks/cfa6d1b63b794febe70a.js +0 -1
  57. package/assets/esri/core/workers/chunks/e0382138cf58191a9697.js +0 -1
  58. package/assets/esri/core/workers/chunks/fe0c6814ef56604540b3.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5936,5732],{84552:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(43697),n=i(2368),s=i(96674),o=i(35463),l=i(5600),a=(i(75215),i(67676),i(80442),i(36030)),d=i(52011),u=i(78981);let p=class extends((0,n.J)(s.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}};(0,r._)([(0,a.J)(u.v,{nonNullable:!0})],p.prototype,"unit",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,r._)([(0,d.j)("esri.TimeInterval")],p);const c=p},5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>n});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},22862:(e,t,i)=>{i.d(t,{Hg:()=>y,V7:()=>m,uD:()=>c});var r=i(92036),n=i(46791),s=i(1153);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.Z}function a(e){return e instanceof n.Z?Object.keys(e.items):l(e)?(0,s.vw)(e).keys():e?Object.keys(e):[]}function d(e,t){return e instanceof n.Z?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function p(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=a(e),n=a(t);if(0===r.length&&0===n.length)return;if(!r.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter((e=>!r.includes(e))),c=r.filter((e=>!n.includes(e))),m=r.filter((i=>n.includes(i)&&d(e,i)!==d(t,i))).concat(s,c).sort(),y=u(e);if(y&&o.has(y)&&m.length)return{type:"complete",oldValue:e,newValue:t};let h;const f=l(e)&&l(t);for(const r of m){const n=d(e,r),s=d(t,r);let o;if((f||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(i&&i[r]&&"function"==typeof i[r])o=i[r]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&u(n)===u(s)?p(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=h?h.diff[r]=o:h={type:"partial",diff:{[r]:o}})}}return h}function c(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}function m(e,t){for(const i of t)if(c(e,i))return!0;return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},1542:(e,t,i)=>{i.d(t,{A4:()=>s,L9:()=>o,yV:()=>n});var r=i(17126);class n{}function s(e){return e instanceof r.ld?e===n.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return s(e)?n.instance:e}n.instance=new r.vF("Etc/UTC")},60437:(e,t,i)=>{i.d(t,{G_:()=>v,HH:()=>o,JR:()=>y,TC:()=>l,Tn:()=>p,Ue:()=>n,al:()=>s,bZ:()=>h,cS:()=>m,dp:()=>d,fS:()=>b,is:()=>f,op:()=>u,pp:()=>a,t8:()=>c});var r=i(6570);function n(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,r,s,o,l=n()){return l[0]=e,l[1]=t,l[2]=i,l[3]=r,l[4]=s,l[5]=o,l}function o(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.Z(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function u(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function p(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?c(e,v):n(v)}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,i,r,n){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function f(e){return 6===e.length}function b(e,t,i){if(null==e||null==t)return e===t;if(!f(e)||!f(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}i(24470);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];n()},88387:(e,t,i)=>{i.r(t),i.d(t,{default:()=>X});var r,n=i(43697),s=(i(66577),i(51773)),o=(i(16050),i(12501),i(28756),i(92271),i(72529),i(5499),i(84382),i(81571),i(91423)),l=i(32400),a=i(3172),d=i(2368),u=i(20102),p=i(50758),c=i(22974),m=i(92604),y=i(16453),h=i(95330),f=i(5600),b=i(75215),v=i(71715),w=i(52011),g=i(86973),_=i(87085),S=i(17287),I=i(71612),T=i(17017),x=i(69637),F=i(6404),C=i(38009),j=i(16859),N=i(34760),R=i(72965),O=i(28294),E=i(21506),V=i(45574),Z=i(1231),D=i(53518),M=i(69165),A=i(54306),U=i(30707),L=i(96674);i(67676),i(80442);let k=r=class extends L.wq{constructor(){super(...arguments),this.age=null,this.ageReceived=null,this.displayCount=null,this.maxObservations=1}clone(){return new r({age:this.age,ageReceived:this.ageReceived,displayCount:this.displayCount,maxObservations:this.maxObservations})}};(0,n._)([(0,f.Cb)({type:Number,json:{write:!0}})],k.prototype,"age",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:!0}})],k.prototype,"ageReceived",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:!0}})],k.prototype,"displayCount",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:!0}})],k.prototype,"maxObservations",void 0),k=r=(0,n._)([(0,w.j)("esri.layers.support.PurgeOptions")],k);const P=k;var J=i(40555),q=i(14165),z=i(32163),B=i(86787),G=i(12259),W=i(82971),Y=i(6570);const H=(0,D.v)();function $(e,t){return new u.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}let Q=class extends((0,F.M)((0,x.b)((0,I.h)((0,O.n)((0,R.M)((0,N.Q)((0,S.Y)((0,C.q)((0,j.I)((0,y.R)((0,T.N)((0,d.J)(_.Z))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.outFields=["*"],this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new P,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=W.Z.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null,this._debouncedSaveOperations=(0,h.Ds)((async(e,t,r)=>{const{save:n,saveAs:s}=await i.e(4330).then(i.bind(i,94330));switch(e){case G.x.SAVE:return n(this,t);case G.x.SAVE_AS:return s(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new u.Z("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(h.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){(0,M.YN)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,i){t=t.layerDefinition||t;const r=t.drawingInfo?.renderer;if(r){const e=(0,o.a)(r,t,i)||void 0;return e||m.Z.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:i}),e}return(0,V.Ob)(t,i)}async connect(e){const[{createConnection:t}]=await Promise.all([Promise.all([i.e(4599),i.e(2330)]).then(i.bind(i,95047)),this.load()]),r=this.geometryType?g.M.toJSON(this.geometryType):null,{customParameters:n=null,definitionExpression:s=null,geometryDefinition:o=null,maxReconnectionAttempts:l=0,maxReconnectionInterval:a=20,spatialReference:d=this.spatialReference}=e||this.createConnectionParameters(),u=t(this.parsedUrl,this.spatialReference,d,r,{geometry:o,where:s},l,a,n??void 0),c=(0,p.AL)([this.on("send-message-to-socket",(e=>u.sendMessageToSocket(e))),this.on("send-message-to-client",(e=>u.sendMessageToClient(e)))]);return u.once("destroy",c.remove),u}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return(0,z.eZ)(this,e)}createQuery(){const e=new q.Z;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let i=null;return this.fields.some((t=>(t.name===e&&(i=t.domain),!!i))),i}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){return this._debouncedSaveOperations(G.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(G.x.SAVE_AS,t,e)}write(e,t){const i=t?.messages;return this.webSocketUrl?(i?.push($(this,"using a custom websocket connection cannot be written to web scenes and web maps")),null):this.parsedUrl?super.write(e,t):(i?.push($(this,"using a client-side only connection without a url cannot be written to web scenes and web maps")),null)}async _fetchService(e){if(!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:t}=await(0,a.Z)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new u.Z("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const e=this.fields.find((e=>"oid"===e.type))?.name;if(!e)throw new u.Z("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=e}if(!this.fields)throw new u.Z("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some((e=>e.name===this.objectIdField))||this.fields.push(new Z.Z({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new u.Z("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),(0,M.YN)(this.renderer,this.fieldsIndex),(0,M.UF)(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField="__esri_stream_id__"),(0,J.y)(this,{origin:"service"})}};(0,n._)([(0,f.Cb)({type:String})],Q.prototype,"copyright",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],Q.prototype,"defaultPopupTemplate",null),(0,n._)([(0,f.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Q.prototype,"definitionExpression",void 0),(0,n._)([(0,f.Cb)({type:String})],Q.prototype,"displayField",void 0),(0,n._)([(0,f.Cb)({type:B.Z})],Q.prototype,"elevationInfo",void 0),(0,n._)([(0,f.Cb)({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],Q.prototype,"featureReduction",null),(0,n._)([(0,f.Cb)(H.fields)],Q.prototype,"fields",void 0),(0,n._)([(0,f.Cb)(H.fieldsIndex)],Q.prototype,"fieldsIndex",void 0),(0,n._)([(0,f.Cb)({type:Y.Z,json:{name:"layerDefinition.definitionGeometry",write:!0}})],Q.prototype,"geometryDefinition",void 0),(0,n._)([(0,f.Cb)({type:g.M.apiValues,json:{read:{reader:g.M.read}}})],Q.prototype,"geometryType",void 0),(0,n._)([(0,f.Cb)(E.iR)],Q.prototype,"labelsVisible",void 0),(0,n._)([(0,f.Cb)({type:[A.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:U.r},write:!0}})],Q.prototype,"labelingInfo",void 0),(0,n._)([(0,f.Cb)(E.rn)],Q.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Q.prototype,"listMode",void 0),(0,n._)([(0,f.Cb)({type:b.z8})],Q.prototype,"maxReconnectionAttempts",void 0),(0,n._)([(0,f.Cb)({type:b.z8})],Q.prototype,"maxReconnectionInterval",void 0),(0,n._)([(0,f.Cb)(E.u1)],Q.prototype,"maxScale",void 0),(0,n._)([(0,f.Cb)(E.rO)],Q.prototype,"minScale",void 0),(0,n._)([(0,f.Cb)({type:String})],Q.prototype,"objectIdField",void 0),(0,n._)([(0,f.Cb)({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],Q.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],Q.prototype,"outFields",void 0),(0,n._)([(0,f.Cb)(E.C_)],Q.prototype,"popupEnabled",void 0),(0,n._)([(0,f.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],Q.prototype,"popupTemplate",void 0),(0,n._)([(0,f.Cb)({type:P})],Q.prototype,"purgeOptions",void 0),(0,n._)([(0,f.Cb)({json:{read:!1,write:!1}})],Q.prototype,"refreshInterval",void 0),(0,n._)([(0,f.Cb)({types:l.A,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:l.o,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],Q.prototype,"renderer",null),(0,n._)([(0,v.r)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,v.r)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Q.prototype,"readRenderer",null),(0,n._)([(0,f.Cb)((()=>{const e=(0,c.d9)(E.YI);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Q.prototype,"screenSizePerspectiveEnabled",void 0),(0,n._)([(0,f.Cb)()],Q.prototype,"sourceJSON",void 0),(0,n._)([(0,f.Cb)({type:W.Z,json:{origins:{service:{read:{source:"spatialReference"}}}}})],Q.prototype,"spatialReference",void 0),(0,n._)([(0,f.Cb)({json:{read:!1}})],Q.prototype,"type",void 0),(0,n._)([(0,f.Cb)(E.HQ)],Q.prototype,"url",void 0),(0,n._)([(0,f.Cb)({type:Number})],Q.prototype,"updateInterval",void 0),(0,n._)([(0,f.Cb)({json:{read:!1,write:!1}})],Q.prototype,"useViewTime",void 0),(0,n._)([(0,f.Cb)({type:String})],Q.prototype,"webSocketUrl",void 0),Q=(0,n._)([(0,w.j)("esri.layers.StreamLayer")],Q);const X=Q},17287:(e,t,i)=>{i.d(t,{Y:()=>a});var r=i(43697),n=i(92604),s=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),l=i(66677);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,n.Z.getLogger(this)))}};return(0,r._)([(0,s.Cb)()],t.prototype,"title",null),(0,r._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,i)=>{i.d(t,{N:()=>o});var r=i(43697),n=i(5600),s=(i(75215),i(67676),i(80442),i(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,n.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,s.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},69637:(e,t,i)=>{i.d(t,{b:()=>C});var r,n=i(43697),s=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),l=i(20102),a=i(96674),d=i(78286),u=i(72746),p=i(66577),c=i(92835),m=i(35454),y=i(22974),h=i(14165);const f=new m.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),b=new m.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let v=r=class extends a.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:i,spatialRelationship:r,timeExtent:n,objectIds:s,units:o,distance:l}=this;return new h.Z({geometry:(0,y.d9)(i),objectIds:(0,y.d9)(s),spatialRelationship:r,timeExtent:(0,y.d9)(n),where:t,units:o,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:i,timeExtent:n,objectIds:s,units:o,distance:l}=this;return new r({geometry:(0,y.d9)(t),objectIds:(0,y.d9)(s),spatialRelationship:i,timeExtent:(0,y.d9)(n),where:e,units:o,distance:l})}};(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],v.prototype,"where",void 0),(0,n._)([(0,s.Cb)({types:p.qM,json:{write:!0}})],v.prototype,"geometry",void 0),(0,n._)([(0,s.Cb)({type:f.apiValues,json:{name:"spatialRel",read:{reader:f.read},write:{allowNull:!1,writer:f.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],v.prototype,"spatialRelationship",void 0),(0,n._)([(0,s.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],v.prototype,"distance",void 0),(0,n._)([(0,s.Cb)({type:[Number],json:{write:!0}})],v.prototype,"objectIds",void 0),(0,n._)([(0,s.Cb)({type:b.apiValues,json:{read:b.read,write:{writer:b.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],v.prototype,"units",void 0),(0,n._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],v.prototype,"timeExtent",void 0),v=r=(0,n._)([(0,o.j)("esri.layers.support.FeatureFilter")],v);const w=v;var g;const _={read:{reader:u.ij},write:{writer:u.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:u.ij},write:{writer:u.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},I={name:"showExcludedLabels",default:!0};let T=g=class extends a.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const i=super.write(e,t);if(t?.origin){if(i.filter){const e=Object.keys(i.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in i)return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return i}clone(){return new g({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,s.Cb)({type:w,json:{write:{allowNull:!0,writer(e,t,i,r){const n=e?.write({},r);n&&0!==Object.keys(n).length?(0,d.RB)(i,n,t):(0,d.RB)(i,null,t)}}}})],T.prototype,"filter",void 0),(0,n._)([(0,s.Cb)({json:{write:!0,origins:{"web-map":_,"portal-item":_}}})],T.prototype,"includedEffect",void 0),(0,n._)([(0,s.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],T.prototype,"excludedEffect",void 0),(0,n._)([(0,s.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":I,"portal-item":I}}})],T.prototype,"excludedLabelsVisible",void 0),T=g=(0,n._)([(0,o.j)("esri.layers.support.FeatureEffect")],T);const x=T,F={write:{allowNull:!0}},C=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,s.Cb)({type:x,json:{origins:{"web-map":F,"portal-item":F}}})],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,o.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},34760:(e,t,i)=>{i.d(t,{Q:()=>w});var r=i(43697),n=i(92604),s=i(95330),o=i(5600),l=i(90578),a=(i(67676),i(80442),i(52011)),d=i(82960),u=i(46791),p=(i(66643),i(20102),i(26258),i(87538));const c=new u.Z,m=new WeakMap;function y(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let f=0,b=0;function v(){const e=Date.now();let t=!1;for(const i of c){const r=i.deref();r?r.refreshInterval&&e-(m.get(r)??0)+5>=6e4*r.refreshInterval&&(m.set(r,e),r.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,p.EH)((()=>{const e=Date.now();let t=0;for(const i of c){const r=i.deref();r&&(t=h(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?m.get(r)||m.set(r,e):m.delete(r))}if(t!==b){if(b=t,clearInterval(f),0===b)return void(f=0);f=setInterval(v,b)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||y(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{n.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,r._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:d.C}}}}})],t.prototype,"refreshInterval",void 0),(0,r._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,r._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,r._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,i)=>{i.d(t,{n:()=>c});var r=i(43697),n=i(92835),s=i(84552),o=i(5600),l=(i(75215),i(67676),i(80442),i(71715)),a=i(52011),d=i(69165),u=i(76259),p=i(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const r=i.timeOffset,n=p.v.fromJSON(i.timeOffsetUnits);return r&&n?new s.Z({value:r,unit:n}):null}set timeInfo(e){(0,d.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r._)([(0,o.Cb)({type:n.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,r._)([(0,o.Cb)({type:s.Z})],t.prototype,"timeOffset",void 0),(0,r._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,r._)([(0,o.Cb)({value:null,type:u.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,r._)([(0,o.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,r._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},1231:(e,t,i)=>{i.d(t,{Z:()=>f});var r,n=i(43697),s=i(35454),o=i(96674),l=i(5600),a=i(75215),d=(i(67676),i(80442),i(36030)),u=i(71715),p=i(52011),c=i(72729),m=i(86719);const y=new s.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=r=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?y.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,n._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,n._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,n._)([(0,u.r)("description")],h.prototype,"readDescription",null),(0,n._)([(0,l.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],h.prototype,"domain",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,n._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,n._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,n._)([(0,d.J)(m.v)],h.prototype,"type",void 0),(0,n._)([(0,l.Cb)()],h.prototype,"valueType",void 0),(0,n._)([(0,u.r)("valueType",["description"])],h.prototype,"readValueType",null),(0,n._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=r=(0,n._)([(0,p.j)("esri.layers.support.Field")],h);const f=h},99514:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(20102),n=i(96674),s=i(92604),o=i(30175),l=i(1542),a=i(69165),d=i(25031),u=i(17126);const p=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],f(e))}static fromLayerJSON(e){return new c(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=y(t);if(t&&r){const n=m(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(r,e),i.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.Dl)(e)||(0,a.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.Dl)(e)||(0,a.Se)(e)||e.nullable||void 0!==(0,a.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(m(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.Z.getLogger("esri.layers.support.FieldsIndex").error(new r.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.pt):h.has(t.type)?d._4:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d._4?l.yV.instance:t===d.pt?u.Qf.utcInstance:(0,o.s1)(p,t,(()=>u.vF.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function m(e){return e.trim().toLowerCase()}function y(e){return(0,a.q6)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:n}=e,s=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,d.Jv)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,d.Jv)(n.dateFieldsTimeReference):l??d.pt:null,u=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.timeReference?(0,d.Jv)(r.timeReference):l:null,p=new Map([[m(n?.creationDateField??""),a],[m(n?.editDateField??""),a],[m(s),u],[m(o),u]]);for(const{name:r,type:n}of e.fields)if(h.has(n))t.set(r,d._4);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(r,null);else if(i)t.set(r,d._4);else{const e=p.get(m(r??""))??l;t.set(r,e)}return t}},76259:(e,t,i)=>{i.d(t,{Z:()=>h});var r=i(43697),n=i(92835),s=i(84552),o=i(2368),l=i(96674),a=i(5600),d=(i(75215),i(67676),i(80442),i(71715)),u=i(52011),p=i(30556),c=i(25031);function m(e,t){return s.Z.fromJSON({value:e,unit:t})}let y=class extends((0,o.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const i=new Date(t.timeExtent[0]),r=new Date(t.timeExtent[1]);return new n.Z({start:i,end:r})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,r._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,r._)([(0,a.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,r._)([(0,d.r)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,r._)([(0,p.c)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,r._)([(0,a.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,r._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,r._)([(0,p.c)("interval")],y.prototype,"writeInterval",null),(0,r._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,r._)([(0,a.Cb)((0,c.mi)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),y=(0,r._)([(0,u.j)("esri.layers.support.TimeInfo")],y);const h=y},72729:(e,t,i)=>{i.d(t,{im:()=>T,V5:()=>I}),i(80442);var r,n=i(43697),s=i(22974),o=i(5600),l=(i(75215),i(36030)),a=i(52011),d=i(96674);i(67676);let u=r=class extends d.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,n._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],u.prototype,"code",void 0),u=r=(0,n._)([(0,a.j)("esri.layers.support.CodedValue")],u);const p=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends d.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,l.J)(p)],c.prototype,"type",void 0),c=(0,n._)([(0,a.j)("esri.layers.support.Domain")],c);const m=c;var y;let h=y=class extends m{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,s.d9)(this.codedValues),name:this.name})}};(0,n._)([(0,o.Cb)({type:[u],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,n._)([(0,l.J)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=y=(0,n._)([(0,a.j)("esri.layers.support.CodedValueDomain")],h);const f=h;var b;i(92604),i(20102);let v=b=class extends m{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,n._)([(0,l.J)({inherited:"inherited"})],v.prototype,"type",void 0),v=b=(0,n._)([(0,a.j)("esri.layers.support.InheritedDomain")],v);const w=v;var g;let _=g=class extends m{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new g({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],_.prototype,"maxValue",void 0),(0,n._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],_.prototype,"minValue",void 0),(0,n._)([(0,l.J)({range:"range"})],_.prototype,"type",void 0),_=g=(0,n._)([(0,a.j)("esri.layers.support.RangeDomain")],_);const S=_,I={key:"type",base:m,typeMap:{range:_,"coded-value":f,inherited:w}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>r});const r=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},78981:(e,t,i)=>{i.d(t,{v:()=>r});const r=(0,i(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},40555:(e,t,i)=>{i.d(t,{y:()=>o});var r=i(66643),n=i(95330),s=i(20941);async function o(e,t,i){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const l=await(0,r.q6)(o.populateFromStyle());if((0,n.k_)(i),!1===l.ok){const i=l.error;t?.messages&&t.messages.push(new s.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},58333:(e,t,i)=>{i.d(t,{ET:()=>s,I4:()=>n,eG:()=>a,lF:()=>o,lj:()=>u,qP:()=>l,wW:()=>d});const r=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},d={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},12259:(e,t,i)=>{var r;i.d(t,{x:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2139],{21787:(e,t,n)=>{n.d(t,{a:()=>l,d:()=>a,f:()=>o,i:()=>d,m:()=>u,n:()=>c,s:()=>i,t:()=>s});var r=n(46851);function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function i(e,t,n,r,o,i,s,a,l,u){return e[0]=t,e[1]=n,e[2]=r,e[3]=o,e[4]=i,e[5]=s,e[6]=a,e[7]=l,e[8]=u,e}function s(e,t){if(e===t){const n=t[1],r=t[2],o=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=o}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function a(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],s=t[4],a=t[5],l=t[6],u=t[7],c=t[8],p=c*s-a*u,d=-c*i+a*l,f=u*i-s*l;let y=n*p+r*d+o*f;return y?(y=1/y,e[0]=p*y,e[1]=(-c*r+o*u)*y,e[2]=(a*r-o*s)*y,e[3]=d*y,e[4]=(c*n-o*l)*y,e[5]=(-a*n+o*i)*y,e[6]=f*y,e[7]=(-u*n+r*l)*y,e[8]=(s*n-r*i)*y,e):null}function l(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],s=t[4],a=t[5],l=t[6],u=t[7],c=t[8];return e[0]=s*c-a*u,e[1]=o*u-r*c,e[2]=r*a-o*s,e[3]=a*l-i*c,e[4]=n*c-o*l,e[5]=o*i-n*a,e[6]=i*u-s*l,e[7]=r*l-n*u,e[8]=n*s-r*i,e}function u(e,t,n){const r=t[0],o=t[1],i=t[2],s=t[3],a=t[4],l=t[5],u=t[6],c=t[7],p=t[8],d=n[0],f=n[1],y=n[2],h=n[3],m=n[4],b=n[5],g=n[6],w=n[7],v=n[8];return e[0]=d*r+f*s+y*u,e[1]=d*o+f*a+y*c,e[2]=d*i+f*l+y*p,e[3]=h*r+m*s+b*u,e[4]=h*o+m*a+b*c,e[5]=h*i+m*l+b*p,e[6]=g*r+w*s+v*u,e[7]=g*o+w*a+v*c,e[8]=g*i+w*l+v*p,e}function c(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],s=t[4],a=t[5],l=t[6],u=t[7],c=t[8],p=t[9],d=t[10],f=t[11],y=t[12],h=t[13],m=t[14],b=t[15],g=n*a-r*s,w=n*l-o*s,v=n*u-i*s,S=r*l-o*a,M=r*u-i*a,C=o*u-i*l,I=c*h-p*y,T=c*m-d*y,F=c*b-f*y,_=p*m-d*h,x=p*b-f*h,E=d*b-f*m;let A=g*E-w*x+v*_+S*F-M*T+C*I;return A?(A=1/A,e[0]=(a*E-l*x+u*_)*A,e[1]=(l*F-s*E-u*T)*A,e[2]=(s*x-a*F+u*I)*A,e[3]=(o*x-r*E-i*_)*A,e[4]=(n*E-o*F+i*T)*A,e[5]=(r*F-n*x-i*I)*A,e[6]=(h*C-m*M+b*S)*A,e[7]=(m*v-y*C-b*w)*A,e[8]=(y*M-h*v+b*g)*A,e):null}function p(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e}function d(e){const t=(0,r.g)(),n=e[0],o=e[1],i=e[2],s=e[3],a=e[4],l=e[5],u=e[6],c=e[7],p=e[8];return Math.abs(1-(n*n+s*s+u*u))<=t&&Math.abs(1-(o*o+a*a+c*c))<=t&&Math.abs(1-(i*i+l*l+p*p))<=t}const f=u,y=p;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},adjoint:l,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},determinant:function(e){const t=e[0],n=e[1],r=e[2],o=e[3],i=e[4],s=e[5],a=e[6],l=e[7],u=e[8];return t*(u*i-s*l)+n*(-u*o+s*a)+r*(l*o-i*a)},equals:function(e,t){const n=e[0],o=e[1],i=e[2],s=e[3],a=e[4],l=e[5],u=e[6],c=e[7],p=e[8],d=t[0],f=t[1],y=t[2],h=t[3],m=t[4],b=t[5],g=t[6],w=t[7],v=t[8],S=(0,r.g)();return Math.abs(n-d)<=S*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(o-f)<=S*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(i-y)<=S*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(s-h)<=S*Math.max(1,Math.abs(s),Math.abs(h))&&Math.abs(a-m)<=S*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(l-b)<=S*Math.max(1,Math.abs(l),Math.abs(b))&&Math.abs(u-g)<=S*Math.max(1,Math.abs(u),Math.abs(g))&&Math.abs(c-w)<=S*Math.max(1,Math.abs(c),Math.abs(w))&&Math.abs(p-v)<=S*Math.max(1,Math.abs(p),Math.abs(v))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)},fromMat2d:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e},fromMat4:o,fromQuat:function(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],s=n+n,a=r+r,l=o+o,u=n*s,c=r*s,p=r*a,d=o*s,f=o*a,y=o*l,h=i*s,m=i*a,b=i*l;return e[0]=1-p-y,e[3]=c-b,e[6]=d+m,e[1]=c+b,e[4]=1-u-y,e[7]=f-h,e[2]=d-m,e[5]=f+h,e[8]=1-u-p,e},fromRotation:function(e,t){const n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},fromTranslation:function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e},identity:function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},invert:a,isOrthoNormal:d,mul:f,multiply:u,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e},normalFromMat4:c,normalFromMat4Legacy:function(e,t){const n=t[0],r=t[1],o=t[2],i=t[4],s=t[5],a=t[6],l=t[8],u=t[9],c=t[10],p=c*s-a*u,d=-c*i+a*l,f=u*i-s*l,y=n*p+r*d+o*f;if(!y)return null;const h=1/y;return e[0]=p*h,e[1]=(-c*r+o*u)*h,e[2]=(a*r-o*s)*h,e[3]=d*h,e[4]=(c*n-o*l)*h,e[5]=(-a*n+o*i)*h,e[6]=f*h,e[7]=(-u*n+r*l)*h,e[8]=(s*n-r*i)*h,e},projection:function(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e},rotate:function(e,t,n){const r=t[0],o=t[1],i=t[2],s=t[3],a=t[4],l=t[5],u=t[6],c=t[7],p=t[8],d=Math.sin(n),f=Math.cos(n);return e[0]=f*r+d*s,e[1]=f*o+d*a,e[2]=f*i+d*l,e[3]=f*s-d*r,e[4]=f*a-d*o,e[5]=f*l-d*i,e[6]=u,e[7]=c,e[8]=p,e},scale:function(e,t,n){const r=n[0],o=n[1],i=n[2];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e[6]=i*t[6],e[7]=i*t[7],e[8]=i*t[8],e},scaleByVec2:function(e,t,n){const r=n[0],o=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=o*t[3],e[4]=o*t[4],e[5]=o*t[5],e},set:i,str:function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"},sub:y,subtract:p,translate:function(e,t,n){const r=t[0],o=t[1],i=t[2],s=t[3],a=t[4],l=t[5],u=t[6],c=t[7],p=t[8],d=n[0],f=n[1];return e[0]=r,e[1]=o,e[2]=i,e[3]=s,e[4]=a,e[5]=l,e[6]=d*r+f*s+u,e[7]=d*o+f*a+c,e[8]=d*i+f*l+p,e},transpose:s},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,n)=>{n.d(t,{a:()=>f,c:()=>m,g:()=>c,j:()=>x,k:()=>h,m:()=>p,s:()=>u});var r=n(46521),o=n(94961),i=n(65617),s=n(46851),a=n(17896),l=n(98766);function u(e,t,n){n*=.5;const r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function c(e,t){const n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>(0,s.g)()?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}function p(e,t,n){const r=t[0],o=t[1],i=t[2],s=t[3],a=n[0],l=n[1],u=n[2],c=n[3];return e[0]=r*c+s*a+o*u-i*l,e[1]=o*c+s*l+i*a-r*u,e[2]=i*c+s*u+r*l-o*a,e[3]=s*c-r*a-o*l-i*u,e}function d(e,t,n,r){const o=t[0],i=t[1],a=t[2],l=t[3];let u,c,p,d,f,y=n[0],h=n[1],m=n[2],b=n[3];return c=o*y+i*h+a*m+l*b,c<0&&(c=-c,y=-y,h=-h,m=-m,b=-b),1-c>(0,s.g)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-r)*u)/p,f=Math.sin(r*u)/p):(d=1-r,f=r),e[0]=d*o+f*y,e[1]=d*i+f*h,e[2]=d*a+f*m,e[3]=d*l+f*b,e}function f(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const n=t[0]+t[4]+t[8];let r;if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{let n=0;t[4]>t[0]&&(n=1),t[8]>t[3*n+n]&&(n=2);const o=(n+1)%3,i=(n+2)%3;r=Math.sqrt(t[3*n+n]-t[3*o+o]-t[3*i+i]+1),e[n]=.5*r,r=.5/r,e[3]=(t[3*o+i]-t[3*i+o])*r,e[o]=(t[3*o+n]+t[3*n+o])*r,e[i]=(t[3*i+n]+t[3*n+i])*r}return e}function h(e,t,n,r){const o=.5*Math.PI/180;t*=o,n*=o,r*=o;const i=Math.sin(t),s=Math.cos(t),a=Math.sin(n),l=Math.cos(n),u=Math.sin(r),c=Math.cos(r);return e[0]=i*l*c-s*a*u,e[1]=s*a*c+i*l*u,e[2]=s*l*u-i*a*c,e[3]=s*l*c+i*a*u,e}const m=l.c,b=l.s,g=l.a,w=p,v=l.b,S=l.d,M=l.l,C=l.f,I=C,T=l.g,F=T,_=l.n,x=l.h,E=l.e,A=(0,i.c)(),U=(0,i.f)(1,0,0),O=(0,i.f)(0,1,0),N=(0,o.a)(),Z=(0,o.a)(),j=(0,r.a)();Object.freeze(Object.defineProperty({__proto__:null,add:g,calculateW:function(e,t){const n=t[0],r=t[1],o=t[2];return e[0]=n,e[1]=r,e[2]=o,e[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),e},conjugate:f,copy:m,dot:S,equals:E,exactEquals:x,fromEuler:h,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const n=t[0],r=t[1],o=t[2],i=t[3],s=n*n+r*r+o*o+i*i,a=s?1/s:0;return e[0]=-n*a,e[1]=-r*a,e[2]=-o*a,e[3]=i*a,e},len:I,length:C,lerp:M,mul:w,multiply:p,normalize:_,random:function(e){const t=s.R,n=t(),r=t(),o=t(),i=Math.sqrt(1-n),a=Math.sqrt(n);return e[0]=i*Math.sin(2*Math.PI*r),e[1]=i*Math.cos(2*Math.PI*r),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,n){n*=.5;const r=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l+s*a,e[1]=o*l+i*a,e[2]=i*l-o*a,e[3]=s*l-r*a,e},rotateY:function(e,t,n){n*=.5;const r=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l-i*a,e[1]=o*l+s*a,e[2]=i*l+r*a,e[3]=s*l-o*a,e},rotateZ:function(e,t,n){n*=.5;const r=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(n),l=Math.cos(n);return e[0]=r*l+o*a,e[1]=o*l-r*a,e[2]=i*l+s*a,e[3]=s*l-i*a,e},rotationTo:function(e,t,n){const r=(0,a.j)(t,n);return r<-.999999?((0,a.b)(A,U,t),(0,a.k)(A)<1e-6&&(0,a.b)(A,O,t),(0,a.n)(A,A),u(e,A,Math.PI),e):r>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.b)(A,t,n),e[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=1+r,_(e,e))},scale:v,set:b,setAxes:function(e,t,n,r){const o=j;return o[0]=n[0],o[3]=n[1],o[6]=n[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],_(e,y(e,o))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,n,r,o,i){return d(N,t,o,i),d(Z,n,r,i),d(e,N,Z,2*i*(1-i)),e},sqrLen:F,squaredLength:T,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},22862:(e,t,n)=>{n.d(t,{Hg:()=>y,V7:()=>f,uD:()=>d});var r=n(92036),o=n(46791),i=n(1153);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof r.Z}function l(e){return e instanceof o.Z?Object.keys(e.items):a(e)?(0,i.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof o.Z?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const r=l(e),o=l(t);if(0===r.length&&0===o.length)return;if(!r.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const i=o.filter((e=>!r.includes(e))),d=r.filter((e=>!o.includes(e))),f=r.filter((n=>o.includes(n)&&u(e,n)!==u(t,n))).concat(i,d).sort(),y=c(e);if(y&&s.has(y)&&f.length)return{type:"complete",oldValue:e,newValue:t};let h;const m=a(e)&&a(t);for(const r of f){const o=u(e,r),i=u(t,r);let s;if((m||"function"!=typeof o&&"function"!=typeof i)&&o!==i&&(null!=o||null!=i)){if(n&&n[r]&&"function"==typeof n[r])s=n[r]?.(o,i);else if(o instanceof Date&&i instanceof Date){if(o.getTime()===i.getTime())continue;s={type:"complete",oldValue:o,newValue:i}}else s="object"==typeof o&&"object"==typeof i&&c(o)===c(i)?p(o,i):{type:"complete",oldValue:o,newValue:i};null!=s&&(null!=h?h.diff[r]=s:h={type:"partial",diff:{[r]:s}})}}return h}function d(e,t){if(null==e)return!1;const n=t.split(".");let r=e;for(const e of n){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}function f(e,t){for(const n of t)if(d(e,n))return!0;return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},1542:(e,t,n)=>{n.d(t,{A4:()=>i,L9:()=>s,yV:()=>o});var r=n(17126);class o{}function i(e){return e instanceof r.ld?e===o.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return i(e)?o.instance:e}o.instance=new r.vF("Etc/UTC")},83932:(e,t,n)=>{n.d(t,{B:()=>u});var r=n(22021),o=n(52138),i=n(65617);function s(e,t,n){const r=Math.sin(e),o=Math.cos(e),i=Math.sin(t),s=Math.cos(t),a=n;return a[0]=-r,a[4]=-i*o,a[8]=s*o,a[12]=0,a[1]=o,a[5]=-i*r,a[9]=s*r,a[13]=0,a[2]=0,a[6]=s,a[10]=i,a[14]=0,a[3]=0,a[7]=0,a[11]=0,a[15]=1,a}var a=n(29166),l=n(8744);function u(e,t,n,r){if(null==e||null==r)return!1;const i=(0,a.eT)(e,a.Jz),u=(0,a.eT)(r,a.sp);if(i===u&&!c(u)&&(i!==a.Ej.UNKNOWN||(0,l.fS)(e,r)))return(0,o.d)(n,t),!0;if(c(u)){const e=a.rf[i][a.Ej.LON_LAT],r=a.rf[a.Ej.LON_LAT][u];return null!=e&&null!=r&&(e(t,0,d,0),r(d,0,f,0),s(p*d[0],p*d[1],n),n[12]=f[0],n[13]=f[1],n[14]=f[2],!0)}if((u===a.Ej.WEB_MERCATOR||u===a.Ej.PLATE_CARREE)&&(i===a.Ej.WGS84||i===a.Ej.CGCS2000&&u===a.Ej.PLATE_CARREE||i===a.Ej.SPHERICAL_ECEF||i===a.Ej.WEB_MERCATOR)){const e=a.rf[i][a.Ej.LON_LAT],r=a.rf[a.Ej.LON_LAT][u];return null!=e&&null!=r&&(e(t,0,d,0),r(d,0,f,0),i===a.Ej.SPHERICAL_ECEF?function(e,t,n){s(e,t,n),(0,o.t)(n,n)}(p*d[0],p*d[1],n):(0,o.g)(n),n[12]=f[0],n[13]=f[1],n[14]=f[2],!0)}return!1}function c(e){return e===a.Ej.SPHERICAL_ECEF||e===a.Ej.SPHERICAL_MARS_PCPF||e===a.Ej.SPHERICAL_MOON_PCPF}const p=(0,r.Vl)(1),d=(0,i.c)(),f=(0,i.c)()},58995:(e,t,n)=>{n.d(t,{rS:()=>u});var r=n(2109),o=n(82971),i=n(8744);const s=new o.Z(r.kU),a=new o.Z(r.JL),l=new o.Z(r.mM);function u(e){return e&&((0,i.BZ)(e)||(0,i.fS)(e,a))?a:e&&((0,i.V2)(e)||(0,i.fS)(e,l))?l:s}new o.Z(r.pn)},60437:(e,t,n)=>{n.d(t,{G_:()=>g,HH:()=>s,JR:()=>y,TC:()=>a,Tn:()=>p,Ue:()=>o,al:()=>i,bZ:()=>h,cS:()=>f,dp:()=>u,fS:()=>b,is:()=>m,op:()=>c,pp:()=>l,t8:()=>d});var r=n(6570);function o(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function i(e,t,n,r,i,s,a=o()){return a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=i,a[5]=s,a}function s(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new r.Z(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function p(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function f(e){return e?d(e,g):o(g)}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function h(e,t,n,r,o){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=o,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function b(e,t,n){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}n(24470);const g=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];o()},1231:(e,t,n)=>{n.d(t,{Z:()=>m});var r,o=n(43697),i=n(35454),s=n(96674),a=n(5600),l=n(75215),u=(n(67676),n(80442),n(36030)),c=n(71715),p=n(52011),d=n(72729),f=n(86719);const y=new i.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=r=class extends s.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?y.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,o._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,c.r)("description")],h.prototype,"readDescription",null),(0,o._)([(0,a.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],h.prototype,"domain",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,o._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,o._)([(0,u.J)(f.v)],h.prototype,"type",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"valueType",void 0),(0,o._)([(0,c.r)("valueType",["description"])],h.prototype,"readValueType",null),(0,o._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=r=(0,o._)([(0,p.j)("esri.layers.support.Field")],h);const m=h},99514:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(20102),o=n(96674),i=n(92604),s=n(30175),a=n(1542),l=n(69165),u=n(25031),c=n(17126);const p=new Map;class d{static fromJSON(e){return new d(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new d(e.fields??[],m(e))}static fromLayerJSON(e){return new d(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const n=[];for(const e of this.fields){const t=e?.name,r=y(t);if(t&&r){const o=f(t);this._fieldsMap.set(t,e),this._fieldsMap.set(o,e),this._normalizedFieldsMap.set(r,e),n.push(`${o}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.Dl)(e)||(0,l.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}n.sort(),this.uid=n.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.Dl)(e)||(0,l.Se)(e)||e.nullable||void 0!==(0,l.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(f(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(i.Z.getLogger("esri.layers.support.FieldsIndex").error(new r.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.pt):h.has(t.type)?u._4:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u._4?a.yV.instance:t===u.pt?c.Qf.utcInstance:(0,s.s1)(p,t,(()=>c.vF.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,o.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function f(e){return e.trim().toLowerCase()}function y(e){return(0,l.q6)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const n=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:o}=e,i=(r?"startField"in r?r.startField:r.startTimeField:"")??"",s=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Jv)(e.dateFieldsTimeReference):null,l=o?function(e){return"timeZone"in e}(o)?o.timeZone??a:o.dateFieldsTimeReference?(0,u.Jv)(o.dateFieldsTimeReference):a??u.pt:null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,u.Jv)(r.timeReference):a:null,p=new Map([[f(o?.creationDateField??""),l],[f(o?.editDateField??""),l],[f(i),c],[f(s),c]]);for(const{name:r,type:o}of e.fields)if(h.has(o))t.set(r,u._4);else if("date"!==o&&"esriFieldTypeDate"!==o)t.set(r,null);else if(n)t.set(r,u._4);else{const e=p.get(f(r??""))??a;t.set(r,e)}return t}},51161:(e,t,n)=>{n.d(t,{H3:()=>b,QI:()=>p,U4:()=>l,Yh:()=>f});var r=n(43697),o=n(96674),i=n(5600),s=(n(75215),n(67676),n(80442),n(36030)),a=n(52011);let l=class extends o.wq{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,r._)([(0,i.Cb)({type:Number})],l.prototype,"nodesPerPage",void 0),(0,r._)([(0,i.Cb)({type:Number})],l.prototype,"rootIndex",void 0),(0,r._)([(0,i.Cb)({type:String})],l.prototype,"lodSelectionMetricType",void 0),l=(0,r._)([(0,a.j)("esri.layer.support.I3SNodePageDefinition")],l);let u=class extends o.wq{constructor(){super(...arguments),this.factor=1}};(0,r._)([(0,i.Cb)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],u.prototype,"id",void 0),(0,r._)([(0,i.Cb)({type:Number})],u.prototype,"factor",void 0),u=(0,r._)([(0,a.j)("esri.layer.support.I3SMaterialTexture")],u);let c=class extends o.wq{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,r._)([(0,i.Cb)({type:[Number]})],c.prototype,"baseColorFactor",void 0),(0,r._)([(0,i.Cb)({type:u})],c.prototype,"baseColorTexture",void 0),(0,r._)([(0,i.Cb)({type:u})],c.prototype,"metallicRoughnessTexture",void 0),(0,r._)([(0,i.Cb)({type:Number})],c.prototype,"metallicFactor",void 0),(0,r._)([(0,i.Cb)({type:Number})],c.prototype,"roughnessFactor",void 0),c=(0,r._)([(0,a.j)("esri.layer.support.I3SMaterialPBRMetallicRoughness")],c);let p=class extends o.wq{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,r._)([(0,s.J)({opaque:"opaque",mask:"mask",blend:"blend"})],p.prototype,"alphaMode",void 0),(0,r._)([(0,i.Cb)({type:Number})],p.prototype,"alphaCutoff",void 0),(0,r._)([(0,i.Cb)({type:Boolean})],p.prototype,"doubleSided",void 0),(0,r._)([(0,s.J)({none:"none",back:"back",front:"front"})],p.prototype,"cullFace",void 0),(0,r._)([(0,i.Cb)({type:u})],p.prototype,"normalTexture",void 0),(0,r._)([(0,i.Cb)({type:u})],p.prototype,"occlusionTexture",void 0),(0,r._)([(0,i.Cb)({type:u})],p.prototype,"emissiveTexture",void 0),(0,r._)([(0,i.Cb)({type:[Number]})],p.prototype,"emissiveFactor",void 0),(0,r._)([(0,i.Cb)({type:c})],p.prototype,"pbrMetallicRoughness",void 0),p=(0,r._)([(0,a.j)("esri.layer.support.I3SMaterialDefinition")],p);let d=class extends o.wq{};(0,r._)([(0,i.Cb)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],d.prototype,"name",void 0),(0,r._)([(0,s.J)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],d.prototype,"format",void 0),d=(0,r._)([(0,a.j)("esri.layer.support.I3STextureFormat")],d);let f=class extends o.wq{constructor(){super(...arguments),this.atlas=!1}};(0,r._)([(0,i.Cb)({type:[d]})],f.prototype,"formats",void 0),(0,r._)([(0,i.Cb)({type:Boolean})],f.prototype,"atlas",void 0),f=(0,r._)([(0,a.j)("esri.layer.support.I3STextureSetDefinition")],f);let y=class extends o.wq{};(0,r._)([(0,s.J)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:Number})],y.prototype,"component",void 0),y=(0,r._)([(0,a.j)("esri.layer.support.I3SGeometryAttribute")],y);let h=class extends o.wq{};(0,r._)([(0,s.J)({draco:"draco"})],h.prototype,"encoding",void 0),(0,r._)([(0,i.Cb)({type:[String]})],h.prototype,"attributes",void 0),h=(0,r._)([(0,a.j)("esri.layer.support.I3SGeometryCompressedAttributes")],h);let m=class extends o.wq{constructor(){super(...arguments),this.offset=0}};(0,r._)([(0,i.Cb)({type:Number})],m.prototype,"offset",void 0),(0,r._)([(0,i.Cb)({type:y})],m.prototype,"position",void 0),(0,r._)([(0,i.Cb)({type:y})],m.prototype,"normal",void 0),(0,r._)([(0,i.Cb)({type:y})],m.prototype,"uv0",void 0),(0,r._)([(0,i.Cb)({type:y})],m.prototype,"color",void 0),(0,r._)([(0,i.Cb)({type:y})],m.prototype,"uvRegion",void 0),(0,r._)([(0,i.Cb)({type:y})],m.prototype,"featureId",void 0),(0,r._)([(0,i.Cb)({type:y})],m.prototype,"faceRange",void 0),(0,r._)([(0,i.Cb)({type:h})],m.prototype,"compressedAttributes",void 0),m=(0,r._)([(0,a.j)("esri.layer.support.I3SGeometryBuffer")],m);let b=class extends o.wq{};(0,r._)([(0,s.J)({triangle:"triangle"})],b.prototype,"topology",void 0),(0,r._)([(0,i.Cb)()],b.prototype,"geometryBuffers",void 0),b=(0,r._)([(0,a.j)("esri.layer.support.I3SGeometryDefinition")],b)},56765:(e,t,n)=>{n.d(t,{Z:()=>c});var r,o=n(43697),i=n(46791),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011));let u=r=class extends s.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new i.Z}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=r=(0,o._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],u);const c=u},71592:(e,t,n)=>{n.d(t,{w:()=>c});var r=n(40330),o=n(3172),i=n(20102),s=n(95330),a=n(66677),l=n(48522),u=n(15235);async function c(e,t){const n=(0,a.Qc)(e);if(!n)throw new i.Z("invalid-url","Invalid scene service url");const c={...t,sceneServerUrl:n.url.path,layerId:n.sublayer??void 0};if(c.sceneLayerItem??=await async function(e){const t=(await p(e)).serviceItemId;if(!t)return null;const n=new u.default({id:t,apiKey:e.apiKey}),i=await async function(e){const t=r.id?.findServerInfo(e.sceneServerUrl);if(t?.owningSystemUrl)return t.owningSystemUrl;const n=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const t=(await(0,o.Z)(n,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(t)return t}catch(e){(0,s.r9)(e)}return null}(e);null!=i&&(n.portal=new l.Z({url:i}));try{return n.load({signal:e.signal})}catch(e){return(0,s.r9)(e),null}}(c),null==c.sceneLayerItem)return d(c.sceneServerUrl.replace("/SceneServer","/FeatureServer"),c);const f=await async function({sceneLayerItem:e,signal:t}){if(!e)return null;try{const n=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:t})).find((e=>"Feature Service"===e.type))||null;if(!n)return null;const r=new u.default({portal:n.portal,id:n.id});return await r.load(),r}catch(e){return(0,s.r9)(e),null}}(c);if(!f?.url)throw new i.Z("related-service-not-found","Could not find feature service through portal item relationship");const y=await d(f.url,c);return y.portalItem=f,y}async function p(e){if(e.rootDocument)return e.rootDocument;const t={query:{f:"json",token:e.apiKey},responseType:"json",signal:e.signal};try{const n=await(0,o.Z)(e.sceneServerUrl,t);e.rootDocument=n.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,t){const n=(0,a.Qc)(e);if(!n)throw new i.Z("invalid-feature-service-url","Invalid feature service url");const r=n.url.path,s=t.layerId;if(null==s)return{serverUrl:r};const l=p(t),u=e=>{const n={query:{f:"json"},responseType:"json",authMode:e,signal:t.signal};return(0,o.Z)(r,n)},c=u("anonymous").catch((()=>u("no-prompt"))),[d,f]=await Promise.all([c,l]),y=f?.layers,h=d.data&&d.data.layers;if(!Array.isArray(h))throw new Error("expected layers array");if(Array.isArray(y)){for(let e=0;e<Math.min(y.length,h.length);e++)if(y[e].id===s)return{serverUrl:r,layerId:h[e].id}}else if(null!=s&&s<h.length)return{serverUrl:r,layerId:h[s].id};throw new Error("could not find matching associated sublayer")}},15506:(e,t,n)=>{n.d(t,{C:()=>r});const r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},72729:(e,t,n)=>{n.d(t,{im:()=>I,V5:()=>C}),n(80442);var r,o=n(43697),i=n(22974),s=n(5600),a=(n(75215),n(36030)),l=n(52011),u=n(96674);n(67676);let c=r=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=r=(0,o._)([(0,l.j)("esri.layers.support.CodedValue")],c);const p=new(n(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,a.J)(p)],d.prototype,"type",void 0),d=(0,o._)([(0,l.j)("esri.layers.support.Domain")],d);const f=d;var y;let h=y=class extends f{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,i.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,s.Cb)({type:[c],json:{write:!0}})],h.prototype,"codedValues",void 0),(0,o._)([(0,a.J)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=y=(0,o._)([(0,l.j)("esri.layers.support.CodedValueDomain")],h);const m=h;var b;n(92604),n(20102);let g=b=class extends f{constructor(e){super(e),this.type="inherited"}clone(){return new b}};(0,o._)([(0,a.J)({inherited:"inherited"})],g.prototype,"type",void 0),g=b=(0,o._)([(0,l.j)("esri.layers.support.InheritedDomain")],g);const w=g;var v;let S=v=class extends f{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,o._)([(0,s.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,o._)([(0,a.J)({range:"range"})],S.prototype,"type",void 0),S=v=(0,o._)([(0,l.j)("esri.layers.support.RangeDomain")],S);const M=S,C={key:"type",base:f,typeMap:{range:S,"coded-value":m,inherited:w}};function I(e){if(!e?.type)return null;switch(e.type){case"range":return M.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,n)=>{n.d(t,{v:()=>r});const r=new(n(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},36405:(e,t,n)=>{function r(e,t){return t?.mode?t.mode:function(e){return e?u:c}(e).mode}function o(e,t){return r(null!=e&&e.hasZ,t)}function i(e,t,n){return n&&n.mode!==t?`${e} only support ${t} elevation mode`:null}function s(e,t,n){return n?.mode===t?`${e} do not support ${t} elevation mode`:null}function a(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function l(e,t){t&&e.warn(".elevationInfo=",t)}n.d(t,{LR:()=>l,Uy:()=>i,VW:()=>o,Wb:()=>s,kf:()=>a}),n(12541);const u={mode:"absolute-height",offset:0},c={mode:"on-the-ground",offset:null}},58333:(e,t,n)=>{n.d(t,{ET:()=>i,I4:()=>o,eG:()=>l,lF:()=>s,lj:()=>c,qP:()=>a,wW:()=>u});const r=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},i={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},91891:(e,t,n)=>{n.d(t,{I_:()=>d,W7:()=>h,qM:()=>b});var r=n(20102),o=n(22974),i=n(92604),s=n(25683),a=n(35065);const l=i.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function u(e,t,n){let o="",i=0;for(;i<n;){const s=e[t+i];if(s<128)o+=String.fromCharCode(s),i++;else if(s>=192&&s<224){if(i+1>=n)throw new r.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&s)<<6|63&e[t+i+1];o+=String.fromCharCode(a),i+=2}else if(s>=224&&s<240){if(i+2>=n)throw new r.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&s)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];o+=String.fromCharCode(a),i+=3}else{if(!(s>=240&&s<248))throw new r.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=n)throw new r.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&s)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(a>=65536){const e=55296+(a-65536>>10),t=56320+(1023&a);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(a);i+=4}}}return o}function c(e,t){const n={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let o=0;o<t.length;o++){const i=t[o],s=i.valueType||i.type,a=w[s];n.fields[i.property]=a(e,r),r+=g[s].BYTES_PER_ELEMENT}return n.byteCount=r,n}function p(e,t,n){const o=[];let i,s,a=0;for(s=0;s<e;s+=1){if(i=t[s],i>0){if(o.push(u(n,a,i-1)),0!==n[a+i-1])throw new r.Z("string-array-error","Invalid string array: missing null termination.")}else o.push(null);a+=i}return o}function d(e,t){return new(0,g[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function f(e,t,n){const i=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:n}},s={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let a=i.byteCount;for(let e=0;e<t.ordering.length;e++){const n=t.ordering[e],l=(0,o.d9)(t[n]);if(l.count=i.fields.count??0,"String"===l.valueType){if(l.byteOffset=a,l.byteCount=i.fields[n+"ByteCount"],"UTF-8"!==l.encoding)throw new r.Z("unsupported-encoding","Unsupported String encoding.",{encoding:l.encoding});if(l.timeEncoding&&"ECMA_ISO8601"!==l.timeEncoding)throw new r.Z("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:l.timeEncoding})}else{if(!v(l.valueType))throw new r.Z("unsupported-value-type","Unsupported binary valueType",{valueType:l.valueType});{const e=S(l.valueType);a+=a%e!=0?e-a%e:0,l.byteOffset=a,l.byteCount=e*l.valuesPerElement*l.count}}a+=l.byteCount??0,s.entries[n]=l}return s.byteCount=a-s.byteOffset,s}function y(e,t,n){if(t!==e&&l.error(`Invalid ${n} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r.Z("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function h(e,t){const n=c(e,t&&t.header);let r=n.byteCount;const o={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},i=n.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const n={...t.vertexAttributes[e],byteOffset:r,count:s},i=m[e]||"_"+e;o.vertexAttributes[i]=n,r+=S(n.valueType)*n.valuesPerElement*s}const a=i.faceCount;if(t.faces&&a){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const n={...t.faces[e],byteOffset:r,count:a};o.faces[e]=n,r+=S(n.valueType)*n.valuesPerElement*a}}const l=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&l){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const n={...t.featureAttributes[e],byteOffset:r,count:l};o.featureAttributes[e]=n,r+=("UInt64"===n.valueType?8:S(n.valueType))*n.valuesPerElement*l}}return y(r,e.byteLength,"geometry"),o.byteCount=r-o.byteOffset,o}const m={position:a.T.POSITION,normal:a.T.NORMAL,color:a.T.COLOR,uv0:a.T.UV0,region:a.T.UVREGION};function b(e,t,n){if("lepcc-rgb"===e.encoding)return(0,s.IT)(t);if("lepcc-intensity"===e.encoding)return(0,s.ti)(t);if(null!=e.encoding&&""!==e.encoding)throw new r.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(l.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(l.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const o=f(t,e,n);y(o.byteOffset+o.byteCount,t.byteLength,"attribute");const i=o.entries.attributeValues||o.entries.objectIds;if(i){if("String"===i.valueType){const e=o.entries.attributeByteCounts,n=d(t,e),r=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,i);return i.timeEncoding?function(e,t,n){return p(e,t,n).map((e=>{const t=e?Date.parse(e):null;return t&&!Number.isNaN(t)?t:null}))}(e.count,n,r):p(e.count,n,r)}return d(t,i)}throw new r.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const g={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function v(e){return g.hasOwnProperty(e)}function S(e){return v(e)?g[e].BYTES_PER_ELEMENT:0}},2358:(e,t,n)=>{n.d(t,{xe:()=>b});var r=n(3172),o=(n(67676),n(20102),n(80442),n(1533)),i=(n(21787),n(46521)),s=(n(52138),n(13598)),a=(n(51305),n(94961)),l=(n(17896),n(65617));n(2109),n(73615),n(82971),n(58995),n(83932),n(87360),(0,l.c)();var u=n(24470),c=(n(8744),n(14165),n(91891));n(22303);var p,d=n(88669);!function(e){e[e.INVISIBLE=0]="INVISIBLE",e[e.TRANSPARENT=1]="TRANSPARENT",e[e.OPAQUE=2]="OPAQUE"}(p||(p={}));(0,d.f)(0,0,0,.2),p.OPAQUE;(0,d.f)(0,0,0,.2),p.OPAQUE,n(6206);var f,y,h=n(87951),m=n(51417);async function b(e,t,n,o,i){const s=[];for(const r of t)if(r&&i.includes(r.name)){const t=`${e}/nodes/${n}/attributes/${r.key}/0`;s.push({url:t,storageInfo:r})}const a=await Promise.allSettled(s.map((e=>(0,r.Z)(e.url,{responseType:"array-buffer"}).then((t=>(0,c.qM)(e.storageInfo,t.data)))))),l=[];for(const e of o){const t={};for(let n=0;n<a.length;n++){const r=a[n];if("fulfilled"===r.status){const o=r.value;t[s[n].storageInfo.name]=v(o,e)}}l.push(t)}return l}(0,u.Ue)(),(y=f||(f={}))[y.OUTSIDE=0]="OUTSIDE",y[y.INTERSECTS_CENTER_OUTSIDE=1]="INTERSECTS_CENTER_OUTSIDE",y[y.INTERSECTS_CENTER_INSIDE=2]="INTERSECTS_CENTER_INSIDE",y[y.INSIDE=3]="INSIDE";const g=-32768,w=-(2**31);function v(e,t){if(!e)return null;const n=e[t];return(0,o.z3)(e)?n===g?null:n:(0,o.Hx)(e)?n===w?null:n:n!=n?null:n}const S=new Array(24);new m.U(S,3),(0,l.c)(),(0,l.c)(),(0,i.a)(),(0,s.a)(),(0,a.a)(),(0,u.Ue)(),(0,u.Ue)(),(0,h.Ue)(),(0,l.c)(),new Array(72),(0,s.a)()},25683:(e,t,n)=>{n.d(t,{Gi:()=>u,IT:()=>y,ti:()=>b});var r=n(20102);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(e,t,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,n+i.identifierOffset,i.identifierLength)),version:t.getUint16(n+i.versionOffset,o),checksum:t.getUint32(n+i.checksumOffset,o)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function l(e,t){return{sizeLo:e.getUint32(t+a.sizeLo,o),sizeHi:e.getUint32(t+a.sizeHi,o),minX:e.getFloat64(t+a.minX,o),minY:e.getFloat64(t+a.minY,o),minZ:e.getFloat64(t+a.minZ,o),maxX:e.getFloat64(t+a.maxX,o),maxY:e.getFloat64(t+a.maxY,o),maxZ:e.getFloat64(t+a.maxZ,o),errorX:e.getFloat64(t+a.errorX,o),errorY:e.getFloat64(t+a.errorY,o),errorZ:e.getFloat64(t+a.errorZ,o),count:e.getUint32(t+a.count,o),reserved:e.getUint32(t+a.reserved,o)}}function u(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:u}=s(e,t,n);if(n+=i.byteCount,"LEPCC "!==o)throw new r.Z("lepcc-decode-error","Bad identifier");if(u>1)throw new r.Z("lepcc-decode-error","Unknown version");const p=l(t,n);if(n+=a.byteCount,p.sizeHi*2**32+p.sizeLo!==e.byteLength)throw new r.Z("lepcc-decode-error","Bad size");const d=new Float64Array(3*p.count),f=[],y=[],h=[],m=[];if(n=c(e,n,f),n=c(e,n,y),n=c(e,n,h),n=c(e,n,m),n!==e.byteLength)throw new r.Z("lepcc-decode-error","Bad length");let b=0,g=0;for(let e=0;e<f.length;e++){g+=f[e];let t=0;for(let n=0;n<y[e];n++){t+=h[b];const e=m[b];d[3*b]=Math.min(p.maxX,p.minX+2*p.errorX*t),d[3*b+1]=Math.min(p.maxY,p.minY+2*p.errorY*g),d[3*b+2]=Math.min(p.maxZ,p.minZ+2*p.errorZ*e),b++}}return{errorX:p.errorX,errorY:p.errorY,errorZ:p.errorZ,result:d}}function c(e,t,n){const r=[];t=p(e,t,r);const o=[];for(let i=0;i<r.length;i++){o.length=0,t=p(e,t,o);for(let e=0;e<o.length;e++)n.push(o[e]+r[i])}return t}function p(e,t,n){const i=new DataView(e,t),s=i.getUint8(0),a=31&s,l=!!(32&s),u=(192&s)>>6;let c=0;if(0===u)c=i.getUint32(1,o),t+=5;else if(1===u)c=i.getUint16(1,o),t+=3;else{if(2!==u)throw new r.Z("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(l)throw new r.Z("lepcc-decode-error","LUT not implemented");const p=Math.ceil(c*a/8),d=new Uint8Array(e,t,p);let f=0,y=0,h=0;const m=-1>>>32-a;for(let e=0;e<c;e++){for(;y<a;)f|=d[h]<<y,y+=8,h+=1;n[e]=f&m,f>>>=a,y-=a,y+a>32&&(f|=d[h-1]>>8-y)}return t+h}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function f(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function y(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:a}=s(e,t,n);if(n+=i.byteCount,"ClusterRGB"!==o)throw new r.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new r.Z("lepcc-decode-error","Unknown version");const l=f(t,n);if(n+=d.byteCount,l.sizeHi*2**32+l.sizeLo!==e.byteLength)throw new r.Z("lepcc-decode-error","Bad size");if((2===l.lookupMethod||1===l.lookupMethod)&&0===l.compressionMethod){if(3*l.colorMapCount+l.count+n!==e.byteLength||l.colorMapCount>256)throw new r.Z("lepcc-decode-error","Bad count");const t=new Uint8Array(e,n,3*l.colorMapCount),o=new Uint8Array(e,n+3*l.colorMapCount,l.count),i=new Uint8Array(3*l.count);for(let e=0;e<l.count;e++){const n=o[e];i[3*e]=t[3*n],i[3*e+1]=t[3*n+1],i[3*e+2]=t[3*n+2]}return i}if(0===l.lookupMethod&&0===l.compressionMethod){if(3*l.count+n!==e.byteLength||0!==l.colorMapCount)throw new r.Z("lepcc-decode-error","Bad count");return new Uint8Array(e,n).slice()}if(l.lookupMethod<=2&&1===l.compressionMethod){if(n+3!==e.byteLength||1!==l.colorMapCount)throw new r.Z("lepcc-decode-error","Bad count");const o=t.getUint8(n),i=t.getUint8(n+1),s=t.getUint8(n+2),a=new Uint8Array(3*l.count);for(let e=0;e<l.count;e++)a[3*e]=o,a[3*e+1]=i,a[3*e+2]=s;return a}throw new r.Z("lepcc-decode-error","Bad method "+l.lookupMethod+","+l.compressionMethod)}const h={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function m(e,t){return{sizeLo:e.getUint32(t+h.sizeLo,o),sizeHi:e.getUint32(t+h.sizeHi,o),count:e.getUint32(t+h.count,o),scaleFactor:e.getUint16(t+h.scaleFactor,o),bitsPerPoint:e.getUint8(t+h.bitsPerPoint),reserved:e.getUint8(t+h.reserved)}}function b(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:a}=s(e,t,n);if(n+=i.byteCount,"Intensity "!==o)throw new r.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new r.Z("lepcc-decode-error","Unknown version");const l=m(t,n);if(n+=h.byteCount,l.sizeHi*2**32+l.sizeLo!==e.byteLength)throw new r.Z("lepcc-decode-error","Bad size");const u=new Uint16Array(l.count);if(8===l.bitsPerPoint){if(l.count+n!==e.byteLength)throw new r.Z("lepcc-decode-error","Bad size");const t=new Uint8Array(e,n,l.count);for(let e=0;e<l.count;e++)u[e]=t[e]*l.scaleFactor}else if(16===l.bitsPerPoint){if(2*l.count+n!==e.byteLength)throw new r.Z("lepcc-decode-error","Bad size");const t=new Uint16Array(e,n,l.count);for(let e=0;e<l.count;e++)u[e]=t[e]*l.scaleFactor}else{const t=[];if(p(e,n,t)!==e.byteLength)throw new r.Z("lepcc-decode-error","Bad size");for(let e=0;e<l.count;e++)u[e]=t[e]*l.scaleFactor}return u}},6206:(e,t,n)=>{var r,o;n.d(t,{a9:()=>r}),n(22021),(o=r||(r={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},87951:(e,t,n)=>{n.d(t,{Ue:()=>c,gI:()=>p}),n(21787);var r=n(46521),o=n(51305),i=n(94961),s=n(17896),a=n(65617),l=(n(98766),n(88669)),u=(n(60437),n(62073),n(64822));function c(e=[0,0,0],t=[-1,-1,-1],n=(0,i.a)()){return{center:(0,a.g)(e),halfSize:(0,a.g)(t),quaternion:(0,i.b)(n)}}function p(e,t,n,r,i){if((0,o.c)(i.quaternion,e.quaternion),r===u.JY.Global){(0,o.a)(h,e.quaternion),(0,s.v)(d,e.center,h),(0,s.w)(f,d),(0,s.x)(y,f,e.halfSize),(0,s.u)(y,f,y);const r=(0,s.l)(y);(0,s.g)(y,f,e.halfSize);const a=(0,s.l)(y);if(r<n)(0,s.c)(i.center,e.center),(0,s.s)(d,n,n,n),(0,s.g)(i.halfSize,e.halfSize,d);else{const o=a>0?1+t/a:1,l=r>0?1+n/r:1,u=(l+o)/2,c=(l-o)/2;(0,s.i)(i.halfSize,f,c),(0,s.q)(i.halfSize,i.halfSize,e.halfSize,u),(0,s.i)(i.center,f,u),(0,s.q)(i.center,i.center,e.halfSize,c),(0,s.z)(d,d),(0,s.A)(i.center,i.center,d),(0,s.v)(i.center,i.center,i.quaternion)}}else{const r=(0,s.s)(d,0,0,1);(0,s.q)(i.center,e.center,r,(n+t)/2),(0,o.a)(h,e.quaternion),(0,s.v)(r,r,h),(0,s.w)(r,r),(0,s.q)(i.halfSize,e.halfSize,r,(n-t)/2)}return i}(0,i.a)(),(0,a.c)(),(0,a.c)(),(0,l.c)(),(0,r.a)(),(()=>{const e=new Int8Array(162);let t=0;const n=n=>{for(let r=0;r<n.length;r++)e[t+r]=n[r];t+=6};n([6,2,3,1,5,4]),n([0,2,3,1,5,4]),n([0,2,3,7,5,4]),n([0,1,3,2,6,4]),n([0,1,3,2,0,0]),n([0,1,5,7,3,2]),n([0,1,3,7,6,4]),n([0,1,3,7,6,2]),n([0,1,5,7,6,2]),n([0,1,5,4,6,2]),n([0,1,5,4,0,0]),n([0,1,3,7,5,4]),n([0,2,6,4,0,0]),n([0,0,0,0,0,0]),n([1,3,7,5,0,0]),n([2,3,7,6,4,0]),n([2,3,7,6,0,0]),n([2,3,1,5,7,6]),n([0,1,5,7,6,2]),n([0,1,5,7,6,4]),n([0,1,3,7,6,4]),n([4,5,7,6,2,0]),n([4,5,7,6,0,0]),n([4,5,1,3,7,6]),n([0,2,3,7,5,4]),n([6,2,3,7,5,4]),n([6,2,3,1,5,4])})();const d=(0,a.c)(),f=(0,a.c)(),y=(0,a.c)(),h=(0,i.a)()},51417:(e,t,n)=>{n.d(t,{U:()=>r,a:()=>o});class r{constructor(e,t,n=t){this.data=e,this.size=t,this.stride=n}}class o extends r{constructor(e,t,n,r=!1,o=n){super(e,n,o),this.indices=t,this.exclusive=r}}},64822:(e,t,n)=>{var r;n.d(t,{JY:()=>r}),function(e){e[e.Global=1]="Global",e[e.Local=2]="Local"}(r||(r={}))},19833:(e,t,n)=>{n.d(t,{V5:()=>i,e7:()=>o});var r=n(69165);async function o(e,t=e.popupTemplate){if(null==t)return[];const n=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:o}=t,{objectIdField:i,typeIdField:s,globalIdField:a,relationships:l}=e;if(n.includes("*"))return["*"];const u=o?(0,r.CH)(e):[],c=(0,r.Q0)(e.fieldsIndex,[...n,...u]);return s&&c.push(s),c&&i&&e.fieldsIndex?.has(i)&&!c.includes(i)&&c.push(i),c&&a&&e.fieldsIndex?.has(a)&&!c.includes(a)&&c.push(a),l&&l.forEach((t=>{const{keyField:n}=t;c&&n&&e.fieldsIndex?.has(n)&&!c.includes(n)&&c.push(n)})),c}function i(e,t){return e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&null!=e.defaultPopupTemplate?e.defaultPopupTemplate:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8968,5732],{59987:(e,t,r)=>{r.d(t,{EN:()=>c,H9:()=>s,eS:()=>u,f:()=>n});var n,a,i=r(19153);(a=n||(n={})).InvalidFunctionParameters="InvalidFunctionParameters",a.InvalidValueForAggregateFunction="InvalidValueForAggregateFunction",a.UnsupportedSqlFunction="UnsupportedSqlFunction",a.UnsupportedOperator="UnsupportedOperator",a.UnsupportedSyntax="UnsupportedSyntax",a.UnsupportedIsRhs="UnsupportedIsRhs",a.UnsupportedIsLhs="UnsupportedIsLhs",a.InvalidDataType="InvalidDataType",a.CannotCastValue="CannotCastValue",a.FunctionNotRecognized="FunctionNotRecognized",a.InvalidTime="InvalidTime",a.InvalidParameterCount="InvalidParameterCount",a.InvalidTimeStamp="InvalidTimeStamp",a.InvalidDate="InvalidDate",a.InvalidOperator="InvalidOperator",a.IllegalInterval="IllegalInterval",a.YearMonthIntervals="YearMonthIntervals",a.PrimarySecondaryQualifiers="PrimarySecondaryQualifiers",a.MissingStatisticParameters="MissingStatisticParameters";const o={[n.InvalidValueForAggregateFunction]:"Invalid value used in aggregate function",[n.MissingStatisticParameters]:"Statistic does not have 1 or 0 Parameters",[n.InvalidFunctionParameters]:"Invalid parameters for call to {function}",[n.UnsupportedIsLhs]:"Unsupported left hand expression in is statement",[n.UnsupportedIsRhs]:"Unsupported right hand expression in is statement",[n.UnsupportedOperator]:"Unsupported operator - {operator}",[n.UnsupportedSyntax]:"Unsupported syntax - {node}",[n.UnsupportedSqlFunction]:"Sql function not found = {function}",[n.InvalidDataType]:"Invalid sql data type",[n.InvalidDate]:"Invalid date encountered",[n.InvalidOperator]:"Invalid operator encountered",[n.InvalidTime]:"Invalid time encountered",[n.IllegalInterval]:"Illegal interval",[n.FunctionNotRecognized]:"Function not recognized",[n.InvalidTimeStamp]:"Invalid timestamp encountered",[n.InvalidParameterCount]:"Invalid parameter count for call to {name}",[n.PrimarySecondaryQualifiers]:"Primary and Secondary SqlInterval qualifiers not supported",[n.YearMonthIntervals]:"Year-Month Intervals not supported",[n.CannotCastValue]:"Cannot cast value to the required data type"};class u extends Error{constructor(e,t){super((0,i.gx)(o[e],t)),this.declaredRootClass="esri.arcade.featureset.support.sqlerror",Error.captureStackTrace&&Error.captureStackTrace(this,u)}}var s;!function(e){e.NeverReach="NeverReach",e.NotImplemented="NotImplemented",e.Cancelled="Cancelled",e.InvalidStatResponse="InvalidStatResponse",e.InvalidRequest="InvalidRequest",e.RequestFailed="RequestFailed",e.MissingFeatures="MissingFeatures",e.AggregationFieldNotFound="AggregationFieldNotFound",e.DataElementsNotFound="DataElementsNotFound"}(s||(s={}));const l={[s.Cancelled]:"Cancelled",[s.InvalidStatResponse]:"Invalid statistics response from service",[s.InvalidRequest]:"Invalid request",[s.RequestFailed]:"Request failed - {reason}",[s.MissingFeatures]:"Missing features",[s.AggregationFieldNotFound]:"Aggregation field not found",[s.DataElementsNotFound]:"Data elements not found on service",[s.NeverReach]:"Encountered unreachable logic",[s.NotImplemented]:"Not implemented"};class c extends Error{constructor(e,t){super((0,i.gx)(l[e],t)),this.declaredRootClass="esri.arcade.featureset.support.featureseterror",Error.captureStackTrace&&Error.captureStackTrace(this,c)}}},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>a});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},41555:(e,t,r)=>{r.d(t,{H:()=>i});var n=r(17126);function a(e){return Number.isNaN(e)||0===e?e:Math.trunc(e)}class i{constructor(e){this._timeStampOffset=e,this._date=null}toDateTime(){return this._date??=n.ou.fromISO(this._timeStampOffset,{setZone:!0}),this._date}get isValid(){return this.toDateTime().isValid}get timezoneOffsetHour(){return a(this.toDateTime().offset/60)}get timezoneOffsetMinutes(){return a(this.toDateTime().offset%60)}toMilliseconds(){return this.toDateTime().toMillis()}get hour(){return this.toDateTime().hour}get minute(){return this.toDateTime().minute}get second(){return this.toDateTime().second}get day(){return this.toDateTime().day}get month(){return this.toDateTime().month}get year(){return this.toDateTime().year}startOfDay(){return i.fromDateTime(this.toDateTime().startOf("day"))}static fromJSDate(e){return new i(n.ou.fromJSDate(e).toISO({includeOffset:!0}))}static fromDateTime(e){return new i(e.toISO({includeOffset:!0}))}static fromParts(e,t,r=0,n=0,a=0,o=0,u=0,s=!1,l=0,c=0){const f=`${e.toString().padStart(4,"0")}-${t.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}`;let d="";o<10&&(d="0");let p=`${n.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}:${d+o.toString()}`;0!==u&&(p+="."+u.toString().padStart(3,"0"));const v=`${s?"-":"+"}${l.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`;return new i(f+"T"+p+v)}toStorageFormat(){return this._timeStampOffset}toString(){return this._timeStampOffset}toSQLValue(){let e=this.toDateTime().toSQL({includeOffset:!0,includeOffsetSpace:!0});return e&&(e=e.replace(".000","")),e}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}addMilliseconds(e){const t=this.toDateTime().plus(e);return i.fromDateTime(t)}}},8968:(e,t,r)=>{r.d(t,{WhereClause:()=>ce});var n=r(48853),a=r(59987),i=r(80442),o=r(22641),u=r(41555),s=r(53970),l=r(17126);function c(e,t){const r=f[e.toLowerCase()];return null!=r&&t>=r.minParams&&t<=r.maxParams}const f={min:{minParams:1,maxParams:1,evaluate:e=>v(e[0],"min")},max:{minParams:1,maxParams:1,evaluate:e=>v(e[0],"max")},avg:{minParams:1,maxParams:1,evaluate:e=>d(e[0])},sum:{minParams:1,maxParams:1,evaluate:e=>function(e){if(null===e)return null;let t=0;for(let r=0;r<e.length;r++){const n=e[r];if(null!==n){if(!p(n))throw new a.eS(a.f.InvalidValueForAggregateFunction);t+=n}}return t}(e[0])},stddev:{minParams:1,maxParams:1,evaluate:e=>function(e){if(null===e)return null;const t=h(e);return null===t?null:Math.sqrt(t)}(e[0])},count:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].length},var:{minParams:1,maxParams:1,evaluate:e=>h(e[0])}};function d(e){if(null===e)return null;let t=0,r=0;for(let n=0;n<e.length;n++){const i=e[n];if(null!==i){if(!p(i))throw new a.eS(a.f.InvalidValueForAggregateFunction);r++,t+=i}}return 0===r?null:t/e.length}function p(e){return"number"==typeof e}function v(e,t){if(null===e)return null;let r=null,n=null;for(const a of e){let e=a;e=a instanceof o.u||a instanceof s.n?a.toNumber():a instanceof l.ou?a.toMillis():a instanceof u.H?a.toMilliseconds():a,(null===r||"max"===t&&null!==n&&null!==e&&n<=e||"min"===t&&null!==n&&null!==e&&n>=e)&&(r=a,n=e)}return r}function h(e){if(null===e)return null;if(0===(e=e.filter((e=>null!==e))).length)return null;const t=d(e);if(null===t)return null;let r=0;for(const n of e){if(!p(n))throw new a.eS(a.f.InvalidValueForAggregateFunction);r+=(t-n)**2}return r/(e.length-1)}class m{constructor(){this.op="+",this.day=0,this.second=0,this.hour=0,this.month=0,this.year=0,this.minute=0,this.millis=0}static _fixDefaults(e){if(null!==e.precision||null!==e.secondary)throw new a.eS(a.f.PrimarySecondaryQualifiers)}static _parseSecondsComponent(e,t){if(t.includes(".")){const r=t.split(".");e.second=parseFloat(r[0]),e.millis=parseInt(r[1],10)}else e.second=parseFloat(t)}static createFromMilliseconds(e){const t=new m;return t.second=e/1e3,t}static createFromValueAndQualifer(e,t,r){let n=null;const i=new m;if(i.op="-"===r?"-":"+","interval-period"===t.type){m._fixDefaults(t);const r=new RegExp("^[0-9]{1,}$");if("year"===t.period||"month"===t.period)throw new a.eS(a.f.YearMonthIntervals);if("second"===t.period){if(!/^[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$/.test(e))throw new a.eS(a.f.IllegalInterval);m._parseSecondsComponent(i,e)}else{if(!r.test(e))throw new a.eS(a.f.IllegalInterval);i[t.period]=parseFloat(e)}}else{if(m._fixDefaults(t.start),m._fixDefaults(t.end),"year"===t.start.period||"month"===t.start.period||"year"===t.end.period||"month"===t.end.period)throw new a.eS(a.f.YearMonthIntervals);switch(t.start.period){case"day":switch(t.end.period){case"hour":if(n=new RegExp("^[0-9]{1,} [0-9]{1,}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);i[t.start.period]=parseFloat(e.split(" ")[0]),i[t.end.period]=parseFloat(e.split(" ")[1]);break;case"minute":if(n=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);{i[t.start.period]=parseFloat(e.split(" ")[0]);const r=e.split(" ")[1].split(":");i.hour=parseFloat(r[0]),i.minute=parseFloat(r[1])}break;case"second":if(n=new RegExp("^[0-9]{1,} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);{i[t.start.period]=parseFloat(e.split(" ")[0]);const r=e.split(" ")[1].split(":");i.hour=parseFloat(r[0]),i.minute=parseFloat(r[1]),m._parseSecondsComponent(i,r[2])}break;default:throw new a.eS(a.f.IllegalInterval)}break;case"hour":switch(t.end.period){case"minute":if(n=new RegExp("^[0-9]{1,}:[0-9]{1,}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);i.hour=parseFloat(e.split(":")[0]),i.minute=parseFloat(e.split(":")[1]);break;case"second":if(n=new RegExp("^[0-9]{1,}:[0-9]{1,2}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);{const t=e.split(":");i.hour=parseFloat(t[0]),i.minute=parseFloat(t[1]),m._parseSecondsComponent(i,t[2])}break;default:throw new a.eS(a.f.IllegalInterval)}break;case"minute":if("second"!==t.end.period)throw new a.eS(a.f.IllegalInterval);if(n=new RegExp("^[0-9]{1,}:[0-9]{1,}([.]{1}[0-9]{1,}){0,1}$"),!n.test(e))throw new a.eS(a.f.IllegalInterval);{const t=e.split(":");i.minute=parseFloat(t[0]),m._parseSecondsComponent(i,t[1])}break;default:throw new a.eS(a.f.IllegalInterval)}}return i}valueInMilliseconds(){return("-"===this.op?-1:1)*(this.millis+1e3*this.second+60*this.minute*1e3+60*this.hour*60*1e3+24*this.day*60*60*1e3+this.month*(365/12)*24*60*60*1e3+365*this.year*24*60*60*1e3)}}var w=r(1542);const I=/^(\d{1,2}):(\d{1,2}):(\d{1,2})$/,S=/^(\d{1,2}):(\d{1,2})$/,g=/^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/,y=/^(\d{4})-(\d{1,2})-(\d{1,2})$/,T=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$/,N=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$/,O=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$/,C=/^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/;function b(e,t){if(t instanceof l.ld)return t===w.yV.instance?l.ou.fromMillis(e.getTime(),{zone:w.yV.instance}):l.ou.fromJSDate(e,{zone:t});switch(t){case"system":case"local":case null:return l.ou.fromJSDate(e);default:return"unknown"===t?.toLowerCase()?l.ou.fromMillis(e.getTime(),{zone:w.yV.instance}):l.ou.fromJSDate(e,{zone:t})}}function x(e){return"number"==typeof e}function A(e){return"string"==typeof e||e instanceof String}function M(e){return e instanceof m}function E(e){return e instanceof Date}function F(e){return e instanceof l.ou}function D(e){return e instanceof o.u}function P(e){return e instanceof s.n}function _(e){return e instanceof u.H}function L(e){let t=I.exec(e);if(null!==t){const[,e,r,n]=t,i=s.n.fromParts(parseInt(e,10),parseInt(r,10),parseInt(n,10),0);if(null!==i)return i;throw new a.eS(a.f.InvalidTime)}if(t=S.exec(e),null!==t){const[,e,r]=t,n=s.n.fromParts(parseInt(e,10),parseInt(r,10),0,0);if(null!==n)return n;throw new a.eS(a.f.InvalidTime)}if(t=g.exec(e),null!==t){const[,e,r,n,i]=t,o=s.n.fromParts(parseInt(e,10),parseInt(r,10),parseInt(n,10),parseInt(i,10));if(null!==o)return o;throw new a.eS(a.f.InvalidTime)}throw new a.eS(a.f.InvalidTime)}function R(e,t,r=!1){let n=T.exec(e);if(null!==n){const[,e,r,i,o,u,s,c]=n,f=l.ou.fromObject({year:parseInt(e,10),month:parseInt(r,10),day:parseInt(i,10),hour:parseInt(o,10),minute:parseInt(u,10),second:parseInt(s,10),millisecond:c?parseInt(c.replace(".",""),10):0},{zone:(0,w.L9)(t)});if(!1===f.isValid)throw new a.eS(a.f.InvalidTimeStamp);return f}if(n=N.exec(e),null!==n){const[,e,t,r,i,o,s,l,c,f,d]=n,p=u.H.fromParts(parseInt(e,10),parseInt(t,10),parseInt(r,10),parseInt(i,10),parseInt(o,10),parseInt(s,10),l?parseInt(l.replace(".",""),10):0,"-"===c,parseInt(f,10),parseInt(d,10));if(!1===p.isValid)throw new a.eS(a.f.InvalidTimeStamp);return p}if(n=O.exec(e),null!==n){const[,e,t,r,i,o,s,l,c]=n,f=u.H.fromParts(parseInt(e,10),parseInt(t,10),parseInt(r,10),parseInt(i,10),parseInt(o,10),0,0,"-"===s,parseInt(l,10),parseInt(c,10));if(!1===f.isValid)throw new a.eS(a.f.InvalidTimeStamp);return f}if(n=C.exec(e),null!==n){const[,e,r,i,o,u]=n,s=l.ou.fromObject({year:parseInt(e,10),month:parseInt(r,10),day:parseInt(i,10),hour:parseInt(o,10),minute:parseInt(u,10),second:0},{zone:(0,w.L9)(t)});if(!1===s.isValid)throw new a.eS(a.f.InvalidTimeStamp);return s}if(n=y.exec(e),null!==n){const[,e,r,i]=n,o=l.ou.fromObject({year:parseInt(e,10),month:parseInt(r,10),day:parseInt(i,10),hour:0,minute:0,second:0},{zone:(0,w.L9)(t)});if(!1===o.isValid)throw new a.eS(a.f.InvalidTimeStamp);return o}throw new a.eS(a.f.InvalidTimeStamp)}function U(e,t){const r=y.exec(e);if(null===r)try{return R(e,t)}catch{throw new a.eS(a.f.InvalidDate)}const[,n,i,u]=r,s=o.u.fromParts(parseInt(n,10),parseInt(i,10),parseInt(u,10));if(null===s)throw new a.eS(a.f.InvalidDate);return s}var V=r(19153);const J=321408e5,$=26784e5,H=864e5,k=36e5,Z=6e4;function z(e){return!!F(e)||!!_(e)}function q(e){if(F(e))return e.toMillis();if(D(e))return e.toNumber();if(_(e))return e.toMilliseconds();throw new a.eS(a.f.InvalidDataType)}function Y(e,t,r,n){if(null==e||null==t)return null;if(x(e)){if(x(t))return j(e,t,r);if(A(t))return function(e,t,r){const n=parseFloat(t);if(!isNaN(n))return j(e,n,r);const a=e.toString();switch(r){case"<>":return a!==t;case"=":return a===t;case">":return a>t;case"<":return a<t;case">=":return a>=t;case"<=":return a<=t}}(e,t,r);if(F(i=t)||D(i)||_(i)||P(i))throw new a.eS(a.f.InvalidOperator);if(D(t))throw new a.eS(a.f.InvalidOperator)}else if(A(e)){if(x(t))return function(e,t,r){const n=parseFloat(e);if(!isNaN(n))return j(n,t,r);const a=t.toString();switch(r){case"<>":return e!==a;case"=":return e===a;case">":return e>a;case"<":return e<a;case">=":return e>=a;case"<=":return e<=a}}(e,t,r);if(A(t))return function(e,t,r){switch(r){case"<>":return e!==t;case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}}(e,t,r);if(F(t))throw new a.eS(a.f.InvalidOperator);if(D(t))throw new a.eS(a.f.InvalidOperator);if(P(t))throw new a.eS(a.f.InvalidOperator);if(_(t))throw new a.eS(a.f.InvalidOperator)}else if(F(e)){if(z(t)){if(e instanceof l.ou&&(0,w.A4)(e.zone)){if(t instanceof l.ou&&!1===(0,w.A4)(t.zone))return B(e,t,r);if(t instanceof u.H)return B(e,t,r)}else if(t instanceof l.ou&&(0,w.A4)(t.zone)){if(e instanceof l.ou&&!1===(0,w.A4)(e.zone))return B(e,t,r);if(e instanceof u.H)return B(e,t,r)}return j(q(e),q(t),r)}if(A(t))throw new a.eS(a.f.InvalidOperator);if(D(t))return function(e,t,r){const n=t.toDateTimeLuxon(e.zone);return j((e=e.startOf("day")).toMillis(),n.toMillis(),r)}(e,t,r);if(P(t))throw new a.eS(a.f.InvalidOperator);if(x(t))throw new a.eS(a.f.InvalidOperator)}else if(D(e)){if(_(t))return function(e,t,r){const n=e.toDateTimeLuxon(t.toDateTime().zone);return t=t.startOfDay(),j(n.toMillis(),t.toMilliseconds(),r)}(e,t,r);if(F(t))return function(e,t,r){const n=e.toDateTimeLuxon(t.zone);return t=t.startOf("day"),j(n.toMillis(),t.toMillis(),r)}(e,t,r);if(A(t))throw new a.eS(a.f.InvalidOperator);if(D(t))return j(e.toNumber(),t.toNumber(),r);if(P(t))throw new a.eS(a.f.InvalidOperator);if(x(t))throw new a.eS(a.f.InvalidOperator)}else if(P(e)){if(P(t))return j(e.toNumber(),t.toNumber(),r);if(A(t))throw new a.eS(a.f.InvalidOperator);if(x(t))throw new a.eS(a.f.InvalidOperator);if(D(t))throw new a.eS(a.f.InvalidOperator);if(z(t))throw new a.eS(a.f.InvalidOperator)}else if(_(e)){if(z(t))return t instanceof l.ou&&(0,w.A4)(t.zone)?B(e,t,r):j(q(e),q(t),r);if(A(t))throw new a.eS(a.f.InvalidOperator);if(D(t))return function(e,t,r){const n=t.toDateTimeLuxon(e.toDateTime().zone);return j((e=e.startOfDay()).toMilliseconds(),n.toMillis(),r)}(e,t,r);if(P(t))throw new a.eS(a.f.InvalidOperator);if(x(t))throw new a.eS(a.f.InvalidOperator)}var i;switch(r){case"<>":return e!==t;case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}}function j(e,t,r){switch(r){case"<>":return e!==t;case"=":return e===t;case">":return e>t;case"<":return e<t;case">=":return e>=t;case"<=":return e<=t}}function B(e,t,r){e instanceof u.H&&(e=e.toDateTime()),t instanceof u.H&&(t=t.toDateTime());const n=Q(e),a=Q(t);switch(r){case"<>":return n!==a;case"=":return n===a;case">":return n>a;case"<":return n<a;case">=":return n>=a;case"<=":return n<=a}}function Q(e){return e.year*J+e.month*$+e.day*H+e.hour*k+e.minute*Z+1e3*e.second+e.millisecond}function G(e,t,r){const n=ee[e.toLowerCase()];if(null==n)throw new a.eS(a.f.FunctionNotRecognized);if(t.length<n.minParams||t.length>n.maxParams)throw new a.eS(a.f.InvalidParameterCount,{name:e.toUpperCase()});return n.evaluate(t,r)}function W(e){return"string"==typeof e||e instanceof String}function K(e){return!(E(e)||D(e)||F(e)||P(e)||_(e))}function X(e){return D(e)||P(e)?e.toString():_(e)?e.toSQLValue():F(e)?0===e.millisecond?e.toFormat("yyyy-LL-dd HH:mm:ss"):e.toSQL({includeOffset:!1}):E(e)?X(l.ou.fromJSDate(e)):e.toString()}const ee={extract:{minParams:2,maxParams:2,evaluate:([e,t])=>{if(null==t)return null;if(E(t))switch(e.toUpperCase()){case"SECOND":return t.getSeconds();case"MINUTE":return t.getMinutes();case"HOUR":return t.getHours();case"DAY":return t.getDate();case"MONTH":return t.getMonth()+1;case"YEAR":return t.getFullYear();case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":return 0}else if(F(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour;case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new a.eS(a.f.InvalidFunctionParameters,{function:"EXTRACT"})}else if(D(t))switch(e.toUpperCase()){case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":case"TIMEZONE_MINUTE":throw new a.eS(a.f.InvalidFunctionParameters,{function:"EXTRACT"})}else if(P(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour}else if(_(t))switch(e.toUpperCase()){case"SECOND":return t.second;case"MINUTE":return t.minute;case"HOUR":return t.hour;case"DAY":return t.day;case"MONTH":return t.month;case"YEAR":return t.year;case"TIMEZONE_HOUR":return t.timezoneOffsetHour;case"TIMEZONE_MINUTE":return t.timezoneOffsetMinutes}throw new a.eS(a.f.InvalidFunctionParameters,{function:"EXTRACT"})}},substring:{minParams:2,maxParams:3,evaluate:e=>{if(2===e.length){const[t,r]=e;return null==t||null==r?null:t.toString().substring(r-1)}if(3===e.length){const[t,r,n]=e;return null==t||null==r||null==n?null:n<=0?"":t.toString().substring(r-1,r+n-1)}}},position:{minParams:2,maxParams:2,evaluate:([e,t])=>null==e||null==t?null:t.indexOf(e)+1},trim:{minParams:2,maxParams:3,evaluate:e=>{const t=3===e.length,r=t?e[1]:" ",n=t?e[2]:e[1];if(null==r||null==n)return null;const i=`(${(0,V.Qs)(r)})`;switch(e[0]){case"BOTH":return n.replaceAll(new RegExp(`^${i}*|${i}*$`,"g"),"");case"LEADING":return n.replaceAll(new RegExp(`^${i}*`,"g"),"");case"TRAILING":return n.replaceAll(new RegExp(`${i}*$`,"g"),"")}throw new a.eS(a.f.InvalidFunctionParameters,{function:"TRIM"})}},abs:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.abs(e[0])},ceiling:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.ceil(e[0])},floor:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.floor(e[0])},log:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.log(e[0])},log10:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.log(e[0])*Math.LOG10E},sin:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.sin(e[0])},cos:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.cos(e[0])},tan:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.tan(e[0])},asin:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.asin(e[0])},acos:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.acos(e[0])},atan:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.atan(e[0])},sign:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0]>0?1:e[1]<0?-1:0},power:{minParams:2,maxParams:2,evaluate:e=>null==e[0]||null==e[1]?null:e[0]**e[1]},mod:{minParams:2,maxParams:2,evaluate:e=>null==e[0]||null==e[1]?null:e[0]%e[1]},round:{minParams:1,maxParams:2,evaluate:e=>{const t=e[0],r=2===e.length?10**e[1]:1;return null==t?null:Math.round(t*r)/r}},truncate:{minParams:1,maxParams:2,evaluate:e=>null==e[0]?null:1===e.length?parseInt(e[0].toFixed(0),10):parseFloat(e[0].toFixed(e[1]))},char_length:{minParams:1,maxParams:1,evaluate:e=>W(e[0])?e[0].length:0},concat:{minParams:1,maxParams:1/0,evaluate:e=>{let t="";for(let r=0;r<e.length;r++){if(null==e[r])return null;t+=e[r].toString()}return t}},lower:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].toString().toLowerCase()},upper:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:e[0].toString().toUpperCase()},coalesce:{minParams:1,maxParams:1/0,evaluate:e=>{for(const t of e)if(null!==t)return t;return null}},cosh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.cosh(e[0])},sinh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.sinh(e[0])},tanh:{minParams:1,maxParams:1,evaluate:e=>null==e[0]?null:Math.tanh(e[0])},nullif:{minParams:2,maxParams:2,evaluate:(e,t)=>Y(e[0],e[1],"=")?null:e[0]},cast:{minParams:2,maxParams:2,evaluate:(e,t)=>{const r=e[0],n=e[1];if(null===r)return null;switch(n.type){case"integer":{if(!K(r))throw new a.eS(a.f.CannotCastValue);const e=parseInt(r,10);if(isNaN(e))throw new a.eS(a.f.CannotCastValue);return e}case"smallint":{if(!K(r))throw new a.eS(a.f.CannotCastValue);const e=parseInt(r,10);if(isNaN(e))throw new a.eS(a.f.CannotCastValue);if(e>32767||e<-32767)throw new a.eS(a.f.CannotCastValue);return e}case"float":case"real":{if(!K(r))throw new a.eS(a.f.CannotCastValue);const e=parseFloat(r);if(isNaN(e))throw new a.eS(a.f.CannotCastValue);return e}case"time":return function(e){if(E(e))return s.n.fromDateJS(e);if(F(e))return s.n.fromDateTime(e);if(D(e))throw new a.eS(a.f.CannotCastValue);if(P(e))return e;if(_(e))return s.n.fromSqlTimeStampOffset(e);if(W(e))return L(e);throw new a.eS(a.f.CannotCastValue)}(r);case"date":return function(e){if(E(e))return o.u.fromDateJS(e);if(F(e))return o.u.fromParts(e.year,e.month,e.day);if(D(e))return e;if(P(e))throw new a.eS(a.f.CannotCastValue);if(_(e)&&null===o.u.fromParts(e.year,e.month,e.day))throw new a.eS(a.f.CannotCastValue);if(W(e)){const t=o.u.fromReader(e);if(null!==t&&t.isValid)return t}throw new a.eS(a.f.CannotCastValue)}(r);case"timestamp":return function(e,t,r){if(E(e))return b(e,t);if(F(e))return e;if(D(e))return e.toDateTimeLuxon("unknown");if(P(e))throw new a.eS(a.f.CannotCastValue);if(_(e))return e;if(W(e))return R(e,"unknown",r);throw new a.eS(a.f.CannotCastValue)}(r,t,!0===n.withtimezone);case"varchar":{const e=X(r);if(e.length>n.size)throw new a.eS(a.f.CannotCastValue);return e}default:throw new a.eS(a.f.InvalidDataType)}}}};function te(e,t,r,n){if("||"===e)return G("concat",[t,r],n);if(null===t||null===r)return null;if(x(t)){if(x(r))return re(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return m.createFromMilliseconds(e+t.valueInMilliseconds());case"-":return m.createFromMilliseconds(e-t.valueInMilliseconds());case"*":return m.createFromMilliseconds(e*t.valueInMilliseconds());case"/":return m.createFromMilliseconds(e/t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(_(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(F(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(A(r))return function(e,t,r){const n=parseFloat(t);if(isNaN(n))throw new a.eS(a.f.InvalidOperator);return re(e,n,r)}(t,r,e);throw new a.eS(a.f.InvalidOperator)}if(D(t)){if(x(r))return function(e,t,r){const n=1e3*t*24*60*60;switch(r){case"+":return e.plus("milliseconds",n);case"-":return e.plus("milliseconds",-1*n)}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return e.plus("milliseconds",t.valueInMilliseconds());case"-":return e.plus("milliseconds",-1*t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){if("-"===r)return e.toDateTimeLuxon("UTC").diff(t.toDateTimeLuxon("UTC")).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(_(r))return function(e,t,r){if("-"===r)return e.toDateTimeLuxon(t.toDateTime().zone).diff(t.toDateTime()).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(F(r))return function(e,t,r){if("-"===r)return e.toDateTimeLuxon(t.zone).diff(t).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(P(t)){if(x(r))return function(e,t,r){const n=1e3*t*24*60*60;switch(r){case"+":return e.plus("milliseconds",n);case"-":return e.plus("milliseconds",-1*n)}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return e.plus("milliseconds",t.valueInMilliseconds());case"-":return e.plus("milliseconds",-1*t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(_(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(F(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(M(t)){if(x(r))return function(e,t,r){switch(r){case"+":return m.createFromMilliseconds(e.valueInMilliseconds()+t);case"-":return m.createFromMilliseconds(e.valueInMilliseconds()-t);case"*":return m.createFromMilliseconds(e.valueInMilliseconds()*t);case"/":return m.createFromMilliseconds(e.valueInMilliseconds()/t)}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return m.createFromMilliseconds(e.valueInMilliseconds()+t.valueInMilliseconds());case"-":return m.createFromMilliseconds(e.valueInMilliseconds()-t.valueInMilliseconds());case"*":return m.createFromMilliseconds(e.valueInMilliseconds()*t.valueInMilliseconds());case"/":return m.createFromMilliseconds(e.valueInMilliseconds()/t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){if("+"===r)return t.plus("milliseconds",e.valueInMilliseconds());throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(D(r))return function(e,t,r){if("+"===r)return t.plus("milliseconds",e.valueInMilliseconds());throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(_(r))return function(e,t,r){if("+"===r)return t.addMilliseconds(e.valueInMilliseconds());throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(F(r))return function(e,t,r){switch(r){case"+":return t.plus({milliseconds:e.valueInMilliseconds()});case"-":return e.valueInMilliseconds()-t.toMillis()}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(F(t)){if(x(r))return function(e,t,r){const n=1e3*t*24*60*60;switch(r){case"+":return e.plus({milliseconds:n});case"-":return e.minus({milliseconds:n})}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return e.plus({milliseconds:t.valueInMilliseconds()});case"-":return e.minus({milliseconds:t.valueInMilliseconds()})}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){if("-"===r)return e.diff(t.toDateTimeLuxon(e.zone)).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(_(r))return function(e,t,r){if("-"===r)return e.diff(t.toDateTime()).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(F(r))return function(e,t,r){if("-"===r)return e.diff(t).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(_(t)){if(x(r))return function(e,t,r){const n=1e3*t*24*60*60;switch(r){case"+":return e.addMilliseconds(n);case"-":return e.addMilliseconds(-1*n)}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(M(r))return function(e,t,r){switch(r){case"+":return e.addMilliseconds(t.valueInMilliseconds());case"-":return e.addMilliseconds(-1*t.valueInMilliseconds())}throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){if("-"===r)return e.toDateTime().diff(t.toDateTimeLuxon(e.toDateTime().zone)).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(_(r))return function(e,t,r){if("-"===r)return e.toDateTime().diff(t.toDateTime()).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(F(r))return function(e,t,r){if("-"===r)return e.toDateTime().diff(t).as("days");throw new a.eS(a.f.InvalidOperator)}(t,r,e);if(A(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();throw new a.eS(a.f.InvalidOperator)}if(A(t)){if(x(r))return function(e,t,r){const n=parseFloat(e);if(isNaN(n))throw new a.eS(a.f.InvalidOperator);return re(n,t,r)}(t,r,e);if(M(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(P(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(D(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(_(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(F(r))return function(e,t,r){throw new a.eS(a.f.InvalidOperator)}();if(A(r))return function(e,t,r){if("+"===r)return e+t;throw new a.eS(a.f.InvalidOperator)}(t,r,e);throw new a.eS(a.f.InvalidOperator)}throw new a.eS(a.f.InvalidOperator)}function re(e,t,r){switch(r){case"+":return e+t;case"-":return e-t;case"*":return e*t;case"/":return e/t}throw new a.eS(a.f.InvalidOperator)}r(5732);var ne,ae,ie={exports:{}};ae=function(){function e(t,r,n,a){var i=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(i,e.prototype),i.expected=r,i.found=n,i.location=a,i.name="SyntaxError",i}function t(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}return function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(e,Error),e.prototype.format=function(e){var r="Error: "+this.message;if(this.location){var n,a=null;for(n=0;n<e.length;n++)if(e[n].source===this.location.source){a=e[n].text.split(/\r\n|\n|\r/g);break}var i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,u=this.location.source+":"+o.line+":"+o.column;if(a){var s=this.location.end,l=t("",o.line.toString().length," "),c=a[i.line-1],f=(i.line===s.line?s.column:c.length+1)-i.column||1;r+="\n --\x3e "+u+"\n"+l+" |\n"+o.line+" | "+c+"\n"+l+" | "+t("",i.column-1," ")+t("",f,"^")}else r+="\n at "+u}return r},e.buildMessage=function(e,t){var r={literal:function(e){return'"'+a(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?i(e[0])+"-"+i(e[1]):i(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function a(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function i(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=e.map(o);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+a(e)+'"':"end of input"}(t)+" found."},{SyntaxError:e,parse:function(t,r){var n,a={},i=(r=void 0!==r?r:{}).grammarSource,o={start:Ha},u=Ha,s="!",l="=",c=">=",f=">",d="<=",p="<>",v="<",h="!=",m="+",w="-",I="||",S="*",g="/",y="@",T="'",N="N'",O="''",C=".",b="null",x="true",A="false",M="in",E="is",F="like",D="escape",P="not",_="and",L="or",R="between",U="from",V="for",J="substring",$="extract",H="trim",k="position",Z="timestamp",z="date",q="time",Y="leading",j="trailing",B="both",Q="cast",G="as",W="integer",K="smallint",X="float",ee="real",te="varchar",re="to",ne="interval",ae="year",ie="timezone_hour",oe="timezone_minute",ue="month",se="day",le="hour",ce="minute",fe="second",de="case",pe="end",ve="when",he="then",me="else",we=",",Ie="(",Se=")",ge="`",ye=/^[A-Za-z_\x80-\uFFFF]/,Te=/^[A-Za-z0-9_]/,Ne=/^[A-Za-z0-9_.\x80-\uFFFF]/,Oe=/^["]/,Ce=/^[^']/,be=/^[0-9]/,xe=/^[eE]/,Ae=/^[+\-]/,Me=/^[ \t\n\r]/,Ee=/^[^`]/,Fe=La("!",!1),De=La("=",!1),Pe=La(">=",!1),_e=La(">",!1),Le=La("<=",!1),Re=La("<>",!1),Ue=La("<",!1),Ve=La("!=",!1),Je=La("+",!1),$e=La("-",!1),He=La("||",!1),ke=La("*",!1),Ze=La("/",!1),ze=Ra([["A","Z"],["a","z"],"_",["€","￿"]],!1,!1),qe=Ra([["A","Z"],["a","z"],["0","9"],"_"],!1,!1),Ye=Ra([["A","Z"],["a","z"],["0","9"],"_",".",["€","￿"]],!1,!1),je=Ra(['"'],!1,!1),Be=La("@",!1),Qe=La("'",!1),Ge=La("N'",!1),We=La("''",!1),Ke=Ra(["'"],!0,!1),Xe=La(".",!1),et=Ra([["0","9"]],!1,!1),tt=Ra(["e","E"],!1,!1),rt=Ra(["+","-"],!1,!1),nt=La("NULL",!0),at=La("TRUE",!0),it=La("FALSE",!0),ot=La("IN",!0),ut=La("IS",!0),st=La("LIKE",!0),lt=La("ESCAPE",!0),ct=La("NOT",!0),ft=La("AND",!0),dt=La("OR",!0),pt=La("BETWEEN",!0),vt=La("FROM",!0),ht=La("FOR",!0),mt=La("SUBSTRING",!0),wt=La("EXTRACT",!0),It=La("TRIM",!0),St=La("POSITION",!0),gt=La("TIMESTAMP",!0),yt=La("DATE",!0),Tt=La("TIME",!0),Nt=La("LEADING",!0),Ot=La("TRAILING",!0),Ct=La("BOTH",!0),bt=La("CAST",!0),xt=La("AS",!0),At=La("INTEGER",!0),Mt=La("SMALLINT",!0),Et=La("FLOAT",!0),Ft=La("REAL",!0),Dt=La("VARCHAR",!0),Pt=La("TO",!0),_t=La("INTERVAL",!0),Lt=La("YEAR",!0),Rt=La("TIMEZONE_HOUR",!0),Ut=La("TIMEZONE_MINUTE",!0),Vt=La("MONTH",!0),Jt=La("DAY",!0),$t=La("HOUR",!0),Ht=La("MINUTE",!0),kt=La("SECOND",!0),Zt=La("CASE",!0),zt=La("END",!0),qt=La("WHEN",!0),Yt=La("THEN",!0),jt=La("ELSE",!0),Bt=La(",",!1),Qt=La("(",!1),Gt=La(")",!1),Wt=Ra([" ","\t","\n","\r"],!1,!1),Kt=La("`",!1),Xt=Ra(["`"],!0,!1),er=function(e){return e},tr=function(e,t){var r={type:"expression-list"},n=function(e,t,r){return function(e,t){for(var r=[e],n=0;n<t.length;n++)r.push(t[n][3]);return r}(e,t)}(e,t);return r.value=n,r},rr=function(e,t){return Oo(e,t)},nr=function(e,t){return Oo(e,t)},ar=function(e){return function(e,t){return{type:"unary-expression",operator:"NOT",expr:t}}(0,e)},ir=function(e,t){return""==t||null==t||null==t?e:"arithmetic"==t.type?Oo(e,t.tail):No(t.op,e,t.right,t.escape)},or=function(e){return{type:"arithmetic",tail:e}},ur=function(e,t){return{op:e+"NOT",right:t}},sr=function(e,t){return{op:e,right:t}},lr=function(e,t,r){return{op:"NOT"+e,right:{type:"expression-list",value:[t,r]}}},cr=function(e,t,r){return{op:e,right:{type:"expression-list",value:[t,r]}}},fr=function(e){return e[0]+" "+e[2]},dr=function(e){return e[0]+" "+e[2]},pr=function(e,t,r){return{op:e,right:t,escape:r.value}},vr=function(e,t){return{op:e,right:t,escape:""}},hr=function(e,t){return{op:e,right:t}},mr=function(e){return{op:e,right:{type:"expression-list",value:[]}}},wr=function(e,t){return{op:e,right:t}},Ir=function(e,t){return Oo(e,t)},Sr=function(e,t){return Oo(e,t)},gr=function(e){return e.paren=!0,e},yr=function(e){return/^CURRENT_DATE$/i.test(e)?{type:"current-time",mode:"date"}:/^CURRENT_TIMESTAMP$/i.test(e)?{type:"current-time",mode:"timestamp"}:{type:"column-reference",table:"",column:e}},Tr=function(e){return{type:"column-reference",table:"",column:e,delimited:!0}},Nr=function(e){return e},Or=function(e,t){return e+t.join("")},Cr=function(e,t){return e+t.join("")},br=function(e){return e},xr=function(e){return e.join("")},Ar=function(){return'"'},Mr=function(e){return{type:"parameter",value:e[1]}},Er=function(e,t){return{type:"function",name:"extract",args:{type:"expression-list",value:[{type:"string",value:e},t]}}},Fr=function(e,t,r){return{type:"function",name:"substring",args:{type:"expression-list",value:r?[e,t,r[2]]:[e,t]}}},Dr=function(e,t){return{type:"function",name:"cast",args:{type:"expression-list",value:[e,t]}}},Pr=function(){return{type:"data-type",value:{type:"integer"}}},_r=function(){return{type:"data-type",value:{type:"smallint"}}},Lr=function(){return{type:"data-type",value:{type:"float"}}},Rr=function(){return{type:"data-type",value:{type:"real"}}},Ur=function(){return{type:"data-type",value:{type:"date"}}},Vr=function(){return{type:"data-type",value:{type:"timestamp"}}},Jr=function(){return{type:"data-type",value:{type:"time"}}},$r=function(e){return{type:"data-type",value:{type:"varchar",size:parseInt(e)}}},Hr=function(e,t,r){return{type:"function",name:"trim",args:{type:"expression-list",value:[{type:"string",value:e??"BOTH"},t,r]}}},kr=function(e,t){return{type:"function",name:"trim",args:{type:"expression-list",value:[{type:"string",value:e??"BOTH"},t]}}},Zr=function(e,t){return{type:"function",name:"position",args:{type:"expression-list",value:[e,t]}}},zr=function(e,t){return{type:"function",name:e,args:t||{type:"expression-list",value:[]}}},qr=function(e){return"string"===e.type&&function(e){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(e)&&_a("Timestamp literal is invalid")}(e.value),{type:"timestamp",value:e.value}},Yr=function(e){return"string"===e.type&&function(e){!0!==/^(\d{1,2}):(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2})$|^(\d{1,2}):(\d{1,2}):(\d{1,2}).([0-9]+)$/.test(e)&&_a("Time literal is invalid")}(e.value),{type:"time",value:e.value}},jr=function(e,t,r){return{type:"interval",value:t,qualifier:r,op:e}},Br=function(e,t){return{type:"interval",value:e,qualifier:t,op:""}},Qr=function(e,t){return{type:"interval-qualifier",start:e,end:t}},Gr=function(e,t){return{type:"interval-period",period:e.value,precision:t,secondary:null}},Wr=function(e){return{type:"interval-period",period:e.value,precision:null,secondary:null}},Kr=function(e){return{type:"interval-period",period:e.value,precision:null,secondary:null}},Xr=function(e,t){return{type:"interval-period",period:"second",precision:e,secondary:t}},en=function(e){return{type:"interval-period",period:"second",precision:e,secondary:null}},tn=function(){return{type:"interval-period",period:"second",precision:null,secondary:null}},rn=function(e,t){return{type:"interval-period",period:e.value,precision:t,secondary:null}},nn=function(e){return{type:"interval-period",period:e.value,precision:null,secondary:null}},an=function(e,t){return{type:"interval-period",period:"second",precision:e,secondary:t}},on=function(e){return{type:"interval-period",period:"second",precision:e,secondary:null}},un=function(){return{type:"interval-period",period:"second",precision:null,secondary:null}},sn=function(){return{type:"string",value:"day"}},ln=function(){return{type:"string",value:"hour"}},cn=function(){return{type:"string",value:"minute"}},fn=function(){return{type:"string",value:"month"}},dn=function(){return{type:"string",value:"year"}},pn=function(e){return parseFloat(e)},vn=function(e){return parseFloat(e)},hn=function(e){return"string"===e.type&&function(e){!0!==/^(\d{4})-(\d{1,2})-(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})?[ ]{0,1}(\+|\-)(\d{1,2}):(\d{1,2})$|^(\d{4})-(\d{1,2})-(\d{1,2}) (\d{1,2}):(\d{1,2})$/.test(e)&&_a("Date literal is invalid")}(e.value),{type:"date",value:e.value}},mn=function(){return{type:"null",value:null}},wn=function(){return{type:"boolean",value:!0}},In=function(){return{type:"boolean",value:!1}},Sn=function(){return"'"},gn=function(e){return{type:"string",value:e.join("")}},yn=function(e,t){return{type:"case-expression",format:"simple",operand:e,clauses:t,else:null}},Tn=function(e,t,r){return{type:"case-expression",format:"simple",operand:e,clauses:t,else:r.value}},Nn=function(e){return{type:"case-expression",format:"searched",clauses:e,else:null}},On=function(e,t){return{type:"case-expression",format:"searched",clauses:e,else:t.value}},Cn=function(e,t){return{type:"when-clause",operand:e,value:t}},bn=function(e,t){return{type:"when-clause",operand:e,value:t}},xn=function(e){return{type:"else-clause",value:e}},An=function(e){return{type:"number",value:e}},Mn=function(e,t,r){return parseFloat(e+t+r)},En=function(e,t){return parseFloat(e+t)},Fn=function(e,t){return parseFloat(e+t)},Dn=function(e){return parseFloat(e)},Pn=function(e,t){return e[0]+t},_n=function(e){return"."+(null!=e?e:"")},Ln=function(e,t){return e+t},Rn=function(e){return e.join("")},Un=function(e,t){return"e"+(null===t?"":t)},Vn=function(){return"IN"},Jn=function(){return"IS"},$n=function(){return"LIKE"},Hn=function(){return"ESCAPE"},kn=function(){return"NOT"},Zn=function(){return"AND"},zn=function(){return"OR"},qn=function(){return"BETWEEN"},Yn=function(){return"FROM"},jn=function(){return"FOR"},Bn=function(){return"SUBSTRING"},Qn=function(){return"EXTRACT"},Gn=function(){return"TRIM"},Wn=function(){return"POSITION"},Kn=function(){return"TIMESTAMP"},Xn=function(){return"DATE"},ea=function(){return"TIME"},ta=function(){return"LEADING"},ra=function(){return"TRAILING"},na=function(){return"BOTH"},aa=function(){return"CAST"},ia=function(){return"AS"},oa=function(){return"INTEGER"},ua=function(){return"SMALLINT"},sa=function(){return"FLOAT"},la=function(){return"REAL"},ca=function(){return"VARCHAR"},fa=function(){return"TO"},da=function(){return"INTERVAL"},pa=function(){return"YEAR"},va=function(){return"TIMEZONE_HOUR"},ha=function(){return"TIMEZONE_MINUTE"},ma=function(){return"MONTH"},wa=function(){return"DAY"},Ia=function(){return"HOUR"},Sa=function(){return"MINUTE"},ga=function(){return"SECOND"},ya=function(){return"CASE"},Ta=function(){return"END"},Na=function(){return"WHEN"},Oa=function(){return"THEN"},Ca=function(){return"ELSE"},ba=function(e){return e},xa=function(e){return e.join("")},Aa=0,Ma=0,Ea=[{line:1,column:1}],Fa=0,Da=[],Pa=0;if("startRule"in r){if(!(r.startRule in o))throw new Error("Can't start parsing from rule \""+r.startRule+'".');u=o[r.startRule]}function _a(e,t){throw $a(e,t=void 0!==t?t:Va(Ma,Aa))}function La(e,t){return{type:"literal",text:e,ignoreCase:t}}function Ra(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Ua(e){var r,n=Ea[e];if(n)return n;for(r=e-1;!Ea[r];)r--;for(n={line:(n=Ea[r]).line,column:n.column};r<e;)10===t.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return Ea[e]=n,n}function Va(e,t,r){var n=Ua(e),a=Ua(t),o={source:i,start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:a.line,column:a.column}};return r&&i&&"function"==typeof i.offset&&(o.start=i.offset(o.start),o.end=i.offset(o.end)),o}function Ja(e){Aa<Fa||(Aa>Fa&&(Fa=Aa,Da=[]),Da.push(e))}function $a(t,r){return new e(t,null,null,r)}function Ha(){var e,t;return e=Aa,go(),(t=Za())!==a?(go(),Ma=e,e=er(t)):(Aa=e,e=a),e}function ka(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=Za())!==a){for(r=[],n=Aa,i=go(),(o=wo())!==a?(u=go(),(s=Za())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=wo())!==a?(u=go(),(s=Za())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=tr(t,r)}else Aa=e,e=a;return e}function Za(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=za())!==a){for(r=[],n=Aa,i=go(),(o=_i())!==a?(u=go(),(s=za())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=_i())!==a?(u=go(),(s=za())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=rr(t,r)}else Aa=e,e=a;return e}function za(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=qa())!==a){for(r=[],n=Aa,i=go(),(o=Pi())!==a?(u=go(),(s=qa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=Pi())!==a?(u=go(),(s=qa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=nr(t,r)}else Aa=e,e=a;return e}function qa(){var e,r,n,i,o;return e=Aa,(r=Di())===a&&(r=Aa,33===t.charCodeAt(Aa)?(n=s,Aa++):(n=a,0===Pa&&Ja(Fe)),n!==a?(i=Aa,Pa++,61===t.charCodeAt(Aa)?(o=l,Aa++):(o=a,0===Pa&&Ja(De)),Pa--,o===a?i=void 0:(Aa=i,i=a),i!==a?r=n=[n,i]:(Aa=r,r=a)):(Aa=r,r=a)),r!==a?(n=go(),(i=qa())!==a?(Ma=e,e=ar(i)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=function(){var e,t,r;return e=Aa,(t=Qa())!==a?(go(),(r=function(){var e;return(e=function(){var e,t,r,n,i,o,u;if(e=Aa,t=[],r=Aa,n=go(),(i=Ya())!==a?(o=go(),(u=Qa())!==a?r=n=[n,i,o,u]:(Aa=r,r=a)):(Aa=r,r=a),r!==a)for(;r!==a;)t.push(r),r=Aa,n=go(),(i=Ya())!==a?(o=go(),(u=Qa())!==a?r=n=[n,i,o,u]:(Aa=r,r=a)):(Aa=r,r=a);else t=a;return t!==a&&(Ma=e,t=or(t)),t}())===a&&(e=function(){var e,t,r,n;return e=Aa,(t=Ba())!==a?(go(),(r=Io())!==a?(go(),(n=ka())!==a?(go(),So()!==a?(Ma=e,e=hr(t,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=Ba())!==a?(go(),(r=Io())!==a?(go(),(n=So())!==a?(Ma=e,e=mr(t)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=Ba())!==a?(go(),(r=ui())!==a?(Ma=e,e=wr(t,r)):(Aa=e,e=a)):(Aa=e,e=a))),e}())===a&&(e=function(){var e,t,r,n,i,o;return e=Aa,(t=Di())!==a?(go(),(r=Li())!==a?(go(),(n=Qa())!==a?(go(),(i=Pi())!==a?(go(),(o=Qa())!==a?(Ma=e,e=lr(r,n,o)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=Li())!==a?(go(),(r=Qa())!==a?(go(),(n=Pi())!==a?(go(),(i=Qa())!==a?(Ma=e,e=cr(t,r,i)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)),e}())===a&&(e=function(){var e,t,r,n;return e=Aa,(t=Mi())!==a?(go(),(r=Di())!==a?(go(),(n=Qa())!==a?(Ma=e,e=ur(t,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=Mi())!==a?(go(),(r=Qa())!==a?(Ma=e,e=sr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)),e}())===a&&(e=function(){var e,t,r,n;return e=Aa,(t=ja())!==a?(go(),(r=vi())!==a?(go(),Fi()!==a?(go(),(n=hi())!==a?(Ma=e,e=pr(t,r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=ja())!==a?(go(),(r=vi())!==a?(Ma=e,e=vr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)),e}()),e}())===a&&(r=null),Ma=e,e=ir(t,r)):(Aa=e,e=a),e}()),e}function Ya(){var e;return t.substr(Aa,2)===c?(e=c,Aa+=2):(e=a,0===Pa&&Ja(Pe)),e===a&&(62===t.charCodeAt(Aa)?(e=f,Aa++):(e=a,0===Pa&&Ja(_e)),e===a&&(t.substr(Aa,2)===d?(e=d,Aa+=2):(e=a,0===Pa&&Ja(Le)),e===a&&(t.substr(Aa,2)===p?(e=p,Aa+=2):(e=a,0===Pa&&Ja(Re)),e===a&&(60===t.charCodeAt(Aa)?(e=v,Aa++):(e=a,0===Pa&&Ja(Ue)),e===a&&(61===t.charCodeAt(Aa)?(e=l,Aa++):(e=a,0===Pa&&Ja(De)),e===a&&(t.substr(Aa,2)===h?(e=h,Aa+=2):(e=a,0===Pa&&Ja(Ve)))))))),e}function ja(){var e,t,r,n,i;return e=Aa,t=Aa,(r=Di())!==a?(n=go(),(i=Ei())!==a?t=r=[r,n,i]:(Aa=t,t=a)):(Aa=t,t=a),t!==a&&(Ma=e,t=fr(t)),(e=t)===a&&(e=Ei()),e}function Ba(){var e,t,r,n,i;return e=Aa,t=Aa,(r=Di())!==a?(n=go(),(i=Ai())!==a?t=r=[r,n,i]:(Aa=t,t=a)):(Aa=t,t=a),t!==a&&(Ma=e,t=dr(t)),(e=t)===a&&(e=Ai()),e}function Qa(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=Wa())!==a){for(r=[],n=Aa,i=go(),(o=Ga())!==a?(u=go(),(s=Wa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=Ga())!==a?(u=go(),(s=Wa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=Ir(t,r)}else Aa=e,e=a;return e}function Ga(){var e;return 43===t.charCodeAt(Aa)?(e=m,Aa++):(e=a,0===Pa&&Ja(Je)),e===a&&(45===t.charCodeAt(Aa)?(e=w,Aa++):(e=a,0===Pa&&Ja($e)),e===a&&(t.substr(Aa,2)===I?(e=I,Aa+=2):(e=a,0===Pa&&Ja(He)))),e}function Wa(){var e,t,r,n,i,o,u,s;if(e=Aa,(t=Xa())!==a){for(r=[],n=Aa,i=go(),(o=Ka())!==a?(u=go(),(s=Xa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);n!==a;)r.push(n),n=Aa,i=go(),(o=Ka())!==a?(u=go(),(s=Xa())!==a?n=i=[i,o,u,s]:(Aa=n,n=a)):(Aa=n,n=a);Ma=e,e=Sr(t,r)}else Aa=e,e=a;return e}function Ka(){var e;return 42===t.charCodeAt(Aa)?(e=S,Aa++):(e=a,0===Pa&&Ja(ke)),e===a&&(47===t.charCodeAt(Aa)?(e=g,Aa++):(e=a,0===Pa&&Ja(Ze))),e}function Xa(){var e,t;return(e=function(){var e;return(e=hi())===a&&(e=function(){var e,t,r,n;return e=Aa,(t=function(){var e,t,r,n;return e=Aa,(t=Si())!==a&&(r=gi())!==a&&(n=yi())!==a?(Ma=e,e=Mn(t,r,n)):(Aa=e,e=a),e===a&&(e=Aa,(t=Si())!==a&&(r=gi())!==a?(Ma=e,e=En(t,r)):(Aa=e,e=a),e===a&&(e=Aa,(t=Si())!==a&&(r=yi())!==a?(Ma=e,e=Fn(t,r)):(Aa=e,e=a),e===a&&(e=Aa,(t=Si())!==a&&(Ma=e,t=Dn(t)),e=t))),e}())!==a?(r=Aa,Pa++,n=ti(),Pa--,n===a?r=void 0:(Aa=r,r=a),r!==a?(Ma=e,e=An(t)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t;return e=Aa,(t=bi())!==a&&(Ma=e,t=wn()),(e=t)===a&&(e=Aa,(t=xi())!==a&&(Ma=e,t=In()),e=t),e}())===a&&(e=function(){var e,t;return e=Aa,(t=Ci())!==a&&(Ma=e,t=mn()),t}())===a&&(e=function(){var e,t;return e=Aa,Zi()!==a?(go(),(t=vi())!==a?(Ma=e,e=hn(t)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t;return e=Aa,ki()!==a?(go(),(t=vi())!==a?(Ma=e,e=qr(t)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=li())===a&&(e=function(){var e,t;return e=Aa,zi()!==a?(go(),(t=vi())!==a?(Ma=e,e=Yr(t)):(Aa=e,e=a)):(Aa=e,e=a),e}()),e}())===a&&(e=function(){var e,t,r;return e=Aa,Ji()!==a?(go(),Io()!==a?(go(),(t=function(){var e;return(e=no())===a&&(e=oo())===a&&(e=uo())===a&&(e=so())===a&&(e=lo())===a&&(e=co())===a&&(e=ao())===a&&(e=io()),e}())!==a?(go(),Ri()!==a?(go(),(r=Za())!==a?(go(),So()!==a?(Ma=e,e=Er(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t,r,n,i,o,u;return e=Aa,Vi()!==a?(go(),Io()!==a?(go(),(t=Za())!==a?(go(),Ri()!==a?(go(),(r=Za())!==a?(go(),n=Aa,(i=Ui())!==a?(o=go(),(u=Za())!==a?n=i=[i,o,u,go()]:(Aa=n,n=a)):(Aa=n,n=a),n===a&&(n=null),(i=So())!==a?(Ma=e,e=Fr(t,r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t,r,n;return e=Aa,$i()!==a?(go(),Io()!==a?(go(),(t=si())===a&&(t=null),go(),(r=Za())!==a?(go(),Ri()!==a?(go(),(n=Za())!==a?(go(),So()!==a?(Ma=e,e=Hr(t,r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,$i()!==a?(go(),Io()!==a?(go(),(t=si())===a&&(t=null),go(),(r=Za())!==a?(go(),So()!==a?(Ma=e,e=kr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)),e}())===a&&(e=function(){var e,t,r;return e=Aa,Hi()!==a?(go(),Io()!==a?(go(),(t=Za())!==a?(go(),Ai()!==a?(go(),(r=Za())!==a?(go(),So()!==a?(Ma=e,e=Zr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t,r;return e=Aa,Bi()!==a?(go(),Io()!==a?(go(),(t=Za())!==a?(go(),Qi()!==a?(go(),(r=function(){var e,t,r;return e=Aa,(t=Gi())!==a&&(Ma=e,t=Pr()),(e=t)===a&&(e=Aa,(t=Wi())!==a&&(Ma=e,t=_r()),(e=t)===a&&(e=Aa,(t=Ki())!==a&&(Ma=e,t=Lr()),(e=t)===a&&(e=Aa,(t=Xi())!==a&&(Ma=e,t=Rr()),(e=t)===a&&(e=Aa,(t=Zi())!==a&&(Ma=e,t=Ur()),(e=t)===a&&(e=Aa,(t=ki())!==a&&(Ma=e,t=Vr()),(e=t)===a&&(e=Aa,(t=zi())!==a&&(Ma=e,t=Jr()),(e=t)===a&&(e=Aa,(t=eo())!==a?(go(),Io()!==a?(go(),(r=Ti())!==a?(go(),So()!==a?(Ma=e,e=$r(r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)))))))),e}())!==a?(go(),So()!==a?(Ma=e,e=Dr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e,t,r;return e=Aa,(t=To())!==a?(go(),Io()!==a?(go(),(r=ka())===a&&(r=null),go(),So()!==a?(Ma=e,e=zr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}())===a&&(e=function(){var e;return(e=function(){var e,t,r,n,i;if(e=Aa,fo()!==a)if(go(),(t=Za())!==a){for(go(),r=[],n=wi();n!==a;)r.push(n),n=wi();n=go(),(i=po())!==a?(Ma=e,e=yn(t,r)):(Aa=e,e=a)}else Aa=e,e=a;else Aa=e,e=a;if(e===a)if(e=Aa,fo()!==a)if(go(),(t=Za())!==a){for(go(),r=[],n=wi();n!==a;)r.push(n),n=wi();n=go(),(i=Ii())!==a?(go(),po()!==a?(Ma=e,e=Tn(t,r,i)):(Aa=e,e=a)):(Aa=e,e=a)}else Aa=e,e=a;else Aa=e,e=a;return e}())===a&&(e=function(){var e,t,r,n;if(e=Aa,fo()!==a){for(go(),t=[],r=mi();r!==a;)t.push(r),r=mi();r=go(),(n=po())!==a?(Ma=e,e=Nn(t)):(Aa=e,e=a)}else Aa=e,e=a;if(e===a)if(e=Aa,fo()!==a){for(go(),t=[],r=mi();r!==a;)t.push(r),r=mi();r=go(),(n=Ii())!==a?(go(),po()!==a?(Ma=e,e=On(t,n)):(Aa=e,e=a)):(Aa=e,e=a)}else Aa=e,e=a;return e}()),e}())===a&&(e=function(){var e,t;return e=Aa,(t=function(){var e,t;return e=Aa,(t=function(){var e,t,r,n;if(e=Aa,(t=ti())!==a){for(r=[],n=ni();n!==a;)r.push(n),n=ni();Ma=e,e=Or(t,r)}else Aa=e,e=a;return e}())!==a&&(Ma=e,t=Nr(t)),t}())!==a&&(Ma=e,t=yr(t)),(e=t)===a&&(e=Aa,(t=function(){var e,t;return e=Aa,oi()!==a?(t=function(){var e,t,r;for(e=Aa,t=[],r=ai();r!==a;)t.push(r),r=ai();return Ma=e,xr(t)}(),oi()!==a?(Ma=e,e=br(t)):(Aa=e,e=a)):(Aa=e,e=a),e}())!==a&&(Ma=e,t=Tr(t)),e=t),e}())===a&&(e=ui())===a&&(e=Aa,Io()!==a?(go(),(t=Za())!==a?(go(),So()!==a?(Ma=e,e=gr(t)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)),e}function ei(){var e,t,r,n;if(e=Aa,(t=ti())!==a){for(r=[],n=ri();n!==a;)r.push(n),n=ri();Ma=e,e=Cr(t,r)}else Aa=e,e=a;return e}function ti(){var e;return ye.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(ze)),e}function ri(){var e;return Te.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(qe)),e}function ni(){var e;return Ne.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(Ye)),e}function ai(){var e;return(e=ii())===a&&(e=function(){var e;return e=Aa,oi()!==a&&oi()!==a?(Ma=e,e=Ar()):(Aa=e,e=a),e}()),e}function ii(){var e;return Ne.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(Ye)),e}function oi(){var e;return Oe.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(je)),e}function ui(){var e,r,n,i;return e=Aa,r=Aa,64===t.charCodeAt(Aa)?(n=y,Aa++):(n=a,0===Pa&&Ja(Be)),n!==a&&(i=ei())!==a?r=n=[n,i]:(Aa=r,r=a),r!==a&&(Ma=e,r=Mr(r)),r}function si(){var e;return(e=qi())===a&&(e=Yi())===a&&(e=ji()),e}function li(){var e,r,n,i;return e=Aa,ro()!==a?(go(),45===t.charCodeAt(Aa)?(r=w,Aa++):(r=a,0===Pa&&Ja($e)),r===a&&(43===t.charCodeAt(Aa)?(r=m,Aa++):(r=a,0===Pa&&Ja(Je))),r!==a?(go(),(n=vi())!==a?(go(),(i=ci())!==a?(Ma=e,e=jr(r,n,i)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,ro()!==a?(go(),(r=vi())!==a?(go(),(n=ci())!==a?(Ma=e,e=Br(r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)),e}function ci(){var e,t,r;return e=Aa,(t=function(){var e,t,r;return e=Aa,(t=fi())!==a?(go(),Io()!==a?(go(),(r=pi())!==a?(go(),So()!==a?(Ma=e,e=Gr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=fi())!==a&&(Ma=e,t=Wr(t)),e=t),e}())!==a?(go(),to()!==a?(go(),(r=function(){var e,t,r,n;return e=Aa,(t=fi())!==a&&(Ma=e,t=Kr(t)),(e=t)===a&&(e=Aa,(t=co())!==a?(go(),Io()!==a?(go(),(r=pi())!==a?(go(),wo()!==a?(go(),(n=di())!==a?(go(),So()!==a?(Ma=e,e=Xr(r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=co())!==a?(go(),Io()!==a?(go(),(r=pi())!==a?(go(),So()!==a?(Ma=e,e=en(r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=co())!==a&&(Ma=e,t=tn()),e=t))),e}())!==a?(Ma=e,e=Qr(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=function(){var e,t,r,n;return e=Aa,(t=fi())!==a?(go(),Io()!==a?(go(),(r=di())!==a?(go(),So()!==a?(Ma=e,e=rn(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=fi())!==a&&(Ma=e,t=nn(t)),(e=t)===a&&(e=Aa,(t=co())!==a?(go(),Io()!==a?(go(),(r=pi())!==a?(go(),wo()!==a?(go(),(n=di())!==a?(go(),So()!==a?(Ma=e,e=an(r,n)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=co())!==a?(go(),Io()!==a?(go(),(r=di())!==a?(go(),So()!==a?(Ma=e,e=on(r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e===a&&(e=Aa,(t=co())!==a&&(Ma=e,t=un()),e=t)))),e}()),e}function fi(){var e,t;return e=Aa,(t=uo())!==a&&(Ma=e,t=sn()),(e=t)===a&&(e=Aa,(t=so())!==a&&(Ma=e,t=ln()),(e=t)===a&&(e=Aa,(t=lo())!==a&&(Ma=e,t=cn()),(e=t)===a&&(e=Aa,(t=oo())!==a&&(Ma=e,t=fn()),(e=t)===a&&(e=Aa,(t=no())!==a&&(Ma=e,t=dn()),e=t)))),e}function di(){var e,t;return e=Aa,(t=Ti())!==a&&(Ma=e,t=pn(t)),t}function pi(){var e,t;return e=Aa,(t=Ti())!==a&&(Ma=e,t=vn(t)),t}function vi(){var e;return(e=hi())===a&&(e=ui()),e}function hi(){var e,r,n,i,o;if(e=Aa,39===t.charCodeAt(Aa)?(r=T,Aa++):(r=a,0===Pa&&Ja(Qe)),r===a&&(t.substr(Aa,2)===N?(r=N,Aa+=2):(r=a,0===Pa&&Ja(Ge))),r!==a){for(n=[],i=Aa,t.substr(Aa,2)===O?(o=O,Aa+=2):(o=a,0===Pa&&Ja(We)),o!==a&&(Ma=i,o=Sn()),(i=o)===a&&(Ce.test(t.charAt(Aa))?(i=t.charAt(Aa),Aa++):(i=a,0===Pa&&Ja(Ke)));i!==a;)n.push(i),i=Aa,t.substr(Aa,2)===O?(o=O,Aa+=2):(o=a,0===Pa&&Ja(We)),o!==a&&(Ma=i,o=Sn()),(i=o)===a&&(Ce.test(t.charAt(Aa))?(i=t.charAt(Aa),Aa++):(i=a,0===Pa&&Ja(Ke)));39===t.charCodeAt(Aa)?(i=T,Aa++):(i=a,0===Pa&&Ja(Qe)),i!==a?(Ma=e,e=gn(n)):(Aa=e,e=a)}else Aa=e,e=a;return e}function mi(){var e,t,r;return e=Aa,vo()!==a?(go(),(t=Za())!==a?(go(),ho()!==a?(go(),(r=Za())!==a?(Ma=e,e=Cn(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}function wi(){var e,t,r;return e=Aa,vo()!==a?(go(),(t=Za())!==a?(go(),ho()!==a?(go(),(r=Za())!==a?(Ma=e,e=bn(t,r)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a)):(Aa=e,e=a),e}function Ii(){var e,t;return e=Aa,mo()!==a?(go(),(t=Za())!==a?(Ma=e,e=xn(t)):(Aa=e,e=a)):(Aa=e,e=a),e}function Si(){var e,r,n;return(e=Ti())===a&&(e=Aa,45===t.charCodeAt(Aa)?(r=w,Aa++):(r=a,0===Pa&&Ja($e)),r===a&&(43===t.charCodeAt(Aa)?(r=m,Aa++):(r=a,0===Pa&&Ja(Je))),r!==a&&(n=Ti())!==a?(Ma=e,e=Pn(r,n)):(Aa=e,e=a)),e}function gi(){var e,r,n;return e=Aa,46===t.charCodeAt(Aa)?(r=C,Aa++):(r=a,0===Pa&&Ja(Xe)),r!==a?((n=Ti())===a&&(n=null),Ma=e,e=_n(n)):(Aa=e,e=a),e}function yi(){var e,t,r;return e=Aa,(t=Oi())!==a&&(r=Ti())!==a?(Ma=e,e=Ln(t,r)):(Aa=e,e=a),e}function Ti(){var e,t,r;if(e=Aa,t=[],(r=Ni())!==a)for(;r!==a;)t.push(r),r=Ni();else t=a;return t!==a&&(Ma=e,t=Rn(t)),t}function Ni(){var e;return be.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(et)),e}function Oi(){var e,r,n;return e=Aa,xe.test(t.charAt(Aa))?(r=t.charAt(Aa),Aa++):(r=a,0===Pa&&Ja(tt)),r!==a?(Ae.test(t.charAt(Aa))?(n=t.charAt(Aa),Aa++):(n=a,0===Pa&&Ja(rt)),n===a&&(n=null),Ma=e,e=Un(r,n)):(Aa=e,e=a),e}function Ci(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===b?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(nt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?e=r=[r,n]:(Aa=e,e=a)):(Aa=e,e=a),e}function bi(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===x?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(at)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?e=r=[r,n]:(Aa=e,e=a)):(Aa=e,e=a),e}function xi(){var e,r,n,i;return e=Aa,t.substr(Aa,5).toLowerCase()===A?(r=t.substr(Aa,5),Aa+=5):(r=a,0===Pa&&Ja(it)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?e=r=[r,n]:(Aa=e,e=a)):(Aa=e,e=a),e}function Ai(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===M?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(ot)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Vn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Mi(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===E?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(ut)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Jn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ei(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===F?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(st)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=$n()):(Aa=e,e=a)):(Aa=e,e=a),e}function Fi(){var e,r,n,i;return e=Aa,t.substr(Aa,6).toLowerCase()===D?(r=t.substr(Aa,6),Aa+=6):(r=a,0===Pa&&Ja(lt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Hn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Di(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===P?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(ct)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=kn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Pi(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===_?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(ft)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Zn()):(Aa=e,e=a)):(Aa=e,e=a),e}function _i(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===L?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(dt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=zn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Li(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===R?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(pt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=qn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ri(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===U?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(vt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Yn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ui(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===V?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(ht)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=jn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Vi(){var e,r,n,i;return e=Aa,t.substr(Aa,9).toLowerCase()===J?(r=t.substr(Aa,9),Aa+=9):(r=a,0===Pa&&Ja(mt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Bn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ji(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===$?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(wt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Qn()):(Aa=e,e=a)):(Aa=e,e=a),e}function $i(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===H?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(It)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Gn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Hi(){var e,r,n,i;return e=Aa,t.substr(Aa,8).toLowerCase()===k?(r=t.substr(Aa,8),Aa+=8):(r=a,0===Pa&&Ja(St)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Wn()):(Aa=e,e=a)):(Aa=e,e=a),e}function ki(){var e,r,n,i;return e=Aa,t.substr(Aa,9).toLowerCase()===Z?(r=t.substr(Aa,9),Aa+=9):(r=a,0===Pa&&Ja(gt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Kn()):(Aa=e,e=a)):(Aa=e,e=a),e}function Zi(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===z?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(yt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Xn()):(Aa=e,e=a)):(Aa=e,e=a),e}function zi(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===q?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Tt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ea()):(Aa=e,e=a)):(Aa=e,e=a),e}function qi(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===Y?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(Nt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ta()):(Aa=e,e=a)):(Aa=e,e=a),e}function Yi(){var e,r,n,i;return e=Aa,t.substr(Aa,8).toLowerCase()===j?(r=t.substr(Aa,8),Aa+=8):(r=a,0===Pa&&Ja(Ot)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ra()):(Aa=e,e=a)):(Aa=e,e=a),e}function ji(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===B?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Ct)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=na()):(Aa=e,e=a)):(Aa=e,e=a),e}function Bi(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===Q?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(bt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=aa()):(Aa=e,e=a)):(Aa=e,e=a),e}function Qi(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===G?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(xt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ia()):(Aa=e,e=a)):(Aa=e,e=a),e}function Gi(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===W?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(At)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=oa()):(Aa=e,e=a)):(Aa=e,e=a),e}function Wi(){var e,r,n,i;return e=Aa,t.substr(Aa,8).toLowerCase()===K?(r=t.substr(Aa,8),Aa+=8):(r=a,0===Pa&&Ja(Mt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ua()):(Aa=e,e=a)):(Aa=e,e=a),e}function Ki(){var e,r,n,i;return e=Aa,t.substr(Aa,5).toLowerCase()===X?(r=t.substr(Aa,5),Aa+=5):(r=a,0===Pa&&Ja(Et)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=sa()):(Aa=e,e=a)):(Aa=e,e=a),e}function Xi(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===ee?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Ft)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=la()):(Aa=e,e=a)):(Aa=e,e=a),e}function eo(){var e,r,n,i;return e=Aa,t.substr(Aa,7).toLowerCase()===te?(r=t.substr(Aa,7),Aa+=7):(r=a,0===Pa&&Ja(Dt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ca()):(Aa=e,e=a)):(Aa=e,e=a),e}function to(){var e,r,n,i;return e=Aa,t.substr(Aa,2).toLowerCase()===re?(r=t.substr(Aa,2),Aa+=2):(r=a,0===Pa&&Ja(Pt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=fa()):(Aa=e,e=a)):(Aa=e,e=a),e}function ro(){var e,r,n,i;return e=Aa,t.substr(Aa,8).toLowerCase()===ne?(r=t.substr(Aa,8),Aa+=8):(r=a,0===Pa&&Ja(_t)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=da()):(Aa=e,e=a)):(Aa=e,e=a),e}function no(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===ae?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Lt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=pa()):(Aa=e,e=a)):(Aa=e,e=a),e}function ao(){var e,r,n,i;return e=Aa,t.substr(Aa,13).toLowerCase()===ie?(r=t.substr(Aa,13),Aa+=13):(r=a,0===Pa&&Ja(Rt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=va()):(Aa=e,e=a)):(Aa=e,e=a),e}function io(){var e,r,n,i;return e=Aa,t.substr(Aa,15).toLowerCase()===oe?(r=t.substr(Aa,15),Aa+=15):(r=a,0===Pa&&Ja(Ut)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ha()):(Aa=e,e=a)):(Aa=e,e=a),e}function oo(){var e,r,n,i;return e=Aa,t.substr(Aa,5).toLowerCase()===ue?(r=t.substr(Aa,5),Aa+=5):(r=a,0===Pa&&Ja(Vt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ma()):(Aa=e,e=a)):(Aa=e,e=a),e}function uo(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===se?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(Jt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=wa()):(Aa=e,e=a)):(Aa=e,e=a),e}function so(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===le?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja($t)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Ia()):(Aa=e,e=a)):(Aa=e,e=a),e}function lo(){var e,r,n,i;return e=Aa,t.substr(Aa,6).toLowerCase()===ce?(r=t.substr(Aa,6),Aa+=6):(r=a,0===Pa&&Ja(Ht)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Sa()):(Aa=e,e=a)):(Aa=e,e=a),e}function co(){var e,r,n,i;return e=Aa,t.substr(Aa,6).toLowerCase()===fe?(r=t.substr(Aa,6),Aa+=6):(r=a,0===Pa&&Ja(kt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ga()):(Aa=e,e=a)):(Aa=e,e=a),e}function fo(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===de?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Zt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=ya()):(Aa=e,e=a)):(Aa=e,e=a),e}function po(){var e,r,n,i;return e=Aa,t.substr(Aa,3).toLowerCase()===pe?(r=t.substr(Aa,3),Aa+=3):(r=a,0===Pa&&Ja(zt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Ta()):(Aa=e,e=a)):(Aa=e,e=a),e}function vo(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===ve?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(qt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Na()):(Aa=e,e=a)):(Aa=e,e=a),e}function ho(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===he?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(Yt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Oa()):(Aa=e,e=a)):(Aa=e,e=a),e}function mo(){var e,r,n,i;return e=Aa,t.substr(Aa,4).toLowerCase()===me?(r=t.substr(Aa,4),Aa+=4):(r=a,0===Pa&&Ja(jt)),r!==a?(n=Aa,Pa++,i=ri(),Pa--,i===a?n=void 0:(Aa=n,n=a),n!==a?(Ma=e,e=Ca()):(Aa=e,e=a)):(Aa=e,e=a),e}function wo(){var e;return 44===t.charCodeAt(Aa)?(e=we,Aa++):(e=a,0===Pa&&Ja(Bt)),e}function Io(){var e;return 40===t.charCodeAt(Aa)?(e=Ie,Aa++):(e=a,0===Pa&&Ja(Qt)),e}function So(){var e;return 41===t.charCodeAt(Aa)?(e=Se,Aa++):(e=a,0===Pa&&Ja(Gt)),e}function go(){var e,t;for(e=[],t=yo();t!==a;)e.push(t),t=yo();return e}function yo(){var e;return Me.test(t.charAt(Aa))?(e=t.charAt(Aa),Aa++):(e=a,0===Pa&&Ja(Wt)),e}function To(){var e,r,n,i;if(e=Aa,(r=ei())!==a&&(Ma=e,r=ba(r)),(e=r)===a)if(e=Aa,96===t.charCodeAt(Aa)?(r=ge,Aa++):(r=a,0===Pa&&Ja(Kt)),r!==a){if(n=[],Ee.test(t.charAt(Aa))?(i=t.charAt(Aa),Aa++):(i=a,0===Pa&&Ja(Xt)),i!==a)for(;i!==a;)n.push(i),Ee.test(t.charAt(Aa))?(i=t.charAt(Aa),Aa++):(i=a,0===Pa&&Ja(Xt));else n=a;n!==a?(96===t.charCodeAt(Aa)?(i=ge,Aa++):(i=a,0===Pa&&Ja(Kt)),i!==a?(Ma=e,e=xa(n)):(Aa=e,e=a)):(Aa=e,e=a)}else Aa=e,e=a;return e}function No(e,t,r,n){var a={type:"binary-expression",operator:e,left:t,right:r};return void 0!==n&&(a.escape=n),a}function Oo(e,t){for(var r=e,n=0;n<t.length;n++)r=No(t[n][1],r,t[n][3]);return r}if((n=u())!==a&&Aa===t.length)return n;throw n!==a&&Aa<t.length&&Ja({type:"end"}),function(t,r,n){return new e(e.buildMessage(t,r),t,r,n)}(Da,Fa<t.length?t.charAt(Fa):null,Fa<t.length?Va(Fa,Fa+1):Va(Fa,Fa))}}},(ne=ie).exports&&(ne.exports=ae());var oe=ie.exports;class ue{static parse(e){return oe.parse(e)}}const se=new Set(["current_timestamp","current_date","current_time"]);class le{static makeBool(e){return fe(e)}static featureValue(e,t,r,n){return ge(e,t,r,n)}static equalsNull(e){return null===e}static applyLike(e,t,r){return Se(e,t,r)}static ensureArray(e){return de(e)}static applyIn(e,t){return me(e,t)}static currentDate(e){return o.u.fromNow(e)}static makeSqlInterval(e,t,r){return m.createFromValueAndQualifer(e,t,r)}static convertInterval(e){return e instanceof m?e.valueInMilliseconds():e}static currentTimestamp(e){return b(new Date,e)}static compare(e,t,r,n){return Y(t,r,e)}static calculate(e,t,r,n){return te(e,t,r,n)}static evaluateTime(e){return L(e)}static evaluateTimestamp(e,t,r){return R(e,t,r)}static evaluateDate(e,t){return U(e,t)}static evaluateFunction(e,t,r){return G(e,t,r)}static lookup(e,t){const r=t[e];return void 0===r?null:r}static between(e,t,r){return null==e||null==t[0]||null==t[1]?null:Y(e,t[0],">=")&&Y(e,t[1],"<=")}static notbetween(e,t,r){return null==e||null==t[0]||null==t[1]?null:Y(e,t[0],"<")||Y(e,t[1],">")}static ternaryNot(e){return pe(e)}static ternaryAnd(e,t){return ve(e,t)}static ternaryOr(e,t){return he(e,t)}}class ce{constructor(e,t,r="UTC"){this.fieldsIndex=t,this.timeZone=r,this.parameters={},this._hasDateFunctions=void 0,this.parseTree=ue.parse(e);const{isStandardized:n,isAggregate:a,referencedFieldNames:i}=this._extractExpressionInfo(t);this._referencedFieldNames=i,this.isStandardized=n,this.isAggregate=a}static convertValueToStorageFormat(e,t=null){if(null===t)return E(e)?e.getTime():F(e)?e.toMillis():_(e)?e.toStorageFormat():P(e)?e.toStorageString():D(e)?e.toStorageFormat():e;switch(t){case"date":return E(e)?e.getTime():F(e)?e.toMillis():_(e)?e.toMilliseconds():D(e)?e.toNumber():e;case"date-only":return E(e)?o.u.fromDateJS(e).toString():_(e)?o.u.fromSqlTimeStampOffset(e).toString():F(e)?o.u.fromDateTime(e).toString():e;case"time-only":return E(e)?s.n.fromDateJS(e).toStorageString():F(e)?s.n.fromDateTime(e).toStorageString():_(e)?s.n.fromSqlTimeStampOffset(e).toStorageString():P(e)?e.toStorageString():e;case"timestamp-offset":if(E(e))return u.H.fromJSDate(e).toStorageFormat();if(F(e))return u.H.fromDateTime(e).toStorageFormat();if(_(e))return e.toStorageFormat()}return e}static create(e,t,r="UTC"){return new ce(e,t,r)}get fieldNames(){return this._referencedFieldNames}testSet(e,t=ye){return!!this._evaluateNode(this.parseTree,null,t,e)}calculateValue(e,t=ye){const r=this._evaluateNode(this.parseTree,e,t,null);return r instanceof m?r.valueInMilliseconds()/864e5:r}calculateValueCompiled(e,t=ye){return null!=this.parseTree._compiledVersion?this.parseTree._compiledVersion(e,this.parameters,t,this.fieldsIndex,this.timeZone):(0,i.Z)("esri-csp-restrictions")?this.calculateValue(e,t):(this._compileMe(),this.parseTree._compiledVersion(e,this.parameters,t,this.fieldsIndex,this.timeZone))}testFeature(e,t=ye){return!!this._evaluateNode(this.parseTree,e,t,null)}testFeatureCompiled(e,t=ye){return null!=this.parseTree._compiledVersion?!!this.parseTree._compiledVersion(e,this.parameters,t,this.fieldsIndex,this.timeZone):(0,i.Z)("esri-csp-restrictions")?this.testFeature(e,t):(this._compileMe(),!!this.parseTree._compiledVersion(e,this.parameters,t,this.fieldsIndex,this.timeZone))}get hasDateFunctions(){return null!=this._hasDateFunctions||(this._hasDateFunctions=!1,this._visitAll(this.parseTree,(e=>{"current-time"===e.type?this._hasDateFunctions=!0:"function"===e.type&&(this._hasDateFunctions=this._hasDateFunctions||se.has(e.name.toLowerCase()))}))),this._hasDateFunctions}getFunctions(){const e=new Set;return this._visitAll(this.parseTree,(t=>{"function"===t.type&&e.add(t.name.toLowerCase())})),Array.from(e)}getExpressions(){const e=new Map;return this._visitAll(this.parseTree,(t=>{if("function"===t.type){const r=t.name.toLowerCase(),n=t.args.value[0];if("column-reference"===n.type){const t=n.column,a=`${r}-${t}`;e.has(a)||e.set(a,{aggregateType:r,field:t})}}})),[...e.values()]}getVariables(){const e=new Set;return this._visitAll(this.parseTree,(t=>{"parameter"===t.type&&e.add(t.value.toLowerCase())})),Array.from(e)}_compileMe(){const e="return this.convertInterval("+this.evaluateNodeToJavaScript(this.parseTree)+")";this.parseTree._compiledVersion=new Function("feature","lookups","attributeAdapter","fieldsIndex","timeZone",e).bind(le)}_extractExpressionInfo(e){const t=[],r=new Set;let n=!0,a=!1;return this._visitAll(this.parseTree,(i=>{switch(i.type){case"column-reference":{const n=e?.get(i.column);let a,o;n?a=o=n.name??"":(o=i.column,a=o.toLowerCase()),r.has(a)||(r.add(a),t.push(o)),i.column=o;break}case"function":{const{name:e,args:t}=i,r=t.value.length;n&&(n=function(e,t){const r=ee[e.toLowerCase()];return null!=r&&t>=r.minParams&&t<=r.maxParams}(e,r)),!1===a&&(a=c(e,r));break}}})),{referencedFieldNames:Array.from(t),isStandardized:n,isAggregate:a}}_visitAll(e,t){if(null!=e)switch(t(e),e.type){case"when-clause":this._visitAll(e.operand,t),this._visitAll(e.value,t);break;case"case-expression":for(const r of e.clauses)this._visitAll(r,t);"simple"===e.format&&this._visitAll(e.operand,t),null!==e.else&&this._visitAll(e.else,t);break;case"expression-list":for(const r of e.value)this._visitAll(r,t);break;case"unary-expression":this._visitAll(e.expr,t);break;case"binary-expression":this._visitAll(e.left,t),this._visitAll(e.right,t);break;case"function":this._visitAll(e.args,t)}}evaluateNodeToJavaScript(e){switch(e.type){case"interval":return"this.makeSqlInterval("+this.evaluateNodeToJavaScript(e.value)+", "+JSON.stringify(e.qualifier)+","+JSON.stringify(e.op)+")";case"case-expression":{let t="";if("simple"===e.format){const r=this.evaluateNodeToJavaScript(e.operand);t="( ";for(let n=0;n<e.clauses.length;n++)t+=" (this.compare('=',"+r+","+this.evaluateNodeToJavaScript(e.clauses[n].operand)+") ? ("+this.evaluateNodeToJavaScript(e.clauses[n].value)+") : ";null!==e.else?t+=this.evaluateNodeToJavaScript(e.else):t+="null",t+=" )"}else{t="( ";for(let r=0;r<e.clauses.length;r++)t+=" this.makeBool("+this.evaluateNodeToJavaScript(e.clauses[r].operand)+")===true ? ("+this.evaluateNodeToJavaScript(e.clauses[r].value)+") : ";null!==e.else?t+=this.evaluateNodeToJavaScript(e.else):t+="null",t+=" )"}return t}case"parameter":return"this.lookup("+JSON.stringify(e.value.toLowerCase())+",lookups)";case"expression-list":{let t="[";for(const r of e.value)"["!==t&&(t+=","),t+=this.evaluateNodeToJavaScript(r);return t+="]",t}case"unary-expression":return"this.ternaryNot("+this.evaluateNodeToJavaScript(e.expr)+")";case"binary-expression":switch(e.operator){case"AND":return"this.ternaryAnd("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+" )";case"OR":return"this.ternaryOr("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+" )";case"IS":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return"this.equalsNull("+this.evaluateNodeToJavaScript(e.left)+")";case"ISNOT":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return"(!(this.equalsNull("+this.evaluateNodeToJavaScript(e.left)+")))";case"IN":return"this.applyIn("+this.evaluateNodeToJavaScript(e.left)+",this.ensureArray("+this.evaluateNodeToJavaScript(e.right)+"))";case"NOT IN":return"this.ternaryNot(this.applyIn("+this.evaluateNodeToJavaScript(e.left)+",this.ensureArray("+this.evaluateNodeToJavaScript(e.right)+")))";case"BETWEEN":return"this.between("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeZone)";case"NOTBETWEEN":return"this.notbetween("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeZone)";case"LIKE":return"this.applyLike("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+","+JSON.stringify(e.escape)+")";case"NOT LIKE":return"this.ternaryNot(this.applyLike("+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+","+JSON.stringify(e.escape)+"))";case"<>":case"<":case">":case">=":case"<=":case"=":return"this.compare("+JSON.stringify(e.operator)+","+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeZone)";case"*":case"-":case"+":case"/":case"||":return"this.calculate("+JSON.stringify(e.operator)+","+this.evaluateNodeToJavaScript(e.left)+","+this.evaluateNodeToJavaScript(e.right)+", timeZone)"}throw new a.eS(a.f.UnsupportedOperator,{operator:e.operator});case"null":case"boolean":case"string":case"number":return JSON.stringify(e.value);case"time":return"this.evaluateTime(JSON.stringify(node.value))";case"date":return"this.evaluateDate(JSON.stringify(node.value), 'unknown')";case"timestamp":return"this.evaluateTimestamp(JSON.stringify(node.value), 'unknown')";case"current-time":return"date"===e.mode?"this.currentDate(timeZone)":"this.currentTimestamp(timeZone)";case"column-reference":return"this.featureValue(feature,"+JSON.stringify(e.column)+",fieldsIndex,attributeAdapter)";case"function":return"this.evaluateFunction("+JSON.stringify(e.name)+","+this.evaluateNodeToJavaScript(e.args)+", timeZone)"}throw new a.eS(a.f.UnsupportedSyntax,{node:e.type})}_evaluateNode(e,t,r,i){let u;switch(e.type){case"interval":{const n=this._evaluateNode(e.value,t,r,i);return m.createFromValueAndQualifer(n,e.qualifier,e.op)}case"case-expression":if("simple"===e.format){const n=this._evaluateNode(e.operand,t,r,i);for(let a=0;a<e.clauses.length;a++)if(Y(n,this._evaluateNode(e.clauses[a].operand,t,r,i),"=",this.timeZone))return this._evaluateNode(e.clauses[a].value,t,r,i);if(null!==e.else)return this._evaluateNode(e.else,t,r,i)}else{for(let n=0;n<e.clauses.length;n++)if(fe(this._evaluateNode(e.clauses[n].operand,t,r,i)))return this._evaluateNode(e.clauses[n].value,t,r,i);if(null!==e.else)return this._evaluateNode(e.else,t,r,i)}return null;case"parameter":return u=this.parameters[e.value.toLowerCase()],E(u)?l.ou.fromJSDate(u):u instanceof n.iG?u.toDateTime():u;case"expression-list":{const n=[];for(const a of e.value)n.push(this._evaluateNode(a,t,r,i));return n}case"unary-expression":return pe(this._evaluateNode(e.expr,t,r,i));case"binary-expression":switch(e.operator){case"AND":return ve(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i));case"OR":return he(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i));case"IS":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return null===this._evaluateNode(e.left,t,r,i);case"ISNOT":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return null!==this._evaluateNode(e.left,t,r,i);case"IN":{const n=de(this._evaluateNode(e.right,t,r,i));return me(this._evaluateNode(e.left,t,r,i),n)}case"NOT IN":{const n=de(this._evaluateNode(e.right,t,r,i));return pe(me(this._evaluateNode(e.left,t,r,i),n))}case"BETWEEN":{const n=this._evaluateNode(e.left,t,r,i),a=this._evaluateNode(e.right,t,r,i);return null==n||null==a[0]||null==a[1]?null:Y(n,a[0],">=",this.timeZone)&&Y(n,a[1],"<=",this.timeZone)}case"NOTBETWEEN":{const n=this._evaluateNode(e.left,t,r,i),a=this._evaluateNode(e.right,t,r,i);return null==n||null==a[0]||null==a[1]?null:Y(n,a[0],"<",this.timeZone)||Y(n,a[1],">",this.timeZone)}case"LIKE":return Se(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i),e.escape);case"NOT LIKE":return pe(Se(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i),e.escape));case"<>":case"<":case">":case">=":case"<=":case"=":return Y(this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i),e.operator,this.timeZone);case"-":case"+":case"*":case"/":case"||":return te(e.operator,this._evaluateNode(e.left,t,r,i),this._evaluateNode(e.right,t,r,i),this.timeZone)}case"null":case"boolean":case"string":case"number":return e.value;case"date":return e.parsedValue??=U(e.value,"unknown"),e.parsedValue;case"timestamp":return e.parsedValue??=R(e.value,"unknown"),e.parsedValue;case"time":return L(e.value);case"current-time":return"date"===e.mode?o.u.fromNow(this.timeZone):b(new Date,this.timeZone);case"column-reference":return ge(t,e.column,this.fieldsIndex,r);case"data-type":return e.value;case"function":{if(this.isAggregate&&c(e.name,e.args.value.length)){const t=[];for(const n of e.args?.value||[]){const e=[];for(const t of i||[])e.push(this._evaluateNode(n,t,r,null));t.push(e)}return function(e,t){const r=f[e.toLowerCase()];if(null==r)throw new a.eS(a.f.FunctionNotRecognized);if(t.length<r.minParams||t.length>r.maxParams)throw new a.eS(a.f.InvalidParameterCount,{name:e.toUpperCase()});return r.evaluate(t)}(e.name,t)}const n=this._evaluateNode(e.args,t,r,i);return G(e.name,n,this.timeZone)}}throw new a.eS(a.f.UnsupportedSyntax,{node:e.type})}}function fe(e){return!0===e}function de(e){return Array.isArray(e)?e:[e]}function pe(e){return null!==e?!0!==e:null}function ve(e,t){return null!=e&&null!=t?!0===e&&!0===t:!1!==e&&!1!==t&&null}function he(e,t){return null!=e&&null!=t?!0===e||!0===t:!0===e||!0===t||null}function me(e,t){if(null==e)return null;let r=!1;for(const n of t)if(null==n)r=null;else if(e===n){r=!0;break}return r}const we="-[]/{}()*+?.\\^$|";var Ie;function Se(e,t,r){return null==e?null:function(e,t){const r=t;let n="",a=Ie.Normal;for(let t=0;t<e.length;t++){const i=e.charAt(t);switch(a){case Ie.Normal:i===r?a=Ie.Escaped:we.includes(i)?n+="\\"+i:n+="%"===i?".*":"_"===i?".":i;break;case Ie.Escaped:we.includes(i)?n+="\\"+i:n+=i,a=Ie.Normal}}return new RegExp("^"+n+"$","m")}(t,r).test(e)}function ge(e,t,r,n){const a=n.getAttribute(e,t),i=r?.get(t);return null==a||"esriFieldTypeDate"!==i?.type&&"date"!==i?.type?null==a||"esriFieldTypeDateOnly"!==i?.type&&"date-only"!==i?.type?null==a||"esriFieldTypeTimeOnly"!==i?.type&&"time-only"!==i?.type?null==a||"esriFieldTypeTimestampOffset"!==i?.type&&"timestamp-offset"!==i?.type?a:new u.H(a):s.n.fromReader(a):o.u.fromReader(a):b(new Date(a),r?.getLuxonTimeZone(i.name)??l.Qf.utcInstance)}!function(e){e[e.Normal=0]="Normal",e[e.Escaped=1]="Escaped"}(Ie||(Ie={}));const ye={getAttribute:(e,t)=>(function(e){return e&&"object"==typeof e.attributes}(e)?e.attributes:e)[t]}}}]);