streamlit-nightly 1.45.1.dev20250511__py3-none-any.whl → 1.45.2.dev20250513__py3-none-any.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 (165) hide show
  1. streamlit/__init__.py +1 -0
  2. streamlit/auth_util.py +6 -6
  3. streamlit/commands/echo.py +5 -3
  4. streamlit/commands/experimental_query_params.py +1 -1
  5. streamlit/commands/navigation.py +1 -4
  6. streamlit/components/v1/custom_component.py +2 -2
  7. streamlit/config.py +16 -18
  8. streamlit/config_util.py +6 -7
  9. streamlit/connections/sql_connection.py +1 -1
  10. streamlit/dataframe_util.py +50 -51
  11. streamlit/delta_generator.py +4 -1
  12. streamlit/deprecation_util.py +5 -5
  13. streamlit/elements/arrow.py +1 -1
  14. streamlit/elements/deck_gl_json_chart.py +1 -4
  15. streamlit/elements/doc_string.py +5 -10
  16. streamlit/elements/exception.py +5 -7
  17. streamlit/elements/layouts.py +4 -3
  18. streamlit/elements/lib/built_in_chart_utils.py +22 -22
  19. streamlit/elements/lib/pandas_styler_utils.py +6 -8
  20. streamlit/elements/lib/policies.py +1 -1
  21. streamlit/elements/map.py +2 -8
  22. streamlit/elements/markdown.py +1 -4
  23. streamlit/elements/media.py +50 -2
  24. streamlit/elements/metric.py +9 -10
  25. streamlit/elements/spinner.py +1 -1
  26. streamlit/elements/vega_charts.py +1 -1
  27. streamlit/elements/widgets/audio_input.py +1 -4
  28. streamlit/elements/widgets/camera_input.py +1 -4
  29. streamlit/elements/widgets/chat.py +52 -5
  30. streamlit/elements/widgets/data_editor.py +1 -1
  31. streamlit/elements/widgets/slider.py +4 -5
  32. streamlit/elements/widgets/time_widgets.py +1 -4
  33. streamlit/elements/write.py +2 -2
  34. streamlit/env_util.py +2 -7
  35. streamlit/error_util.py +15 -8
  36. streamlit/errors.py +11 -8
  37. streamlit/file_util.py +6 -3
  38. streamlit/git_util.py +26 -21
  39. streamlit/hello/dataframe_demo.py +1 -1
  40. streamlit/hello/mapping_demo.py +1 -1
  41. streamlit/hello/plotting_demo.py +3 -3
  42. streamlit/hello/streamlit_app.py +1 -1
  43. streamlit/hello/utils.py +2 -1
  44. streamlit/logger.py +4 -5
  45. streamlit/proto/Audio_pb2.py +4 -3
  46. streamlit/proto/Audio_pb2.pyi +8 -1
  47. streamlit/proto/Block_pb2.py +5 -5
  48. streamlit/proto/Block_pb2.pyi +7 -1
  49. streamlit/proto/ChatInput_pb2.py +8 -7
  50. streamlit/proto/ChatInput_pb2.pyi +10 -1
  51. streamlit/proto/Video_pb2.py +8 -7
  52. streamlit/proto/Video_pb2.pyi +8 -1
  53. streamlit/runtime/app_session.py +5 -5
  54. streamlit/runtime/caching/cache_data_api.py +2 -2
  55. streamlit/runtime/caching/cache_resource_api.py +1 -1
  56. streamlit/runtime/caching/cache_utils.py +3 -3
  57. streamlit/runtime/caching/hashing.py +10 -10
  58. streamlit/runtime/credentials.py +9 -8
  59. streamlit/runtime/forward_msg_queue.py +1 -1
  60. streamlit/runtime/memory_media_file_storage.py +5 -4
  61. streamlit/runtime/memory_uploaded_file_manager.py +1 -1
  62. streamlit/runtime/metrics_util.py +2 -2
  63. streamlit/runtime/runtime.py +1 -1
  64. streamlit/runtime/scriptrunner/exec_code.py +1 -1
  65. streamlit/runtime/scriptrunner/script_cache.py +1 -1
  66. streamlit/runtime/scriptrunner/script_runner.py +10 -3
  67. streamlit/runtime/scriptrunner_utils/script_requests.py +3 -3
  68. streamlit/runtime/scriptrunner_utils/script_run_context.py +3 -3
  69. streamlit/runtime/secrets.py +6 -7
  70. streamlit/runtime/state/query_params.py +3 -5
  71. streamlit/runtime/state/session_state.py +15 -15
  72. streamlit/runtime/stats.py +1 -1
  73. streamlit/static/index.html +1 -1
  74. streamlit/static/static/js/{ErrorOutline.esm.B5LmzpSn.js → ErrorOutline.esm.CxkgXqSh.js} +1 -1
  75. streamlit/static/static/js/{FileDownload.esm.BgWveG3s.js → FileDownload.esm.DVrjmwoh.js} +1 -1
  76. streamlit/static/static/js/{FileHelper.DepIpP48.js → FileHelper.CMA9s0t3.js} +1 -1
  77. streamlit/static/static/js/{FormClearHelper.C_BjP_35.js → FormClearHelper.Ca3GFjxv.js} +1 -1
  78. streamlit/static/static/js/{Hooks.BpH4YuRQ.js → Hooks.BpCPXt5n.js} +1 -1
  79. streamlit/static/static/js/{InputInstructions.CjdwGigq.js → InputInstructions.BO_BnHv5.js} +1 -1
  80. streamlit/static/static/js/{ProgressBar.D1hXcW3N.js → ProgressBar.Ctk1m4EX.js} +1 -1
  81. streamlit/static/static/js/{RenderInPortalIfExists.A1T2s6z-.js → RenderInPortalIfExists.kuKoxpXt.js} +1 -1
  82. streamlit/static/static/js/{Toolbar.y7vr7z0G.js → Toolbar.Cde1fEcQ.js} +1 -1
  83. streamlit/static/static/js/{base-input.BKhd-BLG.js → base-input.BwCmIYba.js} +1 -1
  84. streamlit/static/static/js/{checkbox.DC-GFdrh.js → checkbox.CwPOyuag.js} +1 -1
  85. streamlit/static/static/js/{createSuper.D5WUtJEy.js → createSuper.BMtevhyt.js} +1 -1
  86. streamlit/static/static/js/{data-grid-overlay-editor.BPJ38mWp.js → data-grid-overlay-editor.gtfE9z1L.js} +1 -1
  87. streamlit/static/static/js/{downloader.C6a4LRBw.js → downloader.-58ZXBvx.js} +1 -1
  88. streamlit/static/static/js/{es6.DgMlYq8q.js → es6.6JpsZqpF.js} +2 -2
  89. streamlit/static/static/js/{iframeResizer.contentWindow.BpQxex73.js → iframeResizer.contentWindow.Dvm_jxul.js} +1 -1
  90. streamlit/static/static/js/{index.CiO2JPl_.js → index.9Bu4pGgs.js} +1 -1
  91. streamlit/static/static/js/{index.4Gtr9egA.js → index.B1T1N6vQ.js} +1 -1
  92. streamlit/static/static/js/{index.20fI9wQF.js → index.B9LBeTzL.js} +1 -1
  93. streamlit/static/static/js/{index.VPO2zcSN.js → index.BXdNB_A0.js} +1 -1
  94. streamlit/static/static/js/{index.sKXwUANU.js → index.Bd91GXu8.js} +1 -1
  95. streamlit/static/static/js/{index.DT0CWGt3.js → index.BdEKCy-o.js} +1 -1
  96. streamlit/static/static/js/{index.D3tgBU6x.js → index.BhODUTaJ.js} +1 -1
  97. streamlit/static/static/js/{index.BcbB70bz.js → index.BjtSRm-c.js} +1 -1
  98. streamlit/static/static/js/{index.DPiBGVm8.js → index.BnK8pWHN.js} +1 -1
  99. streamlit/static/static/js/{index.49Q6A5_9.js → index.C5xsotRs.js} +1 -1
  100. streamlit/static/static/js/{index.xIQLhQKv.js → index.CD3lJu6g.js} +1 -1
  101. streamlit/static/static/js/{index.BydIp_VR.js → index.CGJjlswG.js} +1 -1
  102. streamlit/static/static/js/{index.Bj81ZRkx.js → index.CIZd1q4K.js} +1 -1
  103. streamlit/static/static/js/{index.5k30-U6O.js → index.CZy9JHE4.js} +2 -2
  104. streamlit/static/static/js/{index.D5PANKHd.js → index.Ce-7kIl6.js} +1 -1
  105. streamlit/static/static/js/{index.Bo-z1JM2.js → index.CiiU1-bS.js} +1 -1
  106. streamlit/static/static/js/{index.Cqla7uBZ.js → index.ClE8XHxl.js} +1 -1
  107. streamlit/static/static/js/{index.CY8tg9lY.js → index.CvKH37SN.js} +1 -1
  108. streamlit/static/static/js/{index.CkBnHCIQ.js → index.D0G-y_z6.js} +1 -1
  109. streamlit/static/static/js/{index.B3UoUwtN.js → index.D1ccH_2Z.js} +1 -1
  110. streamlit/static/static/js/{index.DB42JCH0.js → index.D3ES4sSL.js} +1 -1
  111. streamlit/static/static/js/{index.BLpDfH1w.js → index.DJ0X7aeY.js} +1 -1
  112. streamlit/static/static/js/{index.BRN41-Jy.js → index.DNNQBTM6.js} +1 -1
  113. streamlit/static/static/js/{index.br6zwNIk.js → index.DQJE0i9s.js} +62 -62
  114. streamlit/static/static/js/{index.DSPS70gp.js → index.DR9ekgzX.js} +1 -1
  115. streamlit/static/static/js/{index.BbhQIRth.js → index.DUizq_aW.js} +1 -1
  116. streamlit/static/static/js/{index.ryD8hMpi.js → index.DVE5BhiT.js} +1 -1
  117. streamlit/static/static/js/{index.C2GjbQtf.js → index.DW60zbv4.js} +1 -1
  118. streamlit/static/static/js/{index.BhGEwO_d.js → index.DenamHJl.js} +1 -1
  119. streamlit/static/static/js/{index._oOkpIXS.js → index.DgnhzFgr.js} +1 -1
  120. streamlit/static/static/js/{index.CHnID3dI.js → index.Dk_aZplH.js} +1 -1
  121. streamlit/static/static/js/index.Dqcp7EZB.js +779 -0
  122. streamlit/static/static/js/{index.DAO4Lj-D.js → index.NfOJ2GJ6.js} +1 -1
  123. streamlit/static/static/js/{index.CcvbHTJu.js → index.WVgPkrrw.js} +1 -1
  124. streamlit/static/static/js/{index.Du1Pbz0y.js → index.bkU6rhIM.js} +1 -1
  125. streamlit/static/static/js/{index.Cfi3u2-T.js → index.hQ5adhxG.js} +1 -1
  126. streamlit/static/static/js/{index.B8ca7fYO.js → index.lYSTjxV_.js} +1 -1
  127. streamlit/static/static/js/{input.CNjMviuo.js → input.JEUWF6Z-.js} +1 -1
  128. streamlit/static/static/js/{memory.f8X97LPt.js → memory.BToPJrCN.js} +1 -1
  129. streamlit/static/static/js/{mergeWith.DU9BO8BA.js → mergeWith.DGon2YId.js} +1 -1
  130. streamlit/static/static/js/{number-overlay-editor.xJPBNdGQ.js → number-overlay-editor.kqkFTYSn.js} +1 -1
  131. streamlit/static/static/js/{possibleConstructorReturn.BjPX9m9m.js → possibleConstructorReturn.twGQoCQl.js} +1 -1
  132. streamlit/static/static/js/{sandbox.B23JuuVd.js → sandbox.o85HOKwq.js} +1 -1
  133. streamlit/static/static/js/{textarea.DodnI6GX.js → textarea.CdOYpTta.js} +1 -1
  134. streamlit/static/static/js/{timepicker.ClHKNfP9.js → timepicker.Cy1BKBo3.js} +1 -1
  135. streamlit/static/static/js/{toConsumableArray.CK6YGgcW.js → toConsumableArray.BVXfsvDc.js} +1 -1
  136. streamlit/static/static/js/{uniqueId.BAAVLIKj.js → uniqueId.Dz7-nY8K.js} +1 -1
  137. streamlit/static/static/js/{useBasicWidgetState.B1oropKY.js → useBasicWidgetState.CeKdNkz-.js} +1 -1
  138. streamlit/static/static/js/{useOnInputChange.CHQJz2sf.js → useOnInputChange.CM8BtP-c.js} +1 -1
  139. streamlit/static/static/js/{withFullScreenWrapper.DZ1W8JUx.js → withFullScreenWrapper.DuyW554J.js} +1 -1
  140. streamlit/string_util.py +1 -4
  141. streamlit/temporary_directory.py +2 -2
  142. streamlit/testing/v1/app_test.py +2 -2
  143. streamlit/testing/v1/element_tree.py +10 -9
  144. streamlit/testing/v1/local_script_runner.py +1 -4
  145. streamlit/type_util.py +2 -5
  146. streamlit/watcher/folder_black_list.py +1 -1
  147. streamlit/watcher/local_sources_watcher.py +5 -3
  148. streamlit/watcher/path_watcher.py +3 -6
  149. streamlit/watcher/polling_path_watcher.py +8 -7
  150. streamlit/watcher/util.py +6 -5
  151. streamlit/web/bootstrap.py +4 -4
  152. streamlit/web/cli.py +13 -13
  153. streamlit/web/server/app_static_file_handler.py +1 -1
  154. streamlit/web/server/authlib_tornado_integration.py +6 -1
  155. streamlit/web/server/oauth_authlib_routes.py +3 -3
  156. streamlit/web/server/oidc_mixin.py +15 -3
  157. streamlit/web/server/routes.py +11 -11
  158. streamlit/web/server/stats_request_handler.py +2 -2
  159. {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/METADATA +1 -1
  160. {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/RECORD +164 -164
  161. streamlit/static/static/js/index.BgEbLy94.js +0 -779
  162. {streamlit_nightly-1.45.1.dev20250511.data → streamlit_nightly-1.45.2.dev20250513.data}/scripts/streamlit.cmd +0 -0
  163. {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/WHEEL +0 -0
  164. {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/entry_points.txt +0 -0
  165. {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- import{r as reactExports,j as jsx}from"./index.BgEbLy94.js";/*!
1
+ import{r as reactExports,j as jsx}from"./index.Dqcp7EZB.js";/*!
2
2
  * Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors
3
3
  * All rights reserved.
4
4
  *
@@ -1 +1 @@
1
- import{r as f,z as T,B as C,j as n,C as y,bo as S,aC as L,bw as W,bp as B,b5 as w,bG as R,J as $,bH as E,bI as P}from"./index.BgEbLy94.js";import{a as v}from"./useBasicWidgetState.B1oropKY.js";import{a as H,L as X,S as p}from"./checkbox.DC-GFdrh.js";import"./FormClearHelper.C_BjP_35.js";function M({element:e,disabled:a,widgetMgr:s,fragmentId:d}){var m;const[x,g]=v({getStateFromWidgetMgr:V,getDefaultStateFromProto:I,getCurrStateFromProto:G,updateWidgetMgrState:j,element:e,widgetMgr:s,fragmentId:d}),k=f.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=T(),{colors:o,spacing:h,sizes:r}=t,b=C(t),u=a?o.fadedText40:o.bodyText;return n(P,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:n(H,{checked:x,disabled:a,onChange:k,"aria-label":e.label,checkmarkType:e.type===E.StyleType.TOGGLE?p.toggle:p.default,labelPlacement:X.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let c=b?o.bgColor:o.bodyText;return a&&(c=b?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${t.spacing.twoXS})`,height:`calc(${r.checkbox} - ${t.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:c,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:c})=>{let l=o.fadedText40;return c&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:t.spacing.twoXS,paddingLeft:t.spacing.threeXS,paddingRight:t.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:t.radii.full,borderTopLeftRadius:t.radii.full,borderBottomRightRadius:t.radii.full,borderTopRightRadius:t.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:c})=>{const l=c&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:t.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&c?`0 0 0 0.2rem ${$(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:t.lineHeights.small,paddingLeft:t.spacing.sm,position:"relative",color:u}}},children:y(R,{visibility:S((m=e.labelVisibility)==null?void 0:m.value),"data-testid":"stWidgetLabel",children:[n(L,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&n(W,{color:u,children:n(B,{content:e.help,placement:w.TOP_RIGHT})})]})})})}function V(e,a){return e.getBoolValue(a)}function I(e){return e.default??null}function G(e){return e.value??null}function j(e,a,s,d){a.setBoolValue(e,s.value,{fromUi:s.fromUi},d)}const A=f.memo(M);export{A as default};
1
+ import{r as f,z as T,B as C,j as n,C as y,bo as S,aC as L,bw as W,bp as B,b5 as w,bG as R,J as $,bH as E,bI as P}from"./index.Dqcp7EZB.js";import{a as v}from"./useBasicWidgetState.CeKdNkz-.js";import{a as H,L as X,S as p}from"./checkbox.CwPOyuag.js";import"./FormClearHelper.Ca3GFjxv.js";function M({element:e,disabled:a,widgetMgr:s,fragmentId:d}){var m;const[x,g]=v({getStateFromWidgetMgr:V,getDefaultStateFromProto:I,getCurrStateFromProto:G,updateWidgetMgrState:j,element:e,widgetMgr:s,fragmentId:d}),k=f.useCallback(i=>{g({value:i.target.checked,fromUi:!0})},[g]),t=T(),{colors:o,spacing:h,sizes:r}=t,b=C(t),u=a?o.fadedText40:o.bodyText;return n(P,{className:"row-widget stCheckbox","data-testid":"stCheckbox",children:n(H,{checked:x,disabled:a,onChange:k,"aria-label":e.label,checkmarkType:e.type===E.StyleType.TOGGLE?p.toggle:p.default,labelPlacement:X.right,overrides:{Root:{style:({$isFocusVisible:i})=>({marginBottom:h.none,marginTop:h.none,backgroundColor:i?o.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:i})=>{let c=b?o.bgColor:o.bodyText;return a&&(c=b?o.gray70:o.gray90),{width:`calc(${r.checkbox} - ${t.spacing.twoXS})`,height:`calc(${r.checkbox} - ${t.spacing.twoXS})`,transform:i?`translateX(${r.checkbox})`:"",backgroundColor:c,boxShadow:""}}},ToggleTrack:{style:({$checked:i,$isHovered:c})=>{let l=o.fadedText40;return c&&!a&&(l=o.fadedText20),i&&!a&&(l=o.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:t.spacing.twoXS,paddingLeft:t.spacing.threeXS,paddingRight:t.spacing.threeXS,width:`calc(2 * ${r.checkbox})`,minWidth:`calc(2 * ${r.checkbox})`,height:r.checkbox,minHeight:r.checkbox,borderBottomLeftRadius:t.radii.full,borderTopLeftRadius:t.radii.full,borderBottomRightRadius:t.radii.full,borderTopRightRadius:t.radii.full,backgroundColor:l}}},Checkmark:{style:({$isFocusVisible:i,$checked:c})=>{const l=c&&!a?o.primary:o.fadedText40;return{outline:0,width:r.checkbox,height:r.checkbox,marginTop:t.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:i&&c?`0 0 0 0.2rem ${$(o.primary,.5)}`:"",borderLeftWidth:r.borderWidth,borderRightWidth:r.borderWidth,borderTopWidth:r.borderWidth,borderBottomWidth:r.borderWidth,borderLeftColor:l,borderRightColor:l,borderTopColor:l,borderBottomColor:l}}},Label:{style:{lineHeight:t.lineHeights.small,paddingLeft:t.spacing.sm,position:"relative",color:u}}},children:y(R,{visibility:S((m=e.labelVisibility)==null?void 0:m.value),"data-testid":"stWidgetLabel",children:[n(L,{source:e.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),e.help&&n(W,{color:u,children:n(B,{content:e.help,placement:w.TOP_RIGHT})})]})})})}function V(e,a){return e.getBoolValue(a)}function I(e){return e.default??null}function G(e){return e.value??null}function j(e,a,s,d){a.setBoolValue(e,s.value,{fromUi:s.fromUi},d)}const A=f.memo(M);export{A as default};
@@ -1 +1 @@
1
- import{n as o,bj as S,i as f,r as l,j as r,C as g,c2 as u,aC as $}from"./index.BgEbLy94.js";const m=o(S,{shouldForwardProp:f,target:"e12gfcky0"})(({theme:e})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:e.colors.secondary,flexGrow:0,flexShrink:0})),x=o("div",{target:"e12gfcky1"})(({theme:e,cache:s})=>({...s?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),y=o("div",{target:"e12gfcky2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),T=o("div",{target:"e12gfcky3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),h=e=>{const s=Math.floor(e/3600),n=Math.floor(e%3600/60),t=e%60;if(s===0&&n===0)return`(${t.toFixed(1)} seconds)`;if(s===0){const d=`${n} minute${n===1?"":"s"}`,p=t===0?"":`, ${t.toFixed(1)} seconds`;return`(${d}${p})`}const i=`${s} hour${s===1?"":"s"}`,a=n===0?"":`, ${n} minute${n===1?"":"s"}`,c=t===0?"":`, ${t.toFixed(1)} seconds`;return`(${i}${a}${c})`};function C({element:e}){const{cache:s,showTime:n}=e,[t,i]=l.useState(0);return l.useEffect(()=>{if(!n)return;const a=setInterval(()=>{i(c=>c+.1)},100);return()=>clearInterval(a)},[n]),r(x,{className:u({stSpinner:!0,stCacheSpinner:s}),"data-testid":"stSpinner",cache:s,children:g(T,{children:[r(m,{}),r($,{source:e.text,allowHTML:!1}),n&&r(y,{children:h(t)})]})})}const z=l.memo(C);export{z as default};
1
+ import{n as o,bj as S,i as f,r as l,j as r,C as g,c2 as u,aC as $}from"./index.Dqcp7EZB.js";const m=o(S,{shouldForwardProp:f,target:"e12gfcky0"})(({theme:e})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:e.colors.secondary,flexGrow:0,flexShrink:0})),x=o("div",{target:"e12gfcky1"})(({theme:e,cache:s})=>({...s?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),y=o("div",{target:"e12gfcky2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),T=o("div",{target:"e12gfcky3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),h=e=>{const s=Math.floor(e/3600),n=Math.floor(e%3600/60),t=e%60;if(s===0&&n===0)return`(${t.toFixed(1)} seconds)`;if(s===0){const d=`${n} minute${n===1?"":"s"}`,p=t===0?"":`, ${t.toFixed(1)} seconds`;return`(${d}${p})`}const i=`${s} hour${s===1?"":"s"}`,a=n===0?"":`, ${n} minute${n===1?"":"s"}`,c=t===0?"":`, ${t.toFixed(1)} seconds`;return`(${i}${a}${c})`};function C({element:e}){const{cache:s,showTime:n}=e,[t,i]=l.useState(0);return l.useEffect(()=>{if(!n)return;const a=setInterval(()=>{i(c=>c+.1)},100);return()=>clearInterval(a)},[n]),r(x,{className:u({stSpinner:!0,stCacheSpinner:s}),"data-testid":"stSpinner",cache:s,children:g(T,{children:[r(m,{}),r($,{source:e.text,allowHTML:!1}),n&&r(y,{children:h(t)})]})})}const z=l.memo(C);export{z as default};
@@ -1 +1 @@
1
- import{n as e,r as a,C as t,j as r,aC as o}from"./index.BgEbLy94.js";import{P as i}from"./ProgressBar.D1hXcW3N.js";const l=e("div",{target:"e1675qd10"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}));function n({element:s}){return t("div",{className:"stProgress","data-testid":"stProgress",children:[r(l,{children:r(o,{source:s.text,allowHTML:!1,isLabel:!0})}),r(i,{value:s.value})]})}const m=a.memo(n);export{m as default};
1
+ import{n as e,r as a,C as t,j as r,aC as o}from"./index.Dqcp7EZB.js";import{P as i}from"./ProgressBar.Ctk1m4EX.js";const l=e("div",{target:"e1675qd10"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}));function n({element:s}){return t("div",{className:"stProgress","data-testid":"stProgress",children:[r(l,{children:r(o,{source:s.text,allowHTML:!1,isLabel:!0})}),r(i,{value:s.value})]})}const m=a.memo(n);export{m as default};
@@ -1 +1 @@
1
- import{n as h,r as i,bf as T,j as p,l as b}from"./index.BgEbLy94.js";const L=h("iframe",{target:"eymnmwl0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"})),N=b.getLogger("Video"),U={width:"100%"};function R({element:r,endpoints:s,elementMgr:l}){const n=i.useRef(null),{type:y,url:f,startTime:a,subtitles:d,endTime:o,loop:c,autoplay:m,muted:E}=r,S=i.useMemo(()=>{if(!r.id)return!0;const e=l.getElementState(r.id,"preventAutoplay");return e||l.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,l]),v=i.useMemo(()=>JSON.stringify(d?d.map(e=>s.buildMediaURL(`${e.url}`)):[]),[d,s]);i.useEffect(()=>{const e=JSON.parse(v);e.length!==0&&e.forEach(t=>{s.checkSourceUrlResponse(t,"Video Subtitle")})},[v,s]),i.useEffect(()=>{n.current&&(n.current.currentTime=a)},[a]),i.useEffect(()=>{const e=n.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=n.current;if(!e)return;let t=!1;const u=()=>{o>0&&e.currentTime>=o&&(c?(e.currentTime=a||0,e.play()):t||(t=!0,e.pause()))};return o>0&&e.addEventListener("timeupdate",u),()=>{e&&o>0&&e.removeEventListener("timeupdate",u)}},[o,c,a]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{c&&(e.currentTime=a||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[c,a]);const g=e=>{const t=new URL(e);if(a&&!isNaN(a)&&t.searchParams.append("start",a.toString()),o&&!isNaN(o)&&t.searchParams.append("end",o.toString()),c){t.searchParams.append("loop","1");const u=t.pathname.split("/").pop();u&&t.searchParams.append("playlist",u)}return m&&t.searchParams.append("autoplay","1"),E&&t.searchParams.append("mute","1"),t.toString()};if(y===T.Type.YOUTUBE_IFRAME)return p(L,{className:"stVideo","data-testid":"stVideo",title:f,src:g(f),allow:"autoplay; encrypted-media",allowFullScreen:!0});const V=e=>{const t=e.currentTarget.src;N.error(`Client Error: Video source error - ${t}`),s.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return p("video",{className:"stVideo","data-testid":"stVideo",ref:n,controls:!0,muted:E,autoPlay:m&&!S,src:s.buildMediaURL(f),style:U,crossOrigin:void 0,onError:V,children:d&&d.map((e,t)=>p("track",{kind:"captions",src:s.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const A=i.memo(R);export{A as default};
1
+ import{n as h,r as i,bf as T,j as p,l as b}from"./index.Dqcp7EZB.js";const L=h("iframe",{target:"eymnmwl0"})(({theme:r})=>({colorScheme:"normal",border:"none",padding:r.spacing.none,margin:r.spacing.none,width:"100%",aspectRatio:"16 / 9"})),N=b.getLogger("Video"),U={width:"100%"};function R({element:r,endpoints:s,elementMgr:l}){const n=i.useRef(null),{type:y,url:f,startTime:a,subtitles:d,endTime:o,loop:c,autoplay:m,muted:E}=r,S=i.useMemo(()=>{if(!r.id)return!0;const e=l.getElementState(r.id,"preventAutoplay");return e||l.setElementState(r.id,"preventAutoplay",!0),e??!1},[r.id,l]),v=i.useMemo(()=>JSON.stringify(d?d.map(e=>s.buildMediaURL(`${e.url}`)):[]),[d,s]);i.useEffect(()=>{const e=JSON.parse(v);e.length!==0&&e.forEach(t=>{s.checkSourceUrlResponse(t,"Video Subtitle")})},[v,s]),i.useEffect(()=>{n.current&&(n.current.currentTime=a)},[a]),i.useEffect(()=>{const e=n.current,t=()=>{e&&(e.currentTime=r.startTime)};return e&&e.addEventListener("loadedmetadata",t),()=>{e&&e.removeEventListener("loadedmetadata",t)}},[r]),i.useEffect(()=>{const e=n.current;if(!e)return;let t=!1;const u=()=>{o>0&&e.currentTime>=o&&(c?(e.currentTime=a||0,e.play()):t||(t=!0,e.pause()))};return o>0&&e.addEventListener("timeupdate",u),()=>{e&&o>0&&e.removeEventListener("timeupdate",u)}},[o,c,a]),i.useEffect(()=>{const e=n.current;if(!e)return;const t=()=>{c&&(e.currentTime=a||0,e.play())};return e.addEventListener("ended",t),()=>{e&&e.removeEventListener("ended",t)}},[c,a]);const g=e=>{const t=new URL(e);if(a&&!isNaN(a)&&t.searchParams.append("start",a.toString()),o&&!isNaN(o)&&t.searchParams.append("end",o.toString()),c){t.searchParams.append("loop","1");const u=t.pathname.split("/").pop();u&&t.searchParams.append("playlist",u)}return m&&t.searchParams.append("autoplay","1"),E&&t.searchParams.append("mute","1"),t.toString()};if(y===T.Type.YOUTUBE_IFRAME)return p(L,{className:"stVideo","data-testid":"stVideo",title:f,src:g(f),allow:"autoplay; encrypted-media",allowFullScreen:!0});const V=e=>{const t=e.currentTarget.src;N.error(`Client Error: Video source error - ${t}`),s.sendClientErrorToHost("Video","Video source failed to load","onerror triggered",t)};return p("video",{className:"stVideo","data-testid":"stVideo",ref:n,controls:!0,muted:E,autoPlay:m&&!S,src:s.buildMediaURL(f),style:U,crossOrigin:void 0,onError:V,children:d&&d.map((e,t)=>p("track",{kind:"captions",src:s.buildMediaURL(`${e.url}`),label:`${e.label}`,default:t===0,"data-testid":"stVideoSubtitle"},t))})}const A=i.memo(R);export{A as default};
@@ -1,2 +1,2 @@
1
- import{bs as Z,bt as J,r as f,bu as Q,z as Y,bv as s,j as S,C as ee,bo as te,bw as re,bp as ne,b5 as oe,bx as ie,bq as ae,bm as ue,b0 as C,a$ as W,b2 as le}from"./index.BgEbLy94.js";import{a as ce}from"./useBasicWidgetState.B1oropKY.js";import"./FormClearHelper.C_BjP_35.js";var se={secondary:"secondary"},G={default:"default"},fe={default:"default"},k=Object.freeze({radio:"radio",checkbox:"checkbox"}),z=Z("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==G.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});z.displayName="StyledRoot";z.displayName="StyledRoot";function j(e){"@babel/helpers - typeof";return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(e)}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function de(e,t){return he(e)||me(e,t)||be(e,t)||ye()}function ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{bs as Z,bt as J,r as f,bu as Q,z as Y,bv as s,j as S,C as ee,bo as te,bw as re,bp as ne,b5 as oe,bx as ie,bq as ae,bm as ue,b0 as C,a$ as W,b2 as le}from"./index.Dqcp7EZB.js";import{a as ce}from"./useBasicWidgetState.CeKdNkz-.js";import"./FormClearHelper.Ca3GFjxv.js";var se={secondary:"secondary"},G={default:"default"},fe={default:"default"},k=Object.freeze({radio:"radio",checkbox:"checkbox"}),z=Z("div",function(e){var t=e.$shape,r=e.$length,n=e.$theme,o=r===1?void 0:t!==G.default?"-".concat(n.sizing.scale100):"-0.5px";return{display:"flex",marginLeft:o,marginRight:o}});z.displayName="StyledRoot";z.displayName="StyledRoot";function j(e){"@babel/helpers - typeof";return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j(e)}function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(n){N(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function de(e,t){return he(e)||me(e,t)||be(e,t)||ye()}function ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function be(e,t){if(e){if(typeof e=="string")return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}}function X(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function me(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,a,p;try{for(r=r.call(e);!(o=(a=r.next()).done)&&(n.push(a.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,p=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw p}}return n}}function he(e){if(Array.isArray(e))return e}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ve(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Se(e,t,r){return t&&ve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$(e,t)}function $(e,t){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},$(e,t)}function Ee(e){var t=we();return function(){var n=I(e),o;if(t){var i=I(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return _e(this,o)}}function _e(e,t){if(t&&(j(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function we(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},I(e)}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e,t){return!Array.isArray(e)&&typeof e!="number"?!1:Array.isArray(e)?e.includes(t):e===t}var F=function(e){Oe(r,e);var t=Ee(r);function r(){var n;ge(this,r);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=t.call.apply(t,[this].concat(i)),N(K(n),"childRefs",{}),n}return Se(r,[{key:"render",value:function(){var o=this,i=this.props,a=i.overrides,p=a===void 0?{}:a,c=i.mode,P=c===void 0?k.checkbox:c,d=i.children,y=i.selected,m=i.disabled,l=i.onClick,_=i.kind,h=i.shape,w=i.size,T=J(p.Root,z),O=de(T,2),E=O[0],L=O[1],H=this.props["aria-label"]||this.props.ariaLabel,g=P===k.radio,V=f.Children.count(d);return f.createElement(Q.Consumer,null,function(q){return f.createElement(E,M({"aria-label":H||q.buttongroup.ariaLabel,"data-baseweb":"button-group",role:g?"radiogroup":"group",$shape:h,$length:d.length},L),f.Children.map(d,function(b,R){if(!f.isValidElement(b))return null;var A=b.props.isSelected?b.props.isSelected:Le(y,R);return g&&(o.childRefs[R]=f.createRef()),f.cloneElement(b,{disabled:m||b.props.disabled,isSelected:A,ref:g?o.childRefs[R]:void 0,tabIndex:!g||A||g&&(!y||y===-1)&&R===0?0:-1,onKeyDown:function(u){if(g){var v=Number(y)?Number(y):0;if(u.key==="ArrowUp"||u.key==="ArrowLeft"){u.preventDefault&&u.preventDefault();var B=v-1<0?V-1:v-1;l&&l(u,B),o.childRefs[B].current&&o.childRefs[B].current.focus()}if(u.key==="ArrowDown"||u.key==="ArrowRight"){u.preventDefault&&u.preventDefault();var D=v+1>V-1?0:v+1;l&&l(u,D),o.childRefs[D].current&&o.childRefs[D].current.focus()}}},kind:_,onClick:function(u){m||(b.props.onClick&&b.props.onClick(u),l&&l(u,R))},shape:h,size:w,overrides:pe({BaseButton:{style:function(u){var v=u.$theme;return d.length===1?{}:h!==G.default?{marginLeft:v.sizing.scale100,marginRight:v.sizing.scale100}:{marginLeft:"0.5px",marginRight:"0.5px"}},props:{"aria-checked":A,role:g?"radio":"checkbox"}}},b.props.overrides)})}))})}}]),r}(f.Component);N(F,"defaultProps",{disabled:!1,onClick:function(){},shape:G.default,size:fe.default,kind:se.secondary});function Re(e,t){return t.includes(e)?t.filter(r=>r!==e):[...t,e]}function Ce(e,t,r){return e==s.ClickMode.MULTI_SELECT?Re(t,r??[]):r!=null&&r.includes(t)?[]:[t]}function Pe(e){return e.length===0?-1:e[0]}function ke(e,t,r,n){t.setIntArrayValue(e,r.value,{fromUi:r.fromUi},n)}function Ie(e,t,r){const n=r===s.Style.PILLS?C.PILLS:r===s.Style.BORDERLESS?C.BORDERLESS_ICON:C.SEGMENTED_CONTROL,o=r===s.Style.BORDERLESS?W.XSMALL:W.MEDIUM,i=n===C.PILLS||n===C.SEGMENTED_CONTROL,a=r===s.Style.BORDERLESS?"lg":"base";return{element:S(le,{icon:t,label:e,iconSize:a,useSmallerFont:i}),kind:n,size:o}}function Te(e,t,r,n){return r.indexOf(n)>-1?!0:t!==s.ClickMode.SINGLE_SELECT||e!==s.SelectionVisualization.ALL_UP_TO_SELECTED?!1:r.length>0&&n<r[0]}function Ae(e,t){return e&&(t=`${t}Active`),t}function Be(e,t){const r={flexWrap:"wrap",maxWidth:"fit-content"};switch(e){case s.Style.BORDERLESS:return{...r,columnGap:t.threeXS,rowGap:t.threeXS};case s.Style.PILLS:return{...r,columnGap:t.twoXS,rowGap:t.twoXS};case s.Style.SEGMENTED_CONTROL:return{...r,columnGap:t.none,rowGap:t.twoXS,"::after":{content:"''",flex:1e4}};default:return r}}function De(e,t,r,n,o,i){const a=Te(r,n,o,t);let p=e.content,c=e.contentIcon;return a&&(p=e.selectedContent?e.selectedContent:p,c=e.selectedContentIcon?e.selectedContentIcon:c),f.forwardRef(function(d,y){const{element:m,kind:l,size:_}=Ie(p??"",c??void 0,i),h=Ae(!!(a&&!e.selectedContent&&!e.selectedContentIcon),l);return S(ue,{...d,size:_,kind:h,children:m})})}function je(e,t){return e.getIntArrayValue(t)}function Me(e){return e.default??null}function $e(e){return e.value??null}function Ge(e){const{disabled:t,element:r,fragmentId:n,widgetMgr:o}=e,{clickMode:i,options:a,selectionVisualization:p,style:c,label:P,labelVisibility:d,help:y}=r,m=Y(),[l,_]=ce({getStateFromWidgetMgr:je,getDefaultStateFromProto:Me,getCurrStateFromProto:$e,updateWidgetMgrState:ke,element:r,widgetMgr:o,fragmentId:n}),h=(O,E)=>{const L=Ce(i,E,l);_({value:L,fromUi:!0})};let w;i===s.ClickMode.SINGLE_SELECT?w=k.radio:i===s.ClickMode.MULTI_SELECT&&(w=k.checkbox);const T=f.useMemo(()=>a.map((O,E)=>{const L=De(O,E,p,i,l,c);return S(L,{},`${O.content}-${E}`)}),[i,a,p,c,l]);return ee("div",{className:"stButtonGroup","data-testid":"stButtonGroup",children:[S(ae,{label:P,disabled:t,labelVisibility:te((d==null?void 0:d.value)??ie.LabelVisibilityOptions.COLLAPSED),children:y&&S(re,{children:S(ne,{content:y,placement:oe.TOP})})}),S(F,{disabled:t,mode:w,onClick:h,selected:i===s.ClickMode.MULTI_SELECT?l:Pe(l),overrides:{Root:{style:f.useCallback(()=>Be(c,m.spacing),[c,m.spacing])}},children:T})]})}const Ue=f.memo(Ge);export{Ue as default};
@@ -1 +1 @@
1
- import{r as s,bd as U,z as k,cp as W,C as A,j as l,bo as L,bC as P,bp as B,b5 as D,bq as j}from"./index.BgEbLy94.js";import{u as _}from"./uniqueId.BAAVLIKj.js";import{u as q,a as w,b as K}from"./useOnInputChange.CHQJz2sf.js";import{I as O}from"./InputInstructions.CjdwGigq.js";import{a as $}from"./useBasicWidgetState.B1oropKY.js";import{T as G}from"./textarea.DodnI6GX.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.C_BjP_35.js";import"./base-input.BKhd-BLG.js";const x=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,J=a=>a.value??null,Q=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},X=({disabled:a,element:t,widgetMgr:o,fragmentId:u})=>{var f;const h=s.useRef(_("text_area_")).current,[T,S]=U(),[r,n]=s.useState(!1),[C,b]=s.useState(!1),[i,d]=s.useState(()=>x(o,t)??null),I=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[y,c]=$({getStateFromWidgetMgr:x,getDefaultStateFromProto:N,getCurrStateFromProto:J,updateWidgetMgrState:Q,element:t,widgetMgr:o,fragmentId:u,onFormCleared:I});q(y,i,d,r);const e=k(),m=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&m(),b(!1)},[r,m]),F=s.useCallback(()=>{b(!0)},[]),v=w({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),z=K(t.formId,m,r,o,u,!0),{height:g,placeholder:E,formId:p}=t,R=W({formId:p})?o.allowFormEnterToSubmit(p):r,H=C&&T>e.breakpoints.hideWidgetDetails;return A("div",{className:"stTextArea","data-testid":"stTextArea",ref:S,children:[l(j,{label:t.label,disabled:a,labelVisibility:L((f=t.labelVisibility)==null?void 0:f.value),htmlFor:h,children:t.help&&l(P,{children:l(B,{content:t.help,placement:D.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:E,onBlur:V,onFocus:F,onChange:v,onKeyDown:z,"aria-label":t.label,disabled:a,id:h,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:g?`${g}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.md,paddingLeft:e.spacing.md,paddingBottom:e.spacing.md,paddingTop:e.spacing.md}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),H&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:W({formId:p}),allowEnterToSubmit:R})]})},it=s.memo(X);export{it as default};
1
+ import{r as s,bd as U,z as k,cp as W,C as A,j as l,bo as L,bC as P,bp as B,b5 as D,bq as j}from"./index.Dqcp7EZB.js";import{u as _}from"./uniqueId.Dz7-nY8K.js";import{u as q,a as w,b as K}from"./useOnInputChange.CM8BtP-c.js";import{I as O}from"./InputInstructions.BO_BnHv5.js";import{a as $}from"./useBasicWidgetState.CeKdNkz-.js";import{T as G}from"./textarea.CdOYpTta.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.Ca3GFjxv.js";import"./base-input.BwCmIYba.js";const x=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,J=a=>a.value??null,Q=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},X=({disabled:a,element:t,widgetMgr:o,fragmentId:u})=>{var f;const h=s.useRef(_("text_area_")).current,[T,S]=U(),[r,n]=s.useState(!1),[C,b]=s.useState(!1),[i,d]=s.useState(()=>x(o,t)??null),I=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[y,c]=$({getStateFromWidgetMgr:x,getDefaultStateFromProto:N,getCurrStateFromProto:J,updateWidgetMgrState:Q,element:t,widgetMgr:o,fragmentId:u,onFormCleared:I});q(y,i,d,r);const e=k(),m=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&m(),b(!1)},[r,m]),F=s.useCallback(()=>{b(!0)},[]),v=w({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),z=K(t.formId,m,r,o,u,!0),{height:g,placeholder:E,formId:p}=t,R=W({formId:p})?o.allowFormEnterToSubmit(p):r,H=C&&T>e.breakpoints.hideWidgetDetails;return A("div",{className:"stTextArea","data-testid":"stTextArea",ref:S,children:[l(j,{label:t.label,disabled:a,labelVisibility:L((f=t.labelVisibility)==null?void 0:f.value),htmlFor:h,children:t.help&&l(P,{children:l(B,{content:t.help,placement:D.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:E,onBlur:V,onFocus:F,onChange:v,onKeyDown:z,"aria-label":t.label,disabled:a,id:h,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:g?`${g}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.md,paddingLeft:e.spacing.md,paddingBottom:e.spacing.md,paddingTop:e.spacing.md}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),H&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:W({formId:p}),allowEnterToSubmit:R})]})},it=s.memo(X);export{it as default};
@@ -1 +1 @@
1
- import{n as l,a_ as v,J as u,a$ as n,r as b,b0 as s,j as i,b1 as B,b2 as k,b3 as S}from"./index.BgEbLy94.js";function x(o,r){switch(o){case n.XSMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.sm}`,fontSize:r.fontSizes.sm};case n.SMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.md}`};case n.LARGE:return{padding:`${r.spacing.md} ${r.spacing.md}`};default:return{padding:`${r.spacing.xs} ${r.spacing.md}`}}}const e=l("a",{target:"e2m15hl0"})(({containerWidth:o,size:r,theme:a})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:a.fontWeights.normal,padding:`${a.spacing.xs} ${a.spacing.md}`,borderRadius:a.radii.default,minHeight:a.sizes.minElementHeight,margin:0,lineHeight:a.lineHeights.base,color:a.colors.primary,textDecoration:"none",width:o?"100%":"auto",userSelect:"none","&:visited":{color:a.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${u(a.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...x(r,a)})),$=l(e,{target:"e2m15hl1"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:v(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),L=l(e,{target:"e2m15hl2"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),w=l(e,{target:"e2m15hl3"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${u(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function T({kind:o,size:r,disabled:a,containerWidth:t,children:c,autoFocus:p,href:g,rel:y,target:f,onClick:C}){let d=$;return o===s.SECONDARY?d=L:o===s.TERTIARY&&(d=w),i(d,{kind:o,size:r||n.MEDIUM,containerWidth:t||!1,disabled:a||!1,autoFocus:p||!1,href:g,target:f,rel:y,onClick:C,tabIndex:a?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:c})}const z=b.memo(T);function R(o){const{element:r}=o;let a=s.SECONDARY;r.type==="primary"?a=s.PRIMARY:r.type==="tertiary"&&(a=s.TERTIARY);const t=c=>{r.disabled&&c.preventDefault()};return i(S,{className:"stLinkButton","data-testid":"stLinkButton",children:i(B,{help:r.help,containerWidth:r.useContainerWidth,children:i(z,{kind:a,size:n.SMALL,disabled:r.disabled,onClick:t,containerWidth:r.useContainerWidth,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":r.disabled,children:i(k,{icon:r.icon,label:r.label})})})})}const W=b.memo(R);export{W as default};
1
+ import{n as l,a_ as v,J as u,a$ as n,r as b,b0 as s,j as i,b1 as B,b2 as k,b3 as S}from"./index.Dqcp7EZB.js";function x(o,r){switch(o){case n.XSMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.sm}`,fontSize:r.fontSizes.sm};case n.SMALL:return{padding:`${r.spacing.twoXS} ${r.spacing.md}`};case n.LARGE:return{padding:`${r.spacing.md} ${r.spacing.md}`};default:return{padding:`${r.spacing.xs} ${r.spacing.md}`}}}const e=l("a",{target:"e2m15hl0"})(({containerWidth:o,size:r,theme:a})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:a.fontWeights.normal,padding:`${a.spacing.xs} ${a.spacing.md}`,borderRadius:a.radii.default,minHeight:a.sizes.minElementHeight,margin:0,lineHeight:a.lineHeights.base,color:a.colors.primary,textDecoration:"none",width:o?"100%":"auto",userSelect:"none","&:visited":{color:a.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${u(a.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...x(r,a)})),$=l(e,{target:"e2m15hl1"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:v(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),L=l(e,{target:"e2m15hl2"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),w=l(e,{target:"e2m15hl3"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${u(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function T({kind:o,size:r,disabled:a,containerWidth:t,children:c,autoFocus:p,href:g,rel:y,target:f,onClick:C}){let d=$;return o===s.SECONDARY?d=L:o===s.TERTIARY&&(d=w),i(d,{kind:o,size:r||n.MEDIUM,containerWidth:t||!1,disabled:a||!1,autoFocus:p||!1,href:g,target:f,rel:y,onClick:C,tabIndex:a?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:c})}const z=b.memo(T);function R(o){const{element:r}=o;let a=s.SECONDARY;r.type==="primary"?a=s.PRIMARY:r.type==="tertiary"&&(a=s.TERTIARY);const t=c=>{r.disabled&&c.preventDefault()};return i(S,{className:"stLinkButton","data-testid":"stLinkButton",children:i(B,{help:r.help,containerWidth:r.useContainerWidth,children:i(z,{kind:a,size:n.SMALL,disabled:r.disabled,onClick:t,containerWidth:r.useContainerWidth,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":r.disabled,children:i(k,{icon:r.icon,label:r.label})})})})}const W=b.memo(R);export{W as default};
@@ -1 +1 @@
1
- import{n as l,k as s,r,j as n}from"./index.BgEbLy94.js";import{P as i,R as m}from"./RenderInPortalIfExists.A1T2s6z-.js";const c=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,p=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,f=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,d=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,B=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,L=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,a=300,h=121,t=20,g=80,u=1e3,x=s("from{transform:translateY(calc(100vh + ",a,"px));}to{transform:translateY(0);}"),_=l("img",{target:"eosrfo90"})(({theme:o})=>({position:"fixed",top:"-300px",marginLeft:`${-121/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-t)+t}vw`,animationDelay:`${Math.random()*u}ms`,height:`${a}px`,width:`${h}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,e=[c,p,f,d,B,L],A=e.length,I=({particleType:o})=>n(_,{src:e[o]}),M=({scriptRunId:o})=>n(m,{children:n(i,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=r.memo(M);export{w as NUM_BALLOONS,S as default};
1
+ import{n as l,k as s,r,j as n}from"./index.Dqcp7EZB.js";import{P as i,R as m}from"./RenderInPortalIfExists.kuKoxpXt.js";const c=""+new URL("../media/balloon-0.Czj7AKwE.png",import.meta.url).href,p=""+new URL("../media/balloon-1.CNvFFrND.png",import.meta.url).href,f=""+new URL("../media/balloon-2.DTvC6B1t.png",import.meta.url).href,d=""+new URL("../media/balloon-3.CgSk4tbL.png",import.meta.url).href,B=""+new URL("../media/balloon-4.mbtFrzxf.png",import.meta.url).href,L=""+new URL("../media/balloon-5.CSwkUfRA.png",import.meta.url).href,a=300,h=121,t=20,g=80,u=1e3,x=s("from{transform:translateY(calc(100vh + ",a,"px));}to{transform:translateY(0);}"),_=l("img",{target:"eosrfo90"})(({theme:o})=>({position:"fixed",top:"-300px",marginLeft:`${-121/2}px`,zIndex:o.zIndices.balloons,left:`${Math.random()*(g-t)+t}vw`,animationDelay:`${Math.random()*u}ms`,height:`${a}px`,width:`${h}px`,pointerEvents:"none",animationDuration:"750ms",animationName:x,animationTimingFunction:"ease-in",animationDirection:"normal",animationIterationCount:1,opacity:1})),w=30,e=[c,p,f,d,B,L],A=e.length,I=({particleType:o})=>n(_,{src:e[o]}),M=({scriptRunId:o})=>n(m,{children:n(i,{className:"stBalloons","data-testid":"stBalloons",scriptRunId:o,numParticleTypes:A,numParticles:w,ParticleComponent:I})}),S=r.memo(M);export{w as NUM_BALLOONS,S as default};
@@ -1 +1 @@
1
- import{n,r as t,O as i,j as c,aY as d,aZ as e,M as g}from"./index.BgEbLy94.js";const l=n("iframe",{target:"e3tg43n0"})(({theme:o,disableScrolling:a})=>({width:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:a?"hidden":void 0}));function r(o){return g(o)||o===""?void 0:o}function m({element:o}){const a=r(o.src),s=i(a)?void 0:r(o.srcdoc);return c(l,{className:"stIFrame","data-testid":"stIFrame",allow:e,disableScrolling:!o.scrolling,src:a,srcDoc:s,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:d,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const F=t.memo(m);export{F as default};
1
+ import{n,r as t,O as i,j as c,aY as d,aZ as e,M as g}from"./index.Dqcp7EZB.js";const l=n("iframe",{target:"e3tg43n0"})(({theme:o,disableScrolling:a})=>({width:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:a?"hidden":void 0}));function r(o){return g(o)||o===""?void 0:o}function m({element:o}){const a=r(o.src),s=i(a)?void 0:r(o.srcdoc);return c(l,{className:"stIFrame","data-testid":"stIFrame",allow:e,disableScrolling:!o.scrolling,src:a,srcDoc:s,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:d,title:"st.iframe",tabIndex:o.tabIndex??void 0})}const F=t.memo(m);export{F as default};
@@ -1,4 +1,4 @@
1
- import{n as s,k as i,r as m,j as e}from"./index.BgEbLy94.js";import{P as c,R as l}from"./RenderInPortalIfExists.A1T2s6z-.js";const p=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,d=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,f=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,S=150,g=10,E=90,u=4e3,n=(t,a=0)=>Math.random()*(t-a)+a,w=()=>i(`from{transform:translateY(0)
1
+ import{n as s,k as i,r as m,j as e}from"./index.Dqcp7EZB.js";import{P as c,R as l}from"./RenderInPortalIfExists.kuKoxpXt.js";const p=""+new URL("../media/flake-0.DgWaVvm5.png",import.meta.url).href,d=""+new URL("../media/flake-1.B2r5AHMK.png",import.meta.url).href,f=""+new URL("../media/flake-2.BnWSExPC.png",import.meta.url).href,o=150,S=150,g=10,E=90,u=4e3,n=(t,a=0)=>Math.random()*(t-a)+a,w=()=>i(`from{transform:translateY(0)
2
2
  rotateX(`,n(360),`deg)
3
3
  rotateY(`,n(360),`deg)
4
4
  rotateZ(`,n(360),"deg);}to{transform:translateY(calc(100vh + ",o,`px))
@@ -1,9 +1,9 @@
1
- var jU=Object.defineProperty;var $U=(r,e,t)=>e in r?jU(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var V=(r,e,t)=>$U(r,typeof e!="symbol"?e+"":e,t);import{r as Bt,at as yr,aT as dt,g as ih,aU as Tu,_ as NO,n as kO,B as UO,aD as zO,U as Q1,aV as lB,aA as WU,j as Df,F as JU,aE as XU,z as KU,C as uB,aW as YU,aX as fB}from"./index.BgEbLy94.js";import{_ as ls,a as qU,C as ZU}from"./toConsumableArray.CK6YGgcW.js";import{a as Wu,b as Ju,_ as qx,c as dA,d as Zx}from"./possibleConstructorReturn.BjPX9m9m.js";import{a as QU,T as e5}from"./Toolbar.y7vr7z0G.js";import{E as GO,w as t5}from"./withFullScreenWrapper.DZ1W8JUx.js";import{u as r5}from"./useBasicWidgetState.B1oropKY.js";import{u as n5,s as i5}from"./threshold.DjX0wlsa.js";import"./FormClearHelper.C_BjP_35.js";import"./value.CgPGBV_l.js";function s5(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}const yu={};function Hm(r,e){if(!r)throw new Error(e||"loader assertion failed.")}const Qx=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hB&&parseFloat(hB[1]);const Pu=globalThis,Ea=globalThis.process||{},o5=globalThis.navigator||{};function VO(r){var n,i;if(typeof window<"u"&&((n=window.process)==null?void 0:n.type)==="renderer"||typeof process<"u"&&((i=process.versions)!=null&&i.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function rl(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||VO()}function a5(r){return rl()?VO()?"Electron":(o5.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const iy="4.1.0";function c5(r){try{const e=window[r],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}let l5=class{constructor(e,t,n="sessionStorage"){this.storage=c5(n),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function u5(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function f5(r,e=8){const t=Math.max(e-r.length,0);return`${" ".repeat(t)}${r}`}var jm;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(jm||(jm={}));const h5=10;function dB(r){return typeof r!="string"?r:(r=r.toUpperCase(),jm[r]||jm.WHITE)}function d5(r,e,t){return!rl&&typeof r=="string"&&(e&&(r=`\x1B[${dB(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${dB(t)+h5}m${r}\x1B[49m`)),r}function A5(r,e=["constructor"]){const t=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(t),i=r;for(const o of n){const s=i[o];typeof s=="function"&&(e.find(c=>o===c)||(i[o]=s.bind(r)))}}function ew(r,e){if(!r)throw new Error("Assertion failed")}function id(){var e,t,n;let r;if(rl()&&Pu.performance)r=(t=(e=Pu==null?void 0:Pu.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in Ea){const i=(n=Ea==null?void 0:Ea.hrtime)==null?void 0:n.call(Ea);r=i[0]*1e3+i[1]/1e6}else r=Date.now();return r}const sd={debug:rl()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},p5={enabled:!0,level:0};function od(){}const AB={},pB={once:!0};let HO=class{constructor({id:e}={id:""}){this.VERSION=iy,this._startTs=id(),this._deltaTs=id(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new l5(`__probe-${this.id}__`,p5),this.timeStamp(`${this.id} started`),A5(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((id()-this._startTs).toPrecision(10))}getDelta(){return Number((id()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,sd.warn,arguments,pB)}error(e){return this._getLogFunction(0,e,sd.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,sd.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,sd.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,sd.debug||sd.info,arguments,pB)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||od,n&&[n],{tag:m5(t)}):od}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||od)}group(e,t,n={collapsed:!1}){const i=gB({logLevel:e,message:t,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||od)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=jO(e)}_getLogFunction(e,t,n,i,o){if(this._shouldLog(e)){o=gB({logLevel:e,message:t,args:i,opts:o}),n=n||o.method,ew(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=id();const s=o.tag||o.message;if(o.once&&s)if(!AB[s])AB[s]=id();else return od;return t=g5(this.id,o.message,o),n.bind(console,t,...o.args)}return od}};HO.VERSION=iy;function jO(r){if(!r)return 0;let e;switch(typeof r){case"number":e=r;break;case"object":e=r.logLevel||r.priority||0;break;default:return 0}return ew(Number.isFinite(e)&&e>=0),e}function gB(r){const{logLevel:e,message:t}=r;r.logLevel=jO(e);const n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&n.unshift(t),r.message=e;break;case"object":Object.assign(r,e);break}typeof r.message=="function"&&(r.message=r.message());const i=typeof r.message;return ew(i==="string"||i==="object"),Object.assign(r,{args:n},r.opts)}function g5(r,e,t){if(typeof e=="string"){const n=t.time?f5(u5(t.total)):"";e=t.time?`${r}: ${n} ${e}`:`${r}: ${e}`,e=d5(e,t.color,t.background)}return e}function m5(r){for(const e in r)for(const t in r[e])return t||"untitled";return"empty"}function _5(r,e){return $O(r||{},e)}function $O(r,e,t=0){if(t>3)return e;const n={...r};for(const[i,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?n[i]=$O(n[i]||{},e[i],t+1):n[i]=e[i];return n}const y5="latest";function v5(){var r;return(r=globalThis._loadersgl_)!=null&&r.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const b5=v5();function ku(r,e){if(!r)throw new Error(e||"loaders.gl assertion failed.")}const $f=typeof process!="object"||String(process)!=="[object process]"||process.browser,x5=typeof window<"u"&&typeof window.orientation<"u",mB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);mB&&parseFloat(mB[1]);let w5=class{constructor(e,t){V(this,"name");V(this,"workerThread");V(this,"isRunning",!0);V(this,"result");V(this,"_resolve",()=>{});V(this,"_reject",()=>{});this.name=e,this.workerThread=t,this.result=new Promise((n,i)=>{this._resolve=n,this._reject=i})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){ku(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){ku(this.isRunning),this.isRunning=!1,this._reject(e)}},Lv=class{terminate(){}};const Nv=new Map;function C5(r){ku(r.source&&!r.url||!r.source&&r.url);let e=Nv.get(r.source||r.url);return e||(r.url&&(e=E5(r.url),Nv.set(r.url,e)),r.source&&(e=WO(r.source),Nv.set(r.source,e))),ku(e),e}function E5(r){if(!r.startsWith("http"))return r;const e=T5(r);return WO(e)}function WO(r){const e=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(e)}function T5(r){return`try {
1
+ var jU=Object.defineProperty;var $U=(r,e,t)=>e in r?jU(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var V=(r,e,t)=>$U(r,typeof e!="symbol"?e+"":e,t);import{r as Bt,at as yr,aT as dt,g as ih,aU as Tu,_ as NO,n as kO,B as UO,aD as zO,U as Q1,aV as lB,aA as WU,j as Df,F as JU,aE as XU,z as KU,C as uB,aW as YU,aX as fB}from"./index.Dqcp7EZB.js";import{_ as ls,a as qU,C as ZU}from"./toConsumableArray.BVXfsvDc.js";import{a as Wu,b as Ju,_ as qx,c as dA,d as Zx}from"./possibleConstructorReturn.twGQoCQl.js";import{a as QU,T as e5}from"./Toolbar.Cde1fEcQ.js";import{E as GO,w as t5}from"./withFullScreenWrapper.DuyW554J.js";import{u as r5}from"./useBasicWidgetState.CeKdNkz-.js";import{u as n5,s as i5}from"./threshold.DjX0wlsa.js";import"./FormClearHelper.Ca3GFjxv.js";import"./value.CgPGBV_l.js";function s5(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function Hm(r,e){if(!r)throw new Error(e||"loader assertion failed.")}const Qx=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hB&&parseFloat(hB[1]);const Pu=globalThis,Ea=globalThis.process||{},o5=globalThis.navigator||{};function VO(r){var n,i;if(typeof window<"u"&&((n=window.process)==null?void 0:n.type)==="renderer"||typeof process<"u"&&((i=process.versions)!=null&&i.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function rl(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||VO()}function a5(r){return rl()?VO()?"Electron":(o5.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const iy="4.1.0";function c5(r){try{const e=window[r],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}let l5=class{constructor(e,t,n="sessionStorage"){this.storage=c5(n),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function u5(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function f5(r,e=8){const t=Math.max(e-r.length,0);return`${" ".repeat(t)}${r}`}var jm;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(jm||(jm={}));const h5=10;function dB(r){return typeof r!="string"?r:(r=r.toUpperCase(),jm[r]||jm.WHITE)}function d5(r,e,t){return!rl&&typeof r=="string"&&(e&&(r=`\x1B[${dB(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${dB(t)+h5}m${r}\x1B[49m`)),r}function A5(r,e=["constructor"]){const t=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(t),i=r;for(const o of n){const s=i[o];typeof s=="function"&&(e.find(c=>o===c)||(i[o]=s.bind(r)))}}function ew(r,e){if(!r)throw new Error("Assertion failed")}function id(){var e,t,n;let r;if(rl()&&Pu.performance)r=(t=(e=Pu==null?void 0:Pu.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in Ea){const i=(n=Ea==null?void 0:Ea.hrtime)==null?void 0:n.call(Ea);r=i[0]*1e3+i[1]/1e6}else r=Date.now();return r}const sd={debug:rl()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},p5={enabled:!0,level:0};function od(){}const AB={},pB={once:!0};let HO=class{constructor({id:e}={id:""}){this.VERSION=iy,this._startTs=id(),this._deltaTs=id(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new l5(`__probe-${this.id}__`,p5),this.timeStamp(`${this.id} started`),A5(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((id()-this._startTs).toPrecision(10))}getDelta(){return Number((id()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,sd.warn,arguments,pB)}error(e){return this._getLogFunction(0,e,sd.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,sd.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,sd.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,sd.debug||sd.info,arguments,pB)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||od,n&&[n],{tag:m5(t)}):od}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||od)}group(e,t,n={collapsed:!1}){const i=gB({logLevel:e,message:t,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||od)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=jO(e)}_getLogFunction(e,t,n,i,o){if(this._shouldLog(e)){o=gB({logLevel:e,message:t,args:i,opts:o}),n=n||o.method,ew(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=id();const s=o.tag||o.message;if(o.once&&s)if(!AB[s])AB[s]=id();else return od;return t=g5(this.id,o.message,o),n.bind(console,t,...o.args)}return od}};HO.VERSION=iy;function jO(r){if(!r)return 0;let e;switch(typeof r){case"number":e=r;break;case"object":e=r.logLevel||r.priority||0;break;default:return 0}return ew(Number.isFinite(e)&&e>=0),e}function gB(r){const{logLevel:e,message:t}=r;r.logLevel=jO(e);const n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&n.unshift(t),r.message=e;break;case"object":Object.assign(r,e);break}typeof r.message=="function"&&(r.message=r.message());const i=typeof r.message;return ew(i==="string"||i==="object"),Object.assign(r,{args:n},r.opts)}function g5(r,e,t){if(typeof e=="string"){const n=t.time?f5(u5(t.total)):"";e=t.time?`${r}: ${n} ${e}`:`${r}: ${e}`,e=d5(e,t.color,t.background)}return e}function m5(r){for(const e in r)for(const t in r[e])return t||"untitled";return"empty"}function _5(r,e){return $O(r||{},e)}function $O(r,e,t=0){if(t>3)return e;const n={...r};for(const[i,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?n[i]=$O(n[i]||{},e[i],t+1):n[i]=e[i];return n}const y5="latest";function v5(){var r;return(r=globalThis._loadersgl_)!=null&&r.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const b5=v5();function ku(r,e){if(!r)throw new Error(e||"loaders.gl assertion failed.")}const $f=typeof process!="object"||String(process)!=="[object process]"||process.browser,x5=typeof window<"u"&&typeof window.orientation<"u",mB=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);mB&&parseFloat(mB[1]);let w5=class{constructor(e,t){V(this,"name");V(this,"workerThread");V(this,"isRunning",!0);V(this,"result");V(this,"_resolve",()=>{});V(this,"_reject",()=>{});this.name=e,this.workerThread=t,this.result=new Promise((n,i)=>{this._resolve=n,this._reject=i})}postMessage(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}done(e){ku(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){ku(this.isRunning),this.isRunning=!1,this._reject(e)}},Lv=class{terminate(){}};const Nv=new Map;function C5(r){ku(r.source&&!r.url||!r.source&&r.url);let e=Nv.get(r.source||r.url);return e||(r.url&&(e=E5(r.url),Nv.set(r.url,e)),r.source&&(e=WO(r.source),Nv.set(r.source,e))),ku(e),e}function E5(r){if(!r.startsWith("http"))return r;const e=T5(r);return WO(e)}function WO(r){const e=new Blob([r],{type:"application/javascript"});return URL.createObjectURL(e)}function T5(r){return`try {
2
2
  importScripts('${r}');
3
3
  } catch (error) {
4
4
  console.error(error);
5
5
  throw error;
6
- }`}function JO(r,e=!0,t){const n=t||new Set;if(r){if(_B(r))n.add(r);else if(_B(r.buffer))n.add(r.buffer);else if(!ArrayBuffer.isView(r)){if(e&&typeof r=="object")for(const i in r)JO(r[i],e,n)}}return t===void 0?Array.from(n):[]}function _B(r){return r?r instanceof ArrayBuffer||typeof MessagePort<"u"&&r instanceof MessagePort||typeof ImageBitmap<"u"&&r instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&r instanceof OffscreenCanvas:!1}const kv=()=>{};let e2=class{constructor(e){V(this,"name");V(this,"source");V(this,"url");V(this,"terminated",!1);V(this,"worker");V(this,"onMessage");V(this,"onError");V(this,"_loadableURL","");const{name:t,source:n,url:i}=e;ku(n||i),this.name=t,this.source=n,this.url=i,this.onMessage=kv,this.onError=o=>console.log(o),this.worker=$f?this._createBrowserWorker():this._createNodeWorker()}static isSupported(){return typeof Worker<"u"&&$f||typeof Lv<"u"&&!$f}destroy(){this.onMessage=kv,this.onError=kv,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,t){t=t||JO(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=`${e.message} in `),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=C5({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},e.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},e.onmessageerror=t=>console.error(t),e}_createNodeWorker(){let e;if(this.url){const n=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new Lv(n,{eval:!1})}else if(this.source)e=new Lv(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",t=>{this.onMessage(t)}),e.on("error",t=>{this.onError(t)}),e.on("exit",t=>{}),e}},B5=class{constructor(e){V(this,"name","unnamed");V(this,"source");V(this,"url");V(this,"maxConcurrency",1);V(this,"maxMobileConcurrency",1);V(this,"onDebug",()=>{});V(this,"reuseWorkers",!0);V(this,"props",{});V(this,"jobQueue",[]);V(this,"idleQueue",[]);V(this,"count",0);V(this,"isDestroyed",!1);this.source=e.source,this.url=e.url,this.setProps(e)}static isSupported(){return e2.isSupported()}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,t=(i,o,s)=>i.done(s),n=(i,o)=>i.error(o)){const i=new Promise(o=>(this.jobQueue.push({name:e,onMessage:t,onError:n,onStart:o}),this));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const n=new w5(t.name,e);e.onMessage=i=>t.onMessage(n,i.type,i.payload),e.onError=i=>t.onError(n,i),t.onStart(n);try{await n.result}catch(i){console.error(`Worker exception: ${i}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!$f||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new e2({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return x5?this.maxMobileConcurrency:this.maxConcurrency}};const S5={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};var oc;let XO=(oc=class{constructor(e){V(this,"props");V(this,"workerPools",new Map);this.props={...S5},this.setProps(e),this.workerPools=new Map}static isSupported(){return e2.isSupported()}static getWorkerFarm(e={}){return oc._workerFarm=oc._workerFarm||new oc({}),oc._workerFarm.setProps(e),oc._workerFarm}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:n,url:i}=e;let o=this.workerPools.get(t);return o||(o=new B5({name:t,source:n,url:i}),o.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,o)),o}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}},V(oc,"_workerFarm"),oc);function I5(r,e={}){const t=e[r.id]||{},n=$f?`${r.id}-worker.js`:`${r.id}-worker-node.js`;let i=t.workerUrl;if(!i&&r.id==="compression"&&(i=e.workerUrl),e._workerType==="test"&&($f?i=`modules/${r.module}/dist/${n}`:i=`modules/${r.module}/src/workers/${r.id}-worker-node.ts`),!i){let o=r.version;o==="latest"&&(o=y5);const s=o?`@${o}`:"";i=`https://unpkg.com/@loaders.gl/${r.module}${s}/dist/${n}`}return ku(i),i}function M5(r,e=b5){ku(r,"no worker provided");const t=r.version;return!(!e||!t)}function P5(r,e){return!XO.isSupported()||!$f&&!(e!=null&&e._nodeWorkers)?!1:r.worker&&(e==null?void 0:e.worker)}async function R5(r,e,t,n,i){const o=r.id,s=I5(r,t),f=XO.getWorkerFarm(t).getWorkerPool({name:o,url:s});t=JSON.parse(JSON.stringify(t)),n=JSON.parse(JSON.stringify(n||{}));const _=await f.startJob("process-on-worker",F5.bind(null,i));return _.postMessage("process",{input:e,options:t,context:n}),await(await _.result).result}async function F5(r,e,t,n){switch(t){case"done":e.done(n);break;case"error":e.error(new Error(n.error));break;case"process":const{id:i,input:o,options:s}=n;try{const c=await r(o,s);e.postMessage("done",{id:i,result:c})}catch(c){const f=c instanceof Error?c.message:"unknown error";e.postMessage("error",{id:i,error:f})}break;default:console.warn(`parse-with-worker unknown message ${t}`)}}function O5(r,e,t){if(t=t||r.byteLength,r.byteLength<t||e.byteLength<t)return!1;const n=new Uint8Array(r),i=new Uint8Array(e);for(let o=0;o<n.length;++o)if(n[o]!==i[o])return!1;return!0}function D5(...r){return L5(r)}function L5(r){const e=r.map(o=>o instanceof ArrayBuffer?new Uint8Array(o):o),t=e.reduce((o,s)=>o+s.byteLength,0),n=new Uint8Array(t);let i=0;for(const o of e)n.set(o,i),i+=o.byteLength;return n.buffer}async function N5(r){const e=[];for await(const t of r)e.push(t);return D5(...e)}let k5="";const yB={};function U5(r){for(const e in yB)if(r.startsWith(e)){const t=yB[e];r=r.replace(e,t)}return!r.startsWith("http://")&&!r.startsWith("https://")&&(r=`${k5}${r}`),r}function z5(r){return r&&typeof r=="object"&&r.isBuffer}function KO(r){if(z5(r))return r;if(r instanceof ArrayBuffer)return r;if(ArrayBuffer.isView(r))return r.byteOffset===0&&r.byteLength===r.buffer.byteLength?r.buffer:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength);if(typeof r=="string"){const e=r;return new TextEncoder().encode(e).buffer}if(r&&typeof r=="object"&&r._toArrayBuffer)return r._toArrayBuffer();throw new Error("toArrayBuffer")}function YO(r){const e=r?r.lastIndexOf("/"):-1;return e>=0?r.substr(e+1):""}function G5(r){const e=r?r.lastIndexOf("/"):-1;return e>=0?r.substr(0,e):""}const V5=r=>typeof r=="boolean",Up=r=>typeof r=="function",bg=r=>r!==null&&typeof r=="object",vB=r=>bg(r)&&r.constructor==={}.constructor,H5=r=>!!r&&typeof r[Symbol.iterator]=="function",j5=r=>r&&typeof r[Symbol.asyncIterator]=="function",sh=r=>typeof Response<"u"&&r instanceof Response||r&&r.arrayBuffer&&r.text&&r.json,oh=r=>typeof Blob<"u"&&r instanceof Blob,$5=r=>r&&typeof r=="object"&&r.isBuffer,W5=r=>typeof ReadableStream<"u"&&r instanceof ReadableStream||bg(r)&&Up(r.tee)&&Up(r.cancel)&&Up(r.getReader),J5=r=>bg(r)&&Up(r.read)&&Up(r.pipe)&&V5(r.readable),qO=r=>W5(r)||J5(r);let X5=class extends Error{constructor(t,n){super(t);V(this,"reason");V(this,"url");V(this,"response");this.reason=n.reason,this.url=n.url,this.response=n.response}};const K5=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,Y5=/^([-\w.]+\/[-\w.+]+)/;function bB(r,e){return r.toLowerCase()===e.toLowerCase()}function q5(r){const e=Y5.exec(r);return e?e[1]:r}function xB(r){const e=K5.exec(r);return e?e[1]:""}const ZO=/\?.*/;function Z5(r){const e=r.match(ZO);return e&&e[0]}function tw(r){return r.replace(ZO,"")}function Q5(r){if(r.length<50)return r;const e=r.slice(r.length-15);return`${r.substr(0,32)}...${e}`}function sy(r){return sh(r)?r.url:oh(r)?r.name||"":typeof r=="string"?r:""}function rw(r){if(sh(r)){const e=r,t=e.headers.get("content-type")||"",n=tw(e.url);return q5(t)||xB(n)}return oh(r)?r.type||"":typeof r=="string"?xB(r):""}function ez(r){return sh(r)?r.headers["content-length"]||-1:oh(r)?r.size:typeof r=="string"?r.length:r instanceof ArrayBuffer||ArrayBuffer.isView(r)?r.byteLength:-1}async function QO(r){if(sh(r))return r;const e={},t=ez(r);t>=0&&(e["content-length"]=String(t));const n=sy(r),i=rw(r);i&&(e["content-type"]=i);const o=await nz(r);o&&(e["x-first-bytes"]=o),typeof r=="string"&&(r=new TextEncoder().encode(r));const s=new Response(r,{headers:e});return Object.defineProperty(s,"url",{value:n}),s}async function tz(r){if(!r.ok)throw await rz(r)}async function rz(r){const e=Q5(r.url);let t=`Failed to fetch resource (${r.status}) ${r.statusText}: ${e}`;t=t.length>100?`${t.slice(0,100)}...`:t;const n={reason:r.statusText,url:r.url,response:r};try{const i=r.headers.get("Content-Type");n.reason=i!=null&&i.includes("application/json")?await r.json():r.text()}catch{}return new X5(t,n)}async function nz(r){if(typeof r=="string")return`data:,${r.slice(0,5)}`;if(r instanceof Blob){const t=r.slice(0,5);return await new Promise(n=>{const i=new FileReader;i.onload=o=>{var s;return n((s=o==null?void 0:o.target)==null?void 0:s.result)},i.readAsDataURL(t)})}if(r instanceof ArrayBuffer){const t=r.slice(0,5);return`data:base64,${iz(t)}`}return null}function iz(r){let e="";const t=new Uint8Array(r);for(let n=0;n<t.byteLength;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function sz(r){return!oz(r)&&!az(r)}function oz(r){return r.startsWith("http:")||r.startsWith("https:")}function az(r){return r.startsWith("data:")}async function wB(r,e){var t,n;if(typeof r=="string"){const i=U5(r);return sz(i)&&(t=globalThis.loaders)!=null&&t.fetchNode?(n=globalThis.loaders)==null?void 0:n.fetchNode(i,e):await fetch(i,e)}return await QO(r)}const b0=globalThis,ad=globalThis.process||{};function cz(r){var n,i;if(typeof window<"u"&&((n=window.process)==null?void 0:n.type)==="renderer"||typeof process<"u"&&((i=process.versions)!=null&&i.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function nw(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||cz()}const eD="4.0.7";function lz(r){try{const e=window[r],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}let uz=class{constructor(e,t,n="sessionStorage"){this.storage=lz(n),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function fz(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function hz(r,e=8){const t=Math.max(e-r.length,0);return`${" ".repeat(t)}${r}`}var $m;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})($m||($m={}));const dz=10;function CB(r){return typeof r!="string"?r:(r=r.toUpperCase(),$m[r]||$m.WHITE)}function Az(r,e,t){return!nw&&typeof r=="string"&&(e&&(r=`\x1B[${CB(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${CB(t)+dz}m${r}\x1B[49m`)),r}function pz(r,e=["constructor"]){const t=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(t),i=r;for(const o of n){const s=i[o];typeof s=="function"&&(e.find(c=>o===c)||(i[o]=s.bind(r)))}}function iw(r,e){if(!r)throw new Error("Assertion failed")}function cd(){var e,t,n;let r;if(nw()&&b0.performance)r=(t=(e=b0==null?void 0:b0.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in ad){const i=(n=ad==null?void 0:ad.hrtime)==null?void 0:n.call(ad);r=i[0]*1e3+i[1]/1e6}else r=Date.now();return r}const ld={debug:nw()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},gz={enabled:!0,level:0};function ud(){}const EB={},TB={once:!0};let sw=class{constructor({id:e}={id:""}){this.VERSION=eD,this._startTs=cd(),this._deltaTs=cd(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new uz(`__probe-${this.id}__`,gz),this.timeStamp(`${this.id} started`),pz(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((cd()-this._startTs).toPrecision(10))}getDelta(){return Number((cd()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,ld.warn,arguments,TB)}error(e){return this._getLogFunction(0,e,ld.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,ld.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,ld.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,ld.debug||ld.info,arguments,TB)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||ud,n&&[n],{tag:_z(t)}):ud}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||ud)}group(e,t,n={collapsed:!1}){const i=BB({logLevel:e,message:t,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||ud)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=tD(e)}_getLogFunction(e,t,n,i,o){if(this._shouldLog(e)){o=BB({logLevel:e,message:t,args:i,opts:o}),n=n||o.method,iw(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=cd();const s=o.tag||o.message;if(o.once&&s)if(!EB[s])EB[s]=cd();else return ud;return t=mz(this.id,o.message,o),n.bind(console,t,...o.args)}return ud}};sw.VERSION=eD;function tD(r){if(!r)return 0;let e;switch(typeof r){case"number":e=r;break;case"object":e=r.logLevel||r.priority||0;break;default:return 0}return iw(Number.isFinite(e)&&e>=0),e}function BB(r){const{logLevel:e,message:t}=r;r.logLevel=tD(e);const n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&n.unshift(t),r.message=e;break;case"object":Object.assign(r,e);break}typeof r.message=="function"&&(r.message=r.message());const i=typeof r.message;return iw(i==="string"||i==="object"),Object.assign(r,{args:n},r.opts)}function mz(r,e,t){if(typeof e=="string"){const n=t.time?hz(fz(t.total)):"";e=t.time?`${r}: ${n} ${e}`:`${r}: ${e}`,e=Az(e,t.color,t.background)}return e}function _z(r){for(const e in r)for(const t in r[e])return t||"untitled";return"empty"}const SB=new sw({id:"loaders.gl"});let yz=class{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},vz=class{constructor(){V(this,"console");this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}};const rD={fetch:null,mimeType:void 0,nothrow:!1,log:new vz,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:Qx,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},bz={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function nD(){globalThis.loaders=globalThis.loaders||{};const{loaders:r}=globalThis;return r._state||(r._state={}),r._state}function iD(){const r=nD();return r.globalOptions=r.globalOptions||{...rD},r.globalOptions}function xz(r,e,t,n){return t=t||[],t=Array.isArray(t)?t:[t],wz(r,t),Ez(e,r,n)}function wz(r,e){IB(r,null,rD,bz,e);for(const t of e){const n=r&&r[t.id]||{},i=t.options&&t.options[t.id]||{},o=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};IB(n,t.id,i,o,e)}}function IB(r,e,t,n,i){const o=e||"Top level",s=e?`${e}.`:"";for(const c in r){const f=!e&&bg(r[c]),_=c==="baseUri"&&!e,b=c==="workerUrl"&&e;if(!(c in t)&&!_&&!b){if(c in n)SB.warn(`${o} loader option '${s}${c}' no longer supported, use '${n[c]}'`)();else if(!f){const T=Cz(c,i);SB.warn(`${o} loader option '${s}${c}' not recognized. ${T}`)()}}}}function Cz(r,e){const t=r.toLowerCase();let n="";for(const i of e)for(const o in i.options){if(r===o)return`Did you mean '${i.id}.${o}'?`;const s=o.toLowerCase();(t.startsWith(s)||s.startsWith(t))&&(n=n||`Did you mean '${i.id}.${o}'?`)}return n}function Ez(r,e,t){const i={...r.options||{}};return Tz(i,t),i.log===null&&(i.log=new yz),MB(i,iD()),MB(i,e),i}function MB(r,e){for(const t in e)if(t in e){const n=e[t];vB(n)&&vB(r[t])?r[t]={...r[t],...e[t]}:r[t]=e[t]}}function Tz(r,e){e&&!("baseUri"in r)&&(r.baseUri=e)}function ow(r){return r?(Array.isArray(r)&&(r=r[0]),Array.isArray(r==null?void 0:r.extensions)):!1}function aw(r){Hm(r,"null loader"),Hm(ow(r),"invalid loader");let e;return Array.isArray(r)&&(e=r[1],r=r[0],r={...r,options:{...r.options,...e}}),(r!=null&&r.parseTextSync||r!=null&&r.parseText)&&(r.text=!0),r.text||(r.binary=!0),r}const sD=()=>{const r=nD();return r.loaderRegistry=r.loaderRegistry||[],r.loaderRegistry};function Bz(r){const e=sD();r=Array.isArray(r)?r:[r];for(const t of r){const n=aw(t);e.find(i=>n===i)||e.unshift(n)}}function Sz(){return sD()}const Iz=new sw({id:"loaders.gl"}),Mz=/\.([^.]+)$/;async function Pz(r,e=[],t,n){if(!oD(r))return null;let i=PB(r,e,{...t,nothrow:!0},n);if(i)return i;if(oh(r)&&(r=await r.slice(0,10).arrayBuffer(),i=PB(r,e,t,n)),!i&&!(t!=null&&t.nothrow))throw new Error(aD(r));return i}function PB(r,e=[],t,n){if(!oD(r))return null;if(e&&!Array.isArray(e))return aw(e);let i=[];e&&(i=i.concat(e)),t!=null&&t.ignoreRegisteredLoaders||i.push(...Sz()),Fz(i);const o=Rz(r,i,t,n);if(!o&&!(t!=null&&t.nothrow))throw new Error(aD(r));return o}function Rz(r,e,t,n){const i=sy(r),o=rw(r),s=tw(i)||(n==null?void 0:n.url);let c=null,f="";return t!=null&&t.mimeType&&(c=Uv(e,t==null?void 0:t.mimeType),f=`match forced by supplied MIME type ${t==null?void 0:t.mimeType}`),c=c||Oz(e,s),f=f||(c?`matched url ${s}`:""),c=c||Uv(e,o),f=f||(c?`matched MIME type ${o}`:""),c=c||Lz(e,r),f=f||(c?`matched initial data ${cD(r)}`:""),t!=null&&t.fallbackMimeType&&(c=c||Uv(e,t==null?void 0:t.fallbackMimeType),f=f||(c?`matched fallback MIME type ${o}`:"")),f&&Iz.log(1,`selectLoader selected ${c==null?void 0:c.name}: ${f}.`),c}function oD(r){return!(r instanceof Response&&r.status===204)}function aD(r){const e=sy(r),t=rw(r);let n="No valid loader found (";n+=e?`${YO(e)}, `:"no url provided, ",n+=`MIME type: ${t?`"${t}"`:"not provided"}, `;const i=r?cD(r):"";return n+=i?` first bytes: "${i}"`:"first bytes: not available",n+=")",n}function Fz(r){for(const e of r)aw(e)}function Oz(r,e){const t=e&&Mz.exec(e),n=t&&t[1];return n?Dz(r,n):null}function Dz(r,e){e=e.toLowerCase();for(const t of r)for(const n of t.extensions)if(n.toLowerCase()===e)return t;return null}function Uv(r,e){var t;for(const n of r)if((t=n.mimeTypes)!=null&&t.some(i=>bB(e,i))||bB(e,`application/x.${n.id}`))return n;return null}function Lz(r,e){if(!e)return null;for(const t of r)if(typeof e=="string"){if(Nz(e,t))return t}else if(ArrayBuffer.isView(e)){if(RB(e.buffer,e.byteOffset,t))return t}else if(e instanceof ArrayBuffer&&RB(e,0,t))return t;return null}function Nz(r,e){return e.testText?e.testText(r):(Array.isArray(e.tests)?e.tests:[e.tests]).some(n=>r.startsWith(n))}function RB(r,e,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(i=>kz(r,e,t,i))}function kz(r,e,t,n){if(n instanceof ArrayBuffer)return O5(n,r,n.byteLength);switch(typeof n){case"function":return n(r);case"string":const i=t2(r,e,n.length);return n===i;default:return!1}}function cD(r,e=5){return typeof r=="string"?r.slice(0,e):ArrayBuffer.isView(r)?t2(r.buffer,r.byteOffset,e):r instanceof ArrayBuffer?t2(r,0,e):""}function t2(r,e,t){if(r.byteLength<e+t)return"";const n=new DataView(r);let i="";for(let o=0;o<t;o++)i+=String.fromCharCode(n.getUint8(e+o));return i}const Uz=256*1024;function*zz(r,e){const t=(e==null?void 0:e.chunkSize)||Uz;let n=0;const i=new TextEncoder;for(;n<r.length;){const o=Math.min(r.length-n,t),s=r.slice(n,n+o);n+=o,yield i.encode(s)}}const Gz=256*1024;function*Vz(r,e={}){const{chunkSize:t=Gz}=e;let n=0;for(;n<r.byteLength;){const i=Math.min(r.byteLength-n,t),o=new ArrayBuffer(i),s=new Uint8Array(r,n,i);new Uint8Array(o).set(s),n+=i,yield o}}const Hz=1024*1024;async function*jz(r,e){const t=(e==null?void 0:e.chunkSize)||Hz;let n=0;for(;n<r.size;){const i=n+t,o=await r.slice(n,i).arrayBuffer();n=i,yield o}}function FB(r,e){return Qx?$z(r,e):Wz(r)}async function*$z(r,e){const t=r.getReader();let n;try{for(;;){const i=n||t.read();e!=null&&e._streamReadAhead&&(n=t.read());const{done:o,value:s}=await i;if(o)return;yield KO(s)}}catch{t.releaseLock()}}async function*Wz(r,e){for await(const t of r)yield KO(t)}function Jz(r,e){if(typeof r=="string")return zz(r,e);if(r instanceof ArrayBuffer)return Vz(r,e);if(oh(r))return jz(r,e);if(qO(r))return FB(r,e);if(sh(r))return FB(r.body,e);throw new Error("makeIterator")}const lD="Cannot convert supplied data type";function Xz(r,e,t){if(e.text&&typeof r=="string")return r;if($5(r)&&(r=r.buffer),r instanceof ArrayBuffer){const n=r;return e.text&&!e.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(r)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(r);let n=r.buffer;const i=r.byteLength||r.length;return(r.byteOffset!==0||i!==n.byteLength)&&(n=n.slice(r.byteOffset,r.byteOffset+i)),n}throw new Error(lD)}async function Kz(r,e,t){const n=r instanceof ArrayBuffer||ArrayBuffer.isView(r);if(typeof r=="string"||n)return Xz(r,e);if(oh(r)&&(r=await QO(r)),sh(r)){const i=r;return await tz(i),e.binary?await i.arrayBuffer():await i.text()}if(qO(r)&&(r=Jz(r,t)),H5(r)||j5(r))return N5(r);throw new Error(lD)}function uD(r,e){const t=iD(),n=r||t;return typeof n.fetch=="function"?n.fetch:bg(n.fetch)?i=>wB(i,n.fetch):e!=null&&e.fetch?e==null?void 0:e.fetch:wB}function Yz(r,e,t){if(t)return t;const n={fetch:uD(e,r),...r};if(n.url){const i=tw(n.url);n.baseUrl=i,n.queryString=Z5(n.url),n.filename=YO(i),n.baseUrl=G5(i)}return Array.isArray(n.loaders)||(n.loaders=null),n}function qz(r,e){if(r&&!Array.isArray(r))return r;let t;if(r&&(t=Array.isArray(r)?r:[r]),e&&e.loaders){const n=Array.isArray(e.loaders)?e.loaders:[e.loaders];t=t?[...t,...n]:n}return t&&t.length?t:void 0}async function Wm(r,e,t,n){e&&!Array.isArray(e)&&!ow(e)&&(n=void 0,t=e,e=void 0),r=await r,t=t||{};const i=sy(r),s=qz(e,n),c=await Pz(r,s,t);return c?(t=xz(t,c,s,i),n=Yz({url:i,_parse:Wm,loaders:s},t,n||null),await Zz(c,r,t,n)):null}async function Zz(r,e,t,n){if(M5(r),t=_5(r.options,t),sh(e)){const o=e,{ok:s,redirected:c,status:f,statusText:_,type:b,url:T}=o,S=Object.fromEntries(o.headers.entries());n.response={headers:S,ok:s,redirected:c,status:f,statusText:_,type:b,url:T}}e=await Kz(e,r,t);const i=r;if(i.parseTextSync&&typeof e=="string")return i.parseTextSync(e,t,n);if(P5(r,t))return await R5(r,e,t,n,Wm);if(i.parseText&&typeof e=="string")return await i.parseText(e,t,n);if(i.parse)return await i.parse(e,t,n);throw ku(!i.parseSync),new Error(`${r.id} loader - no parser found and worker is disabled`)}async function r2(r,e,t,n){let i,o;!Array.isArray(e)&&!ow(e)?(i=[],o=e):(i=e,o=t);const s=uD(o);let c=r;return typeof r=="string"&&(c=await s(r)),oh(r)&&(c=await s(r)),Array.isArray(i)?await Wm(c,i,o):await Wm(c,i,o)}const Qz="4.2.4";var OO;const eG=(OO=globalThis.loaders)==null?void 0:OO.parseImageNode,n2=typeof Image<"u",i2=typeof ImageBitmap<"u",tG=!!eG,s2=Qx?!0:tG;function rG(r){switch(r){case"auto":return i2||n2||s2;case"imagebitmap":return i2;case"image":return n2;case"data":return s2;default:throw new Error(`@loaders.gl/images: image ${r} not supported in this environment`)}}function nG(){if(i2)return"imagebitmap";if(n2)return"image";if(s2)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function iG(r){const e=oG(r);if(!e)throw new Error("Not an image");return e}function sG(r){switch(iG(r)){case"data":return r;case"image":case"imagebitmap":const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)throw new Error("getImageData");return e.width=r.width,e.height=r.height,t.drawImage(r,0,0),t.getImageData(0,0,r.width,r.height);default:throw new Error("getImageData")}}function oG(r){return typeof ImageBitmap<"u"&&r instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&r instanceof Image?"image":r&&typeof r=="object"&&r.data&&r.width&&r.height?"data":null}const aG=/^data:image\/svg\+xml/,cG=/\.svg((\?|#).*)?$/;function cw(r){return r&&(aG.test(r)||cG.test(r))}function lG(r,e){if(cw(e)){let n=new TextDecoder().decode(r);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return fD(r,e)}function fD(r,e){if(cw(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(r)])}async function hD(r,e,t){const n=lG(r,t),i=self.URL||self.webkitURL,o=typeof n!="string"&&i.createObjectURL(n);try{return await uG(o||n,e)}finally{o&&i.revokeObjectURL(o)}}async function uG(r,e){const t=new Image;return t.src=r,e.image&&e.image.decode&&t.decode?(await t.decode(),t):await new Promise((n,i)=>{try{t.onload=()=>n(t),t.onerror=o=>{const s=o instanceof Error?o.message:"error";i(new Error(s))}}catch(o){i(o)}})}const fG={};let OB=!0;async function hG(r,e,t){let n;cw(t)?n=await hD(r,e,t):n=fD(r,t);const i=e&&e.imagebitmap;return await dG(n,i)}async function dG(r,e=null){if((AG(e)||!OB)&&(e=null),e)try{return await createImageBitmap(r,e)}catch(t){console.warn(t),OB=!1}return await createImageBitmap(r)}function AG(r){for(const e in r||fG)return!1;return!0}function pG(r){return!yG(r,"ftyp",4)||(r[8]&96)===0?null:gG(r)}function gG(r){switch(mG(r,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function mG(r,e,t){return String.fromCharCode(...r.slice(e,t))}function _G(r){return[...r].map(e=>e.charCodeAt(0))}function yG(r,e,t=0){const n=_G(e);for(let i=0;i<n.length;++i)if(n[i]!==r[i+t])return!1;return!0}const Wc=!1,zp=!0;function dD(r){const e=xg(r);return bG(e)||CG(e)||xG(e)||wG(e)||vG(e)}function vG(r){const e=new Uint8Array(r instanceof DataView?r.buffer:r),t=pG(e);return t?{mimeType:t.mimeType,width:0,height:0}:null}function bG(r){const e=xg(r);return e.byteLength>=24&&e.getUint32(0,Wc)===2303741511?{mimeType:"image/png",width:e.getUint32(16,Wc),height:e.getUint32(20,Wc)}:null}function xG(r){const e=xg(r);return e.byteLength>=10&&e.getUint32(0,Wc)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,zp),height:e.getUint16(8,zp)}:null}function wG(r){const e=xg(r);return e.byteLength>=14&&e.getUint16(0,Wc)===16973&&e.getUint32(2,zp)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,zp),height:e.getUint32(22,zp)}:null}function CG(r){const e=xg(r);if(!(e.byteLength>=3&&e.getUint16(0,Wc)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:n,sofMarkers:i}=EG();let o=2;for(;o+9<e.byteLength;){const s=e.getUint16(o,Wc);if(i.has(s))return{mimeType:"image/jpeg",height:e.getUint16(o+5,Wc),width:e.getUint16(o+7,Wc)};if(!n.has(s))return null;o+=2,o+=e.getUint16(o,Wc)}return null}function EG(){const r=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)r.add(t);return{tableMarkers:r,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function xg(r){if(r instanceof DataView)return r;if(ArrayBuffer.isView(r))return new DataView(r.buffer);if(r instanceof ArrayBuffer)return new DataView(r);throw new Error("toDataView")}async function TG(r,e){var i;const{mimeType:t}=dD(r)||{},n=(i=globalThis.loaders)==null?void 0:i.parseImageNode;return Hm(n),await n(r,t)}async function BG(r,e,t){e=e||{};const i=(e.image||{}).type||"auto",{url:o}=t||{},s=SG(i);let c;switch(s){case"imagebitmap":c=await hG(r,e,o);break;case"image":c=await hD(r,e,o);break;case"data":c=await TG(r);break;default:Hm(!1)}return i==="data"&&(c=sG(c)),c}function SG(r){switch(r){case"auto":case"data":return nG();default:return rG(r),r}}const IG=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],MG=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],PG={image:{type:"auto",decode:!0}},RG={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:Qz,mimeTypes:MG,extensions:IG,parse:BG,tests:[r=>!!dD(new DataView(r))],options:PG},$r=new HO({id:"deck"});let o2={};function FG(r){o2=r}function so(r,e,t,n){$r.level>0&&o2[r]&&o2[r].call(null,e,t,n)}function OG(r){const e=r[0],t=r[r.length-1];return e==="{"&&t==="}"||e==="["&&t==="]"}const DG={dataType:null,batchType:null,id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:OG,parseTextSync:JSON.parse};function LG(){const r="9.1.11",e=globalThis.deck&&globalThis.deck.VERSION;if(e&&e!==r)throw new Error(`deck.gl - multiple versions detected: ${e} vs ${r}`);return e||($r.log(1,`deck.gl ${r}`)(),globalThis.deck={...globalThis.deck,VERSION:r,version:r,log:$r,_registerLoggers:FG},Bz([DG,[RG,{imagebitmap:{premultiplyAlpha:"none"}}]])),r}const NG=LG();function lw(r,e){if(!r)throw new Error(e||"shadertools: assertion failed.")}const zv={number:{type:"number",validate(r,e){return Number.isFinite(r)&&typeof e=="object"&&(e.max===void 0||r<=e.max)&&(e.min===void 0||r>=e.min)}},array:{type:"array",validate(r,e){return Array.isArray(r)||ArrayBuffer.isView(r)}}};function kG(r){const e={};for(const[t,n]of Object.entries(r))e[t]=UG(n);return e}function UG(r){let e=DB(r);if(e!=="object")return{value:r,...zv[e],type:e};if(typeof r=="object")return r?r.type!==void 0?{...r,...zv[r.type],type:r.type}:r.value===void 0?{type:"object",value:r}:(e=DB(r.value),{...r,...zv[e],type:e}):{type:"object",value:null};throw new Error("props")}function DB(r){return Array.isArray(r)||ArrayBuffer.isView(r)?"array":typeof r}const zG=`#ifdef MODULE_LOGDEPTH
6
+ }`}function JO(r,e=!0,t){const n=t||new Set;if(r){if(_B(r))n.add(r);else if(_B(r.buffer))n.add(r.buffer);else if(!ArrayBuffer.isView(r)){if(e&&typeof r=="object")for(const i in r)JO(r[i],e,n)}}return t===void 0?Array.from(n):[]}function _B(r){return r?r instanceof ArrayBuffer||typeof MessagePort<"u"&&r instanceof MessagePort||typeof ImageBitmap<"u"&&r instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&r instanceof OffscreenCanvas:!1}const kv=()=>{};let e2=class{constructor(e){V(this,"name");V(this,"source");V(this,"url");V(this,"terminated",!1);V(this,"worker");V(this,"onMessage");V(this,"onError");V(this,"_loadableURL","");const{name:t,source:n,url:i}=e;ku(n||i),this.name=t,this.source=n,this.url=i,this.onMessage=kv,this.onError=o=>console.log(o),this.worker=$f?this._createBrowserWorker():this._createNodeWorker()}static isSupported(){return typeof Worker<"u"&&$f||typeof Lv<"u"&&!$f}destroy(){this.onMessage=kv,this.onError=kv,this.worker.terminate(),this.terminated=!0}get isRunning(){return!!this.onMessage}postMessage(e,t){t=t||JO(e),this.worker.postMessage(e,t)}_getErrorFromErrorEvent(e){let t="Failed to load ";return t+=`worker ${this.name} from ${this.url}. `,e.message&&(t+=`${e.message} in `),e.lineno&&(t+=`:${e.lineno}:${e.colno}`),new Error(t)}_createBrowserWorker(){this._loadableURL=C5({source:this.source,url:this.url});const e=new Worker(this._loadableURL,{name:this.name});return e.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},e.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},e.onmessageerror=t=>console.error(t),e}_createNodeWorker(){let e;if(this.url){const n=this.url.includes(":/")||this.url.startsWith("/")?this.url:`./${this.url}`;e=new Lv(n,{eval:!1})}else if(this.source)e=new Lv(this.source,{eval:!0});else throw new Error("no worker");return e.on("message",t=>{this.onMessage(t)}),e.on("error",t=>{this.onError(t)}),e.on("exit",t=>{}),e}},B5=class{constructor(e){V(this,"name","unnamed");V(this,"source");V(this,"url");V(this,"maxConcurrency",1);V(this,"maxMobileConcurrency",1);V(this,"onDebug",()=>{});V(this,"reuseWorkers",!0);V(this,"props",{});V(this,"jobQueue",[]);V(this,"idleQueue",[]);V(this,"count",0);V(this,"isDestroyed",!1);this.source=e.source,this.url=e.url,this.setProps(e)}static isSupported(){return e2.isSupported()}destroy(){this.idleQueue.forEach(e=>e.destroy()),this.isDestroyed=!0}setProps(e){this.props={...this.props,...e},e.name!==void 0&&(this.name=e.name),e.maxConcurrency!==void 0&&(this.maxConcurrency=e.maxConcurrency),e.maxMobileConcurrency!==void 0&&(this.maxMobileConcurrency=e.maxMobileConcurrency),e.reuseWorkers!==void 0&&(this.reuseWorkers=e.reuseWorkers),e.onDebug!==void 0&&(this.onDebug=e.onDebug)}async startJob(e,t=(i,o,s)=>i.done(s),n=(i,o)=>i.error(o)){const i=new Promise(o=>(this.jobQueue.push({name:e,onMessage:t,onError:n,onStart:o}),this));return this._startQueuedJob(),await i}async _startQueuedJob(){if(!this.jobQueue.length)return;const e=this._getAvailableWorker();if(!e)return;const t=this.jobQueue.shift();if(t){this.onDebug({message:"Starting job",name:t.name,workerThread:e,backlog:this.jobQueue.length});const n=new w5(t.name,e);e.onMessage=i=>t.onMessage(n,i.type,i.payload),e.onError=i=>t.onError(n,i),t.onStart(n);try{await n.result}catch(i){console.error(`Worker exception: ${i}`)}finally{this.returnWorkerToQueue(e)}}}returnWorkerToQueue(e){!$f||this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const e=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new e2({name:e,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return x5?this.maxMobileConcurrency:this.maxConcurrency}};const S5={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:()=>{}};var oc;let XO=(oc=class{constructor(e){V(this,"props");V(this,"workerPools",new Map);this.props={...S5},this.setProps(e),this.workerPools=new Map}static isSupported(){return e2.isSupported()}static getWorkerFarm(e={}){return oc._workerFarm=oc._workerFarm||new oc({}),oc._workerFarm.setProps(e),oc._workerFarm}destroy(){for(const e of this.workerPools.values())e.destroy();this.workerPools=new Map}setProps(e){this.props={...this.props,...e};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(e){const{name:t,source:n,url:i}=e;let o=this.workerPools.get(t);return o||(o=new B5({name:t,source:n,url:i}),o.setProps(this._getWorkerPoolProps()),this.workerPools.set(t,o)),o}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}},V(oc,"_workerFarm"),oc);function I5(r,e={}){const t=e[r.id]||{},n=$f?`${r.id}-worker.js`:`${r.id}-worker-node.js`;let i=t.workerUrl;if(!i&&r.id==="compression"&&(i=e.workerUrl),e._workerType==="test"&&($f?i=`modules/${r.module}/dist/${n}`:i=`modules/${r.module}/src/workers/${r.id}-worker-node.ts`),!i){let o=r.version;o==="latest"&&(o=y5);const s=o?`@${o}`:"";i=`https://unpkg.com/@loaders.gl/${r.module}${s}/dist/${n}`}return ku(i),i}function M5(r,e=b5){ku(r,"no worker provided");const t=r.version;return!(!e||!t)}const yu={};function P5(r,e){return!XO.isSupported()||!$f&&!(e!=null&&e._nodeWorkers)?!1:r.worker&&(e==null?void 0:e.worker)}async function R5(r,e,t,n,i){const o=r.id,s=I5(r,t),f=XO.getWorkerFarm(t).getWorkerPool({name:o,url:s});t=JSON.parse(JSON.stringify(t)),n=JSON.parse(JSON.stringify(n||{}));const _=await f.startJob("process-on-worker",F5.bind(null,i));return _.postMessage("process",{input:e,options:t,context:n}),await(await _.result).result}async function F5(r,e,t,n){switch(t){case"done":e.done(n);break;case"error":e.error(new Error(n.error));break;case"process":const{id:i,input:o,options:s}=n;try{const c=await r(o,s);e.postMessage("done",{id:i,result:c})}catch(c){const f=c instanceof Error?c.message:"unknown error";e.postMessage("error",{id:i,error:f})}break;default:console.warn(`parse-with-worker unknown message ${t}`)}}function O5(r,e,t){if(t=t||r.byteLength,r.byteLength<t||e.byteLength<t)return!1;const n=new Uint8Array(r),i=new Uint8Array(e);for(let o=0;o<n.length;++o)if(n[o]!==i[o])return!1;return!0}function D5(...r){return L5(r)}function L5(r){const e=r.map(o=>o instanceof ArrayBuffer?new Uint8Array(o):o),t=e.reduce((o,s)=>o+s.byteLength,0),n=new Uint8Array(t);let i=0;for(const o of e)n.set(o,i),i+=o.byteLength;return n.buffer}async function N5(r){const e=[];for await(const t of r)e.push(t);return D5(...e)}let k5="";const yB={};function U5(r){for(const e in yB)if(r.startsWith(e)){const t=yB[e];r=r.replace(e,t)}return!r.startsWith("http://")&&!r.startsWith("https://")&&(r=`${k5}${r}`),r}function z5(r){return r&&typeof r=="object"&&r.isBuffer}function KO(r){if(z5(r))return r;if(r instanceof ArrayBuffer)return r;if(ArrayBuffer.isView(r))return r.byteOffset===0&&r.byteLength===r.buffer.byteLength?r.buffer:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength);if(typeof r=="string"){const e=r;return new TextEncoder().encode(e).buffer}if(r&&typeof r=="object"&&r._toArrayBuffer)return r._toArrayBuffer();throw new Error("toArrayBuffer")}function YO(r){const e=r?r.lastIndexOf("/"):-1;return e>=0?r.substr(e+1):""}function G5(r){const e=r?r.lastIndexOf("/"):-1;return e>=0?r.substr(0,e):""}const V5=r=>typeof r=="boolean",Up=r=>typeof r=="function",bg=r=>r!==null&&typeof r=="object",vB=r=>bg(r)&&r.constructor==={}.constructor,H5=r=>!!r&&typeof r[Symbol.iterator]=="function",j5=r=>r&&typeof r[Symbol.asyncIterator]=="function",sh=r=>typeof Response<"u"&&r instanceof Response||r&&r.arrayBuffer&&r.text&&r.json,oh=r=>typeof Blob<"u"&&r instanceof Blob,$5=r=>r&&typeof r=="object"&&r.isBuffer,W5=r=>typeof ReadableStream<"u"&&r instanceof ReadableStream||bg(r)&&Up(r.tee)&&Up(r.cancel)&&Up(r.getReader),J5=r=>bg(r)&&Up(r.read)&&Up(r.pipe)&&V5(r.readable),qO=r=>W5(r)||J5(r);let X5=class extends Error{constructor(t,n){super(t);V(this,"reason");V(this,"url");V(this,"response");this.reason=n.reason,this.url=n.url,this.response=n.response}};const K5=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,Y5=/^([-\w.]+\/[-\w.+]+)/;function bB(r,e){return r.toLowerCase()===e.toLowerCase()}function q5(r){const e=Y5.exec(r);return e?e[1]:r}function xB(r){const e=K5.exec(r);return e?e[1]:""}const ZO=/\?.*/;function Z5(r){const e=r.match(ZO);return e&&e[0]}function tw(r){return r.replace(ZO,"")}function Q5(r){if(r.length<50)return r;const e=r.slice(r.length-15);return`${r.substr(0,32)}...${e}`}function sy(r){return sh(r)?r.url:oh(r)?r.name||"":typeof r=="string"?r:""}function rw(r){if(sh(r)){const e=r,t=e.headers.get("content-type")||"",n=tw(e.url);return q5(t)||xB(n)}return oh(r)?r.type||"":typeof r=="string"?xB(r):""}function ez(r){return sh(r)?r.headers["content-length"]||-1:oh(r)?r.size:typeof r=="string"?r.length:r instanceof ArrayBuffer||ArrayBuffer.isView(r)?r.byteLength:-1}async function QO(r){if(sh(r))return r;const e={},t=ez(r);t>=0&&(e["content-length"]=String(t));const n=sy(r),i=rw(r);i&&(e["content-type"]=i);const o=await nz(r);o&&(e["x-first-bytes"]=o),typeof r=="string"&&(r=new TextEncoder().encode(r));const s=new Response(r,{headers:e});return Object.defineProperty(s,"url",{value:n}),s}async function tz(r){if(!r.ok)throw await rz(r)}async function rz(r){const e=Q5(r.url);let t=`Failed to fetch resource (${r.status}) ${r.statusText}: ${e}`;t=t.length>100?`${t.slice(0,100)}...`:t;const n={reason:r.statusText,url:r.url,response:r};try{const i=r.headers.get("Content-Type");n.reason=i!=null&&i.includes("application/json")?await r.json():r.text()}catch{}return new X5(t,n)}async function nz(r){if(typeof r=="string")return`data:,${r.slice(0,5)}`;if(r instanceof Blob){const t=r.slice(0,5);return await new Promise(n=>{const i=new FileReader;i.onload=o=>{var s;return n((s=o==null?void 0:o.target)==null?void 0:s.result)},i.readAsDataURL(t)})}if(r instanceof ArrayBuffer){const t=r.slice(0,5);return`data:base64,${iz(t)}`}return null}function iz(r){let e="";const t=new Uint8Array(r);for(let n=0;n<t.byteLength;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function sz(r){return!oz(r)&&!az(r)}function oz(r){return r.startsWith("http:")||r.startsWith("https:")}function az(r){return r.startsWith("data:")}async function wB(r,e){var t,n;if(typeof r=="string"){const i=U5(r);return sz(i)&&(t=globalThis.loaders)!=null&&t.fetchNode?(n=globalThis.loaders)==null?void 0:n.fetchNode(i,e):await fetch(i,e)}return await QO(r)}const b0=globalThis,ad=globalThis.process||{};function cz(r){var n,i;if(typeof window<"u"&&((n=window.process)==null?void 0:n.type)==="renderer"||typeof process<"u"&&((i=process.versions)!=null&&i.electron))return!0;const t=typeof navigator<"u"&&navigator.userAgent;return!!(t&&t.indexOf("Electron")>=0)}function nw(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||cz()}const eD="4.0.7";function lz(r){try{const e=window[r],t="__storage_test__";return e.setItem(t,t),e.removeItem(t),e}catch{return null}}let uz=class{constructor(e,t,n="sessionStorage"){this.storage=lz(n),this.id=e,this.config=t,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let e={};if(this.storage){const t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}};function fz(r){let e;return r<10?e=`${r.toFixed(2)}ms`:r<100?e=`${r.toFixed(1)}ms`:r<1e3?e=`${r.toFixed(0)}ms`:e=`${(r/1e3).toFixed(2)}s`,e}function hz(r,e=8){const t=Math.max(e-r.length,0);return`${" ".repeat(t)}${r}`}var $m;(function(r){r[r.BLACK=30]="BLACK",r[r.RED=31]="RED",r[r.GREEN=32]="GREEN",r[r.YELLOW=33]="YELLOW",r[r.BLUE=34]="BLUE",r[r.MAGENTA=35]="MAGENTA",r[r.CYAN=36]="CYAN",r[r.WHITE=37]="WHITE",r[r.BRIGHT_BLACK=90]="BRIGHT_BLACK",r[r.BRIGHT_RED=91]="BRIGHT_RED",r[r.BRIGHT_GREEN=92]="BRIGHT_GREEN",r[r.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",r[r.BRIGHT_BLUE=94]="BRIGHT_BLUE",r[r.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",r[r.BRIGHT_CYAN=96]="BRIGHT_CYAN",r[r.BRIGHT_WHITE=97]="BRIGHT_WHITE"})($m||($m={}));const dz=10;function CB(r){return typeof r!="string"?r:(r=r.toUpperCase(),$m[r]||$m.WHITE)}function Az(r,e,t){return!nw&&typeof r=="string"&&(e&&(r=`\x1B[${CB(e)}m${r}\x1B[39m`),t&&(r=`\x1B[${CB(t)+dz}m${r}\x1B[49m`)),r}function pz(r,e=["constructor"]){const t=Object.getPrototypeOf(r),n=Object.getOwnPropertyNames(t),i=r;for(const o of n){const s=i[o];typeof s=="function"&&(e.find(c=>o===c)||(i[o]=s.bind(r)))}}function iw(r,e){if(!r)throw new Error("Assertion failed")}function cd(){var e,t,n;let r;if(nw()&&b0.performance)r=(t=(e=b0==null?void 0:b0.performance)==null?void 0:e.now)==null?void 0:t.call(e);else if("hrtime"in ad){const i=(n=ad==null?void 0:ad.hrtime)==null?void 0:n.call(ad);r=i[0]*1e3+i[1]/1e6}else r=Date.now();return r}const ld={debug:nw()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},gz={enabled:!0,level:0};function ud(){}const EB={},TB={once:!0};let sw=class{constructor({id:e}={id:""}){this.VERSION=eD,this._startTs=cd(),this._deltaTs=cd(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new uz(`__probe-${this.id}__`,gz),this.timeStamp(`${this.id} started`),pz(this),Object.seal(this)}set level(e){this.setLevel(e)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((cd()-this._startTs).toPrecision(10))}getDelta(){return Number((cd()-this._deltaTs).toPrecision(10))}set priority(e){this.level=e}get priority(){return this.level}getPriority(){return this.level}enable(e=!0){return this._storage.setConfiguration({enabled:e}),this}setLevel(e){return this._storage.setConfiguration({level:e}),this}get(e){return this._storage.config[e]}set(e,t){this._storage.setConfiguration({[e]:t})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,t){if(!e)throw new Error(t||"Assertion failed")}warn(e){return this._getLogFunction(0,e,ld.warn,arguments,TB)}error(e){return this._getLogFunction(0,e,ld.error,arguments)}deprecated(e,t){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${t}\` instead`)}removed(e,t){return this.error(`\`${e}\` has been removed. Use \`${t}\` instead`)}probe(e,t){return this._getLogFunction(e,t,ld.log,arguments,{time:!0,once:!0})}log(e,t){return this._getLogFunction(e,t,ld.debug,arguments)}info(e,t){return this._getLogFunction(e,t,console.info,arguments)}once(e,t){return this._getLogFunction(e,t,ld.debug||ld.info,arguments,TB)}table(e,t,n){return t?this._getLogFunction(e,t,console.table||ud,n&&[n],{tag:_z(t)}):ud}time(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}timeEnd(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,t){return this._getLogFunction(e,t,console.timeStamp||ud)}group(e,t,n={collapsed:!1}){const i=BB({logLevel:e,message:t,opts:n}),{collapsed:o}=n;return i.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(i)}groupCollapsed(e,t,n={}){return this.group(e,t,Object.assign({},n,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||ud)}withGroup(e,t,n){this.group(e,t)();try{n()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=tD(e)}_getLogFunction(e,t,n,i,o){if(this._shouldLog(e)){o=BB({logLevel:e,message:t,args:i,opts:o}),n=n||o.method,iw(n),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=cd();const s=o.tag||o.message;if(o.once&&s)if(!EB[s])EB[s]=cd();else return ud;return t=mz(this.id,o.message,o),n.bind(console,t,...o.args)}return ud}};sw.VERSION=eD;function tD(r){if(!r)return 0;let e;switch(typeof r){case"number":e=r;break;case"object":e=r.logLevel||r.priority||0;break;default:return 0}return iw(Number.isFinite(e)&&e>=0),e}function BB(r){const{logLevel:e,message:t}=r;r.logLevel=tD(e);const n=r.args?Array.from(r.args):[];for(;n.length&&n.shift()!==t;);switch(typeof e){case"string":case"function":t!==void 0&&n.unshift(t),r.message=e;break;case"object":Object.assign(r,e);break}typeof r.message=="function"&&(r.message=r.message());const i=typeof r.message;return iw(i==="string"||i==="object"),Object.assign(r,{args:n},r.opts)}function mz(r,e,t){if(typeof e=="string"){const n=t.time?hz(fz(t.total)):"";e=t.time?`${r}: ${n} ${e}`:`${r}: ${e}`,e=Az(e,t.color,t.background)}return e}function _z(r){for(const e in r)for(const t in r[e])return t||"untitled";return"empty"}const SB=new sw({id:"loaders.gl"});let yz=class{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}},vz=class{constructor(){V(this,"console");this.console=console}log(...e){return this.console.log.bind(this.console,...e)}info(...e){return this.console.info.bind(this.console,...e)}warn(...e){return this.console.warn.bind(this.console,...e)}error(...e){return this.console.error.bind(this.console,...e)}};const rD={fetch:null,mimeType:void 0,nothrow:!1,log:new vz,useLocalLibraries:!1,CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:Qx,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},bz={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function nD(){globalThis.loaders=globalThis.loaders||{};const{loaders:r}=globalThis;return r._state||(r._state={}),r._state}function iD(){const r=nD();return r.globalOptions=r.globalOptions||{...rD},r.globalOptions}function xz(r,e,t,n){return t=t||[],t=Array.isArray(t)?t:[t],wz(r,t),Ez(e,r,n)}function wz(r,e){IB(r,null,rD,bz,e);for(const t of e){const n=r&&r[t.id]||{},i=t.options&&t.options[t.id]||{},o=t.deprecatedOptions&&t.deprecatedOptions[t.id]||{};IB(n,t.id,i,o,e)}}function IB(r,e,t,n,i){const o=e||"Top level",s=e?`${e}.`:"";for(const c in r){const f=!e&&bg(r[c]),_=c==="baseUri"&&!e,b=c==="workerUrl"&&e;if(!(c in t)&&!_&&!b){if(c in n)SB.warn(`${o} loader option '${s}${c}' no longer supported, use '${n[c]}'`)();else if(!f){const T=Cz(c,i);SB.warn(`${o} loader option '${s}${c}' not recognized. ${T}`)()}}}}function Cz(r,e){const t=r.toLowerCase();let n="";for(const i of e)for(const o in i.options){if(r===o)return`Did you mean '${i.id}.${o}'?`;const s=o.toLowerCase();(t.startsWith(s)||s.startsWith(t))&&(n=n||`Did you mean '${i.id}.${o}'?`)}return n}function Ez(r,e,t){const i={...r.options||{}};return Tz(i,t),i.log===null&&(i.log=new yz),MB(i,iD()),MB(i,e),i}function MB(r,e){for(const t in e)if(t in e){const n=e[t];vB(n)&&vB(r[t])?r[t]={...r[t],...e[t]}:r[t]=e[t]}}function Tz(r,e){e&&!("baseUri"in r)&&(r.baseUri=e)}function ow(r){return r?(Array.isArray(r)&&(r=r[0]),Array.isArray(r==null?void 0:r.extensions)):!1}function aw(r){Hm(r,"null loader"),Hm(ow(r),"invalid loader");let e;return Array.isArray(r)&&(e=r[1],r=r[0],r={...r,options:{...r.options,...e}}),(r!=null&&r.parseTextSync||r!=null&&r.parseText)&&(r.text=!0),r.text||(r.binary=!0),r}const sD=()=>{const r=nD();return r.loaderRegistry=r.loaderRegistry||[],r.loaderRegistry};function Bz(r){const e=sD();r=Array.isArray(r)?r:[r];for(const t of r){const n=aw(t);e.find(i=>n===i)||e.unshift(n)}}function Sz(){return sD()}const Iz=new sw({id:"loaders.gl"}),Mz=/\.([^.]+)$/;async function Pz(r,e=[],t,n){if(!oD(r))return null;let i=PB(r,e,{...t,nothrow:!0},n);if(i)return i;if(oh(r)&&(r=await r.slice(0,10).arrayBuffer(),i=PB(r,e,t,n)),!i&&!(t!=null&&t.nothrow))throw new Error(aD(r));return i}function PB(r,e=[],t,n){if(!oD(r))return null;if(e&&!Array.isArray(e))return aw(e);let i=[];e&&(i=i.concat(e)),t!=null&&t.ignoreRegisteredLoaders||i.push(...Sz()),Fz(i);const o=Rz(r,i,t,n);if(!o&&!(t!=null&&t.nothrow))throw new Error(aD(r));return o}function Rz(r,e,t,n){const i=sy(r),o=rw(r),s=tw(i)||(n==null?void 0:n.url);let c=null,f="";return t!=null&&t.mimeType&&(c=Uv(e,t==null?void 0:t.mimeType),f=`match forced by supplied MIME type ${t==null?void 0:t.mimeType}`),c=c||Oz(e,s),f=f||(c?`matched url ${s}`:""),c=c||Uv(e,o),f=f||(c?`matched MIME type ${o}`:""),c=c||Lz(e,r),f=f||(c?`matched initial data ${cD(r)}`:""),t!=null&&t.fallbackMimeType&&(c=c||Uv(e,t==null?void 0:t.fallbackMimeType),f=f||(c?`matched fallback MIME type ${o}`:"")),f&&Iz.log(1,`selectLoader selected ${c==null?void 0:c.name}: ${f}.`),c}function oD(r){return!(r instanceof Response&&r.status===204)}function aD(r){const e=sy(r),t=rw(r);let n="No valid loader found (";n+=e?`${YO(e)}, `:"no url provided, ",n+=`MIME type: ${t?`"${t}"`:"not provided"}, `;const i=r?cD(r):"";return n+=i?` first bytes: "${i}"`:"first bytes: not available",n+=")",n}function Fz(r){for(const e of r)aw(e)}function Oz(r,e){const t=e&&Mz.exec(e),n=t&&t[1];return n?Dz(r,n):null}function Dz(r,e){e=e.toLowerCase();for(const t of r)for(const n of t.extensions)if(n.toLowerCase()===e)return t;return null}function Uv(r,e){var t;for(const n of r)if((t=n.mimeTypes)!=null&&t.some(i=>bB(e,i))||bB(e,`application/x.${n.id}`))return n;return null}function Lz(r,e){if(!e)return null;for(const t of r)if(typeof e=="string"){if(Nz(e,t))return t}else if(ArrayBuffer.isView(e)){if(RB(e.buffer,e.byteOffset,t))return t}else if(e instanceof ArrayBuffer&&RB(e,0,t))return t;return null}function Nz(r,e){return e.testText?e.testText(r):(Array.isArray(e.tests)?e.tests:[e.tests]).some(n=>r.startsWith(n))}function RB(r,e,t){return(Array.isArray(t.tests)?t.tests:[t.tests]).some(i=>kz(r,e,t,i))}function kz(r,e,t,n){if(n instanceof ArrayBuffer)return O5(n,r,n.byteLength);switch(typeof n){case"function":return n(r);case"string":const i=t2(r,e,n.length);return n===i;default:return!1}}function cD(r,e=5){return typeof r=="string"?r.slice(0,e):ArrayBuffer.isView(r)?t2(r.buffer,r.byteOffset,e):r instanceof ArrayBuffer?t2(r,0,e):""}function t2(r,e,t){if(r.byteLength<e+t)return"";const n=new DataView(r);let i="";for(let o=0;o<t;o++)i+=String.fromCharCode(n.getUint8(e+o));return i}const Uz=256*1024;function*zz(r,e){const t=(e==null?void 0:e.chunkSize)||Uz;let n=0;const i=new TextEncoder;for(;n<r.length;){const o=Math.min(r.length-n,t),s=r.slice(n,n+o);n+=o,yield i.encode(s)}}const Gz=256*1024;function*Vz(r,e={}){const{chunkSize:t=Gz}=e;let n=0;for(;n<r.byteLength;){const i=Math.min(r.byteLength-n,t),o=new ArrayBuffer(i),s=new Uint8Array(r,n,i);new Uint8Array(o).set(s),n+=i,yield o}}const Hz=1024*1024;async function*jz(r,e){const t=(e==null?void 0:e.chunkSize)||Hz;let n=0;for(;n<r.size;){const i=n+t,o=await r.slice(n,i).arrayBuffer();n=i,yield o}}function FB(r,e){return Qx?$z(r,e):Wz(r)}async function*$z(r,e){const t=r.getReader();let n;try{for(;;){const i=n||t.read();e!=null&&e._streamReadAhead&&(n=t.read());const{done:o,value:s}=await i;if(o)return;yield KO(s)}}catch{t.releaseLock()}}async function*Wz(r,e){for await(const t of r)yield KO(t)}function Jz(r,e){if(typeof r=="string")return zz(r,e);if(r instanceof ArrayBuffer)return Vz(r,e);if(oh(r))return jz(r,e);if(qO(r))return FB(r,e);if(sh(r))return FB(r.body,e);throw new Error("makeIterator")}const lD="Cannot convert supplied data type";function Xz(r,e,t){if(e.text&&typeof r=="string")return r;if($5(r)&&(r=r.buffer),r instanceof ArrayBuffer){const n=r;return e.text&&!e.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(r)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(r);let n=r.buffer;const i=r.byteLength||r.length;return(r.byteOffset!==0||i!==n.byteLength)&&(n=n.slice(r.byteOffset,r.byteOffset+i)),n}throw new Error(lD)}async function Kz(r,e,t){const n=r instanceof ArrayBuffer||ArrayBuffer.isView(r);if(typeof r=="string"||n)return Xz(r,e);if(oh(r)&&(r=await QO(r)),sh(r)){const i=r;return await tz(i),e.binary?await i.arrayBuffer():await i.text()}if(qO(r)&&(r=Jz(r,t)),H5(r)||j5(r))return N5(r);throw new Error(lD)}function uD(r,e){const t=iD(),n=r||t;return typeof n.fetch=="function"?n.fetch:bg(n.fetch)?i=>wB(i,n.fetch):e!=null&&e.fetch?e==null?void 0:e.fetch:wB}function Yz(r,e,t){if(t)return t;const n={fetch:uD(e,r),...r};if(n.url){const i=tw(n.url);n.baseUrl=i,n.queryString=Z5(n.url),n.filename=YO(i),n.baseUrl=G5(i)}return Array.isArray(n.loaders)||(n.loaders=null),n}function qz(r,e){if(r&&!Array.isArray(r))return r;let t;if(r&&(t=Array.isArray(r)?r:[r]),e&&e.loaders){const n=Array.isArray(e.loaders)?e.loaders:[e.loaders];t=t?[...t,...n]:n}return t&&t.length?t:void 0}async function Wm(r,e,t,n){e&&!Array.isArray(e)&&!ow(e)&&(n=void 0,t=e,e=void 0),r=await r,t=t||{};const i=sy(r),s=qz(e,n),c=await Pz(r,s,t);return c?(t=xz(t,c,s,i),n=Yz({url:i,_parse:Wm,loaders:s},t,n||null),await Zz(c,r,t,n)):null}async function Zz(r,e,t,n){if(M5(r),t=_5(r.options,t),sh(e)){const o=e,{ok:s,redirected:c,status:f,statusText:_,type:b,url:T}=o,S=Object.fromEntries(o.headers.entries());n.response={headers:S,ok:s,redirected:c,status:f,statusText:_,type:b,url:T}}e=await Kz(e,r,t);const i=r;if(i.parseTextSync&&typeof e=="string")return i.parseTextSync(e,t,n);if(P5(r,t))return await R5(r,e,t,n,Wm);if(i.parseText&&typeof e=="string")return await i.parseText(e,t,n);if(i.parse)return await i.parse(e,t,n);throw ku(!i.parseSync),new Error(`${r.id} loader - no parser found and worker is disabled`)}async function r2(r,e,t,n){let i,o;!Array.isArray(e)&&!ow(e)?(i=[],o=e):(i=e,o=t);const s=uD(o);let c=r;return typeof r=="string"&&(c=await s(r)),oh(r)&&(c=await s(r)),Array.isArray(i)?await Wm(c,i,o):await Wm(c,i,o)}const Qz="4.2.4";var OO;const eG=(OO=globalThis.loaders)==null?void 0:OO.parseImageNode,n2=typeof Image<"u",i2=typeof ImageBitmap<"u",tG=!!eG,s2=Qx?!0:tG;function rG(r){switch(r){case"auto":return i2||n2||s2;case"imagebitmap":return i2;case"image":return n2;case"data":return s2;default:throw new Error(`@loaders.gl/images: image ${r} not supported in this environment`)}}function nG(){if(i2)return"imagebitmap";if(n2)return"image";if(s2)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}function iG(r){const e=oG(r);if(!e)throw new Error("Not an image");return e}function sG(r){switch(iG(r)){case"data":return r;case"image":case"imagebitmap":const e=document.createElement("canvas"),t=e.getContext("2d");if(!t)throw new Error("getImageData");return e.width=r.width,e.height=r.height,t.drawImage(r,0,0),t.getImageData(0,0,r.width,r.height);default:throw new Error("getImageData")}}function oG(r){return typeof ImageBitmap<"u"&&r instanceof ImageBitmap?"imagebitmap":typeof Image<"u"&&r instanceof Image?"image":r&&typeof r=="object"&&r.data&&r.width&&r.height?"data":null}const aG=/^data:image\/svg\+xml/,cG=/\.svg((\?|#).*)?$/;function cw(r){return r&&(aG.test(r)||cG.test(r))}function lG(r,e){if(cw(e)){let n=new TextDecoder().decode(r);try{typeof unescape=="function"&&typeof encodeURIComponent=="function"&&(n=unescape(encodeURIComponent(n)))}catch(o){throw new Error(o.message)}return`data:image/svg+xml;base64,${btoa(n)}`}return fD(r,e)}function fD(r,e){if(cw(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(r)])}async function hD(r,e,t){const n=lG(r,t),i=self.URL||self.webkitURL,o=typeof n!="string"&&i.createObjectURL(n);try{return await uG(o||n,e)}finally{o&&i.revokeObjectURL(o)}}async function uG(r,e){const t=new Image;return t.src=r,e.image&&e.image.decode&&t.decode?(await t.decode(),t):await new Promise((n,i)=>{try{t.onload=()=>n(t),t.onerror=o=>{const s=o instanceof Error?o.message:"error";i(new Error(s))}}catch(o){i(o)}})}const fG={};let OB=!0;async function hG(r,e,t){let n;cw(t)?n=await hD(r,e,t):n=fD(r,t);const i=e&&e.imagebitmap;return await dG(n,i)}async function dG(r,e=null){if((AG(e)||!OB)&&(e=null),e)try{return await createImageBitmap(r,e)}catch(t){console.warn(t),OB=!1}return await createImageBitmap(r)}function AG(r){for(const e in r||fG)return!1;return!0}function pG(r){return!yG(r,"ftyp",4)||(r[8]&96)===0?null:gG(r)}function gG(r){switch(mG(r,8,12).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}}function mG(r,e,t){return String.fromCharCode(...r.slice(e,t))}function _G(r){return[...r].map(e=>e.charCodeAt(0))}function yG(r,e,t=0){const n=_G(e);for(let i=0;i<n.length;++i)if(n[i]!==r[i+t])return!1;return!0}const Wc=!1,zp=!0;function dD(r){const e=xg(r);return bG(e)||CG(e)||xG(e)||wG(e)||vG(e)}function vG(r){const e=new Uint8Array(r instanceof DataView?r.buffer:r),t=pG(e);return t?{mimeType:t.mimeType,width:0,height:0}:null}function bG(r){const e=xg(r);return e.byteLength>=24&&e.getUint32(0,Wc)===2303741511?{mimeType:"image/png",width:e.getUint32(16,Wc),height:e.getUint32(20,Wc)}:null}function xG(r){const e=xg(r);return e.byteLength>=10&&e.getUint32(0,Wc)===1195984440?{mimeType:"image/gif",width:e.getUint16(6,zp),height:e.getUint16(8,zp)}:null}function wG(r){const e=xg(r);return e.byteLength>=14&&e.getUint16(0,Wc)===16973&&e.getUint32(2,zp)===e.byteLength?{mimeType:"image/bmp",width:e.getUint32(18,zp),height:e.getUint32(22,zp)}:null}function CG(r){const e=xg(r);if(!(e.byteLength>=3&&e.getUint16(0,Wc)===65496&&e.getUint8(2)===255))return null;const{tableMarkers:n,sofMarkers:i}=EG();let o=2;for(;o+9<e.byteLength;){const s=e.getUint16(o,Wc);if(i.has(s))return{mimeType:"image/jpeg",height:e.getUint16(o+5,Wc),width:e.getUint16(o+7,Wc)};if(!n.has(s))return null;o+=2,o+=e.getUint16(o,Wc)}return null}function EG(){const r=new Set([65499,65476,65484,65501,65534]);for(let t=65504;t<65520;++t)r.add(t);return{tableMarkers:r,sofMarkers:new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502])}}function xg(r){if(r instanceof DataView)return r;if(ArrayBuffer.isView(r))return new DataView(r.buffer);if(r instanceof ArrayBuffer)return new DataView(r);throw new Error("toDataView")}async function TG(r,e){var i;const{mimeType:t}=dD(r)||{},n=(i=globalThis.loaders)==null?void 0:i.parseImageNode;return Hm(n),await n(r,t)}async function BG(r,e,t){e=e||{};const i=(e.image||{}).type||"auto",{url:o}=t||{},s=SG(i);let c;switch(s){case"imagebitmap":c=await hG(r,e,o);break;case"image":c=await hD(r,e,o);break;case"data":c=await TG(r);break;default:Hm(!1)}return i==="data"&&(c=sG(c)),c}function SG(r){switch(r){case"auto":case"data":return nG();default:return rG(r),r}}const IG=["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],MG=["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],PG={image:{type:"auto",decode:!0}},RG={dataType:null,batchType:null,id:"image",module:"images",name:"Images",version:Qz,mimeTypes:MG,extensions:IG,parse:BG,tests:[r=>!!dD(new DataView(r))],options:PG},$r=new HO({id:"deck"});let o2={};function FG(r){o2=r}function so(r,e,t,n){$r.level>0&&o2[r]&&o2[r].call(null,e,t,n)}function OG(r){const e=r[0],t=r[r.length-1];return e==="{"&&t==="}"||e==="["&&t==="]"}const DG={dataType:null,batchType:null,id:"JSON",name:"JSON",module:"",version:"",options:{},extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:OG,parseTextSync:JSON.parse};function LG(){const r="9.1.11",e=globalThis.deck&&globalThis.deck.VERSION;if(e&&e!==r)throw new Error(`deck.gl - multiple versions detected: ${e} vs ${r}`);return e||($r.log(1,`deck.gl ${r}`)(),globalThis.deck={...globalThis.deck,VERSION:r,version:r,log:$r,_registerLoggers:FG},Bz([DG,[RG,{imagebitmap:{premultiplyAlpha:"none"}}]])),r}const NG=LG();function lw(r,e){if(!r)throw new Error(e||"shadertools: assertion failed.")}const zv={number:{type:"number",validate(r,e){return Number.isFinite(r)&&typeof e=="object"&&(e.max===void 0||r<=e.max)&&(e.min===void 0||r>=e.min)}},array:{type:"array",validate(r,e){return Array.isArray(r)||ArrayBuffer.isView(r)}}};function kG(r){const e={};for(const[t,n]of Object.entries(r))e[t]=UG(n);return e}function UG(r){let e=DB(r);if(e!=="object")return{value:r,...zv[e],type:e};if(typeof r=="object")return r?r.type!==void 0?{...r,...zv[r.type],type:r.type}:r.value===void 0?{type:"object",value:r}:(e=DB(r.value),{...r,...zv[e],type:e}):{type:"object",value:null};throw new Error("props")}function DB(r){return Array.isArray(r)||ArrayBuffer.isView(r)?"array":typeof r}const zG=`#ifdef MODULE_LOGDEPTH
7
7
  logdepth_adjustPosition(gl_Position);
8
8
  #endif
9
9
  `,GG=`#ifdef MODULE_MATERIAL
@@ -1,4 +1,4 @@
1
- import{r as h,E as $,_ as H,b6 as mt,bg as $t,bh as Ht,bi as Vt,M as X,O as q,aE as jt,n as P,bj as Gt,C as N,j as v,bk as Xt,b0 as qt,bl as Yt,bm as Kt,l as Jt,z as Qt,bn as tt,H as Zt,aA as te,bo as ee,bp as ie,b5 as se,bq as ne}from"./index.BgEbLy94.js";import{u as re,F as oe}from"./FormClearHelper.C_BjP_35.js";import{T as ae,a as ft}from"./Toolbar.y7vr7z0G.js";import{u as le}from"./Hooks.BpH4YuRQ.js";import{c as ce}from"./createDownloadLinkElement.DZMwyjvU.js";import{F as de,D as he}from"./FileDownload.esm.BgWveG3s.js";var yt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),h.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});yt.displayName="Mic";var wt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});wt.displayName="Pause";var St=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});St.displayName="PlayArrow";var Ct=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),h.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});Ct.displayName="Refresh";var Et=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});Et.displayName="StopCircle";function R(s,t,e,i){return new(e||(e=Promise))(function(n,r){function a(c){try{d(i.next(c))}catch(l){r(l)}}function o(c){try{d(i.throw(c))}catch(l){r(l)}}function d(c){var l;c.done?n(c.value):(l=c.value,l instanceof e?l:new e(function(p){p(l)})).then(a,o)}d((i=i.apply(s,t||[])).next())})}let V=class{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),i==null?void 0:i.once){const n=()=>{this.un(t,n),this.un(t,e)};return this.on(t,n),n}return()=>this.un(t,e)}un(t,e){var i;(i=this.listeners[t])===null||i===void 0||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(i=>i(...e))}};const j={decode:function(s,t){return R(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(s).finally(()=>e.close())})},createBuffer:function(s,t){return typeof s[0]=="number"&&(s=[s]),function(e){const i=e[0];if(i.some(n=>n>1||n<-1)){const n=i.length;let r=0;for(let a=0;a<n;a++){const o=Math.abs(i[a]);o>r&&(r=o)}for(const a of e)for(let o=0;o<n;o++)a[o]/=r}}(s),{duration:t,length:s[0].length,sampleRate:s[0].length/t,numberOfChannels:s.length,getChannelData:e=>s==null?void 0:s[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Rt(s,t){const e=t.xmlns?document.createElementNS(t.xmlns,s):document.createElement(s);for(const[i,n]of Object.entries(t))if(i==="children")for(const[r,a]of Object.entries(t))typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(Rt(r,a));else i==="style"?Object.assign(e.style,n):i==="textContent"?e.textContent=n:e.setAttribute(i,n.toString());return e}function gt(s,t,e){const i=Rt(s,t||{});return e==null||e.appendChild(i),i}var ue=Object.freeze({__proto__:null,createElement:gt,default:gt});const pe={fetchBlob:function(s,t,e){return R(this,void 0,void 0,function*(){const i=yield fetch(s,e);if(i.status>=400)throw new Error(`Failed to fetch ${s}: ${i.status} (${i.statusText})`);return function(n,r){R(this,void 0,void 0,function*(){if(!n.body||!n.headers)return;const a=n.body.getReader(),o=Number(n.headers.get("Content-Length"))||0;let d=0;const c=p=>R(this,void 0,void 0,function*(){d+=(p==null?void 0:p.length)||0;const u=Math.round(d/o*100);r(u)}),l=()=>R(this,void 0,void 0,function*(){let p;try{p=yield a.read()}catch{return}p.done||(c(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class me extends V{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const n=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;i&&(this.media.src="");try{this.media.src=n}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return R(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class U extends V{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[n,r]=this.initHtml();i.appendChild(n),this.container=n,this.scrollContainer=r.querySelector(".scroll"),this.wrapper=r.querySelector(".wrapper"),this.canvasWrapper=r.querySelector(".canvases"),this.progressWrapper=r.querySelector(".progress"),this.cursor=r.querySelector(".cursor"),e&&r.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),n=e.clientX-i.left,r=e.clientY-i.top;return[n/i.width,r/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,n]=t(e);this.emit("click",i,n)}),this.wrapper.addEventListener("dblclick",e=>{const[i,n]=t(e);this.emit("dblclick",i,n)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:n}=this.scrollContainer,r=e/i,a=(e+n)/i;this.emit("scroll",r,a,e,e+n)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,n,r=3,a=0,o=100){if(!t)return()=>{};const d=matchMedia("(pointer: coarse)").matches;let c=()=>{};const l=p=>{if(p.button!==a)return;p.preventDefault(),p.stopPropagation();let u=p.clientX,m=p.clientY,f=!1;const b=Date.now(),g=w=>{if(w.preventDefault(),w.stopPropagation(),d&&Date.now()-b<o)return;const D=w.clientX,T=w.clientY,k=D-u,W=T-m;if(f||Math.abs(k)>r||Math.abs(W)>r){const O=t.getBoundingClientRect(),{left:F,top:L}=O;f||(i==null||i(u-F,m-L),f=!0),e(k,W,D-F,T-L),u=D,m=T}},S=w=>{if(f){const D=w.clientX,T=w.clientY,k=t.getBoundingClientRect(),{left:W,top:O}=k;n==null||n(D-W,T-O)}c()},y=w=>{w.relatedTarget&&w.relatedTarget!==document.documentElement||S(w)},x=w=>{f&&(w.stopPropagation(),w.preventDefault())},A=w=>{f&&w.preventDefault()};document.addEventListener("pointermove",g),document.addEventListener("pointerup",S),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("click",x,{capture:!0}),c=()=>{document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",S),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",A),setTimeout(()=>{document.removeEventListener("click",x,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{c(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const n=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const r=this.parent.clientHeight||128;return e!=null&&e.every(a=>!a.overlay)?r/n:r}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
1
+ import{r as h,E as $,_ as H,b6 as mt,bg as $t,bh as Ht,bi as Vt,M as X,O as q,aE as jt,n as P,bj as Gt,C as N,j as v,bk as Xt,b0 as qt,bl as Yt,bm as Kt,l as Jt,z as Qt,bn as tt,H as Zt,aA as te,bo as ee,bp as ie,b5 as se,bq as ne}from"./index.Dqcp7EZB.js";import{u as re,F as oe}from"./FormClearHelper.Ca3GFjxv.js";import{T as ae,a as ft}from"./Toolbar.Cde1fEcQ.js";import{u as le}from"./Hooks.BpCPXt5n.js";import{c as ce}from"./createDownloadLinkElement.DZMwyjvU.js";import{F as de,D as he}from"./FileDownload.esm.DVrjmwoh.js";var yt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{d:"M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z"}),h.createElement("path",{d:"M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.61 6.43 6 6.92V21h2v-3.08c3.39-.49 6-3.39 6-6.92h-2z"}))});yt.displayName="Mic";var wt=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))});wt.displayName="Pause";var St=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("rect",{width:24,height:24,fill:"none"}),h.createElement("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18a1 1 0 000-1.69L9.54 5.98A.998.998 0 008 6.82z"}))});St.displayName="PlayArrow";var Ct=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),h.createElement("path",{d:"M17.65 6.35a7.95 7.95 0 00-6.48-2.31c-3.67.37-6.69 3.35-7.1 7.02C3.52 15.91 7.27 20 12 20a7.98 7.98 0 007.21-4.56c.32-.67-.16-1.44-.9-1.44-.37 0-.72.2-.88.53a5.994 5.994 0 01-6.8 3.31c-2.22-.49-4.01-2.3-4.48-4.52A6.002 6.002 0 0112 6c1.66 0 3.14.69 4.22 1.78l-1.51 1.51c-.63.63-.19 1.71.7 1.71H19c.55 0 1-.45 1-1V6.41c0-.89-1.08-1.34-1.71-.71l-.64.65z"}))});Ct.displayName="Refresh";var Et=h.forwardRef(function(s,t){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return h.createElement($,H({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},s,{ref:t}),h.createElement("g",{fill:"none"},h.createElement("rect",{width:24,height:24}),h.createElement("rect",{width:24,height:24})),h.createElement("path",{fillRule:"evenodd",d:"M9 16h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"}))});Et.displayName="StopCircle";function R(s,t,e,i){return new(e||(e=Promise))(function(n,r){function a(c){try{d(i.next(c))}catch(l){r(l)}}function o(c){try{d(i.throw(c))}catch(l){r(l)}}function d(c){var l;c.done?n(c.value):(l=c.value,l instanceof e?l:new e(function(p){p(l)})).then(a,o)}d((i=i.apply(s,t||[])).next())})}let V=class{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),this.listeners[t].add(e),i==null?void 0:i.once){const n=()=>{this.un(t,n),this.un(t,e)};return this.on(t,n),n}return()=>this.un(t,e)}un(t,e){var i;(i=this.listeners[t])===null||i===void 0||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(i=>i(...e))}};const j={decode:function(s,t){return R(this,void 0,void 0,function*(){const e=new AudioContext({sampleRate:t});return e.decodeAudioData(s).finally(()=>e.close())})},createBuffer:function(s,t){return typeof s[0]=="number"&&(s=[s]),function(e){const i=e[0];if(i.some(n=>n>1||n<-1)){const n=i.length;let r=0;for(let a=0;a<n;a++){const o=Math.abs(i[a]);o>r&&(r=o)}for(const a of e)for(let o=0;o<n;o++)a[o]/=r}}(s),{duration:t,length:s[0].length,sampleRate:s[0].length/t,numberOfChannels:s.length,getChannelData:e=>s==null?void 0:s[e],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function Rt(s,t){const e=t.xmlns?document.createElementNS(t.xmlns,s):document.createElement(s);for(const[i,n]of Object.entries(t))if(i==="children")for(const[r,a]of Object.entries(t))typeof a=="string"?e.appendChild(document.createTextNode(a)):e.appendChild(Rt(r,a));else i==="style"?Object.assign(e.style,n):i==="textContent"?e.textContent=n:e.setAttribute(i,n.toString());return e}function gt(s,t,e){const i=Rt(s,t||{});return e==null||e.appendChild(i),i}var ue=Object.freeze({__proto__:null,createElement:gt,default:gt});const pe={fetchBlob:function(s,t,e){return R(this,void 0,void 0,function*(){const i=yield fetch(s,e);if(i.status>=400)throw new Error(`Failed to fetch ${s}: ${i.status} (${i.statusText})`);return function(n,r){R(this,void 0,void 0,function*(){if(!n.body||!n.headers)return;const a=n.body.getReader(),o=Number(n.headers.get("Content-Length"))||0;let d=0;const c=p=>R(this,void 0,void 0,function*(){d+=(p==null?void 0:p.length)||0;const u=Math.round(d/o*100);r(u)}),l=()=>R(this,void 0,void 0,function*(){let p;try{p=yield a.read()}catch{return}p.done||(c(p.value),yield l())});l()})}(i.clone(),t),i.blob()})}};class me extends V{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),t.playbackRate!=null&&this.onMediaEvent("canplay",()=>{t.playbackRate!=null&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return this.media.canPlayType(t)!==""}setSrc(t,e){const i=this.getSrc();if(t&&i===t)return;this.revokeSrc();const n=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;i&&(this.media.src="");try{this.media.src=n}catch{this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(t){this.media=t}play(){return R(this,void 0,void 0,function*(){return this.media.play()})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){e!=null&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}class U extends V{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=t;const i=this.parentFromOptionsContainer(t.container);this.parent=i;const[n,r]=this.initHtml();i.appendChild(n),this.container=n,this.scrollContainer=r.querySelector(".scroll"),this.wrapper=r.querySelector(".wrapper"),this.canvasWrapper=r.querySelector(".canvases"),this.progressWrapper=r.querySelector(".progress"),this.cursor=r.querySelector(".cursor"),e&&r.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if(typeof t=="string"?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw new Error("Container not found");return e}initEvents(){const t=e=>{const i=this.wrapper.getBoundingClientRect(),n=e.clientX-i.left,r=e.clientY-i.top;return[n/i.width,r/i.height]};if(this.wrapper.addEventListener("click",e=>{const[i,n]=t(e);this.emit("click",i,n)}),this.wrapper.addEventListener("dblclick",e=>{const[i,n]=t(e);this.emit("dblclick",i,n)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{const{scrollLeft:e,scrollWidth:i,clientWidth:n}=this.scrollContainer,r=e/i,a=(e+n)/i;this.emit("scroll",r,a,e,e+n)}),typeof ResizeObserver=="function"){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{e().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const t=this.parent.clientWidth;t===this.lastContainerWidth&&this.options.height!=="auto"||(this.lastContainerWidth=t,this.reRender())}initDrag(){this.subscriptions.push(function(t,e,i,n,r=3,a=0,o=100){if(!t)return()=>{};const d=matchMedia("(pointer: coarse)").matches;let c=()=>{};const l=p=>{if(p.button!==a)return;p.preventDefault(),p.stopPropagation();let u=p.clientX,m=p.clientY,f=!1;const b=Date.now(),g=w=>{if(w.preventDefault(),w.stopPropagation(),d&&Date.now()-b<o)return;const D=w.clientX,T=w.clientY,k=D-u,W=T-m;if(f||Math.abs(k)>r||Math.abs(W)>r){const O=t.getBoundingClientRect(),{left:F,top:L}=O;f||(i==null||i(u-F,m-L),f=!0),e(k,W,D-F,T-L),u=D,m=T}},S=w=>{if(f){const D=w.clientX,T=w.clientY,k=t.getBoundingClientRect(),{left:W,top:O}=k;n==null||n(D-W,T-O)}c()},y=w=>{w.relatedTarget&&w.relatedTarget!==document.documentElement||S(w)},x=w=>{f&&(w.stopPropagation(),w.preventDefault())},A=w=>{f&&w.preventDefault()};document.addEventListener("pointermove",g),document.addEventListener("pointerup",S),document.addEventListener("pointerout",y),document.addEventListener("pointercancel",y),document.addEventListener("touchmove",A,{passive:!1}),document.addEventListener("click",x,{capture:!0}),c=()=>{document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",S),document.removeEventListener("pointerout",y),document.removeEventListener("pointercancel",y),document.removeEventListener("touchmove",A),setTimeout(()=>{document.removeEventListener("click",x,{capture:!0})},10)}};return t.addEventListener("pointerdown",l),()=>{c(),t.removeEventListener("pointerdown",l)}}(this.wrapper,(t,e,i)=>{this.emit("drag",Math.max(0,Math.min(1,i/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))},t=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,t/this.wrapper.getBoundingClientRect().width)))}))}getHeight(t,e){var i;const n=((i=this.audioData)===null||i===void 0?void 0:i.numberOfChannels)||1;if(t==null)return 128;if(!isNaN(Number(t)))return Number(t);if(t==="auto"){const r=this.parent.clientHeight||128;return e!=null&&e.every(a=>!a.overlay)?r/n:r}return 128}initHtml(){const t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
2
2
  <style${i?` nonce="${i}"`:""}>
3
3
  :host {
4
4
  user-select: none;