tangram-core 0.2.0__cp313-cp313-win_amd64.whl

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 (171) hide show
  1. tangram_core/App.vue +335 -0
  2. tangram_core/__init__.py +5 -0
  3. tangram_core/__main__.py +141 -0
  4. tangram_core/_core.cp313-win_amd64.pyd +0 -0
  5. tangram_core/_core.pyi +38 -0
  6. tangram_core/api.ts +456 -0
  7. tangram_core/backend.py +335 -0
  8. tangram_core/colour.ts +71 -0
  9. tangram_core/config.py +122 -0
  10. tangram_core/dist-frontend/aggregation-layers.js +521 -0
  11. tangram_core/dist-frontend/aggregation-layers.js.map +1 -0
  12. tangram_core/dist-frontend/assets/_commonjsHelpers-CqkleIqs.js +2 -0
  13. tangram_core/dist-frontend/assets/_commonjsHelpers-CqkleIqs.js.map +1 -0
  14. tangram_core/dist-frontend/assets/array-utils-flat-wyE8tIYR.js +11 -0
  15. tangram_core/dist-frontend/assets/array-utils-flat-wyE8tIYR.js.map +1 -0
  16. tangram_core/dist-frontend/assets/assert-hrfsarFU.js +3 -0
  17. tangram_core/dist-frontend/assets/assert-hrfsarFU.js.map +1 -0
  18. tangram_core/dist-frontend/assets/b612-latin-400-italic-DePNXA0a.woff +0 -0
  19. tangram_core/dist-frontend/assets/b612-latin-400-italic-a-4GLPtl.woff2 +0 -0
  20. tangram_core/dist-frontend/assets/b612-latin-400-normal-CC98FVm_.woff2 +0 -0
  21. tangram_core/dist-frontend/assets/b612-latin-400-normal-JbZ7xwUX.woff +0 -0
  22. tangram_core/dist-frontend/assets/b612-latin-700-normal-B_Snq1wd.woff +0 -0
  23. tangram_core/dist-frontend/assets/b612-latin-700-normal-BinQrnoB.woff2 +0 -0
  24. tangram_core/dist-frontend/assets/clip-extension-DTCP51Ak.js +26 -0
  25. tangram_core/dist-frontend/assets/clip-extension-DTCP51Ak.js.map +1 -0
  26. tangram_core/dist-frontend/assets/color-CUNNsFV-.js +17 -0
  27. tangram_core/dist-frontend/assets/color-CUNNsFV-.js.map +1 -0
  28. tangram_core/dist-frontend/assets/cube-geometry-CzJ_uBWa.js +2 -0
  29. tangram_core/dist-frontend/assets/cube-geometry-CzJ_uBWa.js.map +1 -0
  30. tangram_core/dist-frontend/assets/deep-equal-uriyKJca.js +2 -0
  31. tangram_core/dist-frontend/assets/deep-equal-uriyKJca.js.map +1 -0
  32. tangram_core/dist-frontend/assets/fly-to-interpolator-DlKiy9_S.js +2 -0
  33. tangram_core/dist-frontend/assets/fly-to-interpolator-DlKiy9_S.js.map +1 -0
  34. tangram_core/dist-frontend/assets/geojson-layer-CLhXLxdI.js +1010 -0
  35. tangram_core/dist-frontend/assets/geojson-layer-CLhXLxdI.js.map +1 -0
  36. tangram_core/dist-frontend/assets/globe-view-DKhftlA1.js +94 -0
  37. tangram_core/dist-frontend/assets/globe-view-DKhftlA1.js.map +1 -0
  38. tangram_core/dist-frontend/assets/globe-viewport-CPES4D4P.js +2 -0
  39. tangram_core/dist-frontend/assets/globe-viewport-CPES4D4P.js.map +1 -0
  40. tangram_core/dist-frontend/assets/image-loader-ClbNCMXW.js +2 -0
  41. tangram_core/dist-frontend/assets/image-loader-ClbNCMXW.js.map +1 -0
  42. tangram_core/dist-frontend/assets/inconsolata-latin-400-normal-DTZQ6lD6.woff2 +0 -0
  43. tangram_core/dist-frontend/assets/inconsolata-latin-400-normal-HYADljCo.woff +0 -0
  44. tangram_core/dist-frontend/assets/inconsolata-latin-700-normal-ByjKuJjN.woff2 +0 -0
  45. tangram_core/dist-frontend/assets/inconsolata-latin-700-normal-DzgUY3Rl.woff +0 -0
  46. tangram_core/dist-frontend/assets/inconsolata-latin-ext-400-normal-BaHVOdFB.woff2 +0 -0
  47. tangram_core/dist-frontend/assets/inconsolata-latin-ext-400-normal-yvPjCxxx.woff +0 -0
  48. tangram_core/dist-frontend/assets/inconsolata-latin-ext-700-normal-D0Kpgs_9.woff2 +0 -0
  49. tangram_core/dist-frontend/assets/inconsolata-latin-ext-700-normal-Dlt-daqV.woff +0 -0
  50. tangram_core/dist-frontend/assets/inconsolata-vietnamese-400-normal-ByiM2lek.woff +0 -0
  51. tangram_core/dist-frontend/assets/inconsolata-vietnamese-400-normal-DfC_iMic.woff2 +0 -0
  52. tangram_core/dist-frontend/assets/inconsolata-vietnamese-700-normal-DLCFFAUf.woff +0 -0
  53. tangram_core/dist-frontend/assets/inconsolata-vietnamese-700-normal-DuasYmn8.woff2 +0 -0
  54. tangram_core/dist-frontend/assets/index-UPPakSLR.css +1 -0
  55. tangram_core/dist-frontend/assets/index-r8T0kY2p.js +821 -0
  56. tangram_core/dist-frontend/assets/index-r8T0kY2p.js.map +1 -0
  57. tangram_core/dist-frontend/assets/layer-DO63TrsS.js +555 -0
  58. tangram_core/dist-frontend/assets/layer-DO63TrsS.js.map +1 -0
  59. tangram_core/dist-frontend/assets/layer-extension-CZ3zsHuN.js +2 -0
  60. tangram_core/dist-frontend/assets/layer-extension-CZ3zsHuN.js.map +1 -0
  61. tangram_core/dist-frontend/assets/mesh-layers-BSECKarm.js +1123 -0
  62. tangram_core/dist-frontend/assets/mesh-layers-BSECKarm.js.map +1 -0
  63. tangram_core/dist-frontend/assets/orthographic-viewport-CzZmHDEZ.js +2 -0
  64. tangram_core/dist-frontend/assets/orthographic-viewport-CzZmHDEZ.js.map +1 -0
  65. tangram_core/dist-frontend/assets/pick-layers-pass-xhWsgZtf.js +2 -0
  66. tangram_core/dist-frontend/assets/pick-layers-pass-xhWsgZtf.js.map +1 -0
  67. tangram_core/dist-frontend/assets/project-CrvReKGW.js +760 -0
  68. tangram_core/dist-frontend/assets/project-CrvReKGW.js.map +1 -0
  69. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-400-italic-4qS3_zkX.woff2 +0 -0
  70. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-400-italic-CDK-EZBY.woff +0 -0
  71. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-400-normal-Bgns473E.woff +0 -0
  72. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-400-normal-_T2aQlWs.woff2 +0 -0
  73. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-500-normal-CvEVpWxD.woff +0 -0
  74. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-500-normal-s4PklZE0.woff2 +0 -0
  75. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-700-normal-9RN-Z7cI.woff2 +0 -0
  76. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-700-normal-BGMkBBYx.woff +0 -0
  77. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-400-italic-C7erd-g8.woff +0 -0
  78. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-400-italic-DR5R5TWx.woff2 +0 -0
  79. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-400-normal-DGo1Ayjq.woff2 +0 -0
  80. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-400-normal-WtM1l1qc.woff +0 -0
  81. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-500-normal-C8FNIdXm.woff2 +0 -0
  82. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-500-normal-TLDmfi3Q.woff +0 -0
  83. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-700-normal-CTXjXnze.woff2 +0 -0
  84. tangram_core/dist-frontend/assets/roboto-condensed-cyrillic-ext-700-normal-CWPRiRXS.woff +0 -0
  85. tangram_core/dist-frontend/assets/roboto-condensed-greek-400-italic-CR6qj4Z4.woff2 +0 -0
  86. tangram_core/dist-frontend/assets/roboto-condensed-greek-400-italic-DHRaIs10.woff +0 -0
  87. tangram_core/dist-frontend/assets/roboto-condensed-greek-400-normal-D5vBSIyg.woff2 +0 -0
  88. tangram_core/dist-frontend/assets/roboto-condensed-greek-400-normal-FabMgVmk.woff +0 -0
  89. tangram_core/dist-frontend/assets/roboto-condensed-greek-500-normal-BIN62cw9.woff +0 -0
  90. tangram_core/dist-frontend/assets/roboto-condensed-greek-500-normal-Hsn-wDIp.woff2 +0 -0
  91. tangram_core/dist-frontend/assets/roboto-condensed-greek-700-normal-89Up2Xly.woff +0 -0
  92. tangram_core/dist-frontend/assets/roboto-condensed-greek-700-normal-DWMOA2VK.woff2 +0 -0
  93. tangram_core/dist-frontend/assets/roboto-condensed-latin-400-italic-D_BR-3LG.woff2 +0 -0
  94. tangram_core/dist-frontend/assets/roboto-condensed-latin-400-italic-om57GXsO.woff +0 -0
  95. tangram_core/dist-frontend/assets/roboto-condensed-latin-400-normal-BICmKrXV.woff2 +0 -0
  96. tangram_core/dist-frontend/assets/roboto-condensed-latin-400-normal-D2e7XwB1.woff +0 -0
  97. tangram_core/dist-frontend/assets/roboto-condensed-latin-500-normal-3p2daRJW.woff2 +0 -0
  98. tangram_core/dist-frontend/assets/roboto-condensed-latin-500-normal-Dc9bsamC.woff +0 -0
  99. tangram_core/dist-frontend/assets/roboto-condensed-latin-700-normal-BOl6B_hI.woff +0 -0
  100. tangram_core/dist-frontend/assets/roboto-condensed-latin-700-normal-DRbp0YnP.woff2 +0 -0
  101. tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-400-italic-BXrkWnoY.woff +0 -0
  102. tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-400-italic-Bhem1d5z.woff2 +0 -0
  103. tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-400-normal-DT8nEsYA.woff +0 -0
  104. tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-400-normal-OHaX69iP.woff2 +0 -0
  105. tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-500-normal-CcSTXKtO.woff2 +0 -0
  106. tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-500-normal-JgPl2bDS.woff +0 -0
  107. tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-700-normal-B004qtqu.woff2 +0 -0
  108. tangram_core/dist-frontend/assets/roboto-condensed-latin-ext-700-normal-O6H_RRvN.woff +0 -0
  109. tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-400-italic-BwUYFJ2t.woff2 +0 -0
  110. tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-400-italic-DV8QogUk.woff +0 -0
  111. tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-400-normal-0o1laQ-g.woff2 +0 -0
  112. tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-400-normal-CPsdS8_S.woff +0 -0
  113. tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-500-normal-G9shSJ2z.woff +0 -0
  114. tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-500-normal-TFWhjk13.woff2 +0 -0
  115. tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-700-normal-BtNeb9D6.woff +0 -0
  116. tangram_core/dist-frontend/assets/roboto-condensed-vietnamese-700-normal-D35V1G0s.woff2 +0 -0
  117. tangram_core/dist-frontend/assets/shader-BJmsOfPx.js +843 -0
  118. tangram_core/dist-frontend/assets/shader-BJmsOfPx.js.map +1 -0
  119. tangram_core/dist-frontend/assets/solid-polygon-layer-DiarVGxh.js +392 -0
  120. tangram_core/dist-frontend/assets/solid-polygon-layer-DiarVGxh.js.map +1 -0
  121. tangram_core/dist-frontend/assets/tesselator-49Dw9L5A.js +2 -0
  122. tangram_core/dist-frontend/assets/tesselator-49Dw9L5A.js.map +1 -0
  123. tangram_core/dist-frontend/assets/webgl-developer-tools-CZl8qVFg.js +7 -0
  124. tangram_core/dist-frontend/assets/webgl-developer-tools-CZl8qVFg.js.map +1 -0
  125. tangram_core/dist-frontend/assets/webgl-device-BY0-CUP6.js +3 -0
  126. tangram_core/dist-frontend/assets/webgl-device-BY0-CUP6.js.map +1 -0
  127. tangram_core/dist-frontend/assets/widget-BbOeHGj0.js +2 -0
  128. tangram_core/dist-frontend/assets/widget-BbOeHGj0.js.map +1 -0
  129. tangram_core/dist-frontend/core.js +60 -0
  130. tangram_core/dist-frontend/core.js.map +1 -0
  131. tangram_core/dist-frontend/extensions.js +609 -0
  132. tangram_core/dist-frontend/extensions.js.map +1 -0
  133. tangram_core/dist-frontend/favicon.ico +0 -0
  134. tangram_core/dist-frontend/favicon.png +0 -0
  135. tangram_core/dist-frontend/font-awesome.min.css +4 -0
  136. tangram_core/dist-frontend/fonts/FontAwesome.otf +0 -0
  137. tangram_core/dist-frontend/fonts/fontawesome-webfont.eot +0 -0
  138. tangram_core/dist-frontend/fonts/fontawesome-webfont.svg +2671 -0
  139. tangram_core/dist-frontend/fonts/fontawesome-webfont.ttf +0 -0
  140. tangram_core/dist-frontend/fonts/fontawesome-webfont.woff +0 -0
  141. tangram_core/dist-frontend/fonts/fontawesome-webfont.woff2 +0 -0
  142. tangram_core/dist-frontend/geo-layers.js +115 -0
  143. tangram_core/dist-frontend/geo-layers.js.map +1 -0
  144. tangram_core/dist-frontend/index.html +38 -0
  145. tangram_core/dist-frontend/json.js +3 -0
  146. tangram_core/dist-frontend/json.js.map +1 -0
  147. tangram_core/dist-frontend/layers.js +268 -0
  148. tangram_core/dist-frontend/layers.js.map +1 -0
  149. tangram_core/dist-frontend/lit-html.js +7 -0
  150. tangram_core/dist-frontend/lit-html.js.map +1 -0
  151. tangram_core/dist-frontend/mapbox.js +2 -0
  152. tangram_core/dist-frontend/mapbox.js.map +1 -0
  153. tangram_core/dist-frontend/maplibre-gl.js +59 -0
  154. tangram_core/dist-frontend/maplibre-gl.js.map +1 -0
  155. tangram_core/dist-frontend/mesh-layers.js +2 -0
  156. tangram_core/dist-frontend/mesh-layers.js.map +1 -0
  157. tangram_core/dist-frontend/rs1090_wasm.js +813 -0
  158. tangram_core/dist-frontend/rs1090_wasm_bg.wasm +0 -0
  159. tangram_core/dist-frontend/vue.esm-browser.prod.js +13 -0
  160. tangram_core/dist-frontend/widgets.js +3 -0
  161. tangram_core/dist-frontend/widgets.js.map +1 -0
  162. tangram_core/main.ts +16 -0
  163. tangram_core/plugin.py +70 -0
  164. tangram_core/plugin.ts +41 -0
  165. tangram_core/redis.py +89 -0
  166. tangram_core/user.css +114 -0
  167. tangram_core/vite-plugin-tangram.mjs +88 -0
  168. tangram_core-0.2.0.dist-info/METADATA +37 -0
  169. tangram_core-0.2.0.dist-info/RECORD +171 -0
  170. tangram_core-0.2.0.dist-info/WHEEL +4 -0
  171. tangram_core-0.2.0.dist-info/entry_points.txt +2 -0
