@arcgis/core 4.31.0-next.20240607 → 4.31.0-next.20240610

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 (100) hide show
  1. package/README.md +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/06ea3bb071a83a54f1b2.js +1 -0
  4. package/assets/esri/core/workers/chunks/{fa5e171c8ce844363b6c.js → 465c718f0b9f7ba0f1ea.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{342426c8a8c9f5f84811.js → 491f402da260293592ff.js} +1 -1
  6. package/assets/esri/core/workers/chunks/4e2943968517e385bd12.js +1 -0
  7. package/assets/esri/core/workers/chunks/5f3600a6d7159228731d.js +1 -0
  8. package/assets/esri/core/workers/chunks/77a360d1c9ecce4d4bed.js +1 -0
  9. package/assets/esri/core/workers/chunks/ace3297f0f314c3724da.js +1 -0
  10. package/assets/esri/core/workers/chunks/c660649465058ef82045.js +1 -0
  11. package/assets/esri/core/workers/chunks/{6a943f384fcd0af5888b.js → e66ebcfffd081f847efe.js} +1 -1
  12. package/assets/esri/core/workers/chunks/ec06875eac992c640057.js +1 -0
  13. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  14. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  15. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  16. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  17. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +8 -0
  18. package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +8 -0
  19. package/assets/esri/themes/base/widgets/_LayerList.scss +8 -0
  20. package/assets/esri/themes/base/widgets/_Print.scss +12 -0
  21. package/assets/esri/themes/base/widgets/_TableList.scss +8 -0
  22. package/assets/esri/themes/dark/main.css +1 -1
  23. package/assets/esri/themes/light/main.css +1 -1
  24. package/assets/esri/themes/light/view.css +1 -1
  25. package/chunks/Terrain.glsl.js +3 -1
  26. package/chunks/lyr3DWorker.js +1 -1
  27. package/interfaces.d.ts +152 -32
  28. package/layers/CatalogLayer.js +1 -1
  29. package/layers/IntegratedMeshLayer.js +1 -1
  30. package/layers/MapImageLayer.js +1 -1
  31. package/layers/SceneLayer.js +1 -1
  32. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  33. package/layers/support/Sublayer.js +1 -1
  34. package/layers/support/arcgisLayers.js +1 -1
  35. package/package.json +1 -1
  36. package/smartMapping/renderers/size.js +1 -1
  37. package/support/elevationInfoUtils.js +1 -1
  38. package/support/featureFlags.js +1 -1
  39. package/support/revision.js +1 -1
  40. package/symbols/support/styleUtils.js +1 -1
  41. package/views/2d/engine/webgl/mesh/bufcut.js +1 -1
  42. package/views/3d/analysis/Viewshed/FieldOfViewManipulation.js +1 -1
  43. package/views/3d/analysis/Viewshed/ScaleOrientManipulation.js +1 -1
  44. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  45. package/views/3d/interactive/editingTools/manipulatorUtils.js +1 -1
  46. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  47. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  48. package/views/3d/layers/FeatureLayerView3D.js +1 -1
  49. package/views/3d/layers/SceneLayerView3D.js +1 -1
  50. package/views/3d/layers/TiledLayerView3D.js +1 -1
  51. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  52. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  53. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  54. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  55. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  56. package/views/3d/state/NearFarHeuristic.js +1 -1
  57. package/views/3d/terrain/OverlayRenderer.js +1 -1
  58. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  59. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  60. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  61. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  62. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  63. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  64. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  65. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  66. package/webdoc/support/webdocSaveUtils.js +1 -1
  67. package/webscene/support/schemaValidator.js +1 -1
  68. package/widgets/BasemapLayerList/css.js +1 -1
  69. package/widgets/BasemapLayerList.js +1 -1
  70. package/widgets/CatalogLayerList/css.js +1 -1
  71. package/widgets/CatalogLayerList.js +1 -1
  72. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  73. package/widgets/Feature/support/featureUtils.js +1 -1
  74. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  75. package/widgets/FeatureTable/FieldColumn.js +1 -1
  76. package/widgets/FeatureTable/Grid/Column.js +1 -1
  77. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  78. package/widgets/FeatureTable/RelationshipColumn.js +1 -1
  79. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  80. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  81. package/widgets/FeatureTable.js +1 -1
  82. package/widgets/Features/FeaturesViewModel.js +1 -1
  83. package/widgets/Fullscreen.js +1 -1
  84. package/widgets/LayerList/css.js +1 -1
  85. package/widgets/LayerList.js +1 -1
  86. package/widgets/Locate.js +1 -1
  87. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  88. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  89. package/widgets/Print/PrintViewModel.js +1 -1
  90. package/widgets/Print.js +1 -1
  91. package/widgets/TableList/css.js +1 -1
  92. package/widgets/TableList.js +1 -1
  93. package/widgets/Track.js +1 -1
  94. package/assets/esri/core/workers/chunks/230429bc1be19dd4944b.js +0 -1
  95. package/assets/esri/core/workers/chunks/441f3eaef3b703dd1026.js +0 -1
  96. package/assets/esri/core/workers/chunks/4d7578131569e65caedc.js +0 -1
  97. package/assets/esri/core/workers/chunks/4faf7055457c04dc9fc1.js +0 -1
  98. package/assets/esri/core/workers/chunks/ba988cd3a49987a0fb83.js +0 -1
  99. package/assets/esri/core/workers/chunks/c70683b7183458b338f8.js +0 -1
  100. package/assets/esri/core/workers/chunks/d03ada1212b13e76bff4.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2343,1053],{11053:(e,r,t)=>{t.d(r,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2343:(e,r,t)=>{t.r(r),t.d(r,{l:()=>l});var n,o,a,i=t(11053),s={exports:{}};n=s,o="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,a=function(e={}){var r,t,n=e;n.ready=new Promise(((e,n)=>{r=e,t=n}));var a,s,u=Object.assign({},n),l="./this.program",d=(e,r)=>{throw r},c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),o&&(c=o),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},s=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var f,h,m=n.print||console.log.bind(console),p=n.printErr||console.error.bind(console);Object.assign(n,u),u=null,n.arguments&&n.arguments,n.thisProgram&&(l=n.thisProgram),n.quit&&(d=n.quit),n.wasmBinary&&(f=n.wasmBinary),"object"!=typeof WebAssembly&&O("no native wasm support detected");var v,y,w,g,E,_,b,k,F=!1;function A(e,r){e||O(r)}function S(){var e=h.buffer;n.HEAP8=v=new Int8Array(e),n.HEAP16=w=new Int16Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=g=new Uint16Array(e),n.HEAP32=E=new Int32Array(e),n.HEAPU32=_=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=k=new Float64Array(e)}var D=[],P=[],T=[];function $(e){D.unshift(e)}function C(e){T.unshift(e)}var M=0,j=null;function x(e){M++,n.monitorRunDependencies&&n.monitorRunDependencies(M)}function R(e){if(M--,n.monitorRunDependencies&&n.monitorRunDependencies(M),0==M&&j){var r=j;j=null,r()}}function O(e){n.onAbort&&n.onAbort(e),p(e="Aborted("+e+")"),F=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}var z,W,N,L=e=>e.startsWith("data:application/octet-stream;base64,");function B(e){if(e==z&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function U(e,r,t){return function(e){return f||"function"!=typeof fetch?Promise.resolve().then((()=>B(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>B(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),O(e)}))}function I(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}L(z="lyr3DWorker.wasm")||(z=function(e){return n.locateFile?n.locateFile(e,c):c+e}(z));var H=e=>{for(;e.length>0;)e.shift()(n)},Y=n.noExitRuntime||!0;function q(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12|0]=e},this.get_caught=function(){return 0!=v[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13|0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){if(kr(this.get_type()))return _[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var V={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=V.isAbs(e),t="/"===e.substr(-1);return(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=V.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=V.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return V.normalize(e.join("/"))},join2:(e,r)=>V.normalize(e+"/"+r)},X=e=>(X=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);O("initRandomDevice")})())(e),G={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:ue.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=V.isAbs(n)}return(r?"/":"")+(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=G.resolve(e).substr(1),r=G.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},J="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&J)return J.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Z=[],Q=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},ee=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function re(e,r,t){var n=Q(e)+1,o=new Array(n),a=ee(e,o,0,o.length);return r&&(o.length=a),o}var te={ttys:[],init(){},shutdown(){},register(e,r){te.ttys[e]={input:[],output:[],ops:r},ue.registerDevice(e,te.stream_ops)},stream_ops:{open(e){var r=te.ttys[e.node.rdev];if(!r)throw new ue.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new ue.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new ue.ErrnoError(29)}if(void 0===s&&0===a)throw new ue.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new ue.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new ue.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!Z.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;Z=re(e,!0)}return Z.shift()})(),put_char(e,r){null===r||10===r?(m(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(m(K(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(K(e.output,0)),e.output=[])}}},ne=e=>{O()},oe={ops_table:null,mount:e=>oe.createNode(null,"/",16895,0),createNode(e,r,t,n){if(ue.isBlkdev(t)||ue.isFIFO(t))throw new ue.ErrnoError(63);oe.ops_table||(oe.ops_table={dir:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,lookup:oe.node_ops.lookup,mknod:oe.node_ops.mknod,rename:oe.node_ops.rename,unlink:oe.node_ops.unlink,rmdir:oe.node_ops.rmdir,readdir:oe.node_ops.readdir,symlink:oe.node_ops.symlink},stream:{llseek:oe.stream_ops.llseek}},file:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:{llseek:oe.stream_ops.llseek,read:oe.stream_ops.read,write:oe.stream_ops.write,allocate:oe.stream_ops.allocate,mmap:oe.stream_ops.mmap,msync:oe.stream_ops.msync}},link:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,readlink:oe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:ue.chrdev_stream_ops}});var o=ue.createNode(e,r,t,n);return ue.isDir(o.mode)?(o.node_ops=oe.ops_table.dir.node,o.stream_ops=oe.ops_table.dir.stream,o.contents={}):ue.isFile(o.mode)?(o.node_ops=oe.ops_table.file.node,o.stream_ops=oe.ops_table.file.stream,o.usedBytes=0,o.contents=null):ue.isLink(o.mode)?(o.node_ops=oe.ops_table.link.node,o.stream_ops=oe.ops_table.link.stream):ue.isChrdev(o.mode)&&(o.node_ops=oe.ops_table.chrdev.node,o.stream_ops=oe.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=ue.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,ue.isDir(e.mode)?r.size=4096:ue.isFile(e.mode)?r.size=e.usedBytes:ue.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&oe.resizeFileStorage(e,r.size)},lookup(e,r){throw ue.genericErrors[44]},mknod:(e,r,t,n)=>oe.createNode(e,r,t,n),rename(e,r,t){if(ue.isDir(e.mode)){var n;try{n=ue.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new ue.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=ue.lookupNode(e,r);for(var n in t.contents)throw new ue.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=oe.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!ue.isLink(e.mode))throw new ue.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(oe.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&ue.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new ue.ErrnoError(28);return n},allocate(e,r,t){oe.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!ue.isFile(e.node.mode))throw new ue.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ne()))throw new ue.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(oe.stream_ops.write(e,r,0,n,t,!1),0)}},ae=(e,r,t,n)=>{var o=`al ${e}`;s(e,(t=>{A(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&R()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&x()},ie=n.preloadPlugins||[],se=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},ue={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=G.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new ue.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=ue.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=ue.lookupNode(n,t[a]),o=V.join2(o,t[a]),ue.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;ue.isLink(n.mode);){var u=ue.readlink(o);if(o=G.resolve(V.dirname(o),u),n=ue.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new ue.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(ue.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%ue.nameTable.length},hashAddNode(e){var r=ue.hashName(e.parent.id,e.name);e.name_next=ue.nameTable[r],ue.nameTable[r]=e},hashRemoveNode(e){var r=ue.hashName(e.parent.id,e.name);if(ue.nameTable[r]===e)ue.nameTable[r]=e.name_next;else for(var t=ue.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=ue.mayLookup(e);if(t)throw new ue.ErrnoError(t,e);for(var n=ue.hashName(e.id,r),o=ue.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return ue.lookup(e,r)},createNode(e,r,t,n){var o=new ue.FSNode(e,r,t,n);return ue.hashAddNode(o),o},destroyNode(e){ue.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>ue.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>ue.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,r){try{return ue.lookupNode(e,r),20}catch(e){}return ue.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=ue.lookupNode(e,r)}catch(e){return e.errno}var o=ue.nodePermissions(e,"wx");if(o)return o;if(t){if(!ue.isDir(n.mode))return 54;if(ue.isRoot(n)||ue.getPath(n)===ue.cwd())return 10}else if(ue.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?ue.isLink(e.mode)?32:ue.isDir(e.mode)&&("r"!==ue.flagsToPermissionString(r)||512&r)?31:ue.nodePermissions(e,ue.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=ue.MAX_OPEN_FDS;e++)if(!ue.streams[e])return e;throw new ue.ErrnoError(33)},getStreamChecked(e){var r=ue.getStream(e);if(!r)throw new ue.ErrnoError(8);return r},getStream:e=>ue.streams[e],createStream:(e,r=-1)=>(ue.FSStream||(ue.FSStream=function(){this.shared={}},ue.FSStream.prototype={},Object.defineProperties(ue.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new ue.FSStream,e),-1==r&&(r=ue.nextfd()),e.fd=r,ue.streams[r]=e,e),closeStream(e){ue.streams[e]=null},chrdev_stream_ops:{open(e){var r=ue.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new ue.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){ue.devices[e]={stream_ops:r}},getDevice:e=>ue.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),ue.syncFSRequests++,ue.syncFSRequests>1&&p(`warning: ${ue.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=ue.getMounts(ue.root.mount),n=0;function o(e){return ue.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&ue.root)throw new ue.ErrnoError(10);if(!o&&!a){var i=ue.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ue.isMountpoint(n))throw new ue.ErrnoError(10);if(!ue.isDir(n.mode))throw new ue.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?ue.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=ue.lookupPath(e,{follow_mount:!1});if(!ue.isMountpoint(r.node))throw new ue.ErrnoError(28);var t=r.node,n=t.mounted,o=ue.getMounts(n);Object.keys(ue.nameTable).forEach((e=>{for(var r=ue.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&ue.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=ue.lookupPath(e,{parent:!0}).node,o=V.basename(e);if(!o||"."===o||".."===o)throw new ue.ErrnoError(28);var a=ue.mayCreate(n,o);if(a)throw new ue.ErrnoError(a);if(!n.node_ops.mknod)throw new ue.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,ue.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,ue.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ue.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,ue.mknod(e,r,t)),symlink(e,r){if(!G.resolve(e))throw new ue.ErrnoError(44);var t=ue.lookupPath(r,{parent:!0}).node;if(!t)throw new ue.ErrnoError(44);var n=V.basename(r),o=ue.mayCreate(t,n);if(o)throw new ue.ErrnoError(o);if(!t.node_ops.symlink)throw new ue.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=V.dirname(e),a=V.dirname(r),i=V.basename(e),s=V.basename(r);if(t=ue.lookupPath(e,{parent:!0}).node,n=ue.lookupPath(r,{parent:!0}).node,!t||!n)throw new ue.ErrnoError(44);if(t.mount!==n.mount)throw new ue.ErrnoError(75);var u,l=ue.lookupNode(t,i),d=G.relative(e,a);if("."!==d.charAt(0))throw new ue.ErrnoError(28);if("."!==(d=G.relative(r,o)).charAt(0))throw new ue.ErrnoError(55);try{u=ue.lookupNode(n,s)}catch(e){}if(l!==u){var c=ue.isDir(l.mode),f=ue.mayDelete(t,i,c);if(f)throw new ue.ErrnoError(f);if(f=u?ue.mayDelete(n,s,c):ue.mayCreate(n,s))throw new ue.ErrnoError(f);if(!t.node_ops.rename)throw new ue.ErrnoError(63);if(ue.isMountpoint(l)||u&&ue.isMountpoint(u))throw new ue.ErrnoError(10);if(n!==t&&(f=ue.nodePermissions(t,"w")))throw new ue.ErrnoError(f);ue.hashRemoveNode(l);try{t.node_ops.rename(l,n,s)}catch(e){throw e}finally{ue.hashAddNode(l)}}},rmdir(e){var r=ue.lookupPath(e,{parent:!0}).node,t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!0);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.rmdir)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.rmdir(r,t),ue.destroyNode(n)},readdir(e){var r=ue.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new ue.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=ue.lookupPath(e,{parent:!0}).node;if(!r)throw new ue.ErrnoError(44);var t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!1);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.unlink)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.unlink(r,t),ue.destroyNode(n)},readlink(e){var r=ue.lookupPath(e).node;if(!r)throw new ue.ErrnoError(44);if(!r.node_ops.readlink)throw new ue.ErrnoError(28);return G.resolve(ue.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=ue.lookupPath(e,{follow:!r}).node;if(!t)throw new ue.ErrnoError(44);if(!t.node_ops.getattr)throw new ue.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>ue.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?ue.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){ue.chmod(e,r,!0)},fchmod(e,r){var t=ue.getStreamChecked(e);ue.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?ue.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){ue.chown(e,r,t,!0)},fchown(e,r,t){var n=ue.getStreamChecked(e);ue.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new ue.ErrnoError(28);var t;if(!(t="string"==typeof e?ue.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);if(ue.isDir(t.mode))throw new ue.ErrnoError(31);if(!ue.isFile(t.mode))throw new ue.ErrnoError(28);var n=ue.nodePermissions(t,"w");if(n)throw new ue.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=ue.getStreamChecked(e);if(!(2097155&t.flags))throw new ue.ErrnoError(28);ue.truncate(t.node,r)},utime(e,r,t){var n=ue.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new ue.ErrnoError(44);var o;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)o=e;else{e=V.normalize(e);try{o=ue.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(o){if(128&r)throw new ue.ErrnoError(20)}else o=ue.mknod(e,t,0),a=!0;if(!o)throw new ue.ErrnoError(44);if(ue.isChrdev(o.mode)&&(r&=-513),65536&r&&!ue.isDir(o.mode))throw new ue.ErrnoError(54);if(!a){var i=ue.mayOpen(o,r);if(i)throw new ue.ErrnoError(i)}512&r&&!a&&ue.truncate(o,0),r&=-131713;var s=ue.createStream({node:o,path:ue.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&r||(ue.readFiles||(ue.readFiles={}),e in ue.readFiles||(ue.readFiles[e]=1)),s},close(e){if(ue.isClosed(e))throw new ue.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ue.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ue.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ue.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(1==(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.read)throw new ue.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.write)throw new ue.ErrnoError(28);e.seekable&&1024&e.flags&&ue.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(r<0||t<=0)throw new ue.ErrnoError(28);if(!(2097155&e.flags))throw new ue.ErrnoError(8);if(!ue.isFile(e.node.mode)&&!ue.isDir(e.node.mode))throw new ue.ErrnoError(43);if(!e.stream_ops.allocate)throw new ue.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new ue.ErrnoError(2);if(1==(2097155&e.flags))throw new ue.ErrnoError(2);if(!e.stream_ops.mmap)throw new ue.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new ue.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=ue.open(e,r.flags),o=ue.stat(e).size,a=new Uint8Array(o);return ue.read(n,a,0,o,0),"utf8"===r.encoding?t=K(a,0):"binary"===r.encoding&&(t=a),ue.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=ue.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Q(r)+1),a=ee(r,o,0,o.length);ue.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");ue.write(n,r,0,r.byteLength,void 0,t.canOwn)}ue.close(n)},cwd:()=>ue.currentPath,chdir(e){var r=ue.lookupPath(e,{follow:!0});if(null===r.node)throw new ue.ErrnoError(44);if(!ue.isDir(r.node.mode))throw new ue.ErrnoError(54);var t=ue.nodePermissions(r.node,"x");if(t)throw new ue.ErrnoError(t);ue.currentPath=r.path},createDefaultDirectories(){ue.mkdir("/tmp"),ue.mkdir("/home"),ue.mkdir("/home/web_user")},createDefaultDevices(){ue.mkdir("/dev"),ue.registerDevice(ue.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),ue.mkdev("/dev/null",ue.makedev(1,3)),te.register(ue.makedev(5,0),te.default_tty_ops),te.register(ue.makedev(6,0),te.default_tty1_ops),ue.mkdev("/dev/tty",ue.makedev(5,0)),ue.mkdev("/dev/tty1",ue.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=X(e).byteLength),e[--r]);ue.createDevice("/dev","random",t),ue.createDevice("/dev","urandom",t),ue.mkdir("/dev/shm"),ue.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ue.mkdir("/proc");var e=ue.mkdir("/proc/self");ue.mkdir("/proc/self/fd"),ue.mount({mount(){var r=ue.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=ue.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?ue.createDevice("/dev","stdin",n.stdin):ue.symlink("/dev/tty","/dev/stdin"),n.stdout?ue.createDevice("/dev","stdout",null,n.stdout):ue.symlink("/dev/tty","/dev/stdout"),n.stderr?ue.createDevice("/dev","stderr",null,n.stderr):ue.symlink("/dev/tty1","/dev/stderr"),ue.open("/dev/stdin",0),ue.open("/dev/stdout",1),ue.open("/dev/stderr",1)},ensureErrnoError(){ue.ErrnoError||(ue.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ue.ErrnoError.prototype=new Error,ue.ErrnoError.prototype.constructor=ue.ErrnoError,[44].forEach((e=>{ue.genericErrors[e]=new ue.ErrnoError(e),ue.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){ue.ensureErrnoError(),ue.nameTable=new Array(4096),ue.mount(oe,{},"/"),ue.createDefaultDirectories(),ue.createDefaultDevices(),ue.createSpecialDirectories(),ue.filesystems={MEMFS:oe}},init(e,r,t){ue.init.initialized=!0,ue.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=r||n.stdout,n.stderr=t||n.stderr,ue.createStandardStreams()},quit(){ue.init.initialized=!1;for(var e=0;e<ue.streams.length;e++){var r=ue.streams[e];r&&ue.close(r)}},findObject(e,r){var t=ue.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=ue.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ue.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=V.basename(e),n=ue.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:ue.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=V.join2(e,a);try{ue.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=V.join2("string"==typeof e?e:ue.getPath(e),r),i=se(n,o);return ue.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:ue.getPath(e),i=r?V.join2(e,r):e);var s=se(n,o),u=ue.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),d=0,c=t.length;d<c;++d)l[d]=t.charCodeAt(d);t=l}ue.chmod(u,146|s);var f=ue.open(u,577);ue.write(f,t,0,t.length,0,a),ue.close(f),ue.chmod(u,s)}return u},createDevice(e,r,t,n){var o=V.join2("string"==typeof e?e:ue.getPath(e),r),a=se(!!t,!!n);ue.createDevice.major||(ue.createDevice.major=64);var i=ue.makedev(ue.createDevice.major++,0);return ue.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new ue.ErrnoError(29)}if(void 0===u&&0===i)throw new ue.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new ue.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),ue.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=re(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ue.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):re(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=ue.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];u[e]=function(){return ue.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(ue.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{ue.forceLoadFile(s);var a=ne();if(!a)throw new ue.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s}},le=(e,r)=>e?K(y,e,r):"",de={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(V.isAbs(r))return r;var n;if(n=-100===e?ue.cwd():de.getStreamFromFD(e).path,0==r.length){if(!t)throw new ue.ErrnoError(44);return n}return V.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&V.normalize(r)!==V.normalize(ue.getPath(e.node)))return-54;throw e}E[t>>2]=n.dev,E[t+4>>2]=n.mode,_[t+8>>2]=n.nlink,E[t+12>>2]=n.uid,E[t+16>>2]=n.gid,E[t+20>>2]=n.rdev,N=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+24>>2]=N[0],E[t+28>>2]=N[1],E[t+32>>2]=4096,E[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return N=[Math.floor(o/1e3)>>>0,(W=Math.floor(o/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+40>>2]=N[0],E[t+44>>2]=N[1],_[t+48>>2]=o%1e3*1e3,N=[Math.floor(a/1e3)>>>0,(W=Math.floor(a/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+56>>2]=N[0],E[t+60>>2]=N[1],_[t+64>>2]=a%1e3*1e3,N=[Math.floor(i/1e3)>>>0,(W=Math.floor(i/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+72>>2]=N[0],E[t+76>>2]=N[1],_[t+80>>2]=i%1e3*1e3,N=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+88>>2]=N[0],E[t+92>>2]=N[1],0},doMsync(e,r,t,n,o){if(!ue.isFile(r.node.mode))throw new ue.ErrnoError(43);if(2&n)return 0;var a=y.slice(e,e+t);ue.msync(r,a,o,t,n)},varargs:void 0,get(){var e=E[+de.varargs>>2];return de.varargs+=4,e},getp:()=>de.get(),getStr:e=>le(e),getStreamFromFD:e=>ue.getStreamChecked(e)},ce={},fe=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function he(e){return this.fromWireType(E[e>>2])}var me,pe,ve,ye={},we={},ge={},Ee=e=>{throw new me(e)},_e=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Ee("Mismatched type converter count");for(var o=0;o<e.length;++o)Fe(e[o],n[o])}e.forEach((function(e){ge[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{we.hasOwnProperty(e)?o[r]=we[e]:(a.push(e),ye.hasOwnProperty(e)||(ye[e]=[]),ye[e].push((()=>{o[r]=we[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},be=e=>{for(var r="",t=e;y[t];)r+=pe[y[t++]];return r},ke=e=>{throw new ve(e)};function Fe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||ke(`type "${n}" must have a positive integer typeid pointer`),we.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ke(`Cannot register type '${n}' twice`)}if(we[e]=r,delete ge[e],ye.hasOwnProperty(e)){var o=ye[e];delete ye[e],o.forEach((e=>e()))}}(e,r,t)}function Ae(){this.allocated=[void 0],this.freelist=[]}var Se,De,Pe=new Ae,Te=e=>{e>=Pe.reserved&&0==--Pe.get(e).refcount&&Pe.free(e)},$e=e=>(e||ke("Cannot use deleted val. handle = "+e),Pe.get(e).value),Ce=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Pe.allocate({refcount:1,value:e})}},Me=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},je=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||ke(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},xe=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&ke(`Cannot register public name '${e}' twice`),je(n,e,e),n.hasOwnProperty(t)&&ke(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,void 0!==t&&(n[e].numArguments=t))},Re=(e,r,t)=>{n.hasOwnProperty(e)||Ee("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},Oe=[],ze=e=>{var r=Oe[e];return r||(e>=Oe.length&&(Oe.length=e+1),Oe[e]=r=Se.get(e)),r},We=(e,r)=>{var t=(e=be(e)).includes("j")?((e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),((e,r,t)=>e.includes("j")?((e,r,t)=>{var o=n["dynCall_"+e];return t&&t.length?o.apply(null,[r].concat(t)):o.call(null,r)})(e,r,t):ze(r).apply(null,t))(e,r,t)}})(e,r):ze(r);return"function"!=typeof t&&ke(`unknown function pointer with signature ${e}: ${r}`),t},Ne=e=>{var r=wr(e),t=be(r);return pr(r),t},Le=(e,r,t)=>{switch(r){case 1:return t?e=>v[0|e]:e=>y[0|e];case 2:return t?e=>w[e>>1]:e=>g[e>>1];case 4:return t?e=>E[e>>2]:e=>_[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}};function Be(e){return this.fromWireType(_[e>>2])}var Ue,Ie="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,He=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&g[n];)++n;if((t=n<<1)-e>32&&Ie)return Ie.decode(y.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=w[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Ye=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);w[r>>1]=i,r+=2}return w[r>>1]=0,r-n},qe=e=>2*e.length,Ve=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=E[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Xe=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),E[r>>2]=i,(r+=4)+4>o)break}return E[r>>2]=0,r-n},Ge=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Je=(e,r)=>{var t=we[e];return void 0===t&&ke(r+" has unknown type "+Ne(e)),t},Ke={},Ze=e=>{var r=Ke[e];return void 0===r?be(e):r},Qe=[],er=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof i.c&&e(i.c)?$$$embind_global$$$=i.c:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},rr=e=>{var r=(e-h.buffer.byteLength+65535)/65536;try{return h.grow(r),S(),1}catch(e){}},tr={},nr=()=>{if(!nr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var r in tr)void 0===tr[r]?delete e[r]:e[r]=tr[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);nr.strings=t}return nr.strings},or=e=>e%4==0&&(e%100!=0||e%400==0),ar=[31,29,31,30,31,30,31,31,30,31,30,31],ir=[31,28,31,30,31,30,31,31,30,31,30,31],sr=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},ur=[],lr=(e,r)=>{Se.set(e,r),Oe[e]=Se.get(e)},dr=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ue.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},cr=365,fr=146;Object.defineProperties(dr.prototype,{read:{get:function(){return(this.mode&cr)===cr},set:function(e){e?this.mode|=cr:this.mode&=~cr}},write:{get:function(){return(this.mode&fr)===fr},set:function(e){e?this.mode|=fr:this.mode&=~fr}},isFolder:{get:function(){return ue.isDir(this.mode)}},isDevice:{get:function(){return ue.isChrdev(this.mode)}}}),ue.FSNode=dr,ue.createPreloadedFile=(e,r,t,n,o,a,i,s,u,l)=>{var d=r?G.resolve(V.join2(e,r)):e;function c(t){function c(t){l&&l(),s||((e,r,t,n,o,a)=>{ue.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,u),a&&a(),R()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return ie.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,d,c,(()=>{i&&i(),R()}))||c(t)}x(),"string"==typeof t?ae(t,(e=>c(e)),i):c(t)},ue.staticInit(),n.FS_createPath=ue.createPath,n.FS_createDataFile=ue.createDataFile,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_unlink=ue.unlink,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,me=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);pe=e})(),ve=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(Ae.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Pe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Pe.reserved=Pe.allocated.length,n.count_emval_handles=()=>{for(var e=0,r=Pe.reserved;r<Pe.allocated.length;++r)void 0!==Pe.allocated[r]&&++e;return e},De=n.UnboundTypeError=((e,r)=>{var t=function(e,r){return e=(e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e})(e),{[e]:function(){return r.apply(this,arguments)}}[e]}(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError");var hr={m:(e,r,t)=>{throw new q(e).init(r,t),e},x:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 0:if((o=de.get())<0)return-28;for(;ue.streams[o];)o++;return ue.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=de.get();return n.flags|=o,0;case 5:return o=de.getp(),w[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return E[yr()>>2]=28,-1}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},N:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=de.getp();E[a>>2]=o.c_iflag||0,E[a+4>>2]=o.c_oflag||0,E[a+8>>2]=o.c_cflag||0,E[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17|0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=de.getp();var s=E[a>>2],u=E[a+4>>2],l=E[a+8>>2],d=E[a+12>>2],c=[];for(i=0;i<32;i++)c.push(v[a+i+17|0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:l,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=de.getp(),E[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=de.getp(),ue.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=de.getp(),w[a>>1]=f[0],w[a+2>>1]=f[1]}return 0;default:return-28}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},O:function(e,r,t,n){de.varargs=n;try{r=de.getStr(r),r=de.calculateAt(e,r);var o=n?de.get():0;return ue.open(r,t,o).fd}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},V:e=>{var r=ce[e];delete ce[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));_e([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,l=e[t+o.length],d=r.setter,c=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];d(c,e,l.toWireType(t,r)),fe(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:8,readValueFromPointer:he,destructorFunction:n}]}))},G:(e,r,t,n,o)=>{},R:(e,r,t,n)=>{Fe(e,{name:r=be(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},Q:(e,r)=>{Fe(e,{name:r=be(r),fromWireType:e=>{var r=$e(e);return Te(e),r},toWireType:(e,r)=>Ce(r),argPackAdvance:8,readValueFromPointer:he,destructorFunction:null})},z:(e,r,t)=>{Fe(e,{name:r=be(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:Me(r,t),destructorFunction:null})},r:(e,r,t,n,o,a,i)=>{var s=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(_[r+4*n>>2]);return t})(r,t);e=(e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(A(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e})(e=be(e)),o=We(n,o),xe(e,(function(){((e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||we[r]||(ge[r]?ge[r].forEach(e):(t.push(r),n[r]=!0))})),new De(`${e}: `+t.map(Ne).join([", "]))})(`Cannot call ${e} due to unbound types`,s)}),r-1),_e([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Re(e,function(e,r,t,n,o,a){var i=r.length;i<2&&ke("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&!1,u=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){u=!0;break}var d="void"!==r[0].name,c=i-2,f=new Array(c),h=[],m=[];return function(){var t;arguments.length!==c&&ke(`function ${e} called with ${arguments.length} arguments, expected ${c}`),m.length=0,h.length=s?2:1,h[0]=o,s&&(t=r[1].toWireType(m,this),h[1]=t);for(var a=0;a<c;++a)f[a]=r[a+2].toWireType(m,arguments[a]),h.push(f[a]);return function(e){if(u)fe(m);else for(var n=s?1:2;n<r.length;n++){var o=1===n?t:f[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(d)return r[0].fromWireType(e)}(n.apply(null,h))}}(e,n,0,o,a),r-1),[]}))},d:(e,r,t,n,o)=>{r=be(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:Le(r,t,0!==n),destructorFunction:null})},b:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=_[e>>2],t=_[e+4>>2];return new n(v.buffer,t,r)}Fe(e,{name:t=be(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},y:(e,r)=>{var t="std::string"===(r=be(r));Fe(e,{name:r,fromWireType(e){var r,n=_[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==y[s]){var u=le(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var l=new Array(n);for(i=0;i<n;++i)l[i]=String.fromCharCode(y[o+i]);r=l.join("")}return pr(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||ke("Cannot pass non-string to std::string"),n=t&&o?Q(r):r.length;var a=vr(4+n+1),i=a+4;if(_[a>>2]=n,t&&o)((e,r,t)=>{ee(e,y,r,t)})(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(pr(i),ke("String has UTF-16 code units that do not fit in 8 bits")),y[i+s]=u}else for(s=0;s<n;++s)y[i+s]=r[s];return null!==e&&e.push(pr,a),a},argPackAdvance:8,readValueFromPointer:Be,destructorFunction(e){pr(e)}})},p:(e,r,t)=>{var n,o,a,i,s;t=be(t),2===r?(n=He,o=Ye,i=qe,a=()=>g,s=1):4===r&&(n=Ve,o=Xe,i=Ge,a=()=>_,s=2),Fe(e,{name:t,fromWireType:e=>{for(var t,o=_[e>>2],i=a(),u=e+4,l=0;l<=o;++l){var d=e+4+l*r;if(l==o||0==i[d>>s]){var c=n(u,d-u);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),u=d+r}}return pr(e),t},toWireType:(e,n)=>{"string"!=typeof n&&ke(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=vr(4+a+r);return _[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(pr,u),u},argPackAdvance:8,readValueFromPointer:he,destructorFunction(e){pr(e)}})},W:(e,r,t,n,o,a)=>{ce[e]={name:be(r),rawConstructor:We(t,n),rawDestructor:We(o,a),fields:[]}},j:(e,r,t,n,o,a,i,s,u,l)=>{ce[e].fields.push({fieldName:be(r),getterReturnType:t,getter:We(n,o),getterContext:a,setterArgumentType:i,setter:We(s,u),setterContext:l})},S:(e,r)=>{Fe(e,{isVoid:!0,name:r=be(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},U:e=>{do{var r=_[e>>2],t=_[(e+=4)>>2],n=_[(e+=4)>>2];e+=4;var o=le(r);ue.createPath("/",V.dirname(o),!0,!0),ue.createDataFile(o,null,v.subarray(n,n+t),!0,!0,!0)}while(_[e>>2])},I:()=>{throw 1/0},Y:(e,r,t)=>{e=$e(e),r=Je(r,"emval::as");var n=[],o=Ce(n);return _[t>>2]=o,r.toWireType(n,e)},A:(e,r,t,n,o)=>{var a=[],i=(e=Qe[e])(r=$e(r),t=Ze(t),a,o);return a.length&&(_[n>>2]=Ce(a)),i},a:Te,Z:e=>0===e?Ce(er()):(e=Ze(e),Ce(er()[e])),B:(e,r)=>{var t=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Je(_[r+4*n>>2],"parameter "+n);return t})(e,r),n=t.shift();e--;var o=new Array(e);return(e=>{var r=Qe.length;return Qe.push(e),r})(((r,a,i,s)=>{for(var u=0,l=0;l<e;++l)o[l]=t[l].readValueFromPointer(s+u),u+=t[l].argPackAdvance;var d=r[a].apply(r,o);for(l=0;l<e;++l)t[l].deleteObject&&t[l].deleteObject(o[l]);return n.toWireType(i,d)}))},l:(e,r)=>(e=$e(e),r=$e(r),Ce(e[r])),g:e=>{e>4&&(Pe.get(e).refcount+=1)},C:()=>Ce([]),h:e=>Ce(Ze(e)),s:e=>{var r=$e(e);fe(r),Te(e)},X:(e,r,t)=>{e=$e(e),r=$e(r),t=$e(t),e[r]=t},k:(e,r)=>{var t=(e=Je(e,"_emval_take_value")).readValueFromPointer(r);return Ce(t)},q:()=>{O("")},P:(e,r,t)=>y.copyWithin(e,r,r+t),J:e=>{var r=y.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,o=1;o<=4;o*=2){var a=r*(1+.2/o);a=Math.min(a,e+100663296);var i=Math.min(t,n(Math.max(e,a),65536));if(rr(i))return!0}return!1},K:(e,r)=>{var t=0;return nr().forEach(((n,o)=>{var a=r+t;_[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)v[0|r++]=e.charCodeAt(t);v[0|r]=0})(n,a),t+=n.length+1})),0},L:(e,r)=>{var t=nr();_[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),_[r>>2]=n,0},T:(e,r)=>{(e=>{Y||(n.onExit&&n.onExit(e),F=!0),d(e,new I(e))})(e)},v:function(e){try{var r=de.getStreamFromFD(e);return ue.close(r),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},M:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.read(e,v,i,s,undefined);if(u<0)return-1;if(o+=u,u<s)break}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},F:function(e,r,t,n,o){var a=((e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN)(r,t);try{if(isNaN(a))return 61;var i=de.getStreamFromFD(e);return ue.llseek(i,a,n),N=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[o>>2]=N[0],E[o+4>>2]=N[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},w:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.write(e,v,i,s,undefined);if(u<0)return-1;o+=u}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},n:function(e,r){var t=_r();try{return ze(e)(r)}catch(e){if(br(t),e!==e+0)throw e;Er(1,0)}},i:function(e,r,t){var n=_r();try{return ze(e)(r,t)}catch(e){if(br(n),e!==e+0)throw e;Er(1,0)}},o:function(e,r,t,n){var o=_r();try{return ze(e)(r,t,n)}catch(e){if(br(o),e!==e+0)throw e;Er(1,0)}},t:function(e,r,t,n,o){var a=_r();try{return ze(e)(r,t,n,o)}catch(e){if(br(a),e!==e+0)throw e;Er(1,0)}},E:function(e,r,t,n,o,a,i,s,u,l){var d=_r();try{return ze(e)(r,t,n,o,a,i,s,u,l)}catch(e){if(br(d),e!==e+0)throw e;Er(1,0)}},u:function(e){var r=_r();try{ze(e)()}catch(e){if(br(r),e!==e+0)throw e;Er(1,0)}},c:function(e,r){var t=_r();try{ze(e)(r)}catch(e){if(br(t),e!==e+0)throw e;Er(1,0)}},D:function(e,r,t,n){var o=_r();try{ze(e)(r,t,n)}catch(e){if(br(o),e!==e+0)throw e;Er(1,0)}},e:function(e,r,t){var n=_r();try{ze(e)(r,t)}catch(e){if(br(n),e!==e+0)throw e;Er(1,0)}},f:function(e,r,t,n){var o=_r();try{ze(e)(r,t,n)}catch(e){if(br(o),e!==e+0)throw e;Er(1,0)}},H:(e,r,t,n,o)=>((e,r,t,n)=>{var o=_[n+40>>2],a={tm_sec:E[n>>2],tm_min:E[n+4>>2],tm_hour:E[n+8>>2],tm_mday:E[n+12>>2],tm_mon:E[n+16>>2],tm_year:E[n+20>>2],tm_wday:E[n+24>>2],tm_yday:E[n+28>>2],tm_isdst:E[n+32>>2],tm_gmtoff:E[n+36>>2],tm_zone:o?le(o):""},i=le(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function f(e,r){return c(e,r,"0")}function h(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function m(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=or(t.getFullYear()),o=t.getMonth(),a=(n?ar:ir)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=m(t),a=m(n);return h(o,r)<=0?h(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>f((e.tm_year+1900)/100|0,2),"%d":e=>f(e.tm_mday,2),"%e":e=>c(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>f(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":e=>f(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(or(e.tm_year+1900)?ar:ir,e.tm_mon-1),3),"%m":e=>f(e.tm_mon+1,2),"%M":e=>f(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>f(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&or(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&or(e.tm_year%400-1))&&r++}return f(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](a)));var w=re(i=i.replace(/\0\0/g,"%"),!1);return w.length>r?0:(((e,r)=>{v.set(e,r)})(w,e),w.length-1)})(e,r,t,n)},mr=function(){var e={a:hr};function r(e,r){return mr=e.exports,h=mr._,S(),Se=mr.aa,function(e){P.unshift(e)}(mr.$),R(),mr}if(x(),n.instantiateWasm)try{return n.instantiateWasm(e,r)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return function(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||L(r)||"function"!=typeof fetch?U(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),U(r,t,n)}))))}(f,z,e,(function(e){r(e.instance)})).catch(t),{}}(),pr=n._free=e=>(pr=n._free=mr.ba)(e),vr=n._malloc=e=>(vr=n._malloc=mr.ca)(e),yr=()=>(yr=mr.da)(),wr=e=>(wr=mr.ea)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=mr.fa)();var gr,Er=(e,r)=>(Er=mr.ga)(e,r),_r=()=>(_r=mr.ha)(),br=e=>(br=mr.ia)(e),kr=e=>(kr=mr.ja)(e);function Fr(){function e(){gr||(gr=!0,n.calledRun=!0,F||(n.noFSInit||ue.init.initialized||ue.init(),ue.ignorePermissions=!1,H(P),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)C(n.postRun.shift());H(T)}()))}M>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)$(n.preRun.shift());H(D)}(),M>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viji=(e,r,t,o,a)=>(n.dynCall_viji=mr.ka)(e,r,t,o,a),n.dynCall_ji=(e,r)=>(n.dynCall_ji=mr.la)(e,r),n.dynCall_jiji=(e,r,t,o,a)=>(n.dynCall_jiji=mr.ma)(e,r,t,o,a),n.dynCall_viijii=(e,r,t,o,a,i,s)=>(n.dynCall_viijii=mr.na)(e,r,t,o,a,i,s),n.dynCall_iiiiij=(e,r,t,o,a,i,s)=>(n.dynCall_iiiiij=mr.oa)(e,r,t,o,a,i,s),n.dynCall_iiiiijj=(e,r,t,o,a,i,s,u,l)=>(n.dynCall_iiiiijj=mr.pa)(e,r,t,o,a,i,s,u,l),n.dynCall_iiiiiijj=(e,r,t,o,a,i,s,u,l,d)=>(n.dynCall_iiiiiijj=mr.qa)(e,r,t,o,a,i,s,u,l,d),n.___emscripten_embedded_file_data=1273528,n.addRunDependency=x,n.removeRunDependency=R,n.FS_createPath=ue.createPath,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,n.addFunction=(e,r)=>{var t=(e=>(Ue||(Ue=new WeakMap,((e,r)=>{if(Ue)for(var t=0;t<0+r;t++){var n=ze(t);n&&Ue.set(n,t)}})(0,Se.length)),Ue.get(e)||0))(e);if(t)return t;var n=(()=>{if(ur.length)return ur.pop();try{Se.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return Se.length-1})();try{lr(n,e)}catch(t){if(!(t instanceof TypeError))throw t;var o=((e,r)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t})(r),e);var t=[1];((e,r)=>{var t=e.slice(0,1),n=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),sr(n.length,r);for(var a=0;a<n.length;++a)r.push(o[n[a]]);"v"==t?r.push(0):r.push(1,o[t])})(r,t);var n=[0,97,115,109,1,0,0,0,1];sr(t.length,n),n.push.apply(n,t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:e}}).exports.f})(e,r);lr(n,o)}return Ue.set(e,n),n},n.UTF8ToString=le,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_createDataFile=ue.createDataFile,n.FS_unlink=ue.unlink,j=function e(){gr||Fr(),gr||(j=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Fr(),e.ready},n.exports=a;const u=(0,i.g)(s.exports),l=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2343,1053],{11053:(e,r,t)=>{t.d(r,{c:()=>n,g:()=>o});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},2343:(e,r,t)=>{t.r(r),t.d(r,{l:()=>l});var n,o,a,i=t(11053),s={exports:{}};n=s,o="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,a=function(e={}){var r,t,n=e;n.ready=new Promise(((e,n)=>{r=e,t=n}));var a,s,u=Object.assign({},n),l="./this.program",d=(e,r)=>{throw r},c="";"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),o&&(c=o),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},s=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var f,h,m=n.print||console.log.bind(console),p=n.printErr||console.error.bind(console);Object.assign(n,u),u=null,n.arguments&&n.arguments,n.thisProgram&&(l=n.thisProgram),n.quit&&(d=n.quit),n.wasmBinary&&(f=n.wasmBinary),"object"!=typeof WebAssembly&&O("no native wasm support detected");var v,y,w,g,E,_,b,k,F=!1;function A(e,r){e||O(r)}function S(){var e=h.buffer;n.HEAP8=v=new Int8Array(e),n.HEAP16=w=new Int16Array(e),n.HEAPU8=y=new Uint8Array(e),n.HEAPU16=g=new Uint16Array(e),n.HEAP32=E=new Int32Array(e),n.HEAPU32=_=new Uint32Array(e),n.HEAPF32=b=new Float32Array(e),n.HEAPF64=k=new Float64Array(e)}var D=[],P=[],T=[];function $(e){D.unshift(e)}function C(e){T.unshift(e)}var M=0,j=null;function x(e){M++,n.monitorRunDependencies&&n.monitorRunDependencies(M)}function R(e){if(M--,n.monitorRunDependencies&&n.monitorRunDependencies(M),0==M&&j){var r=j;j=null,r()}}function O(e){n.onAbort&&n.onAbort(e),p(e="Aborted("+e+")"),F=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}var z,W,N,L=e=>e.startsWith("data:application/octet-stream;base64,");function B(e){if(e==z&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function U(e,r,t){return function(e){return f||"function"!=typeof fetch?Promise.resolve().then((()=>B(e))):fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>B(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),O(e)}))}function I(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}L(z="lyr3DWorker.wasm")||(z=function(e){return n.locateFile?n.locateFile(e,c):c+e}(z));var H=e=>{for(;e.length>0;)e.shift()(n)},Y=n.noExitRuntime||!0;function q(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12|0]=e},this.get_caught=function(){return 0!=v[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13|0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){if(kr(this.get_type()))return _[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var V={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=V.isAbs(e),t="/"===e.substr(-1);return(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=V.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=V.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return V.normalize(e.join("/"))},join2:(e,r)=>V.normalize(e+"/"+r)},X=e=>(X=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);O("initRandomDevice")})())(e),G={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:ue.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=V.isAbs(n)}return(r?"/":"")+(e=V.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=G.resolve(e).substr(1),r=G.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},J="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&J)return J.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Z=[],Q=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},ee=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function re(e,r,t){var n=Q(e)+1,o=new Array(n),a=ee(e,o,0,o.length);return r&&(o.length=a),o}var te={ttys:[],init(){},shutdown(){},register(e,r){te.ttys[e]={input:[],output:[],ops:r},ue.registerDevice(e,te.stream_ops)},stream_ops:{open(e){var r=te.ttys[e.node.rdev];if(!r)throw new ue.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new ue.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new ue.ErrnoError(29)}if(void 0===s&&0===a)throw new ue.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new ue.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(e){throw new ue.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>(()=>{if(!Z.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;Z=re(e,!0)}return Z.shift()})(),put_char(e,r){null===r||10===r?(m(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(m(K(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(K(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(K(e.output,0)),e.output=[])}}},ne=e=>{O()},oe={ops_table:null,mount:e=>oe.createNode(null,"/",16895,0),createNode(e,r,t,n){if(ue.isBlkdev(t)||ue.isFIFO(t))throw new ue.ErrnoError(63);oe.ops_table||(oe.ops_table={dir:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,lookup:oe.node_ops.lookup,mknod:oe.node_ops.mknod,rename:oe.node_ops.rename,unlink:oe.node_ops.unlink,rmdir:oe.node_ops.rmdir,readdir:oe.node_ops.readdir,symlink:oe.node_ops.symlink},stream:{llseek:oe.stream_ops.llseek}},file:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:{llseek:oe.stream_ops.llseek,read:oe.stream_ops.read,write:oe.stream_ops.write,allocate:oe.stream_ops.allocate,mmap:oe.stream_ops.mmap,msync:oe.stream_ops.msync}},link:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr,readlink:oe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:oe.node_ops.getattr,setattr:oe.node_ops.setattr},stream:ue.chrdev_stream_ops}});var o=ue.createNode(e,r,t,n);return ue.isDir(o.mode)?(o.node_ops=oe.ops_table.dir.node,o.stream_ops=oe.ops_table.dir.stream,o.contents={}):ue.isFile(o.mode)?(o.node_ops=oe.ops_table.file.node,o.stream_ops=oe.ops_table.file.stream,o.usedBytes=0,o.contents=null):ue.isLink(o.mode)?(o.node_ops=oe.ops_table.link.node,o.stream_ops=oe.ops_table.link.stream):ue.isChrdev(o.mode)&&(o.node_ops=oe.ops_table.chrdev.node,o.stream_ops=oe.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=ue.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,ue.isDir(e.mode)?r.size=4096:ue.isFile(e.mode)?r.size=e.usedBytes:ue.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&oe.resizeFileStorage(e,r.size)},lookup(e,r){throw ue.genericErrors[44]},mknod:(e,r,t,n)=>oe.createNode(e,r,t,n),rename(e,r,t){if(ue.isDir(e.mode)){var n;try{n=ue.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new ue.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=ue.lookupNode(e,r);for(var n in t.contents)throw new ue.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=oe.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!ue.isLink(e.mode))throw new ue.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(oe.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&ue.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new ue.ErrnoError(28);return n},allocate(e,r,t){oe.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!ue.isFile(e.node.mode))throw new ue.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ne()))throw new ue.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(oe.stream_ops.write(e,r,0,n,t,!1),0)}},ae=(e,r,t,n)=>{var o=`al ${e}`;s(e,(t=>{A(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&R()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&x()},ie=n.preloadPlugins||[],se=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},ue={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=G.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new ue.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=ue.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&r.parent)break;if(n=ue.lookupNode(n,t[a]),o=V.join2(o,t[a]),ue.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;ue.isLink(n.mode);){var u=ue.readlink(o);if(o=G.resolve(V.dirname(o),u),n=ue.lookupPath(o,{recurse_count:r.recurse_count+1}).node,s++>40)throw new ue.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(ue.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%ue.nameTable.length},hashAddNode(e){var r=ue.hashName(e.parent.id,e.name);e.name_next=ue.nameTable[r],ue.nameTable[r]=e},hashRemoveNode(e){var r=ue.hashName(e.parent.id,e.name);if(ue.nameTable[r]===e)ue.nameTable[r]=e.name_next;else for(var t=ue.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=ue.mayLookup(e);if(t)throw new ue.ErrnoError(t,e);for(var n=ue.hashName(e.id,r),o=ue.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return ue.lookup(e,r)},createNode(e,r,t,n){var o=new ue.FSNode(e,r,t,n);return ue.hashAddNode(o),o},destroyNode(e){ue.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>ue.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>ue.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate(e,r){try{return ue.lookupNode(e,r),20}catch(e){}return ue.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=ue.lookupNode(e,r)}catch(e){return e.errno}var o=ue.nodePermissions(e,"wx");if(o)return o;if(t){if(!ue.isDir(n.mode))return 54;if(ue.isRoot(n)||ue.getPath(n)===ue.cwd())return 10}else if(ue.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?ue.isLink(e.mode)?32:ue.isDir(e.mode)&&("r"!==ue.flagsToPermissionString(r)||512&r)?31:ue.nodePermissions(e,ue.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=ue.MAX_OPEN_FDS;e++)if(!ue.streams[e])return e;throw new ue.ErrnoError(33)},getStreamChecked(e){var r=ue.getStream(e);if(!r)throw new ue.ErrnoError(8);return r},getStream:e=>ue.streams[e],createStream:(e,r=-1)=>(ue.FSStream||(ue.FSStream=function(){this.shared={}},ue.FSStream.prototype={},Object.defineProperties(ue.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return!!(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new ue.FSStream,e),-1==r&&(r=ue.nextfd()),e.fd=r,ue.streams[r]=e,e),closeStream(e){ue.streams[e]=null},chrdev_stream_ops:{open(e){var r=ue.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new ue.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){ue.devices[e]={stream_ops:r}},getDevice:e=>ue.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),ue.syncFSRequests++,ue.syncFSRequests>1&&p(`warning: ${ue.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=ue.getMounts(ue.root.mount),n=0;function o(e){return ue.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&ue.root)throw new ue.ErrnoError(10);if(!o&&!a){var i=ue.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ue.isMountpoint(n))throw new ue.ErrnoError(10);if(!ue.isDir(n.mode))throw new ue.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?ue.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=ue.lookupPath(e,{follow_mount:!1});if(!ue.isMountpoint(r.node))throw new ue.ErrnoError(28);var t=r.node,n=t.mounted,o=ue.getMounts(n);Object.keys(ue.nameTable).forEach((e=>{for(var r=ue.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&ue.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=ue.lookupPath(e,{parent:!0}).node,o=V.basename(e);if(!o||"."===o||".."===o)throw new ue.ErrnoError(28);var a=ue.mayCreate(n,o);if(a)throw new ue.ErrnoError(a);if(!n.node_ops.mknod)throw new ue.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,ue.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,ue.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ue.mkdir(n,r)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,ue.mknod(e,r,t)),symlink(e,r){if(!G.resolve(e))throw new ue.ErrnoError(44);var t=ue.lookupPath(r,{parent:!0}).node;if(!t)throw new ue.ErrnoError(44);var n=V.basename(r),o=ue.mayCreate(t,n);if(o)throw new ue.ErrnoError(o);if(!t.node_ops.symlink)throw new ue.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=V.dirname(e),a=V.dirname(r),i=V.basename(e),s=V.basename(r);if(t=ue.lookupPath(e,{parent:!0}).node,n=ue.lookupPath(r,{parent:!0}).node,!t||!n)throw new ue.ErrnoError(44);if(t.mount!==n.mount)throw new ue.ErrnoError(75);var u,l=ue.lookupNode(t,i),d=G.relative(e,a);if("."!==d.charAt(0))throw new ue.ErrnoError(28);if("."!==(d=G.relative(r,o)).charAt(0))throw new ue.ErrnoError(55);try{u=ue.lookupNode(n,s)}catch(e){}if(l!==u){var c=ue.isDir(l.mode),f=ue.mayDelete(t,i,c);if(f)throw new ue.ErrnoError(f);if(f=u?ue.mayDelete(n,s,c):ue.mayCreate(n,s))throw new ue.ErrnoError(f);if(!t.node_ops.rename)throw new ue.ErrnoError(63);if(ue.isMountpoint(l)||u&&ue.isMountpoint(u))throw new ue.ErrnoError(10);if(n!==t&&(f=ue.nodePermissions(t,"w")))throw new ue.ErrnoError(f);ue.hashRemoveNode(l);try{t.node_ops.rename(l,n,s)}catch(e){throw e}finally{ue.hashAddNode(l)}}},rmdir(e){var r=ue.lookupPath(e,{parent:!0}).node,t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!0);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.rmdir)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.rmdir(r,t),ue.destroyNode(n)},readdir(e){var r=ue.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new ue.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=ue.lookupPath(e,{parent:!0}).node;if(!r)throw new ue.ErrnoError(44);var t=V.basename(e),n=ue.lookupNode(r,t),o=ue.mayDelete(r,t,!1);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.unlink)throw new ue.ErrnoError(63);if(ue.isMountpoint(n))throw new ue.ErrnoError(10);r.node_ops.unlink(r,t),ue.destroyNode(n)},readlink(e){var r=ue.lookupPath(e).node;if(!r)throw new ue.ErrnoError(44);if(!r.node_ops.readlink)throw new ue.ErrnoError(28);return G.resolve(ue.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=ue.lookupPath(e,{follow:!r}).node;if(!t)throw new ue.ErrnoError(44);if(!t.node_ops.getattr)throw new ue.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>ue.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?ue.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){ue.chmod(e,r,!0)},fchmod(e,r){var t=ue.getStreamChecked(e);ue.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?ue.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){ue.chown(e,r,t,!0)},fchown(e,r,t){var n=ue.getStreamChecked(e);ue.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new ue.ErrnoError(28);var t;if(!(t="string"==typeof e?ue.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new ue.ErrnoError(63);if(ue.isDir(t.mode))throw new ue.ErrnoError(31);if(!ue.isFile(t.mode))throw new ue.ErrnoError(28);var n=ue.nodePermissions(t,"w");if(n)throw new ue.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=ue.getStreamChecked(e);if(!(2097155&t.flags))throw new ue.ErrnoError(28);ue.truncate(t.node,r)},utime(e,r,t){var n=ue.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new ue.ErrnoError(44);var o;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&t|32768:0,"object"==typeof e)o=e;else{e=V.normalize(e);try{o=ue.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(o){if(128&r)throw new ue.ErrnoError(20)}else o=ue.mknod(e,t,0),a=!0;if(!o)throw new ue.ErrnoError(44);if(ue.isChrdev(o.mode)&&(r&=-513),65536&r&&!ue.isDir(o.mode))throw new ue.ErrnoError(54);if(!a){var i=ue.mayOpen(o,r);if(i)throw new ue.ErrnoError(i)}512&r&&!a&&ue.truncate(o,0),r&=-131713;var s=ue.createStream({node:o,path:ue.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!n.logReadFiles||1&r||(ue.readFiles||(ue.readFiles={}),e in ue.readFiles||(ue.readFiles[e]=1)),s},close(e){if(ue.isClosed(e))throw new ue.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{ue.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new ue.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ue.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(1==(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.read)throw new ue.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new ue.ErrnoError(28);if(ue.isClosed(e))throw new ue.ErrnoError(8);if(!(2097155&e.flags))throw new ue.ErrnoError(8);if(ue.isDir(e.node.mode))throw new ue.ErrnoError(31);if(!e.stream_ops.write)throw new ue.ErrnoError(28);e.seekable&&1024&e.flags&&ue.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new ue.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(ue.isClosed(e))throw new ue.ErrnoError(8);if(r<0||t<=0)throw new ue.ErrnoError(28);if(!(2097155&e.flags))throw new ue.ErrnoError(8);if(!ue.isFile(e.node.mode)&&!ue.isDir(e.node.mode))throw new ue.ErrnoError(43);if(!e.stream_ops.allocate)throw new ue.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new ue.ErrnoError(2);if(1==(2097155&e.flags))throw new ue.ErrnoError(2);if(!e.stream_ops.mmap)throw new ue.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new ue.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=ue.open(e,r.flags),o=ue.stat(e).size,a=new Uint8Array(o);return ue.read(n,a,0,o,0),"utf8"===r.encoding?t=K(a,0):"binary"===r.encoding&&(t=a),ue.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=ue.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Q(r)+1),a=ee(r,o,0,o.length);ue.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");ue.write(n,r,0,r.byteLength,void 0,t.canOwn)}ue.close(n)},cwd:()=>ue.currentPath,chdir(e){var r=ue.lookupPath(e,{follow:!0});if(null===r.node)throw new ue.ErrnoError(44);if(!ue.isDir(r.node.mode))throw new ue.ErrnoError(54);var t=ue.nodePermissions(r.node,"x");if(t)throw new ue.ErrnoError(t);ue.currentPath=r.path},createDefaultDirectories(){ue.mkdir("/tmp"),ue.mkdir("/home"),ue.mkdir("/home/web_user")},createDefaultDevices(){ue.mkdir("/dev"),ue.registerDevice(ue.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),ue.mkdev("/dev/null",ue.makedev(1,3)),te.register(ue.makedev(5,0),te.default_tty_ops),te.register(ue.makedev(6,0),te.default_tty1_ops),ue.mkdev("/dev/tty",ue.makedev(5,0)),ue.mkdev("/dev/tty1",ue.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=X(e).byteLength),e[--r]);ue.createDevice("/dev","random",t),ue.createDevice("/dev","urandom",t),ue.mkdir("/dev/shm"),ue.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ue.mkdir("/proc");var e=ue.mkdir("/proc/self");ue.mkdir("/proc/self/fd"),ue.mount({mount(){var r=ue.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=ue.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?ue.createDevice("/dev","stdin",n.stdin):ue.symlink("/dev/tty","/dev/stdin"),n.stdout?ue.createDevice("/dev","stdout",null,n.stdout):ue.symlink("/dev/tty","/dev/stdout"),n.stderr?ue.createDevice("/dev","stderr",null,n.stderr):ue.symlink("/dev/tty1","/dev/stderr"),ue.open("/dev/stdin",0),ue.open("/dev/stdout",1),ue.open("/dev/stderr",1)},ensureErrnoError(){ue.ErrnoError||(ue.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},ue.ErrnoError.prototype=new Error,ue.ErrnoError.prototype.constructor=ue.ErrnoError,[44].forEach((e=>{ue.genericErrors[e]=new ue.ErrnoError(e),ue.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){ue.ensureErrnoError(),ue.nameTable=new Array(4096),ue.mount(oe,{},"/"),ue.createDefaultDirectories(),ue.createDefaultDevices(),ue.createSpecialDirectories(),ue.filesystems={MEMFS:oe}},init(e,r,t){ue.init.initialized=!0,ue.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=r||n.stdout,n.stderr=t||n.stderr,ue.createStandardStreams()},quit(){ue.init.initialized=!1;for(var e=0;e<ue.streams.length;e++){var r=ue.streams[e];r&&ue.close(r)}},findObject(e,r){var t=ue.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=ue.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ue.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=V.basename(e),n=ue.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:ue.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=V.join2(e,a);try{ue.mkdir(i)}catch(e){}e=i}}return i},createFile(e,r,t,n,o){var a=V.join2("string"==typeof e?e:ue.getPath(e),r),i=se(n,o);return ue.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:ue.getPath(e),i=r?V.join2(e,r):e);var s=se(n,o),u=ue.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),d=0,c=t.length;d<c;++d)l[d]=t.charCodeAt(d);t=l}ue.chmod(u,146|s);var f=ue.open(u,577);ue.write(f,t,0,t.length,0,a),ue.close(f),ue.chmod(u,s)}return u},createDevice(e,r,t,n){var o=V.join2("string"==typeof e?e:ue.getPath(e),r),a=se(!!t,!!n);ue.createDevice.major||(ue.createDevice.major=64);var i=ue.makedev(ue.createDevice.major++,0);return ue.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(e){throw new ue.ErrnoError(29)}if(void 0===u&&0===i)throw new ue.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(e){throw new ue.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),ue.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=re(a(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new ue.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):re(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=ue.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];u[e]=function(){return ue.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(ue.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{ue.forceLoadFile(s);var a=ne();if(!a)throw new ue.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s}},le=(e,r)=>e?K(y,e,r):"",de={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(V.isAbs(r))return r;var n;if(n=-100===e?ue.cwd():de.getStreamFromFD(e).path,0==r.length){if(!t)throw new ue.ErrnoError(44);return n}return V.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&V.normalize(r)!==V.normalize(ue.getPath(e.node)))return-54;throw e}E[t>>2]=n.dev,E[t+4>>2]=n.mode,_[t+8>>2]=n.nlink,E[t+12>>2]=n.uid,E[t+16>>2]=n.gid,E[t+20>>2]=n.rdev,N=[n.size>>>0,(W=n.size,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+24>>2]=N[0],E[t+28>>2]=N[1],E[t+32>>2]=4096,E[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return N=[Math.floor(o/1e3)>>>0,(W=Math.floor(o/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+40>>2]=N[0],E[t+44>>2]=N[1],_[t+48>>2]=o%1e3*1e3,N=[Math.floor(a/1e3)>>>0,(W=Math.floor(a/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+56>>2]=N[0],E[t+60>>2]=N[1],_[t+64>>2]=a%1e3*1e3,N=[Math.floor(i/1e3)>>>0,(W=Math.floor(i/1e3),+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+72>>2]=N[0],E[t+76>>2]=N[1],_[t+80>>2]=i%1e3*1e3,N=[n.ino>>>0,(W=n.ino,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[t+88>>2]=N[0],E[t+92>>2]=N[1],0},doMsync(e,r,t,n,o){if(!ue.isFile(r.node.mode))throw new ue.ErrnoError(43);if(2&n)return 0;var a=y.slice(e,e+t);ue.msync(r,a,o,t,n)},varargs:void 0,get(){var e=E[+de.varargs>>2];return de.varargs+=4,e},getp:()=>de.get(),getStr:e=>le(e),getStreamFromFD:e=>ue.getStreamChecked(e)},ce={},fe=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function he(e){return this.fromWireType(E[e>>2])}var me,pe,ve,ye={},we={},ge={},Ee=e=>{throw new me(e)},_e=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Ee("Mismatched type converter count");for(var o=0;o<e.length;++o)Fe(e[o],n[o])}e.forEach((function(e){ge[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{we.hasOwnProperty(e)?o[r]=we[e]:(a.push(e),ye.hasOwnProperty(e)||(ye[e]=[]),ye[e].push((()=>{o[r]=we[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},be=e=>{for(var r="",t=e;y[t];)r+=pe[y[t++]];return r},ke=e=>{throw new ve(e)};function Fe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||ke(`type "${n}" must have a positive integer typeid pointer`),we.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ke(`Cannot register type '${n}' twice`)}if(we[e]=r,delete ge[e],ye.hasOwnProperty(e)){var o=ye[e];delete ye[e],o.forEach((e=>e()))}}(e,r,t)}function Ae(){this.allocated=[void 0],this.freelist=[]}var Se,De,Pe=new Ae,Te=e=>{e>=Pe.reserved&&0==--Pe.get(e).refcount&&Pe.free(e)},$e=e=>(e||ke("Cannot use deleted val. handle = "+e),Pe.get(e).value),Ce=e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Pe.allocate({refcount:1,value:e})}},Me=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},je=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||ke(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},xe=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&ke(`Cannot register public name '${e}' twice`),je(n,e,e),n.hasOwnProperty(t)&&ke(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,void 0!==t&&(n[e].numArguments=t))},Re=(e,r,t)=>{n.hasOwnProperty(e)||Ee("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},Oe=[],ze=e=>{var r=Oe[e];return r||(e>=Oe.length&&(Oe.length=e+1),Oe[e]=r=Se.get(e)),r},We=(e,r)=>{var t=(e=be(e)).includes("j")?((e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),((e,r,t)=>e.includes("j")?((e,r,t)=>{var o=n["dynCall_"+e];return t&&t.length?o.apply(null,[r].concat(t)):o.call(null,r)})(e,r,t):ze(r).apply(null,t))(e,r,t)}})(e,r):ze(r);return"function"!=typeof t&&ke(`unknown function pointer with signature ${e}: ${r}`),t},Ne=e=>{var r=wr(e),t=be(r);return pr(r),t},Le=(e,r,t)=>{switch(r){case 1:return t?e=>v[0|e]:e=>y[0|e];case 2:return t?e=>w[e>>1]:e=>g[e>>1];case 4:return t?e=>E[e>>2]:e=>_[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}};function Be(e){return this.fromWireType(_[e>>2])}var Ue,Ie="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,He=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&g[n];)++n;if((t=n<<1)-e>32&&Ie)return Ie.decode(y.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=w[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Ye=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);w[r>>1]=i,r+=2}return w[r>>1]=0,r-n},qe=e=>2*e.length,Ve=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=E[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Xe=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),E[r>>2]=i,(r+=4)+4>o)break}return E[r>>2]=0,r-n},Ge=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Je=(e,r)=>{var t=we[e];return void 0===t&&ke(r+" has unknown type "+Ne(e)),t},Ke={},Ze=e=>{var r=Ke[e];return void 0===r?be(e):r},Qe=[],er=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof i.c&&e(i.c)?$$$embind_global$$$=i.c:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},rr=e=>{var r=(e-h.buffer.byteLength+65535)/65536;try{return h.grow(r),S(),1}catch(e){}},tr={},nr=()=>{if(!nr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var r in tr)void 0===tr[r]?delete e[r]:e[r]=tr[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);nr.strings=t}return nr.strings},or=e=>e%4==0&&(e%100!=0||e%400==0),ar=[31,29,31,30,31,30,31,31,30,31,30,31],ir=[31,28,31,30,31,30,31,31,30,31,30,31],sr=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},ur=[],lr=(e,r)=>{Se.set(e,r),Oe[e]=Se.get(e)},dr=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ue.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},cr=365,fr=146;Object.defineProperties(dr.prototype,{read:{get:function(){return(this.mode&cr)===cr},set:function(e){e?this.mode|=cr:this.mode&=~cr}},write:{get:function(){return(this.mode&fr)===fr},set:function(e){e?this.mode|=fr:this.mode&=~fr}},isFolder:{get:function(){return ue.isDir(this.mode)}},isDevice:{get:function(){return ue.isChrdev(this.mode)}}}),ue.FSNode=dr,ue.createPreloadedFile=(e,r,t,n,o,a,i,s,u,l)=>{var d=r?G.resolve(V.join2(e,r)):e;function c(t){function c(t){l&&l(),s||((e,r,t,n,o,a)=>{ue.createDataFile(e,r,t,n,o,a)})(e,r,t,n,o,u),a&&a(),R()}((e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return ie.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o})(t,d,c,(()=>{i&&i(),R()}))||c(t)}x(),"string"==typeof t?ae(t,(e=>c(e)),i):c(t)},ue.staticInit(),n.FS_createPath=ue.createPath,n.FS_createDataFile=ue.createDataFile,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_unlink=ue.unlink,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,me=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);pe=e})(),ve=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Object.assign(Ae.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),Pe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Pe.reserved=Pe.allocated.length,n.count_emval_handles=()=>{for(var e=0,r=Pe.reserved;r<Pe.allocated.length;++r)void 0!==Pe.allocated[r]&&++e;return e},De=n.UnboundTypeError=((e,r)=>{var t=function(e,r){return e=(e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e})(e),{[e]:function(){return r.apply(this,arguments)}}[e]}(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError");var hr={m:(e,r,t)=>{throw new q(e).init(r,t),e},x:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 0:if((o=de.get())<0)return-28;for(;ue.streams[o];)o++;return ue.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=de.get();return n.flags|=o,0;case 5:return o=de.getp(),w[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return E[yr()>>2]=28,-1}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},N:function(e,r,t){de.varargs=t;try{var n=de.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=de.getp();E[a>>2]=o.c_iflag||0,E[a+4>>2]=o.c_oflag||0,E[a+8>>2]=o.c_cflag||0,E[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17|0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=de.getp();var s=E[a>>2],u=E[a+4>>2],l=E[a+8>>2],d=E[a+12>>2],c=[];for(i=0;i<32;i++)c.push(v[a+i+17|0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:l,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=de.getp(),E[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=de.getp(),ue.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=de.getp(),w[a>>1]=f[0],w[a+2>>1]=f[1]}return 0;default:return-28}}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},O:function(e,r,t,n){de.varargs=n;try{r=de.getStr(r),r=de.calculateAt(e,r);var o=n?de.get():0;return ue.open(r,t,o).fd}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return-e.errno}},V:e=>{var r=ce[e];delete ce[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));_e([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,l=e[t+o.length],d=r.setter,c=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];d(c,e,l.toWireType(t,r)),fe(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:8,readValueFromPointer:he,destructorFunction:n}]}))},G:(e,r,t,n,o)=>{},R:(e,r,t,n)=>{Fe(e,{name:r=be(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(y[e])},destructorFunction:null})},Q:(e,r)=>{Fe(e,{name:r=be(r),fromWireType:e=>{var r=$e(e);return Te(e),r},toWireType:(e,r)=>Ce(r),argPackAdvance:8,readValueFromPointer:he,destructorFunction:null})},z:(e,r,t)=>{Fe(e,{name:r=be(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:Me(r,t),destructorFunction:null})},r:(e,r,t,n,o,a,i)=>{var s=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(_[r+4*n>>2]);return t})(r,t);e=(e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(A(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e})(e=be(e)),o=We(n,o),xe(e,(function(){((e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||we[r]||(ge[r]?ge[r].forEach(e):(t.push(r),n[r]=!0))})),new De(`${e}: `+t.map(Ne).join([", "]))})(`Cannot call ${e} due to unbound types`,s)}),r-1),_e([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Re(e,function(e,r,t,n,o,a){var i=r.length;i<2&&ke("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&!1,u=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){u=!0;break}var d="void"!==r[0].name,c=i-2,f=new Array(c),h=[],m=[];return function(){var t;arguments.length!==c&&ke(`function ${e} called with ${arguments.length} arguments, expected ${c}`),m.length=0,h.length=s?2:1,h[0]=o,s&&(t=r[1].toWireType(m,this),h[1]=t);for(var a=0;a<c;++a)f[a]=r[a+2].toWireType(m,arguments[a]),h.push(f[a]);return function(e){if(u)fe(m);else for(var n=s?1:2;n<r.length;n++){var o=1===n?t:f[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(d)return r[0].fromWireType(e)}(n.apply(null,h))}}(e,n,0,o,a),r-1),[]}))},c:(e,r,t,n,o)=>{r=be(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned");Fe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:Le(r,t,0!==n),destructorFunction:null})},b:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=_[e>>2],t=_[e+4>>2];return new n(v.buffer,t,r)}Fe(e,{name:t=be(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},y:(e,r)=>{var t="std::string"===(r=be(r));Fe(e,{name:r,fromWireType(e){var r,n=_[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==y[s]){var u=le(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var l=new Array(n);for(i=0;i<n;++i)l[i]=String.fromCharCode(y[o+i]);r=l.join("")}return pr(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||ke("Cannot pass non-string to std::string"),n=t&&o?Q(r):r.length;var a=vr(4+n+1),i=a+4;if(_[a>>2]=n,t&&o)((e,r,t)=>{ee(e,y,r,t)})(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(pr(i),ke("String has UTF-16 code units that do not fit in 8 bits")),y[i+s]=u}else for(s=0;s<n;++s)y[i+s]=r[s];return null!==e&&e.push(pr,a),a},argPackAdvance:8,readValueFromPointer:Be,destructorFunction(e){pr(e)}})},p:(e,r,t)=>{var n,o,a,i,s;t=be(t),2===r?(n=He,o=Ye,i=qe,a=()=>g,s=1):4===r&&(n=Ve,o=Xe,i=Ge,a=()=>_,s=2),Fe(e,{name:t,fromWireType:e=>{for(var t,o=_[e>>2],i=a(),u=e+4,l=0;l<=o;++l){var d=e+4+l*r;if(l==o||0==i[d>>s]){var c=n(u,d-u);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),u=d+r}}return pr(e),t},toWireType:(e,n)=>{"string"!=typeof n&&ke(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=vr(4+a+r);return _[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(pr,u),u},argPackAdvance:8,readValueFromPointer:he,destructorFunction(e){pr(e)}})},W:(e,r,t,n,o,a)=>{ce[e]={name:be(r),rawConstructor:We(t,n),rawDestructor:We(o,a),fields:[]}},j:(e,r,t,n,o,a,i,s,u,l)=>{ce[e].fields.push({fieldName:be(r),getterReturnType:t,getter:We(n,o),getterContext:a,setterArgumentType:i,setter:We(s,u),setterContext:l})},S:(e,r)=>{Fe(e,{isVoid:!0,name:r=be(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},U:e=>{do{var r=_[e>>2],t=_[(e+=4)>>2],n=_[(e+=4)>>2];e+=4;var o=le(r);ue.createPath("/",V.dirname(o),!0,!0),ue.createDataFile(o,null,v.subarray(n,n+t),!0,!0,!0)}while(_[e>>2])},I:()=>{throw 1/0},Y:(e,r,t)=>{e=$e(e),r=Je(r,"emval::as");var n=[],o=Ce(n);return _[t>>2]=o,r.toWireType(n,e)},A:(e,r,t,n,o)=>{var a=[],i=(e=Qe[e])(r=$e(r),t=Ze(t),a,o);return a.length&&(_[n>>2]=Ce(a)),i},a:Te,Z:e=>0===e?Ce(er()):(e=Ze(e),Ce(er()[e])),B:(e,r)=>{var t=((e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Je(_[r+4*n>>2],"parameter "+n);return t})(e,r),n=t.shift();e--;var o=new Array(e);return(e=>{var r=Qe.length;return Qe.push(e),r})(((r,a,i,s)=>{for(var u=0,l=0;l<e;++l)o[l]=t[l].readValueFromPointer(s+u),u+=t[l].argPackAdvance;var d=r[a].apply(r,o);for(l=0;l<e;++l)t[l].deleteObject&&t[l].deleteObject(o[l]);return n.toWireType(i,d)}))},l:(e,r)=>(e=$e(e),r=$e(r),Ce(e[r])),g:e=>{e>4&&(Pe.get(e).refcount+=1)},C:()=>Ce([]),h:e=>Ce(Ze(e)),s:e=>{var r=$e(e);fe(r),Te(e)},X:(e,r,t)=>{e=$e(e),r=$e(r),t=$e(t),e[r]=t},k:(e,r)=>{var t=(e=Je(e,"_emval_take_value")).readValueFromPointer(r);return Ce(t)},q:()=>{O("")},P:(e,r,t)=>y.copyWithin(e,r,r+t),J:e=>{var r=y.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,o=1;o<=4;o*=2){var a=r*(1+.2/o);a=Math.min(a,e+100663296);var i=Math.min(t,n(Math.max(e,a),65536));if(rr(i))return!0}return!1},K:(e,r)=>{var t=0;return nr().forEach(((n,o)=>{var a=r+t;_[e+4*o>>2]=a,((e,r)=>{for(var t=0;t<e.length;++t)v[0|r++]=e.charCodeAt(t);v[0|r]=0})(n,a),t+=n.length+1})),0},L:(e,r)=>{var t=nr();_[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),_[r>>2]=n,0},T:(e,r)=>{(e=>{Y||(n.onExit&&n.onExit(e),F=!0),d(e,new I(e))})(e)},v:function(e){try{var r=de.getStreamFromFD(e);return ue.close(r),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},M:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.read(e,v,i,s,undefined);if(u<0)return-1;if(o+=u,u<s)break}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},F:function(e,r,t,n,o){var a=((e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN)(r,t);try{if(isNaN(a))return 61;var i=de.getStreamFromFD(e);return ue.llseek(i,a,n),N=[i.position>>>0,(W=i.position,+Math.abs(W)>=1?W>0?+Math.floor(W/4294967296)>>>0:~~+Math.ceil((W-+(~~W>>>0))/4294967296)>>>0:0)],E[o>>2]=N[0],E[o+4>>2]=N[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},w:function(e,r,t,n){try{var o=((e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=ue.write(e,v,i,s,undefined);if(u<0)return-1;o+=u}return o})(de.getStreamFromFD(e),r,t);return _[n>>2]=o,0}catch(e){if(void 0===ue||"ErrnoError"!==e.name)throw e;return e.errno}},n:function(e,r){var t=_r();try{return ze(e)(r)}catch(e){if(br(t),e!==e+0)throw e;Er(1,0)}},i:function(e,r,t){var n=_r();try{return ze(e)(r,t)}catch(e){if(br(n),e!==e+0)throw e;Er(1,0)}},o:function(e,r,t,n){var o=_r();try{return ze(e)(r,t,n)}catch(e){if(br(o),e!==e+0)throw e;Er(1,0)}},t:function(e,r,t,n,o){var a=_r();try{return ze(e)(r,t,n,o)}catch(e){if(br(a),e!==e+0)throw e;Er(1,0)}},E:function(e,r,t,n,o,a,i,s,u,l){var d=_r();try{return ze(e)(r,t,n,o,a,i,s,u,l)}catch(e){if(br(d),e!==e+0)throw e;Er(1,0)}},u:function(e){var r=_r();try{ze(e)()}catch(e){if(br(r),e!==e+0)throw e;Er(1,0)}},d:function(e,r){var t=_r();try{ze(e)(r)}catch(e){if(br(t),e!==e+0)throw e;Er(1,0)}},D:function(e,r,t,n){var o=_r();try{ze(e)(r,t,n)}catch(e){if(br(o),e!==e+0)throw e;Er(1,0)}},e:function(e,r,t){var n=_r();try{ze(e)(r,t)}catch(e){if(br(n),e!==e+0)throw e;Er(1,0)}},f:function(e,r,t,n){var o=_r();try{ze(e)(r,t,n)}catch(e){if(br(o),e!==e+0)throw e;Er(1,0)}},H:(e,r,t,n,o)=>((e,r,t,n)=>{var o=_[n+40>>2],a={tm_sec:E[n>>2],tm_min:E[n+4>>2],tm_hour:E[n+8>>2],tm_mday:E[n+12>>2],tm_mon:E[n+16>>2],tm_year:E[n+20>>2],tm_wday:E[n+24>>2],tm_yday:E[n+28>>2],tm_isdst:E[n+32>>2],tm_gmtoff:E[n+36>>2],tm_zone:o?le(o):""},i=le(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function f(e,r){return c(e,r,"0")}function h(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function m(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=or(t.getFullYear()),o=t.getMonth(),a=(n?ar:ir)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=m(t),a=m(n);return h(o,r)<=0?h(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var y={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>f((e.tm_year+1900)/100|0,2),"%d":e=>f(e.tm_mday,2),"%e":e=>c(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>f(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":e=>f(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(or(e.tm_year+1900)?ar:ir,e.tm_mon-1),3),"%m":e=>f(e.tm_mon+1,2),"%M":e=>f(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>f(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&or(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&or(e.tm_year%400-1))&&r++}return f(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),y)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),y[u](a)));var w=re(i=i.replace(/\0\0/g,"%"),!1);return w.length>r?0:(((e,r)=>{v.set(e,r)})(w,e),w.length-1)})(e,r,t,n)},mr=function(){var e={a:hr};function r(e,r){return mr=e.exports,h=mr._,S(),Se=mr.aa,function(e){P.unshift(e)}(mr.$),R(),mr}if(x(),n.instantiateWasm)try{return n.instantiateWasm(e,r)}catch(e){p(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return function(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||L(r)||"function"!=typeof fetch?U(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),U(r,t,n)}))))}(f,z,e,(function(e){r(e.instance)})).catch(t),{}}(),pr=n._free=e=>(pr=n._free=mr.ba)(e),vr=n._malloc=e=>(vr=n._malloc=mr.ca)(e),yr=()=>(yr=mr.da)(),wr=e=>(wr=mr.ea)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=mr.fa)();var gr,Er=(e,r)=>(Er=mr.ga)(e,r),_r=()=>(_r=mr.ha)(),br=e=>(br=mr.ia)(e),kr=e=>(kr=mr.ja)(e);function Fr(){function e(){gr||(gr=!0,n.calledRun=!0,F||(n.noFSInit||ue.init.initialized||ue.init(),ue.ignorePermissions=!1,H(P),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)C(n.postRun.shift());H(T)}()))}M>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)$(n.preRun.shift());H(D)}(),M>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viji=(e,r,t,o,a)=>(n.dynCall_viji=mr.ka)(e,r,t,o,a),n.dynCall_ji=(e,r)=>(n.dynCall_ji=mr.la)(e,r),n.dynCall_jiji=(e,r,t,o,a)=>(n.dynCall_jiji=mr.ma)(e,r,t,o,a),n.dynCall_viijii=(e,r,t,o,a,i,s)=>(n.dynCall_viijii=mr.na)(e,r,t,o,a,i,s),n.dynCall_iiiiij=(e,r,t,o,a,i,s)=>(n.dynCall_iiiiij=mr.oa)(e,r,t,o,a,i,s),n.dynCall_iiiiijj=(e,r,t,o,a,i,s,u,l)=>(n.dynCall_iiiiijj=mr.pa)(e,r,t,o,a,i,s,u,l),n.dynCall_iiiiiijj=(e,r,t,o,a,i,s,u,l,d)=>(n.dynCall_iiiiiijj=mr.qa)(e,r,t,o,a,i,s,u,l,d),n.___emscripten_embedded_file_data=1273528,n.addRunDependency=x,n.removeRunDependency=R,n.FS_createPath=ue.createPath,n.FS_createLazyFile=ue.createLazyFile,n.FS_createDevice=ue.createDevice,n.addFunction=(e,r)=>{var t=(e=>(Ue||(Ue=new WeakMap,((e,r)=>{if(Ue)for(var t=0;t<0+r;t++){var n=ze(t);n&&Ue.set(n,t)}})(0,Se.length)),Ue.get(e)||0))(e);if(t)return t;var n=(()=>{if(ur.length)return ur.pop();try{Se.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return Se.length-1})();try{lr(n,e)}catch(t){if(!(t instanceof TypeError))throw t;var o=((e,r)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function((e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t})(r),e);var t=[1];((e,r)=>{var t=e.slice(0,1),n=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),sr(n.length,r);for(var a=0;a<n.length;++a)r.push(o[n[a]]);"v"==t?r.push(0):r.push(1,o[t])})(r,t);var n=[0,97,115,109,1,0,0,0,1];sr(t.length,n),n.push.apply(n,t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:e}}).exports.f})(e,r);lr(n,o)}return Ue.set(e,n),n},n.UTF8ToString=le,n.FS_createPreloadedFile=ue.createPreloadedFile,n.FS_createDataFile=ue.createDataFile,n.FS_unlink=ue.unlink,j=function e(){gr||Fr(),gr||(j=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Fr(),e.ready},n.exports=a;const u=(0,i.g)(s.exports),l=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1737],{70668:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(90237),s=i(69540),n=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),d=i(40608),u=i(73133);let p=class extends((0,s.O)(n.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,r._)([(0,l.e)(u.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,r._)([(0,d.$)("esri.TimeInterval")],p);const c=p},54239:(e,t,i)=>{i.d(t,{A:()=>w});var r,s=i(90237),n=i(4576),o=i(66552),a=i(25482),l=i(83047),d=i(67076),u=i(10107),p=(i(44208),i(53966),i(36005)),c=i(40608),h=i(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,n.Xy)(f,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=r=class extends a.oY{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return y.write(e,t,i)}readHeightModel(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return m.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||m.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,h.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=r=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],g);const w=g},13899:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ee});var r=i(90237),s=i(52106),n=i(13874),o=(i(86162),i(94409),i(65345),i(42980),i(39290),i(92438),i(96576),i(93618),i(65494),i(15036)),a=i(69540),l=i(5503),d=i(49186),u=i(53966),p=i(92071),c=i(74887),h=i(36708),y=i(10107),f=(i(44208),i(87811),i(88620)),m=i(36005),g=i(40608),v=i(35666),w=i(1535),I=i(86738),_=i(4146),b=i(55726),F=i(52136),A=i(18768),S=i(69208),M=i(47685),L=i(16131),x=i(8303),T=i(25036),E=i(58947),O=i(82935),j=i(60945),Z=i(70668),P=i(25482),U=i(30524);function R({associatedLayer:e,serviceUpdateTimeStamp:t}){const i=e?.editingInfo?.lastEditDate,r=e?.serverGens,s=null!=i,n=null!=t,o=s&&n&&t.lastUpdate!==i.getTime();return s&&(o||!n&&r?.minServerGen!==r?.serverGen)}var $=i(96184);const D=e=>{let t=class extends e{constructor(){super(...arguments),this.serviceTimeInfo=null}get timeInfo(){const e=this.associatedLayer?.timeInfo;if(null==e)return null;const t=e.clone();return(0,U.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,U.sv)(e,this.fieldsIndex),this._override("timeInfo",e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}async loadTimeInfoFromService(e){const{serviceTimeInfo:t}=this;if(null==t)return;const{startTimeField:i,endTimeField:r}=t;if(null==i&&null==r)return;if(R({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;const s=async t=>{let r=null;try{const i=await(this.fetchStatistics?.(t,e));r=i?.stats}catch{}if(null==r)return null;const{minTimeStr:s,min:n,maxTimeStr:o,max:a}=r,l=t===i?s??n:o??a;return null!=l?new Date(l):null},[n,o]=await Promise.all([s(i),s(r)]);if(null!=i&&null==n||null!=r&&null==o)return;const a=new j.A({start:n,end:o});this.setAtOrigin("timeInfo",new $.A({endField:r,startField:i,fullTimeExtent:a}),"service")}};return(0,r._)([(0,y.MZ)({type:$.A,json:{read:!1,write:!1}})],t.prototype,"timeInfo",null),(0,r._)([(0,y.MZ)({type:j.A,json:{read:!1,write:!1}})],t.prototype,"timeExtent",null),(0,r._)([(0,y.MZ)({type:Z.A,json:{read:!1,write:!1}})],t.prototype,"timeOffset",null),(0,r._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],t.prototype,"datesInUnknownTimezone",null),(0,r._)([(0,y.MZ)({type:N,readOnly:!0,json:{read:{source:"timeInfo"}}})],t.prototype,"serviceTimeInfo",void 0),t=(0,r._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer")],t),t};let N=class extends P.oY{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,r._)([(0,y.MZ)({type:String})],N.prototype,"endTimeField",void 0),(0,r._)([(0,y.MZ)({type:String})],N.prototype,"startTimeField",void 0),N=(0,r._)([(0,g.$)("esri.layers.mixins.TemporalSceneLayer.SceneServiceTimeInfo")],N);var C=i(60694),k=i(92009),H=i(4071),q=i(10873),V=i(15426),G=i(40530),K=i(67202),Q=i(17036),W=i(95466),J=i(50805),B=i(20557),Y=i(81457),z=i(39383),X=i(37352),ee=i(4513);let te=class extends P.oY{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,r._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"name",void 0),(0,r._)([(0,y.MZ)({type:String,json:{read:!0,write:!0}})],te.prototype,"field",void 0),(0,r._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"currentRangeExtent",void 0),(0,r._)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"fullRangeExtent",void 0),(0,r._)([(0,y.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],te.prototype,"type",void 0),te=(0,r._)([(0,g.$)("esri.layers.support.RangeInfo")],te);var ie,re=i(78888),se=i(4718),ne=i(87024),oe=i(67076),ae=i(39829),le=i(57251);let de=ie=class extends((0,P.Te)(l.A.ofType(ae.A))){constructor(e){super(e)}clone(){return new ie(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((i=>{if(!t.equals(i.spatialReference)){if(!(0,le.canProjectWithoutEngine)(i.spatialReference,t))return e?.messages&&e.messages.push(new oe.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const r=new ae.A;(0,le.projectPolygon)(i,r,t),i=r}const r=i.toJSON(e);return delete r.spatialReference,r})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new oe.A("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const i=new ie;return e.forEach((e=>i.add(ae.A.fromJSON(e,t)))),i}};de=ie=(0,r._)([(0,g.$)("esri.layers.support.PolygonCollection")],de);const ue=de;var pe,ce=i(97159);let he=pe=class extends P.oY{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ue,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.OH))}readGeometries(e,t,i){Array.isArray(e)?this.geometries=ue.fromJSON(e,i):this._geometriesSource={url:(0,ce.f)(e,i),context:i}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:i,context:r}=this._geometriesSource,s=await(0,re.A)(i,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=ue.fromJSON(o,r),this._geometriesSource=null}clone(){const e=new pe({geometries:(0,se.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,r._)([(0,y.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],he.prototype,"spatialRelationship",void 0),(0,r._)([(0,y.MZ)({type:ue,nonNullable:!0,json:{write:!0}}),(0,ne.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],he.prototype,"geometries",void 0),(0,r._)([(0,m.w)(["web-scene","portal-item"],"geometries")],he.prototype,"readGeometries",null),he=pe=(0,r._)([(0,g.$)("esri.layers.support.SceneFilter")],he);const ye=he;var fe=i(84952),me=i(8947),ge=i(61956),ve=i(24212),we=i(30291);async function Ie(e){const t=[];for(const i of e)i.name.toLowerCase().endsWith(".zip")?t.push(_e(i)):t.push(Promise.resolve(i));return(await Promise.all(t)).flat()}async function _e(e){const{BlobReader:t,ZipReader:r,BlobWriter:s}=await Promise.all([i.e(8392),i.e(9588)]).then(i.bind(i,9588)),n=[],o=new r(new t(e));return(await o.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,i=e.getData?.(t).then((t=>new File([t],e.filename)));i&&n.push(i)})),Promise.all(n)}var be=i(28030),Fe=i(45671),Ae=i(78553);const Se=new Set(["3DObject","Point"]),Me=(0,Q.p)();let Le=class extends(D((0,M.w6)((0,E.w6)((0,A.b)((0,L.q)((0,x.A)((0,T.j)((0,p.P)((0,S.d)((0,F.p)((0,a.O)(_.A)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new l.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const i=this.getFeatureType(t?.feature)?.domains?.[e];return i&&"inherited"!==i.type?i:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new W.A(this.fields)}readNodePages(e,t,i){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:J.W4.fromJSON(e,i)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,V.C$)(this.associatedLayer)}get geometryType(){return Te[this.profile]||"mesh"}set renderer(e){(0,U.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:H.P;const{query:t,queryRelated:i,editing:{supportsGlobalId:r,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:d,isVersioned:u,supportsAttachment:p},operations:{supportsEditing:c,supportsAdd:h,supportsUpdate:y,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,w=e.operations.supportsChangeTracking,I=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:i,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:I&&o,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:d,isVersioned:u},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:c&&w,supportsAdd:I&&h&&w,supportsDelete:I&&f&&w,supportsUpdate:y&&w,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const i=t.store.profile;return null!=i&&xe[i]?xe[i]:(u.A.getLogger(this).error("Unknown or missing profile",{profile:i,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,me.L)(this,{origin:"service"},t),(0,U.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ge.A;return"mesh"===this.geometryType?this.associatedLayer?.infoFor3D&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const i=(0,U.hL)(this.fieldsIndex,await(0,Fe.TO)(this,(0,Fe.D8)(this)));return(0,be.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,i,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const i=await this.queryCachedAttributes(e,[t]);if(!i||0===i.length)throw new d.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const r=new s.A;return r.attributes=i[0],r.layer=this,r.sourceLayer=this,r}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((i=>i.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,we.tn)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(E.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(E.Xh.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await i.e(6247).then(i.bind(i,78628));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,l=s?.globalIdUsed??!0;if(a&&null==o)throw new d.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new d.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,C.Wo)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,V.GA)(n,e.deleteFeatures,o)}),r(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const i=e=>{throw u.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||i(new d.A("invalid:layer","SceneLayer has no capability for mesh conversion"));const r=await this.extractAndFilterFiles(e),s=r.reduce(((e,t)=>(0,B.oF)(this.infoFor3D,t)?e+1:e),0);0===s&&i(new b.VP),s>1&&i(new b.XQ);const n=this.spatialReference,o=t?.location??new I.A({x:0,y:0,z:0,spatialReference:n}),a=o.spatialReference.isGeographic?"local":"georeferenced",l=w.A.createWithExternalSource(o,r,{vertexSpace:a}),[p]=await this.uploadAssets([l],t);return p}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await Ie(e)).filter((e=>(0,B.fu)(t,e))):e}validateLayer(e){if(e.layerType&&!Se.has(e.layerType))throw new d.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let i=!1,r=!1;if(null==e)i=!0,r=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":i=!0,r=s;break;case"vertex-reference-frame":i=!0,r=!s;break;default:i=!1}}if(!i)throw new d.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!r)throw new d.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some((t=>t.name===e.name)),i=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||i,supportsLayerQuery:i};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const i=this.getField(t.name);i?(!i.domain&&t.domain&&(i.domain=t.domain.clone()),i.editable=t.editable,i.nullable=t.nullable,i.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,f.oY)(this);for(let i=0;i<e.length;i++){const r=e[i],s=this.originIdOf(r),n=this.associatedLayer.originIdOf(r);s<n&&(n===v.Gr.SERVICE||n===v.Gr.PORTAL_ITEM)&&t.setAtOrigin(r,this.associatedLayer[r],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");null!=this.associatedLayer?.infoFor3D&&e&&(0,C.Wo)(this.associatedLayer?.url)&&R(this)&&(0,f.oY)(this).setAtOrigin("fullExtent",e.clone(),v.Gr.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:i,portalItem:r}=await(0,k.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ee.S.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:i,portalItem:r}),await this.associatedLayer.load()}catch(e){(0,c.zf)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.C_)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):u.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,ve.XF)(u.A.getLogger(this),(0,ve.$7)("Mesh scene layers","relative-to-scene",e)),(0,ve.XF)(u.A.getLogger(this),(0,ve.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:i,fieldsIndex:r,path:s,customParameters:n,apiKey:o,signal:a}){if(null==t)throw new d.A(`${i}:no-cached-statistics`,"Cached statistics are not available for this layer");const l=r.get(e);if(null==l)throw new d.A(`${i}:field-unexisting`,`Field '${e}' does not exist on the layer`);const u=t.find((e=>e.name===l.name));if(null==u)throw new d.A(`${i}:no-cached-statistics`,"Cached statistics for this attribute are not available");const p=(0,fe.fj)(s,u.href),{data:c}=await(0,re.A)(p,{query:{f:"json",...n,token:o},responseType:"json",signal:a});return c}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};(0,r._)([(0,y.MZ)({types:{key:"type",base:G.c,typeMap:{selection:K.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Le.prototype,"featureReduction",void 0),(0,r._)([(0,y.MZ)({type:[te],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Le.prototype,"rangeInfos",void 0),(0,r._)([(0,y.MZ)({json:{read:!1}})],Le.prototype,"associatedLayer",void 0),(0,r._)([(0,y.MZ)({type:["show","hide"]})],Le.prototype,"listMode",void 0),(0,r._)([(0,y.MZ)({type:["ArcGISSceneServiceLayer"]})],Le.prototype,"operationalLayerType",void 0),(0,r._)([(0,y.MZ)({json:{read:!1},readOnly:!0})],Le.prototype,"type",void 0),(0,r._)([(0,y.MZ)({...Me.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"fields",void 0),(0,r._)([(0,y.MZ)()],Le.prototype,"types",null),(0,r._)([(0,y.MZ)()],Le.prototype,"typeIdField",null),(0,r._)([(0,y.MZ)()],Le.prototype,"templates",null),(0,r._)([(0,y.MZ)()],Le.prototype,"formTemplate",null),(0,r._)([(0,y.MZ)({readOnly:!0,clonable:!1})],Le.prototype,"fieldsIndex",null),(0,r._)([(0,y.MZ)({type:X.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Le.prototype,"floorInfo",void 0),(0,r._)([(0,y.MZ)(Me.outFields)],Le.prototype,"outFields",void 0),(0,r._)([(0,y.MZ)({type:J.W4,readOnly:!0,json:{read:!1}})],Le.prototype,"nodePages",void 0),(0,r._)([(0,m.w)("service","nodePages",["nodePages","pointNodePages"])],Le.prototype,"readNodePages",null),(0,r._)([(0,y.MZ)({type:[J.uV],readOnly:!0})],Le.prototype,"materialDefinitions",void 0),(0,r._)([(0,y.MZ)({type:[J.Ot],readOnly:!0})],Le.prototype,"textureSetDefinitions",void 0),(0,r._)([(0,y.MZ)({type:[J.L0],readOnly:!0})],Le.prototype,"geometryDefinitions",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],Le.prototype,"serviceUpdateTimeStamp",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],Le.prototype,"attributeStorageInfo",void 0),(0,r._)([(0,y.MZ)({readOnly:!0})],Le.prototype,"statisticsInfo",void 0),(0,r._)([(0,y.MZ)({type:l.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Le.prototype,"excludeObjectIds",void 0),(0,r._)([(0,y.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Le.prototype,"definitionExpression",void 0),(0,r._)([(0,y.MZ)({type:ye,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Le.prototype,"filter",void 0),(0,r._)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Le.prototype,"path",void 0),(0,r._)([(0,y.MZ)(q.Yj)],Le.prototype,"elevationInfo",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"effectiveCapabilities",null),(0,r._)([(0,y.MZ)({readOnly:!0})],Le.prototype,"effectiveEditingEnabled",null),(0,r._)([(0,y.MZ)({type:String})],Le.prototype,"geometryType",null),(0,r._)([(0,y.MZ)(q.kF)],Le.prototype,"labelsVisible",void 0),(0,r._)([(0,y.MZ)({type:[Y.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:z.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:z.w},write:!0}})],Le.prototype,"labelingInfo",void 0),(0,r._)([(0,y.MZ)(q.fV)],Le.prototype,"legendEnabled",void 0),(0,r._)([(0,y.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const i=t.layerDefinition?.drawingInfo?.transparency;return void 0!==i?(0,Ae.D)(i):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Le.prototype,"opacity",void 0),(0,r._)([(0,y.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"priority",void 0),(0,r._)([(0,y.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"semantic",void 0),(0,r._)([(0,y.MZ)({types:o.X,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Le.prototype,"renderer",null),(0,r._)([(0,y.MZ)({json:{read:!1}})],Le.prototype,"cachedDrawingInfo",void 0),(0,r._)([(0,m.w)("service","cachedDrawingInfo")],Le.prototype,"readCachedDrawingInfo",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"capabilities",null),(0,r._)([(0,y.MZ)({type:Boolean,json:{read:!1}})],Le.prototype,"editingEnabled",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"infoFor3D",null),(0,r._)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],Le.prototype,"relationships",null),(0,r._)([(0,y.MZ)(q.M6)],Le.prototype,"popupEnabled",void 0),(0,r._)([(0,y.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],Le.prototype,"popupTemplate",void 0),(0,r._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],Le.prototype,"defaultPopupTemplate",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],Le.prototype,"objectIdField",void 0),(0,r._)([(0,m.w)("service","objectIdField",["objectIdField","fields"])],Le.prototype,"readObjectIdField",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],Le.prototype,"globalIdField",void 0),(0,r._)([(0,m.w)("service","globalIdField",["globalIdField","fields"])],Le.prototype,"readGlobalIdField",null),(0,r._)([(0,y.MZ)({readOnly:!0,type:String,json:{read:!1}})],Le.prototype,"displayField",null),(0,r._)([(0,y.MZ)({type:String,json:{read:!1}})],Le.prototype,"profile",void 0),(0,r._)([(0,m.w)("service","profile",["store.profile"])],Le.prototype,"readProfile",null),(0,r._)([(0,y.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Le.prototype,"normalReferenceFrame",void 0),(0,r._)([(0,y.MZ)(q.PY)],Le.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,y.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],Le.prototype,"serviceItemId",void 0),(0,r._)([(0,y.MZ)(O.B)],Le.prototype,"useViewTime",null),Le=(0,r._)([(0,g.$)("esri.layers.SceneLayer")],Le);const xe={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Te={"mesh-pyramids":"mesh",points:"point"},Ee=Le},55726:(e,t,i)=>{i.d(t,{$1:()=>d,H2:()=>h,MT:()=>y,VP:()=>f,WF:()=>u,Wt:()=>o,XQ:()=>m,hK:()=>c,nS:()=>p,uh:()=>a,xY:()=>l});var r=i(49186);const s="upload-assets",n=()=>new Error;class o extends r.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends r.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends r.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class d extends r.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class u extends r.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends r.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class c extends r.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends r.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class y extends r.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class f extends r.A{constructor(){super("invalid-input:no-model","No supported model found")}}class m extends r.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},52136:(e,t,i)=>{i.d(t,{p:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),s=i(53966),n=i(10107),o=(i(44208),i(87811),i(40608)),a=i(60694);const l=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,a.qg)(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,a.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,n.MZ)()],t.prototype,"title",null),(0,r._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},47685:(e,t,i)=>{i.d(t,{Mk:()=>c,Zk:()=>u,w6:()=>f});var r=i(90237),s=i(65529),n=i(4718),o=i(74887),a=(i(53966),i(44208),i(49186),i(40608)),l=i(20816);const d=new s.A.EventEmitter;function u(e,t,i=null,r=!1){const s=(0,o.Tw)();return r=null==t||r,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:i,mayReceiveServiceEdits:r,result:s.promise}),s}const p=Symbol();function c(e){return null!=e&&"object"==typeof e&&p in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function y(e,t,i){const r=new URL(e).host,s=l.Z3.get(r),n=e=>!e||e===s;return n(t)&&n(i)||t===i}const f=e=>{var t;let i=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:i,gdbVersion:r,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,l=null!=i&&null!=this.layerId&&i===this.layerId,d=h(this),u=h(this)&&y(t,r,this.gdbVersion);if(!a||d&&!u||!l&&!s)return;const p=o.then((e=>{if(l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;const i=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(i){const{adds:t,updates:r,deletes:s}=i.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:s?s.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:r?r.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",o),o}const s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,s.historicMoment)&&this.emit("edits",s),s})).then((e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,r,e.historicMoment)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:i,moment:r}=e,s=t===this.url,n=h(this),o=h(this)&&y(t,i,this.gdbVersion),a=h(this)&&!y(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==r&&(this.historicMoment=r)},this.when().then((()=>{this.addHandles(function(e){return d.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return d.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}_shouldUpdateHistoricMoment(e,t,i){return"historicMoment"in this&&this.historicMoment!==i&&(0,l.w5)(e,t)}};return t=p,i=(0,r._)([(0,a.$)("esri.layers.mixins.EditBusLayer")],i),i}},8303:(e,t,i)=>{i.d(t,{A:()=>b});var r=i(90237),s=i(92602),n=i(70333),o=i(78888),a=i(60999),l=i(49186),d=i(53966),u=i(97768),p=i(74887),c=i(84952),h=i(10107),y=(i(44208),i(87811),i(36005)),f=i(40608),m=i(43937),g=i(83531),v=i(20655),w=i(80812),I=i(41318),_=i(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(1204)]).then(i.bind(i,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,_.It)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!s||!(0,c.b8)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,l=!1,d=!1;if(!o)return{features:{edit:a,fullEdit:l},content:{updateItem:d}};try{if(r?await i.reload():(i=new w.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,_.It)(i)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=F.credential===t?F.user:await this._fetchEditingUser(e);return F.credential=t,F.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(r))return s.user;const l=`${r}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?I.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,h.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},F={credential:null,user:null}},25036:(e,t,i)=>{i.d(t,{j:()=>o});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const i=this._get("effectiveScaleRange");return i&&i.minScale===e.minScale&&i.maxScale===e.maxScale?i:e}};return(0,r._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,r._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,r._)([(0,s.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},82935:(e,t,i)=>{i.d(t,{B:()=>h,e:()=>y});var r=i(90237),s=i(60945),n=i(70668),o=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),l=i(40608),d=i(89317),u=i(30524),p=i(96184),c=i(73133);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:d.K}}},y=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,s=c.j.fromJSON(i.timeOffsetUnits);return r&&s?new n.A({value:r,unit:s}):null}set timeInfo(e){(0,u.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r._)([(0,o.MZ)({type:s.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,r._)([(0,o.MZ)({type:n.A})],t.prototype,"timeOffset",void 0),(0,r._)([(0,a.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,r._)([(0,o.MZ)({value:null,type:p.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,r._)([(0,o.MZ)(h)],t.prototype,"useViewTime",void 0),t=(0,r._)([(0,l.$)("esri.layers.mixins.TemporalLayer")],t),t}},40530:(e,t,i)=>{i.d(t,{c:()=>a});var r=i(90237),s=i(25482),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let a=class extends s.oY{constructor(){super(...arguments),this.type=null}};(0,r._)([(0,n.MZ)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,r._)([(0,o.$)("esri.layers.support.FeatureReduction")],a)},67202:(e,t,i)=>{i.d(t,{A:()=>d});var r,s=i(90237),n=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),a=i(40530);let l=r=class extends a.c{constructor(e){super(e),this.type="selection"}clone(){return new r}};(0,s._)([(0,n.MZ)({type:["selection"]})],l.prototype,"type",void 0),l=r=(0,s._)([(0,o.$)("esri.layers.support.FeatureReductionSelection")],l);const d=l},37352:(e,t,i)=>{i.d(t,{A:()=>u});var r,s=i(90237),n=i(5503),o=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(40608));let d=r=class extends o.oY{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"floorField",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllMode",void 0),(0,s._)([(0,a.MZ)({json:{read:!1,write:!1}})],d.prototype,"viewAllLevelIds",void 0),d=r=(0,s._)([(0,l.$)("esri.layers.support.LayerFloorInfo")],d);const u=d},96184:(e,t,i)=>{i.d(t,{A:()=>f});var r=i(90237),s=i(60945),n=i(70668),o=i(69540),a=i(25482),l=i(10107),d=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),p=i(43937),c=i(56400);function h(e,t){return n.A.fromJSON({value:e,unit:t})}let y=class extends((0,o.O)(a.oY)){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,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?s.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,r._)([(0,l.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,r._)([(0,l.MZ)({type:s.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,r._)([(0,d.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,r._)([(0,p.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,r._)([(0,l.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,r._)([(0,l.MZ)({type:n.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,r._)([(0,d.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,r._)([(0,p.K)("interval")],y.prototype,"writeInterval",null),(0,r._)([(0,l.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,r._)([(0,l.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,r._)([(0,l.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,r._)([(0,l.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,r._)([(0,l.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,r._)([(0,u.$)("esri.layers.support.TimeInfo")],y);const f=y},17036:(e,t,i)=>{i.d(t,{p:()=>l});var r=i(44208),s=i(53966),n=i(20437),o=i(95466),a=i(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,r.A)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const i=this.fieldsIndex?.has(t);i||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},20557:(e,t,i)=>{i.d(t,{E1:()=>a,Fm:()=>l,JZ:()=>y,R_:()=>o,fu:()=>s,oF:()=>n,rq:()=>d});const r=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=p(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const i=d(t,e.supportedFormats??[]);return null!=i&&e.editFormats.includes(i)}function o(e,t){return c(function(e,t){const i=e.toLowerCase();return u(t).find((e=>h(e)===i))}(e,t))}function a(e,t){return c(p(e,t))}function l(e,t){return h(function(e,t){return u(t).find((t=>c(t)===e))}(e,t))}function d(e,t){return a(e.name,t)??o(e.type,t)}function u(e){return[...r,...e]}function p(e,t){const i=e.toLowerCase();return u(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>i.endsWith(e)))))}function c(e){return e?.[0]}function h(e){return e?.[1].toLowerCase()}function y(e){return e.tables?.find((e=>"assetMaps"===e.role))}},73133:(e,t,i)=>{i.d(t,{j:()=>r});const r=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},8947:(e,t,i)=>{i.d(t,{L:()=>o});var r=i(60999),s=i(74887),n=i(67076);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 a=await(0,r.Ke)(o.populateFromStyle());if((0,s.Te)(i),!1===a.ok){const i=a.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},20816:(e,t,i)=>{i.d(t,{TA:()=>s,We:()=>a,Z3:()=>n,ZJ:()=>l,w5:()=>d});var r=i(78888);const s=(0,i(13069).vD)(),n=new Map,o=new Map;async function a(e,t,i){if(!e||!i)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,r.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,r=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&r){const[{deleteForwardEdits:t},{default:r}]=await Promise.all([i.e(2186).then(i.bind(i,32186)),i.e(2558).then(i.bind(i,32558))]),a=await t(n,e,new r({sessionId:s,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function d(e,t){if(!e)return!1;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),r=o.get(i)?.entries();if(r)for(const[e,i]of r)if(i.name===t)return"edit"===i.lockType;return!1}new Map}}]);
@@ -23,6 +23,14 @@
23
23
  @include layerListActionImage();
24
24
  }
25
25
 
26
+ .esri-basemap-layer-list__action-menu .esri-basemap-layer-list__action-group {
27
+ display: none;
28
+ }
29
+
30
+ .esri-basemap-layer-list__action-menu[open] .esri-basemap-layer-list__action-group {
31
+ display: flex;
32
+ }
33
+
26
34
  .esri-basemap-layer-list__visible-icon {
27
35
  visibility: hidden;
28
36
  }
@@ -24,6 +24,14 @@
24
24
  @include layerListActionImage();
25
25
  }
26
26
 
27
+ .esri-catalog-layer-list__action-menu .esri-catalog-layer-list__action-group {
28
+ display: none;
29
+ }
30
+
31
+ .esri-catalog-layer-list__action-menu[open] .esri-catalog-layer-list__action-group {
32
+ display: flex;
33
+ }
34
+
27
35
  .esri-catalog-layer-list__visible-icon {
28
36
  visibility: hidden;
29
37
  }
@@ -25,6 +25,14 @@
25
25
  @include layerListActionImage();
26
26
  }
27
27
 
28
+ .esri-layer-list__action-menu .esri-layer-list__action-group {
29
+ display: none;
30
+ }
31
+
32
+ .esri-layer-list__action-menu[open] .esri-layer-list__action-group {
33
+ display: flex;
34
+ }
35
+
28
36
  .esri-layer-list__visible-icon {
29
37
  visibility: hidden;
30
38
  }
@@ -161,6 +161,18 @@
161
161
  display: flex;
162
162
  flex-direction: column;
163
163
  overflow-y: auto;
164
+
165
+ .esri-print__template-select-flow-item-list-heading {
166
+ display: flex;
167
+ gap: $side-spacing--half;
168
+ align-items: center;
169
+ border-bottom: 1px solid var(--calcite-color-border-3);
170
+ background-color: $background-color--offset;
171
+ padding: $cap-spacing $side-spacing;
172
+ color: $font-color;
173
+ font-size: $font-size;
174
+ font-weight: $font-weight--medium;
175
+ }
164
176
  }
165
177
  }
166
178
 
@@ -15,6 +15,14 @@
15
15
  @include layerListActionImage();
16
16
  }
17
17
 
18
+ .esri-table-list__action-menu .esri-table-list__action-group {
19
+ display: none;
20
+ }
21
+
22
+ .esri-table-list__action-menu[open] .esri-table-list__action-group {
23
+ display: flex;
24
+ }
25
+
18
26
  .esri-table-list__publishing {
19
27
  @include layerListPublishingIndicator();
20
28