@@ -0,0 +1,38 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" href="/favicon.ico" />
6
+ <link rel="apple-touch-icon" href="/favicon.png" />
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
+ <title>tangram</title>
9
+ <link rel="stylesheet" href="/font-awesome.min.css" />
10
+ <!-- we externalise vue esm so plugins dont have to vendor their own -->
11
+ <!-- this results in a larger (initial) bundle size but is well worth it -->
12
+
13
+ <script type="importmap">
14
+ {
15
+ "imports": {
16
+ "vue": "/vue.esm-browser.prod.js",
17
+ "maplibre": "/maplibre-gl.js",
18
+ "@deck.gl/core": "/core.js",
19
+ "@deck.gl/layers": "/layers.js",
20
+ "@deck.gl/aggregation-layers": "/aggregation-layers.js",
21
+ "@deck.gl/geo-layers": "/geo-layers.js",
22
+ "@deck.gl/mesh-layers": "/mesh-layers.js",
23
+ "@deck.gl/json": "/json.js",
24
+ "@deck.gl/mapbox": "/mapbox.js",
25
+ "@deck.gl/widgets": "/widgets.js",
26
+ "@deck.gl/extensions": "/extensions.js",
27
+ "lit-html": "/lit-html.js",
28
+ "rs1090-wasm": "/rs1090_wasm.js"
29
+ }
30
+ }
31
+ </script>
32
+ <script type="module" crossorigin src="/assets/index-r8T0kY2p.js"></script>
33
+ <link rel="stylesheet" crossorigin href="/assets/index-UPPakSLR.css">
34
+ </head>
35
+ <body>
36
+ <div id="app"></div>
37
+ </body>
38
+ </html>
@@ -0,0 +1,3 @@
1
+ import{g as Ue}from"./assets/_commonjsHelpers-CqkleIqs.js";function W(e,t=""){if(!e)throw new Error(`JSON conversion error ${t}`)}function Te(e,t){const r=qe(t);let o=e;for(const u of r)o=Be(o)?o[u]:void 0;return o}function Be(e){return e!==null&&typeof e=="object"}const ce={};function qe(e){if(typeof e=="string"){let t=ce[e];return t||(t=e.split("."),ce[e]=t),t}return Array.isArray(e)?e:[e]}var j={exports:{}},le;function je(){return le||(le=1,(function(e,t){(function(r){var o="Compound",u="Identifier",E="MemberExpression",J="Literal",Oe="ThisExpression",Ce="CallExpression",ve="UnaryExpression",me="BinaryExpression",_e="LogicalExpression",Ne="ConditionalExpression",we="ArrayExpression",k=46,te=44,Se=39,Pe=34,M=40,U=41,X=91,$=93,xe=63,Ae=59,Je=58,p=function(i,n){var b=new Error(i+" at character "+n);throw b.index=n,b.description=i,b},I=!0,_={"-":I,"!":I,"~":I,"+":I},C={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},T=function(i){var n=0,b;for(var S in i)(b=S.length)>n&&i.hasOwnProperty(S)&&(n=b);return n},N=T(_),w=T(C),D={true:!0,false:!1,null:null},ke="this",re=function(i){return C[i]||0},ne=function(i,n,b){var S=i==="||"||i==="&&"?_e:me;return{type:S,operator:i,left:n,right:b}},F=function(i){return i>=48&&i<=57},R=function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=128&&!C[String.fromCharCode(i)]},z=function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i>=128&&!C[String.fromCharCode(i)]},d=function(i){for(var n=0,b=i.charAt,S=i.charCodeAt,y=function(s){return b.call(i,s)},f=function(s){return S.call(i,s)},L=i.length,O=function(){for(var s=f(n);s===32||s===9||s===10||s===13;)s=f(++n)},P=function(){var s=Ie(),a,c;if(O(),f(n)===xe){if(n++,a=P(),a||p("Expected expression",n),O(),f(n)===Je)return n++,c=P(),c||p("Expected expression",n),{type:Ne,test:s,consequent:a,alternate:c};p("Expected :",n)}else return s},se=function(){O();for(var s=i.substr(n,w),a=s.length;a>0;){if(C.hasOwnProperty(s)&&(!R(f(n))||n+s.length<i.length&&!z(f(n+s.length))))return n+=a,s;s=s.substr(0,--a)}return!1},Ie=function(){var s,a,c,l,m,g,v,x,ue;if(g=B(),a=se(),!a)return g;for(m={value:a,prec:re(a)},v=B(),v||p("Expected expression after "+a,n),l=[g,m,v];(a=se())&&(c=re(a),c!==0);){for(m={value:a,prec:c},ue=a;l.length>2&&c<=l[l.length-2].prec;)v=l.pop(),a=l.pop().value,g=l.pop(),s=ne(a,g,v),l.push(s);s=B(),s||p("Expected expression after "+ue,n),l.push(m,s)}for(x=l.length-1,s=l[x];x>1;)s=ne(l[x-1].value,l[x-2],s),x-=2;return s},B=function(){var s,a,c;if(O(),s=f(n),F(s)||s===k)return De();if(s===Se||s===Pe)return Fe();if(s===X)return Me();for(a=i.substr(n,N),c=a.length;c>0;){if(_.hasOwnProperty(a)&&(!R(f(n))||n+a.length<i.length&&!z(f(n+a.length))))return n+=c,{type:ve,operator:a,argument:B(),prefix:!0};a=a.substr(0,--c)}return R(s)||s===M?Re():!1},De=function(){for(var s="",a,c;F(f(n));)s+=y(n++);if(f(n)===k)for(s+=y(n++);F(f(n));)s+=y(n++);if(a=y(n),a==="e"||a==="E"){for(s+=y(n++),a=y(n),(a==="+"||a==="-")&&(s+=y(n++));F(f(n));)s+=y(n++);F(f(n-1))||p("Expected exponent ("+s+y(n)+")",n)}return c=f(n),R(c)?p("Variable names cannot start with a number ("+s+y(n)+")",n):c===k&&p("Unexpected period",n),{type:J,value:parseFloat(s),raw:s}},Fe=function(){for(var s="",a=y(n++),c=!1,l;n<L;)if(l=y(n++),l===a){c=!0;break}else if(l==="\\")switch(l=y(n++),l){case"n":s+=`
2
+ `;break;case"r":s+="\r";break;case"t":s+=" ";break;case"b":s+="\b";break;case"f":s+="\f";break;case"v":s+="\v";break;default:s+=l}else s+=l;return c||p('Unclosed quote after "'+s+'"',n),{type:J,value:s,raw:a+s+a}},ie=function(){var s=f(n),a=n,c;for(R(s)?n++:p("Unexpected "+y(n),n);n<L&&(s=f(n),z(s));)n++;return c=i.slice(a,n),D.hasOwnProperty(c)?{type:J,value:D[c],raw:c}:c===ke?{type:Oe}:{type:u,name:c}},oe=function(s){for(var a,c=[],l,m=!1,g=0;n<L;)if(O(),a=f(n),a===s){m=!0,n++,s===U&&g&&g>=c.length&&p("Unexpected token "+String.fromCharCode(s),n);break}else if(a===te){if(n++,g++,g!==c.length){if(s===U)p("Unexpected token ,",n);else if(s===$)for(var v=c.length;v<g;v++)c.push(null)}}else l=P(),(!l||l.type===o)&&p("Expected comma",n),c.push(l);return m||p("Expected "+String.fromCharCode(s),n),c},Re=function(){var s,a;for(s=f(n),s===M?a=Le():a=ie(),O(),s=f(n);s===k||s===X||s===M;)n++,s===k?(O(),a={type:E,computed:!1,object:a,property:ie()}):s===X?(a={type:E,computed:!0,object:a,property:P()},O(),s=f(n),s!==$&&p("Unclosed [",n),n++):s===M&&(a={type:Ce,arguments:oe(U),callee:a}),O(),s=f(n);return a},Le=function(){n++;var s=P();if(O(),f(n)===U)return n++,s;p("Unclosed (",n)},Me=function(){return n++,{type:we,elements:oe($)}},q=[],Y,ae;n<L;)Y=f(n),Y===Ae||Y===te?n++:(ae=P())?q.push(ae):n<L&&p('Unexpected "'+y(n)+'"',n);return q.length===1?q[0]:{type:o,body:q}};d.version="0.3.5",d.toString=function(){return"JavaScript Expression Parser (JSEP) v"+d.version},d.addUnaryOp=function(i){return N=Math.max(i.length,N),_[i]=I,this},d.addBinaryOp=function(i,n){return w=Math.max(i.length,w),C[i]=n,this},d.addLiteral=function(i,n){return D[i]=n,this},d.removeUnaryOp=function(i){return delete _[i],i.length===N&&(N=T(_)),this},d.removeAllUnaryOps=function(){return _={},N=0,this},d.removeBinaryOp=function(i){return delete C[i],i.length===w&&(w=T(C)),this},d.removeAllBinaryOps=function(){return C={},w=0,this},d.removeLiteral=function(i){return delete D[i],this},d.removeAllLiterals=function(){return D={},this},e.exports?t=e.exports=d:t.parse=d})()})(j,j.exports)),j.exports}var Ke=je();const Xe=Ue(Ke),fe={"||":(e,t)=>e||t,"&&":(e,t)=>e&&t,"|":(e,t)=>e|t,"^":(e,t)=>e^t,"&":(e,t)=>e&t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,">":(e,t)=>e>t,"<=":(e,t)=>e<=t,">=":(e,t)=>e>=t,"<<":(e,t)=>e<<t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"*":(e,t)=>e*t,"/":(e,t)=>e/t,"%":(e,t)=>e%t},$e={"-":e=>-e,"+":e=>+e,"~":e=>~e,"!":e=>!e};function pe(e,t){return e.map(function(r){return h(r,t)})}function he(e,t){const r=h(e.object,t);let o;if(e.computed?o=h(e.property,t):o=e.property.name,/^__proto__|prototype|constructor$/.test(o))throw Error(`Access to member "${o}" disallowed.`);return[r,r[o]]}function h(e,t){const r=e;switch(r.type){case"ArrayExpression":return pe(r.elements,t);case"BinaryExpression":return fe[r.operator](h(r.left,t),h(r.right,t));case"CallExpression":let o,u,E;return r.callee.type==="MemberExpression"?(E=he(r.callee,t),o=E[0],u=E[1]):u=h(r.callee,t),typeof u!="function"?void 0:u.apply(o,pe(r.arguments,t));case"ConditionalExpression":return h(r.test,t)?h(r.consequent,t):h(r.alternate,t);case"Identifier":return t[r.name];case"Literal":return r.value;case"LogicalExpression":return r.operator==="||"?h(r.left,t)||h(r.right,t):r.operator==="&&"?h(r.left,t)&&h(r.right,t):fe[r.operator](h(r.left,t),h(r.right,t));case"MemberExpression":return he(r,t)[1];case"ThisExpression":return t;case"UnaryExpression":return $e[r.operator](h(r.argument,t));default:return}}const Q={"-":e=>e};function Ee(e,t){if(e in Q)return Q[e];let r;const o=Xe(e);return o.type==="Identifier"?r=u=>Te(u,e):(G(o,u=>{if(u.type==="CallExpression")throw new Error("Function calls not allowed in JSON expressions")}),r=u=>h(o,u)),Q[e]=r,r}function G(e,t){if(Array.isArray(e))e.forEach(r=>G(r,t));else if(e&&typeof e=="object"){e.type&&t(e);for(const r in e)G(e[r],t)}}const K="@@=",ye="@@#",ze="@@type",ge="@@function",de=e=>e&&typeof e=="object";class H{constructor(...t){this.typeKey=ze,this.functionKey=ge,this.log=console,this.classes={},this.reactComponents={},this.enumerations={},this.constants={},this.functions={},this.React=null,this.convertFunction=Ee,this.preProcessClassProps=(r,o)=>o,this.postProcessConvertedJson=r=>r;for(const r of t)this.merge(r)}merge(t){for(const r in t)switch(r){case"layers":case"views":Object.assign(this.classes,t[r]);break;default:if(r in this){const o=t[r];this[r]=de(this[r])?Object.assign(this[r],o):o}}}validate(t){return W(!this.typeKey||typeof this.typeKey=="string"),W(de(this.classes)),!0}}function Ye(e){return typeof e=="string"&&e.startsWith(K)}function Qe(e){return e.replace(K,"")}function be(e,t){const r={};for(const o in e){let u=e[o];Ye(u)&&(u=Qe(u),u=Ee(u)),r[o]=u}return r}function We(e,t,r){const o=r.classes[e],u=r.reactComponents[e];if(!o&&!u){const{log:E}=r;if(E){const J=JSON.stringify(t,null,0).slice(0,40);E.warn(`JSON converter: No registered class of type ${e}(${J}...) `)}return null}return o?Ge(o,t,r):He(u,t,r)}function Ge(e,t,r){return r.preProcessClassProps&&(t=r.preProcessClassProps(e,t,r)),t=be(t),new e(t)}function He(e,t,r){const{React:o}=r,{children:u=[]}=t;return delete t.children,r.preProcessClassProps&&(t=r.preProcessClassProps(e,t,r)),t=be(t),o.createElement(e,t,u)}function Ve(e,t,r){const o=r.functions[e];if(!o){const{log:u}=r;if(u){const E=JSON.stringify(t,null,0).slice(0,40);u.warn(`JSON converter: No registered function ${e}(${E}...) `)}return null}return o(t)}function Ze(e){return typeof e=="string"?JSON.parse(e):e}const V=e=>e&&typeof e=="object";class ot{constructor(t){this.log=console,this.onJSONChange=()=>{},this.json=null,this.convertedJson=null,this.setProps(t)}finalize(){}setProps(t){"configuration"in t&&(this.configuration=t.configuration instanceof H?t.configuration:new H(t.configuration)),"onJSONChange"in t&&(this.onJSONChange=t.onJSONChange)}mergeConfiguration(t){this.configuration.merge(t)}convert(t){if(!t||t===this.json)return this.convertedJson;this.json=t;const r=Ze(t);let o=et(r,this.configuration);return o=this.configuration.postProcessConvertedJson(o),this.convertedJson=o,o}convertJson(t){return this.convert(t)}}function et(e,t){return t=new H(t),Z(e,"",t)}function Z(e,t,r){return Array.isArray(e)?e.map((o,u)=>Z(o,String(u),r)):tt(e,r)?rt(e,r):V(e)?ge in e?nt(e,r):ee(e,r):typeof e=="string"?st(e,t,r):e}function tt(e,t){const{typeKey:r}=t;return V(e)&&!!e[r]}function rt(e,t){const{typeKey:r}=t,o=e[r];let u={...e};return delete u[r],u=ee(u,t),We(o,u,t)}function nt(e,t){const{functionKey:r}=t,o=e[r];let u={...e};return delete u[r],u=ee(u,t),Ve(o,u,t)}function ee(e,t){W(V(e));const r={};for(const o in e){const u=e[o];r[o]=Z(u,o,t)}return r}function st(e,t,r){if(e.startsWith(K)&&r.convertFunction)return e=e.replace(K,""),r.convertFunction(e,r);if(e.startsWith(ye)){if(e=e.replace(ye,""),r.constants[e])return r.constants[e];const[o,u]=e.split(".");return r.enumerations[o][u]}return e}const A={onInitialize:e=>e,onFinalize:e=>e,onMessage:e=>e};class at{static setCallbacks({onInitialize:t,onFinalize:r,onMessage:o}){t&&(A.onInitialize=t),r&&(A.onFinalize=r),o&&(A.onMessage=o)}constructor(t="Transport"){this._messageQueue=[],this.userData={},this._destroyed=!1,this.name=t}getRootDOMElement(){return typeof document<"u"?document.body:null}sendJSONMessage(){console.error("Back-channel not implemented for this transport")}sendBinaryMessage(){console.error("Back-channel not implemented for this transport")}_initialize(t={}){const r={transport:this,...t};A.onInitialize(r)}_finalize(t={}){const r={transport:this,...t};A.onFinalize(r),this._destroyed=!0}_messageReceived(t={}){t={transport:this,...t},console.debug("Delivering transport message",t),A.onMessage(t)}static _stringifyJSONSafe(t){const r=new Set;return JSON.stringify(t,(o,u)=>{if(typeof u=="object"&&u!==null){if(r.has(u))try{return JSON.parse(JSON.stringify(u))}catch{return}r.add(u)}return u})}}function ut(e,t){if(e===t)return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!(r in t)||e[r]!==t[r])return!1;for(const r in t)if(!(r in e))return!1;return!0}export{H as JSONConfiguration,ot as JSONConverter,at as Transport,be as _convertFunctions,Ee as _parseExpressionString,ut as _shallowEqualObjects};
3
+ //# sourceMappingURL=json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json.js","sources":["../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/utils/assert.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/utils/get.js","../../../../../node_modules/.pnpm/jsep@0.3.5/node_modules/jsep/build/jsep.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/utils/expression-eval.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/helpers/parse-expression-string.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/syntactic-sugar.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/json-configuration.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/helpers/convert-functions.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/helpers/instantiate-class.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/helpers/execute-function.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/helpers/parse-json.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/json-converter.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/transports/transport.js","../../../../../node_modules/.pnpm/@deck.gl+json@9.2.2_@deck.gl+core@9.2.2/node_modules/@deck.gl/json/dist/utils/shallow-equal-objects.js"],"sourcesContent":["// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nexport default function assert(condition, message = '') {\n if (!condition) {\n throw new Error(`JSON conversion error ${message}`);\n }\n}\n//# sourceMappingURL=assert.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n/**\n * Access properties of nested containers using dot-path notation\n * Returns `undefined` if any container is not valid, instead of throwing\n * @param {Object} container - container that supports get\n * @param {String|*} compositeKey - key to access, can be '.'-separated string\n * @return {*} - value in the final key of the nested container, or `undefined`\n */\nexport function get(container, compositeKey) {\n // Split the key into subkeys\n const keyList = getKeys(compositeKey);\n // Recursively get the value of each key;\n let value = container;\n for (const key of keyList) {\n // If any intermediate subfield is not an object, return undefined\n value = isObject(value) ? value[key] : undefined;\n }\n return value;\n}\n/**\n * Checks if argument is an \"indexable\" object (not a primitive value, nor null)\n * @param {*} value - JavaScript value to be tested\n * @return {Boolean} - true if argument is a JavaScript object\n */\nfunction isObject(value) {\n return value !== null && typeof value === 'object';\n}\n// Cache key to key arrays for speed\nconst keyMap = {};\n// Takes a string of '.' separated keys and returns an array of keys\n// - 'feature.geometry.type' => ['feature', 'geometry', 'type']\n// - 'feature' => ['feature']\nfunction getKeys(compositeKey) {\n if (typeof compositeKey === 'string') {\n // else assume string and split around dots\n let keyList = keyMap[compositeKey];\n if (!keyList) {\n keyList = compositeKey.split('.');\n keyMap[compositeKey] = keyList;\n }\n return keyList;\n }\n // Wrap in array if needed\n return Array.isArray(compositeKey) ? compositeKey : [compositeKey];\n}\n//# sourceMappingURL=get.js.map","// JavaScript Expression Parser (JSEP) 0.3.5\n// JSEP may be freely distributed under the MIT License\n// https://ericsmekens.github.io/jsep/\n\n/*global module: true, exports: true, console: true */\n(function (root) {\n\t'use strict';\n\t// Node Types\n\t// ----------\n\n\t// This is the full set of types that any JSEP node can be.\n\t// Store them here to save space when minified\n\tvar COMPOUND = 'Compound',\n\t\tIDENTIFIER = 'Identifier',\n\t\tMEMBER_EXP = 'MemberExpression',\n\t\tLITERAL = 'Literal',\n\t\tTHIS_EXP = 'ThisExpression',\n\t\tCALL_EXP = 'CallExpression',\n\t\tUNARY_EXP = 'UnaryExpression',\n\t\tBINARY_EXP = 'BinaryExpression',\n\t\tLOGICAL_EXP = 'LogicalExpression',\n\t\tCONDITIONAL_EXP = 'ConditionalExpression',\n\t\tARRAY_EXP = 'ArrayExpression',\n\n\t\tPERIOD_CODE = 46, // '.'\n\t\tCOMMA_CODE = 44, // ','\n\t\tSQUOTE_CODE = 39, // single quote\n\t\tDQUOTE_CODE = 34, // double quotes\n\t\tOPAREN_CODE = 40, // (\n\t\tCPAREN_CODE = 41, // )\n\t\tOBRACK_CODE = 91, // [\n\t\tCBRACK_CODE = 93, // ]\n\t\tQUMARK_CODE = 63, // ?\n\t\tSEMCOL_CODE = 59, // ;\n\t\tCOLON_CODE = 58, // :\n\n\t\tthrowError = function(message, index) {\n\t\t\tvar error = new Error(message + ' at character ' + index);\n\t\t\terror.index = index;\n\t\t\terror.description = message;\n\t\t\tthrow error;\n\t\t},\n\n\t// Operations\n\t// ----------\n\n\t// Set `t` to `true` to save space (when minified, not gzipped)\n\t\tt = true,\n\t// Use a quickly-accessible map to store all of the unary operators\n\t// Values are set to `true` (it really doesn't matter)\n\t\tunary_ops = {'-': t, '!': t, '~': t, '+': t},\n\t// Also use a map for the binary operations but set their values to their\n\t// binary precedence for quick reference:\n\t// see [Order of operations](http://en.wikipedia.org/wiki/Order_of_operations#Programming_language)\n\t\tbinary_ops = {\n\t\t\t'||': 1, '&&': 2, '|': 3, '^': 4, '&': 5,\n\t\t\t'==': 6, '!=': 6, '===': 6, '!==': 6,\n\t\t\t'<': 7, '>': 7, '<=': 7, '>=': 7,\n\t\t\t'<<':8, '>>': 8, '>>>': 8,\n\t\t\t'+': 9, '-': 9,\n\t\t\t'*': 10, '/': 10, '%': 10\n\t\t},\n\t// Get return the longest key length of any object\n\t\tgetMaxKeyLen = function(obj) {\n\t\t\tvar max_len = 0, len;\n\t\t\tfor(var key in obj) {\n\t\t\t\tif((len = key.length) > max_len && obj.hasOwnProperty(key)) {\n\t\t\t\t\tmax_len = len;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn max_len;\n\t\t},\n\t\tmax_unop_len = getMaxKeyLen(unary_ops),\n\t\tmax_binop_len = getMaxKeyLen(binary_ops),\n\t// Literals\n\t// ----------\n\t// Store the values to return for the various literals we may encounter\n\t\tliterals = {\n\t\t\t'true': true,\n\t\t\t'false': false,\n\t\t\t'null': null\n\t\t},\n\t// Except for `this`, which is special. This could be changed to something like `'self'` as well\n\t\tthis_str = 'this',\n\t// Returns the precedence of a binary operator or `0` if it isn't a binary operator\n\t\tbinaryPrecedence = function(op_val) {\n\t\t\treturn binary_ops[op_val] || 0;\n\t\t},\n\t// Utility function (gets called from multiple places)\n\t// Also note that `a && b` and `a || b` are *logical* expressions, not binary expressions\n\t\tcreateBinaryExpression = function (operator, left, right) {\n\t\t\tvar type = (operator === '||' || operator === '&&') ? LOGICAL_EXP : BINARY_EXP;\n\t\t\treturn {\n\t\t\t\ttype: type,\n\t\t\t\toperator: operator,\n\t\t\t\tleft: left,\n\t\t\t\tright: right\n\t\t\t};\n\t\t},\n\t\t// `ch` is a character code in the next three functions\n\t\tisDecimalDigit = function(ch) {\n\t\t\treturn (ch >= 48 && ch <= 57); // 0...9\n\t\t},\n\t\tisIdentifierStart = function(ch) {\n\t\t\treturn (ch === 36) || (ch === 95) || // `$` and `_`\n\t\t\t\t\t(ch >= 65 && ch <= 90) || // A...Z\n\t\t\t\t\t(ch >= 97 && ch <= 122) || // a...z\n (ch >= 128 && !binary_ops[String.fromCharCode(ch)]); // any non-ASCII that is not an operator\n\t\t},\n\t\tisIdentifierPart = function(ch) {\n\t\t\treturn (ch === 36) || (ch === 95) || // `$` and `_`\n\t\t\t\t\t(ch >= 65 && ch <= 90) || // A...Z\n\t\t\t\t\t(ch >= 97 && ch <= 122) || // a...z\n\t\t\t\t\t(ch >= 48 && ch <= 57) || // 0...9\n (ch >= 128 && !binary_ops[String.fromCharCode(ch)]); // any non-ASCII that is not an operator\n\t\t},\n\n\t\t// Parsing\n\t\t// -------\n\t\t// `expr` is a string with the passed in expression\n\t\tjsep = function(expr) {\n\t\t\t// `index` stores the character number we are currently at while `length` is a constant\n\t\t\t// All of the gobbles below will modify `index` as we move along\n\t\t\tvar index = 0,\n\t\t\t\tcharAtFunc = expr.charAt,\n\t\t\t\tcharCodeAtFunc = expr.charCodeAt,\n\t\t\t\texprI = function(i) { return charAtFunc.call(expr, i); },\n\t\t\t\texprICode = function(i) { return charCodeAtFunc.call(expr, i); },\n\t\t\t\tlength = expr.length,\n\n\t\t\t\t// Push `index` up to the next non-space character\n\t\t\t\tgobbleSpaces = function() {\n\t\t\t\t\tvar ch = exprICode(index);\n\t\t\t\t\t// space or tab\n\t\t\t\t\twhile(ch === 32 || ch === 9 || ch === 10 || ch === 13) {\n\t\t\t\t\t\tch = exprICode(++index);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t// The main parsing function. Much of this code is dedicated to ternary expressions\n\t\t\t\tgobbleExpression = function() {\n\t\t\t\t\tvar test = gobbleBinaryExpression(),\n\t\t\t\t\t\tconsequent, alternate;\n\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\tif(exprICode(index) === QUMARK_CODE) {\n\t\t\t\t\t\t// Ternary expression: test ? consequent : alternate\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tconsequent = gobbleExpression();\n\t\t\t\t\t\tif(!consequent) {\n\t\t\t\t\t\t\tthrowError('Expected expression', index);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\t\tif(exprICode(index) === COLON_CODE) {\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\talternate = gobbleExpression();\n\t\t\t\t\t\t\tif(!alternate) {\n\t\t\t\t\t\t\t\tthrowError('Expected expression', index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttype: CONDITIONAL_EXP,\n\t\t\t\t\t\t\t\ttest: test,\n\t\t\t\t\t\t\t\tconsequent: consequent,\n\t\t\t\t\t\t\t\talternate: alternate\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrowError('Expected :', index);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn test;\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t// Search for the operation portion of the string (e.g. `+`, `===`)\n\t\t\t\t// Start by taking the longest possible binary operations (3 characters: `===`, `!==`, `>>>`)\n\t\t\t\t// and move down from 3 to 2 to 1 character until a matching binary operation is found\n\t\t\t\t// then, return that binary operation\n\t\t\t\tgobbleBinaryOp = function() {\n\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\tvar biop, to_check = expr.substr(index, max_binop_len), tc_len = to_check.length;\n\t\t\t\t\twhile(tc_len > 0) {\n\t\t\t\t\t\t// Don't accept a binary op when it is an identifier.\n\t\t\t\t\t\t// Binary ops that start with a identifier-valid character must be followed\n\t\t\t\t\t\t// by a non identifier-part valid character\n\t\t\t\t\t\tif(binary_ops.hasOwnProperty(to_check) && (\n\t\t\t\t\t\t\t!isIdentifierStart(exprICode(index)) ||\n\t\t\t\t\t\t\t(index+to_check.length< expr.length && !isIdentifierPart(exprICode(index+to_check.length)))\n\t\t\t\t\t\t)) {\n\t\t\t\t\t\t\tindex += tc_len;\n\t\t\t\t\t\t\treturn to_check;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto_check = to_check.substr(0, --tc_len);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\n\t\t\t\t// This function is responsible for gobbling an individual expression,\n\t\t\t\t// e.g. `1`, `1+2`, `a+(b*2)-Math.sqrt(2)`\n\t\t\t\tgobbleBinaryExpression = function() {\n\t\t\t\t\tvar ch_i, node, biop, prec, stack, biop_info, left, right, i, cur_biop;\n\n\t\t\t\t\t// First, try to get the leftmost thing\n\t\t\t\t\t// Then, check to see if there's a binary operator operating on that leftmost thing\n\t\t\t\t\tleft = gobbleToken();\n\t\t\t\t\tbiop = gobbleBinaryOp();\n\n\t\t\t\t\t// If there wasn't a binary operator, just return the leftmost node\n\t\t\t\t\tif(!biop) {\n\t\t\t\t\t\treturn left;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Otherwise, we need to start a stack to properly place the binary operations in their\n\t\t\t\t\t// precedence structure\n\t\t\t\t\tbiop_info = { value: biop, prec: binaryPrecedence(biop)};\n\n\t\t\t\t\tright = gobbleToken();\n\t\t\t\t\tif(!right) {\n\t\t\t\t\t\tthrowError(\"Expected expression after \" + biop, index);\n\t\t\t\t\t}\n\t\t\t\t\tstack = [left, biop_info, right];\n\n\t\t\t\t\t// Properly deal with precedence using [recursive descent](http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm)\n\t\t\t\t\twhile((biop = gobbleBinaryOp())) {\n\t\t\t\t\t\tprec = binaryPrecedence(biop);\n\n\t\t\t\t\t\tif(prec === 0) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbiop_info = { value: biop, prec: prec };\n\n\t\t\t\t\t\tcur_biop = biop;\n\t\t\t\t\t\t// Reduce: make a binary expression from the three topmost entries.\n\t\t\t\t\t\twhile ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) {\n\t\t\t\t\t\t\tright = stack.pop();\n\t\t\t\t\t\t\tbiop = stack.pop().value;\n\t\t\t\t\t\t\tleft = stack.pop();\n\t\t\t\t\t\t\tnode = createBinaryExpression(biop, left, right);\n\t\t\t\t\t\t\tstack.push(node);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnode = gobbleToken();\n\t\t\t\t\t\tif(!node) {\n\t\t\t\t\t\t\tthrowError(\"Expected expression after \" + cur_biop, index);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstack.push(biop_info, node);\n\t\t\t\t\t}\n\n\t\t\t\t\ti = stack.length - 1;\n\t\t\t\t\tnode = stack[i];\n\t\t\t\t\twhile(i > 1) {\n\t\t\t\t\t\tnode = createBinaryExpression(stack[i - 1].value, stack[i - 2], node);\n\t\t\t\t\t\ti -= 2;\n\t\t\t\t\t}\n\t\t\t\t\treturn node;\n\t\t\t\t},\n\n\t\t\t\t// An individual part of a binary expression:\n\t\t\t\t// e.g. `foo.bar(baz)`, `1`, `\"abc\"`, `(a % 2)` (because it's in parenthesis)\n\t\t\t\tgobbleToken = function() {\n\t\t\t\t\tvar ch, to_check, tc_len;\n\n\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\tch = exprICode(index);\n\n\t\t\t\t\tif(isDecimalDigit(ch) || ch === PERIOD_CODE) {\n\t\t\t\t\t\t// Char code 46 is a dot `.` which can start off a numeric literal\n\t\t\t\t\t\treturn gobbleNumericLiteral();\n\t\t\t\t\t} else if(ch === SQUOTE_CODE || ch === DQUOTE_CODE) {\n\t\t\t\t\t\t// Single or double quotes\n\t\t\t\t\t\treturn gobbleStringLiteral();\n\t\t\t\t\t} else if (ch === OBRACK_CODE) {\n\t\t\t\t\t\treturn gobbleArray();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tto_check = expr.substr(index, max_unop_len);\n\t\t\t\t\t\ttc_len = to_check.length;\n\t\t\t\t\t\twhile(tc_len > 0) {\n\t\t\t\t\t\t// Don't accept an unary op when it is an identifier.\n\t\t\t\t\t\t// Unary ops that start with a identifier-valid character must be followed\n\t\t\t\t\t\t// by a non identifier-part valid character\n\t\t\t\t\t\t\tif(unary_ops.hasOwnProperty(to_check) && (\n\t\t\t\t\t\t\t\t!isIdentifierStart(exprICode(index)) ||\n\t\t\t\t\t\t\t\t(index+to_check.length < expr.length && !isIdentifierPart(exprICode(index+to_check.length)))\n\t\t\t\t\t\t\t)) {\n\t\t\t\t\t\t\t\tindex += tc_len;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttype: UNARY_EXP,\n\t\t\t\t\t\t\t\t\toperator: to_check,\n\t\t\t\t\t\t\t\t\targument: gobbleToken(),\n\t\t\t\t\t\t\t\t\tprefix: true\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tto_check = to_check.substr(0, --tc_len);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isIdentifierStart(ch) || ch === OPAREN_CODE) { // open parenthesis\n\t\t\t\t\t\t\t// `foo`, `bar.baz`\n\t\t\t\t\t\t\treturn gobbleVariable();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\t\t\t\t// Parse simple numeric literals: `12`, `3.4`, `.5`. Do this by using a string to\n\t\t\t\t// keep track of everything in the numeric literal and then calling `parseFloat` on that string\n\t\t\t\tgobbleNumericLiteral = function() {\n\t\t\t\t\tvar number = '', ch, chCode;\n\t\t\t\t\twhile(isDecimalDigit(exprICode(index))) {\n\t\t\t\t\t\tnumber += exprI(index++);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(exprICode(index) === PERIOD_CODE) { // can start with a decimal marker\n\t\t\t\t\t\tnumber += exprI(index++);\n\n\t\t\t\t\t\twhile(isDecimalDigit(exprICode(index))) {\n\t\t\t\t\t\t\tnumber += exprI(index++);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tch = exprI(index);\n\t\t\t\t\tif(ch === 'e' || ch === 'E') { // exponent marker\n\t\t\t\t\t\tnumber += exprI(index++);\n\t\t\t\t\t\tch = exprI(index);\n\t\t\t\t\t\tif(ch === '+' || ch === '-') { // exponent sign\n\t\t\t\t\t\t\tnumber += exprI(index++);\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile(isDecimalDigit(exprICode(index))) { //exponent itself\n\t\t\t\t\t\t\tnumber += exprI(index++);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!isDecimalDigit(exprICode(index-1)) ) {\n\t\t\t\t\t\t\tthrowError('Expected exponent (' + number + exprI(index) + ')', index);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\tchCode = exprICode(index);\n\t\t\t\t\t// Check to make sure this isn't a variable name that start with a number (123abc)\n\t\t\t\t\tif(isIdentifierStart(chCode)) {\n\t\t\t\t\t\tthrowError('Variable names cannot start with a number (' +\n\t\t\t\t\t\t\t\t\tnumber + exprI(index) + ')', index);\n\t\t\t\t\t} else if(chCode === PERIOD_CODE) {\n\t\t\t\t\t\tthrowError('Unexpected period', index);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: LITERAL,\n\t\t\t\t\t\tvalue: parseFloat(number),\n\t\t\t\t\t\traw: number\n\t\t\t\t\t};\n\t\t\t\t},\n\n\t\t\t\t// Parses a string literal, staring with single or double quotes with basic support for escape codes\n\t\t\t\t// e.g. `\"hello world\"`, `'this is\\nJSEP'`\n\t\t\t\tgobbleStringLiteral = function() {\n\t\t\t\t\tvar str = '', quote = exprI(index++), closed = false, ch;\n\n\t\t\t\t\twhile(index < length) {\n\t\t\t\t\t\tch = exprI(index++);\n\t\t\t\t\t\tif(ch === quote) {\n\t\t\t\t\t\t\tclosed = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if(ch === '\\\\') {\n\t\t\t\t\t\t\t// Check for all of the common escape codes\n\t\t\t\t\t\t\tch = exprI(index++);\n\t\t\t\t\t\t\tswitch(ch) {\n\t\t\t\t\t\t\t\tcase 'n': str += '\\n'; break;\n\t\t\t\t\t\t\t\tcase 'r': str += '\\r'; break;\n\t\t\t\t\t\t\t\tcase 't': str += '\\t'; break;\n\t\t\t\t\t\t\t\tcase 'b': str += '\\b'; break;\n\t\t\t\t\t\t\t\tcase 'f': str += '\\f'; break;\n\t\t\t\t\t\t\t\tcase 'v': str += '\\x0B'; break;\n\t\t\t\t\t\t\t\tdefault : str += ch;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstr += ch;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(!closed) {\n\t\t\t\t\t\tthrowError('Unclosed quote after \"'+str+'\"', index);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: LITERAL,\n\t\t\t\t\t\tvalue: str,\n\t\t\t\t\t\traw: quote + str + quote\n\t\t\t\t\t};\n\t\t\t\t},\n\n\t\t\t\t// Gobbles only identifiers\n\t\t\t\t// e.g.: `foo`, `_value`, `$x1`\n\t\t\t\t// Also, this function checks if that identifier is a literal:\n\t\t\t\t// (e.g. `true`, `false`, `null`) or `this`\n\t\t\t\tgobbleIdentifier = function() {\n\t\t\t\t\tvar ch = exprICode(index), start = index, identifier;\n\n\t\t\t\t\tif(isIdentifierStart(ch)) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrowError('Unexpected ' + exprI(index), index);\n\t\t\t\t\t}\n\n\t\t\t\t\twhile(index < length) {\n\t\t\t\t\t\tch = exprICode(index);\n\t\t\t\t\t\tif(isIdentifierPart(ch)) {\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tidentifier = expr.slice(start, index);\n\n\t\t\t\t\tif(literals.hasOwnProperty(identifier)) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttype: LITERAL,\n\t\t\t\t\t\t\tvalue: literals[identifier],\n\t\t\t\t\t\t\traw: identifier\n\t\t\t\t\t\t};\n\t\t\t\t\t} else if(identifier === this_str) {\n\t\t\t\t\t\treturn { type: THIS_EXP };\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttype: IDENTIFIER,\n\t\t\t\t\t\t\tname: identifier\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t// Gobbles a list of arguments within the context of a function call\n\t\t\t\t// or array literal. This function also assumes that the opening character\n\t\t\t\t// `(` or `[` has already been gobbled, and gobbles expressions and commas\n\t\t\t\t// until the terminator character `)` or `]` is encountered.\n\t\t\t\t// e.g. `foo(bar, baz)`, `my_func()`, or `[bar, baz]`\n\t\t\t\tgobbleArguments = function(termination) {\n\t\t\t\t\tvar ch_i, args = [], node, closed = false;\n\t\t\t\t\tvar separator_count = 0;\n\t\t\t\t\twhile(index < length) {\n\t\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\t\tch_i = exprICode(index);\n\t\t\t\t\t\tif(ch_i === termination) { // done parsing\n\t\t\t\t\t\t\tclosed = true;\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\tif(termination === CPAREN_CODE && separator_count && separator_count >= args.length){\n\t\t\t\t\t\t\t\tthrowError('Unexpected token ' + String.fromCharCode(termination), index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} else if (ch_i === COMMA_CODE) { // between expressions\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t\tseparator_count++;\n\t\t\t\t\t\t\tif(separator_count !== args.length) { // missing argument\n\t\t\t\t\t\t\t\tif(termination === CPAREN_CODE) {\n\t\t\t\t\t\t\t\t\tthrowError('Unexpected token ,', index);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if(termination === CBRACK_CODE) {\n\t\t\t\t\t\t\t\t\tfor(var arg = args.length; arg< separator_count; arg++) {\n\t\t\t\t\t\t\t\t\t\targs.push(null);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode = gobbleExpression();\n\t\t\t\t\t\t\tif(!node || node.type === COMPOUND) {\n\t\t\t\t\t\t\t\tthrowError('Expected comma', index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\targs.push(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!closed) {\n\t\t\t\t\t\tthrowError('Expected ' + String.fromCharCode(termination), index);\n\t\t\t\t\t}\n\t\t\t\t\treturn args;\n\t\t\t\t},\n\n\t\t\t\t// Gobble a non-literal variable name. This variable name may include properties\n\t\t\t\t// e.g. `foo`, `bar.baz`, `foo['bar'].baz`\n\t\t\t\t// It also gobbles function calls:\n\t\t\t\t// e.g. `Math.acos(obj.angle)`\n\t\t\t\tgobbleVariable = function() {\n\t\t\t\t\tvar ch_i, node;\n\t\t\t\t\tch_i = exprICode(index);\n\n\t\t\t\t\tif(ch_i === OPAREN_CODE) {\n\t\t\t\t\t\tnode = gobbleGroup();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode = gobbleIdentifier();\n\t\t\t\t\t}\n\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\tch_i = exprICode(index);\n\t\t\t\t\twhile(ch_i === PERIOD_CODE || ch_i === OBRACK_CODE || ch_i === OPAREN_CODE) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\tif(ch_i === PERIOD_CODE) {\n\t\t\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\t\t\tnode = {\n\t\t\t\t\t\t\t\ttype: MEMBER_EXP,\n\t\t\t\t\t\t\t\tcomputed: false,\n\t\t\t\t\t\t\t\tobject: node,\n\t\t\t\t\t\t\t\tproperty: gobbleIdentifier()\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else if(ch_i === OBRACK_CODE) {\n\t\t\t\t\t\t\tnode = {\n\t\t\t\t\t\t\t\ttype: MEMBER_EXP,\n\t\t\t\t\t\t\t\tcomputed: true,\n\t\t\t\t\t\t\t\tobject: node,\n\t\t\t\t\t\t\t\tproperty: gobbleExpression()\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\t\t\tch_i = exprICode(index);\n\t\t\t\t\t\t\tif(ch_i !== CBRACK_CODE) {\n\t\t\t\t\t\t\t\tthrowError('Unclosed [', index);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tindex++;\n\t\t\t\t\t\t} else if(ch_i === OPAREN_CODE) {\n\t\t\t\t\t\t\t// A function call is being made; gobble all the arguments\n\t\t\t\t\t\t\tnode = {\n\t\t\t\t\t\t\t\ttype: CALL_EXP,\n\t\t\t\t\t\t\t\t'arguments': gobbleArguments(CPAREN_CODE),\n\t\t\t\t\t\t\t\tcallee: node\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\t\tch_i = exprICode(index);\n\t\t\t\t\t}\n\t\t\t\t\treturn node;\n\t\t\t\t},\n\n\t\t\t\t// Responsible for parsing a group of things within parentheses `()`\n\t\t\t\t// This function assumes that it needs to gobble the opening parenthesis\n\t\t\t\t// and then tries to gobble everything within that parenthesis, assuming\n\t\t\t\t// that the next thing it should see is the close parenthesis. If not,\n\t\t\t\t// then the expression probably doesn't have a `)`\n\t\t\t\tgobbleGroup = function() {\n\t\t\t\t\tindex++;\n\t\t\t\t\tvar node = gobbleExpression();\n\t\t\t\t\tgobbleSpaces();\n\t\t\t\t\tif(exprICode(index) === CPAREN_CODE) {\n\t\t\t\t\t\tindex++;\n\t\t\t\t\t\treturn node;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrowError('Unclosed (', index);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t// Responsible for parsing Array literals `[1, 2, 3]`\n\t\t\t\t// This function assumes that it needs to gobble the opening bracket\n\t\t\t\t// and then tries to gobble the expressions as arguments.\n\t\t\t\tgobbleArray = function() {\n\t\t\t\t\tindex++;\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: ARRAY_EXP,\n\t\t\t\t\t\telements: gobbleArguments(CBRACK_CODE)\n\t\t\t\t\t};\n\t\t\t\t},\n\n\t\t\t\tnodes = [], ch_i, node;\n\n\t\t\twhile(index < length) {\n\t\t\t\tch_i = exprICode(index);\n\n\t\t\t\t// Expressions can be separated by semicolons, commas, or just inferred without any\n\t\t\t\t// separators\n\t\t\t\tif(ch_i === SEMCOL_CODE || ch_i === COMMA_CODE) {\n\t\t\t\t\tindex++; // ignore separators\n\t\t\t\t} else {\n\t\t\t\t\t// Try to gobble each expression individually\n\t\t\t\t\tif((node = gobbleExpression())) {\n\t\t\t\t\t\tnodes.push(node);\n\t\t\t\t\t// If we weren't able to find a binary expression and are out of room, then\n\t\t\t\t\t// the expression passed in probably has too much\n\t\t\t\t\t} else if(index < length) {\n\t\t\t\t\t\tthrowError('Unexpected \"' + exprI(index) + '\"', index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If there's only one expression just try returning the expression\n\t\t\tif(nodes.length === 1) {\n\t\t\t\treturn nodes[0];\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\ttype: COMPOUND,\n\t\t\t\t\tbody: nodes\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\n\t// To be filled in by the template\n\tjsep.version = '0.3.5';\n\tjsep.toString = function() { return 'JavaScript Expression Parser (JSEP) v' + jsep.version; };\n\n\t/**\n\t * @method jsep.addUnaryOp\n\t * @param {string} op_name The name of the unary op to add\n\t * @return jsep\n\t */\n\tjsep.addUnaryOp = function(op_name) {\n\t\tmax_unop_len = Math.max(op_name.length, max_unop_len);\n\t\tunary_ops[op_name] = t; return this;\n\t};\n\n\t/**\n\t * @method jsep.addBinaryOp\n\t * @param {string} op_name The name of the binary op to add\n\t * @param {number} precedence The precedence of the binary op (can be a float)\n\t * @return jsep\n\t */\n\tjsep.addBinaryOp = function(op_name, precedence) {\n\t\tmax_binop_len = Math.max(op_name.length, max_binop_len);\n\t\tbinary_ops[op_name] = precedence;\n\t\treturn this;\n\t};\n\n\t/**\n\t * @method jsep.addLiteral\n\t * @param {string} literal_name The name of the literal to add\n\t * @param {*} literal_value The value of the literal\n\t * @return jsep\n\t */\n\tjsep.addLiteral = function(literal_name, literal_value) {\n\t\tliterals[literal_name] = literal_value;\n\t\treturn this;\n\t};\n\n\t/**\n\t * @method jsep.removeUnaryOp\n\t * @param {string} op_name The name of the unary op to remove\n\t * @return jsep\n\t */\n\tjsep.removeUnaryOp = function(op_name) {\n\t\tdelete unary_ops[op_name];\n\t\tif(op_name.length === max_unop_len) {\n\t\t\tmax_unop_len = getMaxKeyLen(unary_ops);\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * @method jsep.removeAllUnaryOps\n\t * @return jsep\n\t */\n\tjsep.removeAllUnaryOps = function() {\n\t\tunary_ops = {};\n\t\tmax_unop_len = 0;\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * @method jsep.removeBinaryOp\n\t * @param {string} op_name The name of the binary op to remove\n\t * @return jsep\n\t */\n\tjsep.removeBinaryOp = function(op_name) {\n\t\tdelete binary_ops[op_name];\n\t\tif(op_name.length === max_binop_len) {\n\t\t\tmax_binop_len = getMaxKeyLen(binary_ops);\n\t\t}\n\t\treturn this;\n\t};\n\n\t/**\n\t * @method jsep.removeAllBinaryOps\n\t * @return jsep\n\t */\n\tjsep.removeAllBinaryOps = function() {\n\t\tbinary_ops = {};\n\t\tmax_binop_len = 0;\n\n\t\treturn this;\n\t};\n\n\t/**\n\t * @method jsep.removeLiteral\n\t * @param {string} literal_name The name of the literal to remove\n\t * @return jsep\n\t */\n\tjsep.removeLiteral = function(literal_name) {\n\t\tdelete literals[literal_name];\n\t\treturn this;\n\t};\n\n\t/**\n\t * @method jsep.removeAllLiterals\n\t * @return jsep\n\t */\n\tjsep.removeAllLiterals = function() {\n\t\tliterals = {};\n\n\t\treturn this;\n\t};\n\n\t// In desktop environments, have a way to restore the old value for `jsep`\n\tif (typeof exports === 'undefined') {\n\t\tvar old_jsep = root.jsep;\n\t\t// The star of the show! It's a function!\n\t\troot.jsep = jsep;\n\t\t// And a courteous function willing to move out of the way for other similarly-named objects!\n\t\tjsep.noConflict = function() {\n\t\t\tif(root.jsep === jsep) {\n\t\t\t\troot.jsep = old_jsep;\n\t\t\t}\n\t\t\treturn jsep;\n\t\t};\n\t} else {\n\t\t// In Node.JS environments\n\t\tif (typeof module !== 'undefined' && module.exports) {\n\t\t\texports = module.exports = jsep;\n\t\t} else {\n\t\t\texports.parse = jsep;\n\t\t}\n\t}\n}(this));\n","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport jsep from 'jsep';\n/**\n * Sources:\n * - Copyright (c) 2013 Stephen Oney, http://jsep.from.so/, MIT License\n * - Copyright (c) 2023 Don McCurdy, https://github.com/donmccurdy/expression-eval, MIT License\n */\n// Default operator precedence from https://github.com/EricSmekens/jsep/blob/master/src/jsep.js#L55\nconst DEFAULT_PRECEDENCE = {\n '||': 1,\n '&&': 2,\n '|': 3,\n '^': 4,\n '&': 5,\n '==': 6,\n '!=': 6,\n '===': 6,\n '!==': 6,\n '<': 7,\n '>': 7,\n '<=': 7,\n '>=': 7,\n '<<': 8,\n '>>': 8,\n '>>>': 8,\n '+': 9,\n '-': 9,\n '*': 10,\n '/': 10,\n '%': 10\n};\nconst binops = {\n '||': (a, b) => {\n return a || b;\n },\n '&&': (a, b) => {\n return a && b;\n },\n '|': (a, b) => {\n return a | b;\n },\n '^': (a, b) => {\n return a ^ b;\n },\n '&': (a, b) => {\n return a & b;\n },\n '==': (a, b) => {\n // eslint-disable-next-line eqeqeq\n return a == b;\n },\n '!=': (a, b) => {\n // eslint-disable-next-line eqeqeq\n return a != b;\n },\n '===': (a, b) => {\n return a === b;\n },\n '!==': (a, b) => {\n return a !== b;\n },\n '<': (a, b) => {\n return a < b;\n },\n '>': (a, b) => {\n return a > b;\n },\n '<=': (a, b) => {\n return a <= b;\n },\n '>=': (a, b) => {\n return a >= b;\n },\n '<<': (a, b) => {\n return a << b;\n },\n '>>': (a, b) => {\n return a >> b;\n },\n '>>>': (a, b) => {\n return a >>> b;\n },\n '+': (a, b) => {\n // @ts-expect-error\n return a + b;\n },\n '-': (a, b) => {\n return a - b;\n },\n '*': (a, b) => {\n return a * b;\n },\n '/': (a, b) => {\n return a / b;\n },\n '%': (a, b) => {\n return a % b;\n }\n};\nconst unops = {\n '-': (a) => {\n return -a;\n },\n '+': (a) => {\n // @ts-expect-error\n // eslint-disable-next-line no-implicit-coercion\n return +a;\n },\n '~': (a) => {\n return ~a;\n },\n '!': (a) => {\n return !a;\n }\n};\nfunction evaluateArray(list, context) {\n return list.map(function (v) {\n return evaluate(v, context);\n });\n}\nasync function evaluateArrayAsync(list, context) {\n const res = await Promise.all(list.map(v => evalAsync(v, context)));\n return res;\n}\nfunction evaluateMember(node, context) {\n const object = evaluate(node.object, context);\n let key;\n if (node.computed) {\n key = evaluate(node.property, context);\n }\n else {\n key = node.property.name;\n }\n if (/^__proto__|prototype|constructor$/.test(key)) {\n throw Error(`Access to member \"${key}\" disallowed.`);\n }\n return [object, object[key]];\n}\nasync function evaluateMemberAsync(node, context) {\n const object = await evalAsync(node.object, context);\n let key;\n if (node.computed) {\n key = await evalAsync(node.property, context);\n }\n else {\n key = node.property.name;\n }\n if (/^__proto__|prototype|constructor$/.test(key)) {\n throw Error(`Access to member \"${key}\" disallowed.`);\n }\n return [object, object[key]];\n}\n// eslint-disable-next-line complexity\nfunction evaluate(_node, context) {\n const node = _node;\n switch (node.type) {\n case 'ArrayExpression':\n return evaluateArray(node.elements, context);\n case 'BinaryExpression':\n return binops[node.operator](evaluate(node.left, context), evaluate(node.right, context));\n case 'CallExpression':\n let caller;\n let fn;\n let assign;\n if (node.callee.type === 'MemberExpression') {\n assign = evaluateMember(node.callee, context);\n caller = assign[0];\n fn = assign[1];\n }\n else {\n fn = evaluate(node.callee, context);\n }\n if (typeof fn !== 'function') {\n return undefined;\n }\n return fn.apply(caller, evaluateArray(node.arguments, context));\n case 'ConditionalExpression':\n return evaluate(node.test, context)\n ? evaluate(node.consequent, context)\n : evaluate(node.alternate, context);\n case 'Identifier':\n return context[node.name];\n case 'Literal':\n return node.value;\n case 'LogicalExpression':\n if (node.operator === '||') {\n return evaluate(node.left, context) || evaluate(node.right, context);\n }\n else if (node.operator === '&&') {\n return evaluate(node.left, context) && evaluate(node.right, context);\n }\n return binops[node.operator](evaluate(node.left, context), evaluate(node.right, context));\n case 'MemberExpression':\n return evaluateMember(node, context)[1];\n case 'ThisExpression':\n return context;\n case 'UnaryExpression':\n return unops[node.operator](evaluate(node.argument, context));\n default:\n return undefined;\n }\n}\n// eslint-disable-next-line complexity\nasync function evalAsync(_node, context) {\n const node = _node;\n // Brackets used for some case blocks here, to avoid edge cases related to variable hoisting.\n // See: https://stackoverflow.com/questions/57759348/const-and-let-variable-shadowing-in-a-switch-statement\n switch (node.type) {\n case 'ArrayExpression':\n return await evaluateArrayAsync(node.elements, context);\n case 'BinaryExpression': {\n const [left, right] = await Promise.all([\n evalAsync(node.left, context),\n evalAsync(node.right, context)\n ]);\n return binops[node.operator](left, right);\n }\n case 'CallExpression': {\n let caller;\n let fn;\n let assign;\n if (node.callee.type === 'MemberExpression') {\n assign = await evaluateMemberAsync(node.callee, context);\n caller = assign[0];\n fn = assign[1];\n }\n else {\n fn = await evalAsync(node.callee, context);\n }\n if (typeof fn !== 'function') {\n return undefined;\n }\n return await fn.apply(caller, await evaluateArrayAsync(node.arguments, context));\n }\n case 'ConditionalExpression':\n return (await evalAsync(node.test, context))\n ? await evalAsync(node.consequent, context)\n : await evalAsync(node.alternate, context);\n case 'Identifier':\n return context[node.name];\n case 'Literal':\n return node.value;\n case 'LogicalExpression': {\n if (node.operator === '||') {\n return (await evalAsync(node.left, context)) || (await evalAsync(node.right, context));\n }\n else if (node.operator === '&&') {\n return (await evalAsync(node.left, context)) && (await evalAsync(node.right, context));\n }\n const [left, right] = await Promise.all([\n evalAsync(node.left, context),\n evalAsync(node.right, context)\n ]);\n return binops[node.operator](left, right);\n }\n case 'MemberExpression':\n return (await evaluateMemberAsync(node, context))[1];\n case 'ThisExpression':\n return context;\n case 'UnaryExpression':\n return unops[node.operator](await evalAsync(node.argument, context));\n default:\n return undefined;\n }\n}\nfunction compile(expression) {\n return evaluate.bind(null, jsep(expression));\n}\nfunction compileAsync(expression) {\n return evalAsync.bind(null, jsep(expression));\n}\n// Added functions to inject Custom Unary Operators (and override existing ones)\nfunction addUnaryOp(operator, _function) {\n jsep.addUnaryOp(operator);\n unops[operator] = _function;\n}\n// Added functions to inject Custom Binary Operators (and override existing ones)\nfunction addBinaryOp(operator, precedenceOrFn, _function) {\n if (_function) {\n jsep.addBinaryOp(operator, precedenceOrFn);\n binops[operator] = _function;\n }\n else {\n jsep.addBinaryOp(operator, DEFAULT_PRECEDENCE[operator] || 1);\n binops[operator] = precedenceOrFn;\n }\n}\nexport { jsep as parse, evaluate as eval, evalAsync, compile, compileAsync, addUnaryOp, addBinaryOp };\n//# sourceMappingURL=expression-eval.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { get } from \"../utils/get.js\";\n// expression-eval: Small jsep based expression parser that supports array and object indexing\nimport { parse, eval as evaluate } from \"../utils/expression-eval.js\";\nconst cachedExpressionMap = {\n '-': object => object\n};\n// Calculates an accessor function from a JSON string\n// '-' : x => x\n// 'a.b.c': x => x.a.b.c\nexport default function parseExpressionString(propValue, configuration) {\n // NOTE: Can be null which represents invalid function. Return null so that prop can be omitted\n if (propValue in cachedExpressionMap) {\n return cachedExpressionMap[propValue];\n }\n let func;\n // Compile with expression-eval\n const ast = parse(propValue);\n if (ast.type === 'Identifier') {\n func = row => {\n return get(row, propValue);\n };\n }\n else {\n // NOTE: To avoid security risks, the arguments passed to the\n // compiled expression must only give access to pure data (no globals etc)\n // We disable function call syntax\n traverse(ast, node => {\n if (node.type === 'CallExpression') {\n throw new Error('Function calls not allowed in JSON expressions');\n }\n });\n // TODO Something like `expressionEval.eval(ast, {row});` would be useful for unpacking arrays\n func = row => {\n return evaluate(ast, row);\n };\n }\n // Cache the compiled function\n cachedExpressionMap[propValue] = func;\n return func;\n}\n// Helper function to search all nodes in AST returned by expressionEval\n// eslint-disable-next-line complexity\nfunction traverse(node, visitor) {\n if (Array.isArray(node)) {\n node.forEach(element => traverse(element, visitor));\n }\n else if (node && typeof node === 'object') {\n if (node.type) {\n visitor(node);\n }\n for (const key in node) {\n traverse(node[key], visitor);\n }\n }\n}\n//# sourceMappingURL=parse-expression-string.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nconst FUNCTION_IDENTIFIER = '@@=';\nconst CONSTANT_IDENTIFIER = '@@#';\nconst TYPE_KEY = '@@type';\nconst FUNCTION_KEY = '@@function';\nexport { FUNCTION_IDENTIFIER, CONSTANT_IDENTIFIER, TYPE_KEY, FUNCTION_KEY };\n//# sourceMappingURL=syntactic-sugar.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// TODO - default parsing code should not be part of the configuration.\nimport parseExpressionString from \"./helpers/parse-expression-string.js\";\nimport assert from \"./utils/assert.js\";\nimport { TYPE_KEY, FUNCTION_KEY } from \"./syntactic-sugar.js\";\nconst isObject = value => value && typeof value === 'object';\nexport default class JSONConfiguration {\n constructor(...configurations) {\n this.typeKey = TYPE_KEY;\n this.functionKey = FUNCTION_KEY;\n this.log = console; // eslint-disable-line\n this.classes = {};\n this.reactComponents = {};\n this.enumerations = {};\n this.constants = {};\n this.functions = {};\n this.React = null;\n // TODO - this needs to be simpler, function conversion should be built in\n this.convertFunction = parseExpressionString;\n this.preProcessClassProps = (Class, props) => props;\n this.postProcessConvertedJson = json => json;\n for (const configuration of configurations) {\n this.merge(configuration);\n }\n }\n merge(configuration) {\n for (const key in configuration) {\n switch (key) {\n // DEPRECATED = For backwards compatibility, add views and layers to classes;\n case 'layers':\n case 'views':\n Object.assign(this.classes, configuration[key]);\n break;\n default:\n // Store configuration as root fields (this.classes, ...)\n if (key in this) {\n const value = configuration[key];\n this[key] = isObject(this[key]) ? Object.assign(this[key], value) : value;\n }\n }\n }\n }\n validate(configuration) {\n assert(!this.typeKey || typeof this.typeKey === 'string');\n assert(isObject(this.classes));\n return true;\n }\n}\n//# sourceMappingURL=json-configuration.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport parseExpressionString from \"./parse-expression-string.js\";\nimport { FUNCTION_IDENTIFIER } from \"../syntactic-sugar.js\";\nfunction hasFunctionIdentifier(value) {\n return typeof value === 'string' && value.startsWith(FUNCTION_IDENTIFIER);\n}\nfunction trimFunctionIdentifier(value) {\n return value.replace(FUNCTION_IDENTIFIER, '');\n}\n// Try to determine if any props are function valued\n// and if so convert their string values to functions\nexport default function convertFunctions(props, configuration) {\n // Use deck.gl prop types if available.\n const replacedProps = {};\n for (const propName in props) {\n let propValue = props[propName];\n // Parse string valued expressions\n const isFunction = hasFunctionIdentifier(propValue);\n if (isFunction) {\n // Parse string as \"expression\", return equivalent JavaScript function\n propValue = trimFunctionIdentifier(propValue);\n propValue = parseExpressionString(propValue, configuration);\n }\n replacedProps[propName] = propValue;\n }\n return replacedProps;\n}\n//# sourceMappingURL=convert-functions.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport convertFunctions from \"./convert-functions.js\";\n// This attempts to instantiate a class, either as a class or as a React component\nexport function instantiateClass(type, props, configuration) {\n // Find the class\n const Class = configuration.classes[type];\n const Component = configuration.reactComponents[type];\n // Check that the class is in the configuration.\n if (!Class && !Component) {\n const { log } = configuration; // eslint-disable-line\n if (log) {\n const stringProps = JSON.stringify(props, null, 0).slice(0, 40);\n log.warn(`JSON converter: No registered class of type ${type}(${stringProps}...) `);\n }\n return null;\n }\n if (Class) {\n return instantiateJavaScriptClass(Class, props, configuration);\n }\n return instantiateReactComponent(Component, props, configuration);\n}\nfunction instantiateJavaScriptClass(Class, props, configuration) {\n if (configuration.preProcessClassProps) {\n props = configuration.preProcessClassProps(Class, props, configuration);\n }\n props = convertFunctions(props, configuration);\n return new Class(props);\n}\nfunction instantiateReactComponent(Component, props, configuration) {\n const { React } = configuration;\n const { children = [] } = props;\n delete props.children;\n if (configuration.preProcessClassProps) {\n props = configuration.preProcessClassProps(Component, props, configuration);\n }\n props = convertFunctions(props, configuration);\n return React.createElement(Component, props, children);\n}\n//# sourceMappingURL=instantiate-class.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// This attempts to execute a function\nexport function executeFunction(targetFunction, props, configuration) {\n // Find the function\n const matchedFunction = configuration.functions[targetFunction];\n // Check that the function is in the configuration.\n if (!matchedFunction) {\n const { log } = configuration; // eslint-disable-line\n if (log) {\n const stringProps = JSON.stringify(props, null, 0).slice(0, 40);\n log.warn(`JSON converter: No registered function ${targetFunction}(${stringProps}...) `);\n }\n return null;\n }\n return matchedFunction(props);\n}\n//# sourceMappingURL=execute-function.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Accept JSON strings by parsing them\n// TODO - use a parser that provides meaninful error messages\nexport default function parseJSON(json) {\n return typeof json === 'string' ? JSON.parse(json) : json;\n}\n//# sourceMappingURL=parse-json.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// Converts JSON to props (\"hydrating\" classes, resolving enums and functions etc).\n// Lightly processes `json` props, transform string values, and extract `views` and `layers`\n// See: https://github.com/visgl/deck.gl/blob/master/dev-docs/RFCs/v6.1/json-layers-rfc.md\n//\n// NOTES:\n// * This is intended to provide minimal necessary processing required to support\n// existing deck.gl props via JSON. This is not an implementation of alternate JSON schemas.\n// * Optionally, error checking could be applied, but ideally should leverage\n// non-JSON specific mechanisms like prop types.\nimport assert from \"./utils/assert.js\";\nimport JSONConfiguration from \"./json-configuration.js\";\nimport { instantiateClass } from \"./helpers/instantiate-class.js\";\nimport { executeFunction } from \"./helpers/execute-function.js\";\nimport { FUNCTION_IDENTIFIER, CONSTANT_IDENTIFIER, FUNCTION_KEY } from \"./syntactic-sugar.js\";\nimport parseJSON from \"./helpers/parse-json.js\";\nconst isObject = value => value && typeof value === 'object';\nexport default class JSONConverter {\n constructor(props) {\n this.log = console; // eslint-disable-line\n this.onJSONChange = () => { };\n this.json = null;\n this.convertedJson = null;\n this.setProps(props);\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n finalize() { }\n setProps(props) {\n // HANDLE CONFIGURATION PROPS\n if ('configuration' in props) {\n // Accept object or `JSONConfiguration`\n this.configuration =\n props.configuration instanceof JSONConfiguration\n ? props.configuration\n : new JSONConfiguration(props.configuration);\n }\n if ('onJSONChange' in props) {\n this.onJSONChange = props.onJSONChange;\n }\n }\n mergeConfiguration(config) {\n this.configuration.merge(config);\n }\n convert(json) {\n // Use shallow equality to ensure we only convert same json once\n if (!json || json === this.json) {\n return this.convertedJson;\n }\n // Save json for shallow diffing\n this.json = json;\n // Accept JSON strings by parsing them\n const parsedJSON = parseJSON(json);\n // Convert the JSON\n let convertedJson = convertJSON(parsedJSON, this.configuration);\n convertedJson = this.configuration.postProcessConvertedJson(convertedJson);\n this.convertedJson = convertedJson;\n return convertedJson;\n }\n // DEPRECATED: Backwards compatibility\n convertJson(json) {\n return this.convert(json);\n }\n}\nfunction convertJSON(json, configuration) {\n // Fixup configuration\n configuration = new JSONConfiguration(configuration);\n return convertJSONRecursively(json, '', configuration);\n}\n// Converts JSON to props (\"hydrating\" classes, resolving enums and functions etc).\nfunction convertJSONRecursively(json, key, configuration) {\n if (Array.isArray(json)) {\n return json.map((element, i) => convertJSONRecursively(element, String(i), configuration));\n }\n // If object.type is in configuration, instantiate\n if (isClassInstance(json, configuration)) {\n return convertClassInstance(json, configuration);\n }\n if (isObject(json)) {\n // If object.function is in configuration, convert object to function\n if (FUNCTION_KEY in json) {\n return convertFunctionObject(json, configuration);\n }\n return convertPlainObject(json, configuration);\n }\n // Single value\n if (typeof json === 'string') {\n return convertString(json, key, configuration);\n }\n // Return unchanged (number, boolean, ...)\n return json;\n}\n// Returns true if an object has a `type` field\nfunction isClassInstance(json, configuration) {\n const { typeKey } = configuration;\n const isClass = isObject(json) && Boolean(json[typeKey]);\n return isClass;\n}\nfunction convertClassInstance(json, configuration) {\n // Extract the class type field\n const { typeKey } = configuration;\n const type = json[typeKey];\n // Prepare a props object and ensure all values have been converted\n let props = { ...json };\n delete props[typeKey];\n props = convertPlainObject(props, configuration);\n return instantiateClass(type, props, configuration);\n}\n// Plain JS object, embed functions.\nfunction convertFunctionObject(json, configuration) {\n // Extract the target function field\n const { functionKey } = configuration;\n const targetFunction = json[functionKey];\n // Prepare a props object and ensure all values have been converted\n let props = { ...json };\n delete props[functionKey];\n props = convertPlainObject(props, configuration);\n return executeFunction(targetFunction, props, configuration);\n}\n// Plain JS object, convert each key and return.\nfunction convertPlainObject(json, configuration) {\n assert(isObject(json));\n const result = {};\n for (const key in json) {\n const value = json[key];\n result[key] = convertJSONRecursively(value, key, configuration);\n }\n return result;\n}\n// Convert one string value in an object\n// TODO - We could also support string syntax for hydrating other types, like regexps...\n// But no current use case\nfunction convertString(string, key, configuration) {\n // Here the JSON value is supposed to be treated as a function\n if (string.startsWith(FUNCTION_IDENTIFIER) && configuration.convertFunction) {\n string = string.replace(FUNCTION_IDENTIFIER, '');\n return configuration.convertFunction(string, configuration);\n }\n if (string.startsWith(CONSTANT_IDENTIFIER)) {\n string = string.replace(CONSTANT_IDENTIFIER, '');\n if (configuration.constants[string]) {\n return configuration.constants[string];\n }\n // enum\n const [enumVarName, enumValName] = string.split('.');\n return configuration.enumerations[enumVarName][enumValName];\n }\n return string;\n}\n//# sourceMappingURL=json-converter.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n/* global document */\nconst state = {\n onInitialize: _ => _,\n onFinalize: _ => _,\n onMessage: _ => _\n};\nexport default class Transport {\n static setCallbacks({ onInitialize, onFinalize, onMessage }) {\n if (onInitialize) {\n state.onInitialize = onInitialize;\n }\n if (onFinalize) {\n state.onFinalize = onFinalize;\n }\n if (onMessage) {\n state.onMessage = onMessage;\n }\n // this._flushQueuedConnections();\n }\n constructor(name = 'Transport') {\n this._messageQueue = [];\n this.userData = {};\n this._destroyed = false;\n this.name = name;\n }\n /**\n * Return a root DOM element for this transport connection\n * @return {HTMLElement} default implementation returns document.body\n * Jupyter Notebook transports will return an element associated with the notebook cell\n */\n getRootDOMElement() {\n return typeof document !== 'undefined' ? document.body : null;\n }\n /**\n * Back-channel messaging\n */\n sendJSONMessage() {\n // eslint-disable-next-line\n console.error('Back-channel not implemented for this transport');\n }\n /**\n * Back-channel messaging\n */\n sendBinaryMessage() {\n // eslint-disable-next-line\n console.error('Back-channel not implemented for this transport');\n }\n //\n // API for transports (not intended for apps)\n //\n _initialize(options = {}) {\n const message = { transport: this, ...options };\n state.onInitialize(message);\n // console.debug('Resolving init promise', options); // eslint-disable-line\n // this._initResolvers.resolve(message);\n }\n _finalize(options = {}) {\n const message = { transport: this, ...options };\n // TODO - could potentially be called without Initialize being called\n state.onFinalize(message);\n this._destroyed = true;\n }\n _messageReceived(message = {}) {\n message = { transport: this, ...message };\n // TODO - this function could potentially be called before callback registered/ Initialize called\n // if (!state.onMessage) {\n // console.error('Queueing transport message', message); // eslint-disable-line\n // this._messageQueue.push(message);\n // return;\n // }\n console.debug('Delivering transport message', message); // eslint-disable-line\n state.onMessage(message);\n }\n /*\n // This tries to handle the case that a transport connection initializes before the application\n // has set the callbacks.\n // Note: It is not clear that this can actually happen in the in initial Jupyter widget transport\n _flushQueuedConnections() {\n if (onInitialize) {\n state._initPromise.then(initArgs => {\n onInitialize(initArgs);\n \n if (state._onMessage) {\n // Send any queued messages\n let message;\n while ((message = this._messageQueue.pop())) {\n console.debug('Delivering queued transport message', message); // eslint-disable-line\n this._onMessage(message);\n }\n }\n });\n }\n }\n */\n static _stringifyJSONSafe(v) {\n const cache = new Set();\n return JSON.stringify(v, (key, value) => {\n if (typeof value === 'object' && value !== null) {\n if (cache.has(value)) {\n // Circular reference found\n try {\n // If this value does not reference a parent it can be deduped\n return JSON.parse(JSON.stringify(value));\n }\n catch (err) {\n // discard key if value cannot be deduped\n return undefined;\n }\n }\n // Store value in our set\n cache.add(value);\n }\n return value;\n });\n }\n}\n//# sourceMappingURL=transport.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n// TODO - can we reuse the core util? Assuming we don't want to export it\n/* eslint-disable complexity */\n// Compares two objects to see if their keys are shallowly equal\nexport function shallowEqualObjects(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== 'object' || a === null || typeof b !== 'object' || b === null) {\n return false;\n }\n if (Object.keys(a).length !== Object.keys(b).length) {\n return false;\n }\n for (const key in a) {\n if (!(key in b) || a[key] !== b[key]) {\n return false;\n }\n }\n for (const key in b) {\n if (!(key in a)) {\n return false;\n }\n }\n return true;\n}\n//# sourceMappingURL=shallow-equal-objects.js.map"],"names":["assert","condition","message","get","container","compositeKey","keyList","getKeys","value","key","isObject","keyMap","root","COMPOUND","IDENTIFIER","MEMBER_EXP","LITERAL","THIS_EXP","CALL_EXP","UNARY_EXP","BINARY_EXP","LOGICAL_EXP","CONDITIONAL_EXP","ARRAY_EXP","PERIOD_CODE","COMMA_CODE","SQUOTE_CODE","DQUOTE_CODE","OPAREN_CODE","CPAREN_CODE","OBRACK_CODE","CBRACK_CODE","QUMARK_CODE","SEMCOL_CODE","COLON_CODE","throwError","index","error","t","unary_ops","binary_ops","getMaxKeyLen","obj","max_len","len","max_unop_len","max_binop_len","literals","this_str","binaryPrecedence","op_val","createBinaryExpression","operator","left","right","type","isDecimalDigit","ch","isIdentifierStart","isIdentifierPart","jsep","expr","charAtFunc","charCodeAtFunc","exprI","i","exprICode","length","gobbleSpaces","gobbleExpression","test","gobbleBinaryExpression","consequent","alternate","gobbleBinaryOp","to_check","tc_len","node","biop","prec","stack","biop_info","cur_biop","gobbleToken","gobbleNumericLiteral","gobbleStringLiteral","gobbleArray","gobbleVariable","number","chCode","str","quote","closed","gobbleIdentifier","start","identifier","gobbleArguments","termination","ch_i","args","separator_count","arg","gobbleGroup","nodes","op_name","precedence","literal_name","literal_value","module","exports","binops","a","b","unops","evaluateArray","list","context","v","evaluate","evaluateMember","object","_node","caller","fn","assign","cachedExpressionMap","parseExpressionString","propValue","configuration","func","ast","parse","row","traverse","visitor","element","FUNCTION_IDENTIFIER","CONSTANT_IDENTIFIER","TYPE_KEY","FUNCTION_KEY","JSONConfiguration","configurations","Class","props","json","hasFunctionIdentifier","trimFunctionIdentifier","convertFunctions","replacedProps","propName","instantiateClass","Component","log","stringProps","instantiateJavaScriptClass","instantiateReactComponent","React","children","executeFunction","targetFunction","matchedFunction","parseJSON","JSONConverter","config","parsedJSON","convertedJson","convertJSON","convertJSONRecursively","isClassInstance","convertClassInstance","convertFunctionObject","convertPlainObject","convertString","typeKey","functionKey","result","string","enumVarName","enumValName","state","_","Transport","onInitialize","onFinalize","onMessage","name","options","cache","shallowEqualObjects"],"mappings":"2DAGe,SAASA,EAAOC,EAAWC,EAAU,GAAI,CACpD,GAAI,CAACD,EACD,MAAM,IAAI,MAAM,yBAAyBC,CAAO,EAAE,CAE1D,CCGO,SAASC,GAAIC,EAAWC,EAAc,CAEzC,MAAMC,EAAUC,GAAQF,CAAY,EAEpC,IAAIG,EAAQJ,EACZ,UAAWK,KAAOH,EAEdE,EAAQE,GAASF,CAAK,EAAIA,EAAMC,CAAG,EAAI,OAE3C,OAAOD,CACX,CAMA,SAASE,GAASF,EAAO,CACrB,OAAOA,IAAU,MAAQ,OAAOA,GAAU,QAC9C,CAEA,M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AC3BA,EAAU,CAAE,UAAW,KAAM,GAAGA,CAAO,EAOvC,QAAQ,MAAM,+BAAgCA,CAAO,EACrDiL,EAAM,UAAUjL,CAAO,CAC3B,CAsBA,OAAO,mBAAmBmH,EAAG,CACzB,MAAMsE,EAAQ,IAAI,IAClB,OAAO,KAAK,UAAUtE,EAAG,CAAC5G,EAAKD,IAAU,CACrC,GAAI,OAAOA,GAAU,UAAYA,IAAU,KAAM,CAC7C,GAAImL,EAAM,IAAInL,CAAK,EAEf,GAAI,CAEA,OAAO,KAAK,MAAM,KAAK,UAAUA,CAAK,CAAC,CAC3C,MACY,CAER,MACJ,CAGJmL,EAAM,IAAInL,CAAK,CACnB,CACA,OAAOA,CACX,CAAC,CACL,CACJ,CChHO,SAASoL,GAAoB7E,EAAGC,EAAG,CACtC,GAAID,IAAMC,EACN,MAAO,GAKX,GAHI,OAAOD,GAAM,UAAYA,IAAM,MAAQ,OAAOC,GAAM,UAAYA,IAAM,MAGtE,OAAO,KAAKD,CAAC,EAAE,SAAW,OAAO,KAAKC,CAAC,EAAE,OACzC,MAAO,GAEX,UAAWvG,KAAOsG,EACd,GAAI,EAAEtG,KAAOuG,IAAMD,EAAEtG,CAAG,IAAMuG,EAAEvG,CAAG,EAC/B,MAAO,GAGf,UAAWA,KAAOuG,EACd,GAAI,EAAEvG,KAAOsG,GACT,MAAO,GAGf,MAAO,EACX","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13]}
@@ -0,0 +1,268 @@
1
+ import{A as H,B as q,G as J,I as X,P as Z,a as $,S as Q,T as Y,M as ee,b as te}from"./assets/geojson-layer-CLhXLxdI.js";import{L as v,p as m,d as _,G as h}from"./assets/layer-DO63TrsS.js";import{c as w}from"./assets/color-CUNNsFV-.js";import{U as d}from"./assets/deep-equal-uriyKJca.js";import{M as P}from"./assets/shader-BJmsOfPx.js";import{C as x}from"./assets/solid-polygon-layer-DiarVGxh.js";import{P as ie,S as re}from"./assets/solid-polygon-layer-DiarVGxh.js";import{C as y}from"./assets/cube-geometry-CzJ_uBWa.js";import"./assets/tesselator-49Dw9L5A.js";import"./assets/webgl-developer-tools-CZl8qVFg.js";import"./assets/assert-hrfsarFU.js";import"./assets/project-CrvReKGW.js";import"./assets/array-utils-flat-wyE8tIYR.js";import"./assets/webgl-device-BY0-CUP6.js";import"./assets/_commonjsHelpers-CqkleIqs.js";const S=`struct LineUniforms {
2
+ widthScale: f32,
3
+ widthMinPixels: f32,
4
+ widthMaxPixels: f32,
5
+ useShortestPath: f32,
6
+ widthUnits: i32,
7
+ };
8
+
9
+ @group(0) @binding(1)
10
+ var<uniform> line: LineUniforms;
11
+ `,u=`uniform lineUniforms {
12
+ float widthScale;
13
+ float widthMinPixels;
14
+ float widthMaxPixels;
15
+ float useShortestPath;
16
+ highp int widthUnits;
17
+ } line;
18
+ `,L={name:"line",source:S,vs:u,fs:u,uniformTypes:{widthScale:"f32",widthMinPixels:"f32",widthMaxPixels:"f32",useShortestPath:"f32",widthUnits:"i32"}},C=`// ---------- Helper Structures & Functions ----------
19
+
20
+ // Placeholder filter functions.
21
+ fn deckgl_filter_size(offset: vec3<f32>, geometry: Geometry) -> vec3<f32> {
22
+ return offset;
23
+ }
24
+ fn deckgl_filter_gl_position(p: vec4<f32>, geometry: Geometry) -> vec4<f32> {
25
+ return p;
26
+ }
27
+ fn deckgl_filter_color(color: vec4<f32>, geometry: Geometry) -> vec4<f32> {
28
+ return color;
29
+ }
30
+
31
+ // Compute an extrusion offset given a line direction (in clipspace),
32
+ // an offset direction (-1 or 1), and a width in pixels.
33
+ // Assumes a uniform "project" with a viewportSize field is available.
34
+ fn getExtrusionOffset(line_clipspace: vec2<f32>, offset_direction: f32, width: f32) -> vec2<f32> {
35
+ // project.viewportSize should be provided as a uniform (not shown here)
36
+ let dir_screenspace = normalize(line_clipspace * project.viewportSize);
37
+ // Rotate by 90°: (x,y) becomes (-y,x)
38
+ let rotated = vec2<f32>(-dir_screenspace.y, dir_screenspace.x);
39
+ return rotated * offset_direction * width / 2.0;
40
+ }
41
+
42
+ // Splits the line between two points at a given x coordinate.
43
+ // Interpolates the y and z components.
44
+ fn splitLine(a: vec3<f32>, b: vec3<f32>, x: f32) -> vec3<f32> {
45
+ let t: f32 = (x - a.x) / (b.x - a.x);
46
+ return vec3<f32>(x, a.yz + t * (b.yz - a.yz));
47
+ }
48
+
49
+ // ---------- Uniforms & Global Structures ----------
50
+
51
+ // Uniforms for line, color, and project are assumed to be defined elsewhere.
52
+ // For example:
53
+ //
54
+ // @group(0) @binding(0)
55
+ // var<uniform> line: LineUniform;
56
+ //
57
+ // struct ColorUniform {
58
+ // opacity: f32,
59
+ // };
60
+ // @group(0) @binding(1)
61
+ // var<uniform> color: ColorUniform;
62
+ //
63
+ // struct ProjectUniform {
64
+ // viewportSize: vec2<f32>,
65
+ // };
66
+ // @group(0) @binding(2)
67
+ // var<uniform> project: ProjectUniform;
68
+
69
+
70
+
71
+ // ---------- Vertex Output Structure ----------
72
+
73
+ struct Varyings {
74
+ @builtin(position) gl_Position: vec4<f32>,
75
+ @location(0) vColor: vec4<f32>,
76
+ @location(1) uv: vec2<f32>,
77
+ };
78
+
79
+ // ---------- Vertex Shader Entry Point ----------
80
+
81
+ @vertex
82
+ fn vertexMain(
83
+ @location(0) positions: vec3<f32>,
84
+ @location(1) instanceSourcePositions: vec3<f32>,
85
+ @location(2) instanceTargetPositions: vec3<f32>,
86
+ @location(3) instanceSourcePositions64Low: vec3<f32>,
87
+ @location(4) instanceTargetPositions64Low: vec3<f32>,
88
+ @location(5) instanceColors: vec4<f32>,
89
+ @location(6) instancePickingColors: vec3<f32>,
90
+ @location(7) instanceWidths: f32
91
+ ) -> Varyings {
92
+ var geometry: Geometry;
93
+ geometry.worldPosition = instanceSourcePositions;
94
+ geometry.worldPositionAlt = instanceTargetPositions;
95
+
96
+ var source_world: vec3<f32> = instanceSourcePositions;
97
+ var target_world: vec3<f32> = instanceTargetPositions;
98
+ var source_world_64low: vec3<f32> = instanceSourcePositions64Low;
99
+ var target_world_64low: vec3<f32> = instanceTargetPositions64Low;
100
+
101
+ // Apply shortest-path adjustments if needed.
102
+ if (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {
103
+ source_world.x = (source_world.x + 180.0 % 360.0) - 180.0;
104
+ target_world.x = (target_world.x + 180.0 % 360.0) - 180.0;
105
+ let deltaLng: f32 = target_world.x - source_world.x;
106
+
107
+ if (deltaLng * line.useShortestPath > 180.0) {
108
+ source_world.x = source_world.x + 360.0 * line.useShortestPath;
109
+ source_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);
110
+ source_world_64low = vec3<f32>(0.0, 0.0, 0.0);
111
+ } else if (deltaLng * line.useShortestPath < -180.0) {
112
+ target_world.x = target_world.x + 360.0 * line.useShortestPath;
113
+ target_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);
114
+ target_world_64low = vec3<f32>(0.0, 0.0, 0.0);
115
+ } else if (line.useShortestPath < 0.0) {
116
+ var abortOut: Varyings;
117
+ abortOut.gl_Position = vec4<f32>(0.0);
118
+ abortOut.vColor = vec4<f32>(0.0);
119
+ abortOut.uv = vec2<f32>(0.0);
120
+ return abortOut;
121
+ }
122
+ }
123
+
124
+ // Project Pos and target positions to clip space.
125
+ let sourceResult = project_position_to_clipspace_and_commonspace(source_world, source_world_64low, vec3<f32>(0.0));
126
+ let targetResult = project_position_to_clipspace_and_commonspace(target_world, target_world_64low, vec3<f32>(0.0));
127
+ let sourcePos: vec4<f32> = sourceResult.clipPosition;
128
+ let targetPos: vec4<f32> = targetResult.clipPosition;
129
+ let source_commonspace: vec4<f32> = sourceResult.commonPosition;
130
+ let target_commonspace: vec4<f32> = targetResult.commonPosition;
131
+
132
+ // Interpolate along the line segment.
133
+ let segmentIndex: f32 = positions.x;
134
+ let p: vec4<f32> = sourcePos + segmentIndex * (targetPos - sourcePos);
135
+ geometry.position = source_commonspace + segmentIndex * (target_commonspace - source_commonspace);
136
+ let uv: vec2<f32> = positions.xy;
137
+ geometry.uv = uv;
138
+ geometry.pickingColor = instancePickingColors;
139
+
140
+ // Determine width in pixels.
141
+ let widthPixels: f32 = clamp(
142
+ project_unit_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),
143
+ line.widthMinPixels, line.widthMaxPixels
144
+ );
145
+
146
+ // Compute extrusion offset.
147
+ let extrusion: vec2<f32> = getExtrusionOffset(targetPos.xy - sourcePos.xy, positions.y, widthPixels);
148
+ let offset: vec3<f32> = vec3<f32>(extrusion, 0.0);
149
+
150
+ // Apply deck.gl filter functions.
151
+ let filteredOffset = deckgl_filter_size(offset, geometry);
152
+ let filteredP = deckgl_filter_gl_position(p, geometry);
153
+
154
+ let clipOffset: vec2<f32> = project_pixel_size_to_clipspace(filteredOffset.xy);
155
+ let finalPosition: vec4<f32> = filteredP + vec4<f32>(clipOffset, 0.0, 0.0);
156
+
157
+ // Compute color.
158
+ var vColor: vec4<f32> = vec4<f32>(instanceColors.rgb, instanceColors.a * color.opacity);
159
+ // vColor = deckgl_filter_color(vColor, geometry);
160
+
161
+ var output: Varyings;
162
+ output.gl_Position = finalPosition;
163
+ output.vColor = vColor;
164
+ output.uv = uv;
165
+ return output;
166
+ }
167
+
168
+ @fragment
169
+ fn fragmentMain(
170
+ @location(0) vColor: vec4<f32>,
171
+ @location(1) uv: vec2<f32>
172
+ ) -> @location(0) vec4<f32> {
173
+ // Create and initialize geometry with the provided uv.
174
+ var geometry: Geometry;
175
+ geometry.uv = uv;
176
+
177
+ // Start with the input color.
178
+ var fragColor: vec4<f32> = vColor;
179
+
180
+ // Apply the deck.gl filter to the color.
181
+ fragColor = deckgl_filter_color(fragColor, geometry);
182
+
183
+ // Apply premultiplied alpha as required by transparent canvas
184
+ fragColor = deckgl_premultiplied_alpha(fragColor);
185
+
186
+ return fragColor;
187
+ }
188
+ `,b=`#version 300 es
189
+ #define SHADER_NAME line-layer-vertex-shader
190
+ in vec3 positions;
191
+ in vec3 instanceSourcePositions;
192
+ in vec3 instanceTargetPositions;
193
+ in vec3 instanceSourcePositions64Low;
194
+ in vec3 instanceTargetPositions64Low;
195
+ in vec4 instanceColors;
196
+ in vec3 instancePickingColors;
197
+ in float instanceWidths;
198
+ out vec4 vColor;
199
+ out vec2 uv;
200
+ vec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {
201
+ vec2 dir_screenspace = normalize(line_clipspace * project.viewportSize);
202
+ dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);
203
+ return dir_screenspace * offset_direction * width / 2.0;
204
+ }
205
+ vec3 splitLine(vec3 a, vec3 b, float x) {
206
+ float t = (x - a.x) / (b.x - a.x);
207
+ return vec3(x, mix(a.yz, b.yz, t));
208
+ }
209
+ void main(void) {
210
+ geometry.worldPosition = instanceSourcePositions;
211
+ geometry.worldPositionAlt = instanceTargetPositions;
212
+ vec3 source_world = instanceSourcePositions;
213
+ vec3 target_world = instanceTargetPositions;
214
+ vec3 source_world_64low = instanceSourcePositions64Low;
215
+ vec3 target_world_64low = instanceTargetPositions64Low;
216
+ if (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {
217
+ source_world.x = mod(source_world.x + 180., 360.0) - 180.;
218
+ target_world.x = mod(target_world.x + 180., 360.0) - 180.;
219
+ float deltaLng = target_world.x - source_world.x;
220
+ if (deltaLng * line.useShortestPath > 180.) {
221
+ source_world.x += 360. * line.useShortestPath;
222
+ source_world = splitLine(source_world, target_world, 180. * line.useShortestPath);
223
+ source_world_64low = vec3(0.0);
224
+ } else if (deltaLng * line.useShortestPath < -180.) {
225
+ target_world.x += 360. * line.useShortestPath;
226
+ target_world = splitLine(source_world, target_world, 180. * line.useShortestPath);
227
+ target_world_64low = vec3(0.0);
228
+ } else if (line.useShortestPath < 0.) {
229
+ gl_Position = vec4(0.);
230
+ return;
231
+ }
232
+ }
233
+ vec4 source_commonspace;
234
+ vec4 target_commonspace;
235
+ vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);
236
+ vec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);
237
+ float segmentIndex = positions.x;
238
+ vec4 p = mix(source, target, segmentIndex);
239
+ geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);
240
+ uv = positions.xy;
241
+ geometry.uv = uv;
242
+ geometry.pickingColor = instancePickingColors;
243
+ float widthPixels = clamp(
244
+ project_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),
245
+ line.widthMinPixels, line.widthMaxPixels
246
+ );
247
+ vec3 offset = vec3(
248
+ getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),
249
+ 0.0);
250
+ DECKGL_FILTER_SIZE(offset, geometry);
251
+ DECKGL_FILTER_GL_POSITION(p, geometry);
252
+ gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);
253
+ vColor = vec4(instanceColors.rgb, instanceColors.a * layer.opacity);
254
+ DECKGL_FILTER_COLOR(vColor, geometry);
255
+ }
256
+ `,M=`#version 300 es
257
+ #define SHADER_NAME line-layer-fragment-shader
258
+ precision highp float;
259
+ in vec4 vColor;
260
+ in vec2 uv;
261
+ out vec4 fragColor;
262
+ void main(void) {
263
+ geometry.uv = uv;
264
+ fragColor = vColor;
265
+ DECKGL_FILTER_COLOR(fragColor, geometry);
266
+ }
267
+ `,z=[0,0,0,255],T={getSourcePosition:{type:"accessor",value:o=>o.sourcePosition},getTargetPosition:{type:"accessor",value:o=>o.targetPosition},getColor:{type:"accessor",value:z},getWidth:{type:"accessor",value:1},widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class f extends v{getBounds(){return this.getAttributeManager()?.getBounds(["instanceSourcePositions","instanceTargetPositions"])}getShaders(){return super.getShaders({vs:b,fs:M,source:C,modules:[m,w,_,L]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:"float64",fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:"float64",fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1}})}updateState(e){super.updateState(e),e.changeFlags.extensionsChanged&&(this.state.model?.destroy(),this.state.model=this._getModel(),this.getAttributeManager().invalidateAll())}draw({uniforms:e}){const{widthUnits:i,widthScale:n,widthMinPixels:a,widthMaxPixels:l,wrapLongitude:r}=this.props,t=this.state.model,s={widthUnits:d[i],widthScale:n,widthMinPixels:a,widthMaxPixels:l,useShortestPath:r?1:0};t.shaderInputs.setProps({line:s}),t.draw(this.context.renderPass),r&&(t.shaderInputs.setProps({line:{...s,useShortestPath:-1}}),t.draw(this.context.renderPass))}_getModel(){const e=this.context.device.type==="webgpu"?{depthWriteEnabled:!0,depthCompare:"less-equal"}:void 0,i=[0,-1,0,0,1,0,1,-1,0,1,1,0];return new P(this.context.device,{...this.getShaders(),id:this.props.id,bufferLayout:this.getAttributeManager().getBufferLayouts(),geometry:new h({topology:"triangle-strip",attributes:{positions:{size:3,value:new Float32Array(i)}}}),parameters:e,isInstanced:!0})}}f.layerName="LineLayer";f.defaultProps=T;const I={cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",value:[1,1]}};class p extends x{_updateGeometry(){const e=new y;this.state.fillModel.setGeometry(e)}draw({uniforms:e}){const{elevationScale:i,extruded:n,offset:a,coverage:l,cellSize:r,angle:t,radiusUnits:s}=this.props,c=this.state.fillModel,g={radius:r/2,radiusUnits:d[s],angle:t,offset:a,extruded:n,stroked:!1,coverage:l,elevationScale:i,edgeDistance:1,isStroke:!1,widthUnits:0,widthScale:0,widthMinPixels:0,widthMaxPixels:0};c.shaderInputs.setProps({column:g}),c.draw(this.context.renderPass)}}p.layerName="GridCellLayer";p.defaultProps=I;export{H as ArcLayer,q as BitmapLayer,x as ColumnLayer,J as GeoJsonLayer,p as GridCellLayer,X as IconLayer,f as LineLayer,ie as PathLayer,Z as PointCloudLayer,$ as PolygonLayer,Q as ScatterplotLayer,re as SolidPolygonLayer,Y as TextLayer,ee as _MultiIconLayer,te as _TextBackgroundLayer};
268
+ //# sourceMappingURL=layers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layers.js","sources":["../../../../../node_modules/.pnpm/@deck.gl+layers@9.2.2_@deck.gl+core@9.2.2_@loaders.gl+core@4.3.4_@luma.gl+core@9.2.4_@l_7c6c451d1cd7df4d1061915e19ef692b/node_modules/@deck.gl/layers/dist/line-layer/line-layer-uniforms.js","../../../../../node_modules/.pnpm/@deck.gl+layers@9.2.2_@deck.gl+core@9.2.2_@loaders.gl+core@4.3.4_@luma.gl+core@9.2.4_@l_7c6c451d1cd7df4d1061915e19ef692b/node_modules/@deck.gl/layers/dist/line-layer/line-layer.wgsl.js","../../../../../node_modules/.pnpm/@deck.gl+layers@9.2.2_@deck.gl+core@9.2.2_@loaders.gl+core@4.3.4_@luma.gl+core@9.2.4_@l_7c6c451d1cd7df4d1061915e19ef692b/node_modules/@deck.gl/layers/dist/line-layer/line-layer-vertex.glsl.js","../../../../../node_modules/.pnpm/@deck.gl+layers@9.2.2_@deck.gl+core@9.2.2_@loaders.gl+core@4.3.4_@luma.gl+core@9.2.4_@l_7c6c451d1cd7df4d1061915e19ef692b/node_modules/@deck.gl/layers/dist/line-layer/line-layer-fragment.glsl.js","../../../../../node_modules/.pnpm/@deck.gl+layers@9.2.2_@deck.gl+core@9.2.2_@loaders.gl+core@4.3.4_@luma.gl+core@9.2.4_@l_7c6c451d1cd7df4d1061915e19ef692b/node_modules/@deck.gl/layers/dist/line-layer/line-layer.js","../../../../../node_modules/.pnpm/@deck.gl+layers@9.2.2_@deck.gl+core@9.2.2_@loaders.gl+core@4.3.4_@luma.gl+core@9.2.4_@l_7c6c451d1cd7df4d1061915e19ef692b/node_modules/@deck.gl/layers/dist/column-layer/grid-cell-layer.js"],"sourcesContent":["// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nconst uniformBlockWGSL = /* wgsl */ `\\\nstruct LineUniforms {\n widthScale: f32,\n widthMinPixels: f32,\n widthMaxPixels: f32,\n useShortestPath: f32,\n widthUnits: i32,\n};\n\n@group(0) @binding(1)\nvar<uniform> line: LineUniforms;\n`;\nconst uniformBlockGLSL = /* glsl */ `\\\nuniform lineUniforms {\n float widthScale;\n float widthMinPixels;\n float widthMaxPixels;\n float useShortestPath;\n highp int widthUnits;\n} line;\n`;\nexport const lineUniforms = {\n name: 'line',\n source: uniformBlockWGSL,\n vs: uniformBlockGLSL,\n fs: uniformBlockGLSL,\n uniformTypes: {\n widthScale: 'f32',\n widthMinPixels: 'f32',\n widthMaxPixels: 'f32',\n useShortestPath: 'f32',\n widthUnits: 'i32'\n }\n};\n//# sourceMappingURL=line-layer-uniforms.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nexport const shaderWGSL = /* wgsl */ `\\\n// ---------- Helper Structures & Functions ----------\n\n// Placeholder filter functions.\nfn deckgl_filter_size(offset: vec3<f32>, geometry: Geometry) -> vec3<f32> {\n return offset;\n}\nfn deckgl_filter_gl_position(p: vec4<f32>, geometry: Geometry) -> vec4<f32> {\n return p;\n}\nfn deckgl_filter_color(color: vec4<f32>, geometry: Geometry) -> vec4<f32> {\n return color;\n}\n\n// Compute an extrusion offset given a line direction (in clipspace),\n// an offset direction (-1 or 1), and a width in pixels.\n// Assumes a uniform \"project\" with a viewportSize field is available.\nfn getExtrusionOffset(line_clipspace: vec2<f32>, offset_direction: f32, width: f32) -> vec2<f32> {\n // project.viewportSize should be provided as a uniform (not shown here)\n let dir_screenspace = normalize(line_clipspace * project.viewportSize);\n // Rotate by 90°: (x,y) becomes (-y,x)\n let rotated = vec2<f32>(-dir_screenspace.y, dir_screenspace.x);\n return rotated * offset_direction * width / 2.0;\n}\n\n// Splits the line between two points at a given x coordinate.\n// Interpolates the y and z components.\nfn splitLine(a: vec3<f32>, b: vec3<f32>, x: f32) -> vec3<f32> {\n let t: f32 = (x - a.x) / (b.x - a.x);\n return vec3<f32>(x, a.yz + t * (b.yz - a.yz));\n}\n\n// ---------- Uniforms & Global Structures ----------\n\n// Uniforms for line, color, and project are assumed to be defined elsewhere.\n// For example:\n//\n// @group(0) @binding(0)\n// var<uniform> line: LineUniform;\n//\n// struct ColorUniform {\n// opacity: f32,\n// };\n// @group(0) @binding(1)\n// var<uniform> color: ColorUniform;\n//\n// struct ProjectUniform {\n// viewportSize: vec2<f32>,\n// };\n// @group(0) @binding(2)\n// var<uniform> project: ProjectUniform;\n\n\n\n// ---------- Vertex Output Structure ----------\n\nstruct Varyings {\n @builtin(position) gl_Position: vec4<f32>,\n @location(0) vColor: vec4<f32>,\n @location(1) uv: vec2<f32>,\n};\n\n// ---------- Vertex Shader Entry Point ----------\n\n@vertex\nfn vertexMain(\n @location(0) positions: vec3<f32>,\n @location(1) instanceSourcePositions: vec3<f32>,\n @location(2) instanceTargetPositions: vec3<f32>,\n @location(3) instanceSourcePositions64Low: vec3<f32>,\n @location(4) instanceTargetPositions64Low: vec3<f32>,\n @location(5) instanceColors: vec4<f32>,\n @location(6) instancePickingColors: vec3<f32>,\n @location(7) instanceWidths: f32\n) -> Varyings {\n var geometry: Geometry;\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n var source_world: vec3<f32> = instanceSourcePositions;\n var target_world: vec3<f32> = instanceTargetPositions;\n var source_world_64low: vec3<f32> = instanceSourcePositions64Low;\n var target_world_64low: vec3<f32> = instanceTargetPositions64Low;\n\n // Apply shortest-path adjustments if needed.\n if (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {\n source_world.x = (source_world.x + 180.0 % 360.0) - 180.0;\n target_world.x = (target_world.x + 180.0 % 360.0) - 180.0;\n let deltaLng: f32 = target_world.x - source_world.x;\n\n if (deltaLng * line.useShortestPath > 180.0) {\n source_world.x = source_world.x + 360.0 * line.useShortestPath;\n source_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);\n source_world_64low = vec3<f32>(0.0, 0.0, 0.0);\n } else if (deltaLng * line.useShortestPath < -180.0) {\n target_world.x = target_world.x + 360.0 * line.useShortestPath;\n target_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);\n target_world_64low = vec3<f32>(0.0, 0.0, 0.0);\n } else if (line.useShortestPath < 0.0) {\n var abortOut: Varyings;\n abortOut.gl_Position = vec4<f32>(0.0);\n abortOut.vColor = vec4<f32>(0.0);\n abortOut.uv = vec2<f32>(0.0);\n return abortOut;\n }\n }\n\n // Project Pos and target positions to clip space.\n let sourceResult = project_position_to_clipspace_and_commonspace(source_world, source_world_64low, vec3<f32>(0.0));\n let targetResult = project_position_to_clipspace_and_commonspace(target_world, target_world_64low, vec3<f32>(0.0));\n let sourcePos: vec4<f32> = sourceResult.clipPosition;\n let targetPos: vec4<f32> = targetResult.clipPosition;\n let source_commonspace: vec4<f32> = sourceResult.commonPosition;\n let target_commonspace: vec4<f32> = targetResult.commonPosition;\n\n // Interpolate along the line segment.\n let segmentIndex: f32 = positions.x;\n let p: vec4<f32> = sourcePos + segmentIndex * (targetPos - sourcePos);\n geometry.position = source_commonspace + segmentIndex * (target_commonspace - source_commonspace);\n let uv: vec2<f32> = positions.xy;\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n\n // Determine width in pixels.\n let widthPixels: f32 = clamp(\n project_unit_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),\n line.widthMinPixels, line.widthMaxPixels\n );\n\n // Compute extrusion offset.\n let extrusion: vec2<f32> = getExtrusionOffset(targetPos.xy - sourcePos.xy, positions.y, widthPixels);\n let offset: vec3<f32> = vec3<f32>(extrusion, 0.0);\n\n // Apply deck.gl filter functions.\n let filteredOffset = deckgl_filter_size(offset, geometry);\n let filteredP = deckgl_filter_gl_position(p, geometry);\n\n let clipOffset: vec2<f32> = project_pixel_size_to_clipspace(filteredOffset.xy);\n let finalPosition: vec4<f32> = filteredP + vec4<f32>(clipOffset, 0.0, 0.0);\n\n // Compute color.\n var vColor: vec4<f32> = vec4<f32>(instanceColors.rgb, instanceColors.a * color.opacity);\n // vColor = deckgl_filter_color(vColor, geometry);\n\n var output: Varyings;\n output.gl_Position = finalPosition;\n output.vColor = vColor;\n output.uv = uv;\n return output;\n}\n\n@fragment\nfn fragmentMain(\n @location(0) vColor: vec4<f32>,\n @location(1) uv: vec2<f32>\n) -> @location(0) vec4<f32> {\n // Create and initialize geometry with the provided uv.\n var geometry: Geometry;\n geometry.uv = uv;\n\n // Start with the input color.\n var fragColor: vec4<f32> = vColor;\n\n // Apply the deck.gl filter to the color.\n fragColor = deckgl_filter_color(fragColor, geometry);\n\n // Apply premultiplied alpha as required by transparent canvas\n fragColor = deckgl_premultiplied_alpha(fragColor);\n\n return fragColor;\n}\n`;\n//# sourceMappingURL=line-layer.wgsl.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nexport default `\\\n#version 300 es\n#define SHADER_NAME line-layer-vertex-shader\nin vec3 positions;\nin vec3 instanceSourcePositions;\nin vec3 instanceTargetPositions;\nin vec3 instanceSourcePositions64Low;\nin vec3 instanceTargetPositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin float instanceWidths;\nout vec4 vColor;\nout vec2 uv;\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\nvec2 dir_screenspace = normalize(line_clipspace * project.viewportSize);\ndir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\nreturn dir_screenspace * offset_direction * width / 2.0;\n}\nvec3 splitLine(vec3 a, vec3 b, float x) {\nfloat t = (x - a.x) / (b.x - a.x);\nreturn vec3(x, mix(a.yz, b.yz, t));\n}\nvoid main(void) {\ngeometry.worldPosition = instanceSourcePositions;\ngeometry.worldPositionAlt = instanceTargetPositions;\nvec3 source_world = instanceSourcePositions;\nvec3 target_world = instanceTargetPositions;\nvec3 source_world_64low = instanceSourcePositions64Low;\nvec3 target_world_64low = instanceTargetPositions64Low;\nif (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {\nsource_world.x = mod(source_world.x + 180., 360.0) - 180.;\ntarget_world.x = mod(target_world.x + 180., 360.0) - 180.;\nfloat deltaLng = target_world.x - source_world.x;\nif (deltaLng * line.useShortestPath > 180.) {\nsource_world.x += 360. * line.useShortestPath;\nsource_world = splitLine(source_world, target_world, 180. * line.useShortestPath);\nsource_world_64low = vec3(0.0);\n} else if (deltaLng * line.useShortestPath < -180.) {\ntarget_world.x += 360. * line.useShortestPath;\ntarget_world = splitLine(source_world, target_world, 180. * line.useShortestPath);\ntarget_world_64low = vec3(0.0);\n} else if (line.useShortestPath < 0.) {\ngl_Position = vec4(0.);\nreturn;\n}\n}\nvec4 source_commonspace;\nvec4 target_commonspace;\nvec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);\nvec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);\nfloat segmentIndex = positions.x;\nvec4 p = mix(source, target, segmentIndex);\ngeometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\nuv = positions.xy;\ngeometry.uv = uv;\ngeometry.pickingColor = instancePickingColors;\nfloat widthPixels = clamp(\nproject_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),\nline.widthMinPixels, line.widthMaxPixels\n);\nvec3 offset = vec3(\ngetExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n0.0);\nDECKGL_FILTER_SIZE(offset, geometry);\nDECKGL_FILTER_GL_POSITION(p, geometry);\ngl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\nvColor = vec4(instanceColors.rgb, instanceColors.a * layer.opacity);\nDECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n//# sourceMappingURL=line-layer-vertex.glsl.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nexport default `\\\n#version 300 es\n#define SHADER_NAME line-layer-fragment-shader\nprecision highp float;\nin vec4 vColor;\nin vec2 uv;\nout vec4 fragColor;\nvoid main(void) {\ngeometry.uv = uv;\nfragColor = vColor;\nDECKGL_FILTER_COLOR(fragColor, geometry);\n}\n`;\n//# sourceMappingURL=line-layer-fragment.glsl.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { Layer, project32, color, picking, UNIT } from '@deck.gl/core';\nimport { Model, Geometry } from '@luma.gl/engine';\nimport { lineUniforms } from \"./line-layer-uniforms.js\";\nimport { shaderWGSL as source } from \"./line-layer.wgsl.js\";\nimport vs from \"./line-layer-vertex.glsl.js\";\nimport fs from \"./line-layer-fragment.glsl.js\";\nconst DEFAULT_COLOR = [0, 0, 0, 255];\nconst defaultProps = {\n getSourcePosition: { type: 'accessor', value: (x) => x.sourcePosition },\n getTargetPosition: { type: 'accessor', value: (x) => x.targetPosition },\n getColor: { type: 'accessor', value: DEFAULT_COLOR },\n getWidth: { type: 'accessor', value: 1 },\n widthUnits: 'pixels',\n widthScale: { type: 'number', value: 1, min: 0 },\n widthMinPixels: { type: 'number', value: 0, min: 0 },\n widthMaxPixels: { type: 'number', value: Number.MAX_SAFE_INTEGER, min: 0 }\n};\n/**\n * A layer that renders straight lines joining pairs of source and target coordinates.\n */\nclass LineLayer extends Layer {\n getBounds() {\n return this.getAttributeManager()?.getBounds([\n 'instanceSourcePositions',\n 'instanceTargetPositions'\n ]);\n }\n getShaders() {\n return super.getShaders({ vs, fs, source, modules: [project32, color, picking, lineUniforms] });\n }\n // This layer has its own wrapLongitude logic\n get wrapLongitude() {\n return false;\n }\n initializeState() {\n const attributeManager = this.getAttributeManager();\n /* eslint-disable max-len */\n attributeManager.addInstanced({\n instanceSourcePositions: {\n size: 3,\n type: 'float64',\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getSourcePosition'\n },\n instanceTargetPositions: {\n size: 3,\n type: 'float64',\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getTargetPosition'\n },\n instanceColors: {\n size: this.props.colorFormat.length,\n type: 'unorm8',\n transition: true,\n accessor: 'getColor',\n defaultValue: [0, 0, 0, 255]\n },\n instanceWidths: {\n size: 1,\n transition: true,\n accessor: 'getWidth',\n defaultValue: 1\n }\n });\n /* eslint-enable max-len */\n }\n updateState(params) {\n super.updateState(params);\n if (params.changeFlags.extensionsChanged) {\n this.state.model?.destroy();\n this.state.model = this._getModel();\n this.getAttributeManager().invalidateAll();\n }\n }\n draw({ uniforms }) {\n const { widthUnits, widthScale, widthMinPixels, widthMaxPixels, wrapLongitude } = this.props;\n const model = this.state.model;\n const lineProps = {\n widthUnits: UNIT[widthUnits],\n widthScale,\n widthMinPixels,\n widthMaxPixels,\n useShortestPath: wrapLongitude ? 1 : 0\n };\n model.shaderInputs.setProps({ line: lineProps });\n model.draw(this.context.renderPass);\n if (wrapLongitude) {\n // Render a second copy for the clipped lines at the 180th meridian\n model.shaderInputs.setProps({ line: { ...lineProps, useShortestPath: -1 } });\n model.draw(this.context.renderPass);\n }\n }\n _getModel() {\n // TODO(ibgreen): WebGPU complication: Matching attachment state of the renderpass requires including a depth buffer\n const parameters = this.context.device.type === 'webgpu'\n ? {\n depthWriteEnabled: true,\n depthCompare: 'less-equal'\n }\n : undefined;\n /*\n * (0, -1)-------------_(1, -1)\n * | _,-\" |\n * o _,-\" o\n * | _,-\" |\n * (0, 1)\"-------------(1, 1)\n */\n const positions = [0, -1, 0, 0, 1, 0, 1, -1, 0, 1, 1, 0];\n return new Model(this.context.device, {\n ...this.getShaders(),\n id: this.props.id,\n bufferLayout: this.getAttributeManager().getBufferLayouts(),\n geometry: new Geometry({\n topology: 'triangle-strip',\n attributes: {\n positions: { size: 3, value: new Float32Array(positions) }\n }\n }),\n parameters,\n isInstanced: true\n });\n }\n}\nLineLayer.layerName = 'LineLayer';\nLineLayer.defaultProps = defaultProps;\nexport default LineLayer;\n//# sourceMappingURL=line-layer.js.map","// deck.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { UNIT } from '@deck.gl/core';\nimport { CubeGeometry } from '@luma.gl/engine';\nimport ColumnLayer from \"./column-layer.js\";\nconst defaultProps = {\n cellSize: { type: 'number', min: 0, value: 1000 },\n offset: { type: 'array', value: [1, 1] }\n};\nclass GridCellLayer extends ColumnLayer {\n _updateGeometry() {\n const geometry = new CubeGeometry();\n this.state.fillModel.setGeometry(geometry);\n }\n draw({ uniforms }) {\n const { elevationScale, extruded, offset, coverage, cellSize, angle, radiusUnits } = this.props;\n const fillModel = this.state.fillModel;\n const columnProps = {\n radius: cellSize / 2,\n radiusUnits: UNIT[radiusUnits],\n angle,\n offset,\n extruded,\n stroked: false,\n coverage,\n elevationScale,\n edgeDistance: 1,\n isStroke: false,\n widthUnits: 0,\n widthScale: 0,\n widthMinPixels: 0,\n widthMaxPixels: 0\n };\n fillModel.shaderInputs.setProps({ column: columnProps });\n fillModel.draw(this.context.renderPass);\n }\n}\nGridCellLayer.layerName = 'GridCellLayer';\nGridCellLayer.defaultProps = defaultProps;\nexport default GridCellLayer;\n//# sourceMappingURL=grid-cell-layer.js.map"],"names":["uniformBlockWGSL","uniformBlockGLSL","lineUniforms","shaderWGSL","vs","fs","DEFAULT_COLOR","defaultProps","x","LineLayer","Layer","source","project32","color","picking","params","uniforms","widthUnits","widthScale","widthMinPixels","widthMaxPixels","wrapLongitude","model","lineProps","UNIT","parameters","positions","Model","Geometry","GridCellLayer","ColumnLayer","geometry","CubeGeometry","elevationScale","extruded","offset","coverage","cellSize","angle","radiusUnits","fillModel","columnProps"],"mappings":"mzBAGA,MAAMA,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAY9BC,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASvBC,EAAe,CACxB,KAAM,OACN,OAAQF,EACR,GAAIC,EACJ,GAAIA,EACJ,aAAc,CACV,WAAY,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