streamlit-nightly 1.41.2.dev20250201__py2.py3-none-any.whl → 1.42.1.dev20250204__py2.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.
- streamlit/auth_util.py +2 -1
- streamlit/commands/echo.py +4 -1
- streamlit/commands/execution_control.py +3 -1
- streamlit/commands/page_config.py +2 -1
- streamlit/config.py +56 -25
- streamlit/config_option.py +3 -3
- streamlit/connections/snowflake_connection.py +22 -10
- streamlit/connections/snowpark_connection.py +2 -1
- streamlit/connections/util.py +4 -1
- streamlit/dataframe_util.py +3 -8
- streamlit/delta_generator.py +1 -1
- streamlit/elements/alert.py +32 -4
- streamlit/elements/arrow.py +28 -15
- streamlit/elements/code.py +4 -3
- streamlit/elements/deck_gl_json_chart.py +3 -4
- streamlit/elements/form.py +22 -4
- streamlit/elements/heading.py +21 -6
- streamlit/elements/image.py +12 -3
- streamlit/elements/layouts.py +9 -4
- streamlit/elements/lib/built_in_chart_utils.py +1 -3
- streamlit/elements/lib/color_util.py +7 -6
- streamlit/elements/lib/column_config_utils.py +4 -3
- streamlit/elements/lib/column_types.py +100 -33
- streamlit/elements/lib/dicttools.py +4 -1
- streamlit/elements/lib/event_utils.py +2 -2
- streamlit/elements/lib/file_uploader_utils.py +4 -1
- streamlit/elements/lib/image_utils.py +5 -4
- streamlit/elements/lib/options_selector_utils.py +4 -1
- streamlit/elements/lib/pandas_styler_utils.py +2 -1
- streamlit/elements/lib/policies.py +3 -1
- streamlit/elements/lib/utils.py +1 -1
- streamlit/elements/map.py +3 -1
- streamlit/elements/markdown.py +21 -7
- streamlit/elements/media.py +2 -2
- streamlit/elements/metric.py +8 -4
- streamlit/elements/plotly_chart.py +4 -5
- streamlit/elements/spinner.py +25 -3
- streamlit/elements/text.py +7 -2
- streamlit/elements/vega_charts.py +26 -22
- streamlit/elements/widgets/audio_input.py +8 -4
- streamlit/elements/widgets/button.py +29 -12
- streamlit/elements/widgets/button_group.py +29 -13
- streamlit/elements/widgets/camera_input.py +8 -4
- streamlit/elements/widgets/chat.py +1 -3
- streamlit/elements/widgets/checkbox.py +16 -8
- streamlit/elements/widgets/color_picker.py +8 -4
- streamlit/elements/widgets/data_editor.py +10 -14
- streamlit/elements/widgets/file_uploader.py +12 -6
- streamlit/elements/widgets/multiselect.py +10 -5
- streamlit/elements/widgets/number_input.py +8 -4
- streamlit/elements/widgets/radio.py +11 -5
- streamlit/elements/widgets/select_slider.py +12 -8
- streamlit/elements/widgets/selectbox.py +11 -5
- streamlit/elements/widgets/slider.py +19 -17
- streamlit/elements/widgets/text_widgets.py +16 -8
- streamlit/elements/widgets/time_widgets.py +21 -15
- streamlit/elements/write.py +60 -43
- streamlit/errors.py +1 -2
- streamlit/external/langchain/streamlit_callback_handler.py +3 -3
- streamlit/hello/animation_demo.py +1 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/proto/NewSession_pb2.py +16 -16
- streamlit/proto/NewSession_pb2.pyi +30 -3
- streamlit/runtime/app_session.py +15 -15
- streamlit/runtime/caching/cached_message_replay.py +2 -1
- streamlit/runtime/caching/hashing.py +3 -2
- streamlit/runtime/context.py +2 -1
- streamlit/runtime/forward_msg_cache.py +3 -1
- streamlit/runtime/memory_session_storage.py +4 -1
- streamlit/runtime/memory_uploaded_file_manager.py +4 -1
- streamlit/runtime/runtime.py +6 -4
- streamlit/runtime/scriptrunner/script_runner.py +4 -3
- streamlit/runtime/scriptrunner_utils/script_run_context.py +2 -3
- streamlit/runtime/secrets.py +1 -5
- streamlit/runtime/state/common.py +2 -4
- streamlit/runtime/state/query_params.py +2 -1
- streamlit/runtime/state/query_params_proxy.py +2 -1
- streamlit/runtime/state/safe_session_state.py +3 -1
- streamlit/runtime/state/session_state.py +2 -5
- streamlit/runtime/state/session_state_proxy.py +2 -1
- streamlit/runtime/uploaded_file_manager.py +3 -1
- streamlit/runtime/websocket_session_manager.py +8 -8
- streamlit/static/index.html +2 -2
- streamlit/static/static/css/{index.mUTQuMqR.css → index.DpJG_94W.css} +1 -1
- streamlit/static/static/js/{FileDownload.esm.Cf3bITtP.js → FileDownload.esm.CuayiK6T.js} +1 -1
- streamlit/static/static/js/FileDropzone.CvXoxIUm.js +5 -0
- streamlit/static/static/js/{FormClearHelper.BgwPD1tD.js → FormClearHelper.DpwWkrvV.js} +1 -1
- streamlit/static/static/js/{Hooks.BMaXaj11.js → Hooks.BQiFiHd5.js} +1 -1
- streamlit/static/static/js/{InputInstructions.qlsk9gvt.js → InputInstructions.CypmdrYz.js} +1 -1
- streamlit/static/static/js/ProgressBar.DfR4HyQR.js +2 -0
- streamlit/static/static/js/{RenderInPortalIfExists.Blpdplqk.js → RenderInPortalIfExists.D6u3szcn.js} +1 -1
- streamlit/static/static/js/{Toolbar.DMhyNpv2.js → Toolbar.D6p42Hno.js} +1 -1
- streamlit/static/static/js/axios.upsvKRUO.js +6 -0
- streamlit/static/static/js/{base-input.DyTEaESI.js → base-input.B5AcLp6p.js} +4 -4
- streamlit/static/static/js/{createSuper.B3rIhdpQ.js → createSuper.DNzaJgi-.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.C9Q9Gy4e.js → data-grid-overlay-editor.CKACfVZL.js} +1 -1
- streamlit/static/static/js/{downloader.BAMiKd1n.js → downloader.D6HV3a60.js} +1 -1
- streamlit/static/static/js/{es6.D82pr6dy.js → es6.UQDWlCyE.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CJwxqR7x.js → iframeResizer.contentWindow.DQ-TFrBp.js} +1 -1
- streamlit/static/static/js/{index.B7J6suR-.js → index.2EE80u0h.js} +200 -200
- streamlit/static/static/js/{index.CoE1gpPQ.js → index.B96fHK2A.js} +1 -1
- streamlit/static/static/js/index.BAFGiIHm.js +1 -0
- streamlit/static/static/js/index.BPNlEjgz.js +1 -0
- streamlit/static/static/js/{index.C4kPuKr4.js → index.BPmrb-47.js} +1 -1
- streamlit/static/static/js/{index.BM_J1KkD.js → index.BQEIBi4n.js} +1 -1
- streamlit/static/static/js/index.BUGQmWUV.js +3 -0
- streamlit/static/static/js/index.BXmBj7MJ.js +1 -0
- streamlit/static/static/js/{index.5JFTbX2J.js → index.BY8YeKF1.js} +1 -1
- streamlit/static/static/js/{index.CF4stbIZ.js → index.BdVr8Tta.js} +1 -1
- streamlit/static/static/js/{index.CjFbbEE0.js → index.BghvoEVe.js} +1 -1
- streamlit/static/static/js/{index.8Q56Jjmk.js → index.BiMrOUpK.js} +1 -1
- streamlit/static/static/js/{index.yp4f0OMe.js → index.BiybRa0I.js} +2 -2
- streamlit/static/static/js/index.Bm7Vkuba.js +73 -0
- streamlit/static/static/js/{index.BZvQkTCS.js → index.BuyK2IsW.js} +1 -1
- streamlit/static/static/js/index.ByH1pn5_.js +1 -0
- streamlit/static/static/js/{index.zlHOKWDA.js → index.C8zZSMvD.js} +1 -1
- streamlit/static/static/js/index.CAuJtYES.js +1 -0
- streamlit/static/static/js/{index.Y84nTPW2.js → index.CEdHQ1ob.js} +1 -1
- streamlit/static/static/js/{index.CqGcWpm5.js → index.CJ-t5S6T.js} +2 -2
- streamlit/static/static/js/{index.BdlaxG49.js → index.CKOdbWxq.js} +1 -1
- streamlit/static/static/js/index.CSgG8OVN.js +1 -0
- streamlit/static/static/js/index.CX9gqq2L.js +1 -0
- streamlit/static/static/js/{index.TPHsScPF.js → index.CgVoYKAP.js} +1 -1
- streamlit/static/static/js/{index.D9yF6cxC.js → index.ChrjN8GY.js} +1 -1
- streamlit/static/static/js/{index.NbimJbgq.js → index.CrMtUJsu.js} +6 -6
- streamlit/static/static/js/index.D4SMJhY1.js +1 -0
- streamlit/static/static/js/index.D7BxtE4u.js +1 -0
- streamlit/static/static/js/{index.P5kx9um8.js → index.DB_dBVfZ.js} +5 -5
- streamlit/static/static/js/{index.BLCqXxIG.js → index.DMKXUbO6.js} +1 -1
- streamlit/static/static/js/index.DaoBv396.js +1 -0
- streamlit/static/static/js/{index.B3Wxz7wG.js → index.DkV6k6Ng.js} +1 -1
- streamlit/static/static/js/{index.BcAjRRAZ.js → index.DqZZoWyt.js} +1 -1
- streamlit/static/static/js/index.Dr6DSYcq.js +1 -0
- streamlit/static/static/js/{index.BdEYCAFh.js → index.Epl2r08f.js} +1 -1
- streamlit/static/static/js/{index.CC5oiyoV.js → index.ndVWhafL.js} +2 -2
- streamlit/static/static/js/{index.DiZyaYeV.js → index.wW-pPvtW.js} +3 -3
- streamlit/static/static/js/{input.DRyjjTTH.js → input.CxqdG-sh.js} +2 -2
- streamlit/static/static/js/{memory.C98yjNkk.js → memory.DuSk7Eex.js} +1 -1
- streamlit/static/static/js/{mergeWith.CLihEflw.js → mergeWith.DrxB1Sj4.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DozQhDJj.js → number-overlay-editor.DBc0yndt.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DJ7-JsJc.js → possibleConstructorReturn.ZdYWHeG3.js} +1 -1
- streamlit/static/static/js/{sandbox.0Tj4C46D.js → sandbox.D3L4CYjG.js} +1 -1
- streamlit/static/static/js/{textarea.CUrV8-V3.js → textarea.CSafh28v.js} +2 -2
- streamlit/static/static/js/{timepicker.DEu3fwJe.js → timepicker.C-pwkiaT.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.C71OtXzK.js → toConsumableArray.DyCVskz5.js} +1 -1
- streamlit/static/static/js/{uniqueId.CndDhnid.js → uniqueId.BODM2vTk.js} +1 -1
- streamlit/static/static/js/useBasicWidgetState.DQUiM2dz.js +1 -0
- streamlit/static/static/js/{useOnInputChange.CvHbHWmy.js → useOnInputChange.Ccjd55xn.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BLLyDFUF.js → withFullScreenWrapper.CneUoXNE.js} +1 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.DcZbplWk.woff2 +0 -0
- streamlit/testing/v1/app_test.py +3 -1
- streamlit/testing/v1/element_tree.py +3 -4
- streamlit/testing/v1/local_script_runner.py +3 -3
- streamlit/type_util.py +11 -8
- streamlit/user_info.py +2 -3
- streamlit/watcher/path_watcher.py +4 -4
- streamlit/web/server/authlib_tornado_integration.py +3 -1
- streamlit/web/server/browser_websocket_handler.py +3 -1
- streamlit/web/server/routes.py +4 -1
- streamlit/web/server/server.py +2 -1
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/METADATA +1 -2
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/RECORD +166 -165
- streamlit/static/static/js/FileDropzone.B8wCqKiM.js +0 -5
- streamlit/static/static/js/ProgressBar.Di2oT-20.js +0 -2
- streamlit/static/static/js/index.B79cf7gS.js +0 -1
- streamlit/static/static/js/index.BBPZ3wsr.js +0 -1
- streamlit/static/static/js/index.BKahTKEx.js +0 -3
- streamlit/static/static/js/index.CSGfgCnQ.js +0 -1
- streamlit/static/static/js/index.CYMgsYSm.js +0 -1
- streamlit/static/static/js/index.CZjnqbcd.js +0 -73
- streamlit/static/static/js/index.C_4BuzGH.js +0 -1
- streamlit/static/static/js/index.CjiPq39N.js +0 -1
- streamlit/static/static/js/index.CjuTYYFG.js +0 -1
- streamlit/static/static/js/index.CuH7mftz.js +0 -1
- streamlit/static/static/js/index.DFJg1zHB.js +0 -1
- streamlit/static/static/js/index.Dm3nmdhh.js +0 -1
- streamlit/static/static/js/index.rrDohWOh.js +0 -1
- streamlit/static/static/js/useBasicWidgetState.DXLMTaiS.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.DzyB5T7Y.woff2 +0 -0
- {streamlit_nightly-1.41.2.dev20250201.data → streamlit_nightly-1.42.1.dev20250204.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.41.2.dev20250201.dist-info → streamlit_nightly-1.42.1.dev20250204.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aV as yu,_ as jM,j as ms,z as Ll,aW as Gy,F as aE,aX as Wy,aY as TL,aZ as lE,a_ as EL,aF as SL,a$ as CL,b0 as PL,n as HM,C as GM,b1 as T1,b2 as cE,aC as IL,y as ML,b3 as RL,b4 as uE}from"./index.B7J6suR-.js";import{_ as Gn,a as BL,C as OL}from"./toConsumableArray.C71OtXzK.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./possibleConstructorReturn.DJ7-JsJc.js";import{a as DL,T as FL}from"./Toolbar.DMhyNpv2.js";import{u as WM,E as XM,w as LL}from"./withFullScreenWrapper.BLLyDFUF.js";import{u as kL}from"./useBasicWidgetState.DXLMTaiS.js";import{u as NL,s as UL}from"./threshold.B8r8f5kt.js";import"./FormClearHelper.BgwPD1tD.js";import"./value.iufjd77T.js";function zL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},VL=globalThis.navigator||{};function qM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||qM()}function jL(t){return ku()?qM()?"Electron":(VL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function HL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class WL{constructor(e,r,i="sessionStorage"){this.storage=HL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function XL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function qL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const $L=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function ZL(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+$L}m${t}\x1B[49m`)),t}function KL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function Xf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const qf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},YL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=Xf(),this._deltaTs=Xf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new WL(`__probe-${this.id}__`,YL),this.timeStamp(`${this.id} started`),KL(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((Xf()-this._startTs).toPrecision(10))}getDelta(){return Number((Xf()-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,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,qf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,qf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,qf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,qf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,qf.debug||qf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:QL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Xf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=Xf();else return $f;return r=JL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function JL(t,e,r){if(typeof e=="string"){const i=r.time?qL(XL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=ZL(e,r.color,r.background)}return e}function QL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function ek(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function tk(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const rk="latest";function ik(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=ik();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",nk=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class sk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class Xy{terminate(){}}const qy=new Map;function ok(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=qy.get(t.source||t.url);return e||(t.url&&(e=ak(t.url),qy.set(t.url,e)),t.source&&(e=eR(t.source),qy.set(t.source,e))),Pc(e),e}function ak(t){if(!t.startsWith("http"))return t;const e=lk(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function lk(t){return`try {
|
1
|
+
var xL=Object.defineProperty;var wL=(t,e,r)=>e in t?xL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var U=(t,e,r)=>wL(t,typeof e!="symbol"?e+"":e,r);import{g as oA,r as it,ao as Wt,p as $e,d as VM,aV as yu,_ as jM,j as ms,z as Ll,aW as Gy,F as aE,aX as Wy,aY as lE,aZ as TL,aF as EL,a_ as SL,a$ as CL,n as HM,C as GM,b0 as T1,b1 as cE,aC as PL,y as IL,b2 as ML,b3 as uE}from"./index.2EE80u0h.js";import{_ as Gn,a as RL,C as BL}from"./toConsumableArray.DyCVskz5.js";import{b as Fu,a as Lu,_ as l2,c as Gd,d as c2}from"./possibleConstructorReturn.ZdYWHeG3.js";import{a as OL,T as DL}from"./Toolbar.D6p42Hno.js";import{u as WM,E as XM,w as FL}from"./withFullScreenWrapper.CneUoXNE.js";import{u as LL}from"./useBasicWidgetState.DQUiM2dz.js";import{u as kL,s as NL}from"./threshold.B8r8f5kt.js";import{a as UL}from"./axios.upsvKRUO.js";import"./FormClearHelper.DpwWkrvV.js";import"./value.iufjd77T.js";function zL(t,e){for(var r=0;r<e.length;r++){const i=e[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in t)){const o=Object.getOwnPropertyDescriptor(i,n);o&&Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}async function aA(t,e,r,i){return i._parse(t,e,r,i)}function Ni(t,e){if(!t)throw new Error(e||"loader assertion failed.")}const v_=!!(typeof process!="object"||String(process)!=="[object process]"||process.browser),hE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);hE&&parseFloat(hE[1]);const tg=globalThis,Wf=globalThis.process||{},VL=globalThis.navigator||{};function qM(t){var i,n;if(typeof window<"u"&&((i=window.process)==null?void 0:i.type)==="renderer"||typeof process<"u"&&((n=process.versions)!=null&&n.electron))return!0;const r=typeof navigator<"u"&&navigator.userAgent;return!!(r&&r.indexOf("Electron")>=0)}function ku(){return!(typeof process=="object"&&String(process)==="[object process]"&&!(process!=null&&process.browser))||qM()}function jL(t){return ku()?qM()?"Electron":(VL.userAgent||"").indexOf("Edge")>-1?"Edge":globalThis.chrome?"Chrome":globalThis.safari?"Safari":globalThis.mozInnerScreenX?"Firefox":"Unknown":"Node"}const $M="4.0.7";function HL(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch{return null}}class WL{constructor(e,r,i="sessionStorage"){this.storage=HL(i),this.id=e,this.config=r,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(e){if(Object.assign(this.config,e),this.storage){const r=JSON.stringify(this.config);this.storage.setItem(this.id,r)}}_loadConfiguration(){let e={};if(this.storage){const r=this.storage.getItem(this.id);e=r?JSON.parse(r):{}}return Object.assign(this.config,e),this}}function XL(t){let e;return t<10?e=`${t.toFixed(2)}ms`:t<100?e=`${t.toFixed(1)}ms`:t<1e3?e=`${t.toFixed(0)}ms`:e=`${(t/1e3).toFixed(2)}s`,e}function qL(t,e=8){const r=Math.max(e-t.length,0);return`${" ".repeat(r)}${t}`}var mm;(function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(mm||(mm={}));const $L=10;function fE(t){return typeof t!="string"?t:(t=t.toUpperCase(),mm[t]||mm.WHITE)}function ZL(t,e,r){return!ku&&typeof t=="string"&&(e&&(t=`\x1B[${fE(e)}m${t}\x1B[39m`),r&&(t=`\x1B[${fE(r)+$L}m${t}\x1B[49m`)),t}function KL(t,e=["constructor"]){const r=Object.getPrototypeOf(t),i=Object.getOwnPropertyNames(r),n=t;for(const o of i){const s=n[o];typeof s=="function"&&(e.find(f=>o===f)||(n[o]=s.bind(t)))}}function u2(t,e){if(!t)throw new Error("Assertion failed")}function Xf(){var e,r,i;let t;if(ku()&&tg.performance)t=(r=(e=tg==null?void 0:tg.performance)==null?void 0:e.now)==null?void 0:r.call(e);else if("hrtime"in Wf){const n=(i=Wf==null?void 0:Wf.hrtime)==null?void 0:i.call(Wf);t=n[0]*1e3+n[1]/1e6}else t=Date.now();return t}const qf={debug:ku()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},YL={enabled:!0,level:0};function $f(){}const dE={},AE={once:!0};class lA{constructor({id:e}={id:""}){this.VERSION=$M,this._startTs=Xf(),this._deltaTs=Xf(),this.userData={},this.LOG_THROTTLE_TIMEOUT=0,this.id=e,this.userData={},this._storage=new WL(`__probe-${this.id}__`,YL),this.timeStamp(`${this.id} started`),KL(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((Xf()-this._startTs).toPrecision(10))}getDelta(){return Number((Xf()-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,r){this._storage.setConfiguration({[e]:r})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(e,r){if(!e)throw new Error(r||"Assertion failed")}warn(e){return this._getLogFunction(0,e,qf.warn,arguments,AE)}error(e){return this._getLogFunction(0,e,qf.error,arguments)}deprecated(e,r){return this.warn(`\`${e}\` is deprecated and will be removed in a later version. Use \`${r}\` instead`)}removed(e,r){return this.error(`\`${e}\` has been removed. Use \`${r}\` instead`)}probe(e,r){return this._getLogFunction(e,r,qf.log,arguments,{time:!0,once:!0})}log(e,r){return this._getLogFunction(e,r,qf.debug,arguments)}info(e,r){return this._getLogFunction(e,r,console.info,arguments)}once(e,r){return this._getLogFunction(e,r,qf.debug||qf.info,arguments,AE)}table(e,r,i){return r?this._getLogFunction(e,r,console.table||$f,i&&[i],{tag:QL(r)}):$f}time(e,r){return this._getLogFunction(e,r,console.time?console.time:console.info)}timeEnd(e,r){return this._getLogFunction(e,r,console.timeEnd?console.timeEnd:console.info)}timeStamp(e,r){return this._getLogFunction(e,r,console.timeStamp||$f)}group(e,r,i={collapsed:!1}){const n=pE({logLevel:e,message:r,opts:i}),{collapsed:o}=i;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(e,r,i={}){return this.group(e,r,Object.assign({},i,{collapsed:!0}))}groupEnd(e){return this._getLogFunction(e,"",console.groupEnd||$f)}withGroup(e,r,i){this.group(e,r)();try{i()}finally{this.groupEnd(e)()}}trace(){console.trace&&console.trace()}_shouldLog(e){return this.isEnabled()&&this.getLevel()>=ZM(e)}_getLogFunction(e,r,i,n,o){if(this._shouldLog(e)){o=pE({logLevel:e,message:r,args:n,opts:o}),i=i||o.method,u2(i),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=Xf();const s=o.tag||o.message;if(o.once&&s)if(!dE[s])dE[s]=Xf();else return $f;return r=JL(this.id,o.message,o),i.bind(console,r,...o.args)}return $f}}lA.VERSION=$M;function ZM(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return u2(Number.isFinite(e)&&e>=0),e}function pE(t){const{logLevel:e,message:r}=t;t.logLevel=ZM(e);const i=t.args?Array.from(t.args):[];for(;i.length&&i.shift()!==r;);switch(typeof e){case"string":case"function":r!==void 0&&i.unshift(r),t.message=e;break;case"object":Object.assign(t,e);break}typeof t.message=="function"&&(t.message=t.message());const n=typeof t.message;return u2(n==="string"||n==="object"),Object.assign(t,{args:i},t.opts)}function JL(t,e,r){if(typeof e=="string"){const i=r.time?qL(XL(r.total)):"";e=r.time?`${t}: ${i} ${e}`:`${t}: ${e}`,e=ZL(e,r.color,r.background)}return e}function QL(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}globalThis.probe={};const KM=new lA({id:"@probe.gl/log"});function YM(t,e){return JM(t||{},e)}function JM(t,e,r=0){if(r>3)return e;const i={...t};for(const[n,o]of Object.entries(e))o&&typeof o=="object"&&!Array.isArray(o)?i[n]=JM(i[n]||{},e[n],r+1):i[n]=e[n];return i}function ek(t){var e;globalThis.loaders||(globalThis.loaders={}),(e=globalThis.loaders).modules||(e.modules={}),Object.assign(globalThis.loaders.modules,t)}function tk(t){var r,i;return((i=(r=globalThis.loaders)==null?void 0:r.modules)==null?void 0:i[t])||null}const rk="latest";function ik(){var t;return(t=globalThis._loadersgl_)!=null&&t.version||(globalThis._loadersgl_=globalThis._loadersgl_||{},globalThis._loadersgl_.version="4.2.4"),globalThis._loadersgl_.version}const QM=ik();function Pc(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}const Sa=typeof process!="object"||String(process)!=="[object process]"||process.browser,h2=typeof importScripts=="function",nk=typeof window<"u"&&typeof window.orientation<"u",gE=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version);gE&&parseFloat(gE[1]);class sk{constructor(e,r){U(this,"name");U(this,"workerThread");U(this,"isRunning",!0);U(this,"result");U(this,"_resolve",()=>{});U(this,"_reject",()=>{});this.name=e,this.workerThread=r,this.result=new Promise((i,n)=>{this._resolve=i,this._reject=n})}postMessage(e,r){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:r})}done(e){Pc(this.isRunning),this.isRunning=!1,this._resolve(e)}error(e){Pc(this.isRunning),this.isRunning=!1,this._reject(e)}}class Xy{terminate(){}}const qy=new Map;function ok(t){Pc(t.source&&!t.url||!t.source&&t.url);let e=qy.get(t.source||t.url);return e||(t.url&&(e=ak(t.url),qy.set(t.url,e)),t.source&&(e=eR(t.source),qy.set(t.source,e))),Pc(e),e}function ak(t){if(!t.startsWith("http"))return t;const e=lk(t);return eR(e)}function eR(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function lk(t){return`try {
|
2
2
|
importScripts('${t}');
|
3
3
|
} catch (error) {
|
4
4
|
console.error(error);
|
@@ -1761,7 +1761,7 @@ uniform `+j+" "+z+" u_"+W+`;
|
|
1761
1761
|
`),Se=S.createShader(S.FRAGMENT_SHADER);if(S.isContextLost())this.failedToCreate=!0;else{S.shaderSource(Se,J),S.compileShader(Se),S.attachShader(this.program,Se);var Ie=S.createShader(S.VERTEX_SHADER);if(S.isContextLost())this.failedToCreate=!0;else{S.shaderSource(Ie,_e),S.compileShader(Ie),S.attachShader(this.program,Ie),this.attributes={};var Me={};this.numAttributes=L.length;for(var Ge=0;Ge<this.numAttributes;Ge++)L[Ge]&&(S.bindAttribLocation(this.program,Ge,L[Ge]),this.attributes[L[Ge]]=Ge);S.linkProgram(this.program),S.deleteShader(Ie),S.deleteShader(Se);for(var Qe=0;Qe<W.length;Qe++){var st=W[Qe];if(st&&!Me[st]){var rt=S.getUniformLocation(this.program,st);rt&&(Me[st]=rt)}}this.fixedUniforms=y(l,Me),this.binderUniforms=d?d.getUniforms(l,Me):[]}}};function Yl(l,u,c){var d=1/ai(c,1,u.transform.tileZoom),y=Math.pow(2,c.tileID.overscaledZ),T=c.tileSize*Math.pow(2,u.transform.tileZoom)/y,S=T*(c.tileID.canonical.x+c.tileID.wrap*y),M=T*c.tileID.canonical.y;return{u_image:0,u_texsize:c.imageAtlasTexture.size,u_scale:[d,l.fromScale,l.toScale],u_fade:l.t,u_pixel_coord_upper:[S>>16,M>>16],u_pixel_coord_lower:[65535&S,65535&M]}}nf.prototype.draw=function(l,u,c,d,y,T,S,M,D,L,j,z,W,te,Q,ie){var K,J=l.gl;if(!this.failedToCreate){for(var _e in l.program.set(this.program),l.setDepthMode(c),l.setStencilMode(d),l.setColorMode(y),l.setCullFace(T),this.fixedUniforms)this.fixedUniforms[_e].set(S[_e]);te&&te.setUniforms(l,this.binderUniforms,z,{zoom:W});for(var Se=(K={},K[J.LINES]=2,K[J.TRIANGLES]=3,K[J.LINE_STRIP]=1,K)[u],Ie=0,Me=j.get();Ie<Me.length;Ie+=1){var Ge=Me[Ie],Qe=Ge.vaos||(Ge.vaos={});(Qe[M]||(Qe[M]=new Gc)).bind(l,this,D,te?te.getPaintVertexBuffers():[],L,Ge.vertexOffset,Q,ie),J.drawElements(u,Ge.primitiveLength*Se,J.UNSIGNED_SHORT,Ge.primitiveOffset*Se*2)}}};var sf=function(l,u,c,d){var y=u.style.light,T=y.properties.get("position"),S=[T.x,T.y,T.z],M=s.create$1();y.properties.get("anchor")==="viewport"&&s.fromRotation(M,-u.transform.angle),s.transformMat3(S,S,M);var D=y.properties.get("color");return{u_matrix:l,u_lightpos:S,u_lightintensity:y.properties.get("intensity"),u_lightcolor:[D.r,D.g,D.b],u_vertical_gradient:+c,u_opacity:d}},Ba=function(l,u,c,d,y,T,S){return s.extend(sf(l,u,c,d),Yl(T,u,S),{u_height_factor:-Math.pow(2,y.overscaledZ)/S.tileSize/8})},ua=function(l){return{u_matrix:l}},Js=function(l,u,c,d){return s.extend(ua(l),Yl(c,u,d))},of=function(l,u){return{u_matrix:l,u_world:u}},Wc=function(l,u,c,d,y){return s.extend(Js(l,u,c,d),{u_world:y})},Xc=function(l,u,c,d){var y,T,S=l.transform;if(d.paint.get("circle-pitch-alignment")==="map"){var M=ai(c,1,S.zoom);y=!0,T=[M,M]}else y=!1,T=S.pixelsToGLUnits;return{u_camera_to_center_distance:S.cameraToCenterDistance,u_scale_with_map:+(d.paint.get("circle-pitch-scale")==="map"),u_matrix:l.translatePosMatrix(u.posMatrix,c,d.paint.get("circle-translate"),d.paint.get("circle-translate-anchor")),u_pitch_with_map:+y,u_device_pixel_ratio:s.browser.devicePixelRatio,u_extrude_scale:T}},Bs=function(l,u,c){var d=ai(c,1,u.zoom),y=Math.pow(2,u.zoom-c.tileID.overscaledZ),T=c.tileID.overscaleFactor();return{u_matrix:l,u_camera_to_center_distance:u.cameraToCenterDistance,u_pixels_to_tile_units:d,u_extrude_scale:[u.pixelsToGLUnits[0]/(d*y),u.pixelsToGLUnits[1]/(d*y)],u_overscale_factor:T}},af=function(l,u,c){return{u_matrix:l,u_inv_matrix:u,u_camera_to_center_distance:c.cameraToCenterDistance,u_viewport_size:[c.width,c.height]}},zo=function(l,u,c){return c===void 0&&(c=1),{u_matrix:l,u_color:u,u_overlay:0,u_overlay_scale:c}},ha=function(l){return{u_matrix:l}},lf=function(l,u,c,d){return{u_matrix:l,u_extrude_scale:ai(u,1,c),u_intensity:d}},fl=function(l,u,c){var d=l.transform;return{u_matrix:cf(l,u,c),u_ratio:1/ai(u,1,d.zoom),u_device_pixel_ratio:s.browser.devicePixelRatio,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},ei=function(l,u,c,d){return s.extend(fl(l,u,c),{u_image:0,u_image_height:d})},dl=function(l,u,c,d){var y=l.transform,T=ti(u,y);return{u_matrix:cf(l,u,c),u_texsize:u.imageAtlasTexture.size,u_ratio:1/ai(u,1,y.zoom),u_device_pixel_ratio:s.browser.devicePixelRatio,u_image:0,u_scale:[T,d.fromScale,d.toScale],u_fade:d.t,u_units_to_pixels:[1/y.pixelsToGLUnits[0],1/y.pixelsToGLUnits[1]]}},qc=function(l,u,c,d,y){var T=l.lineAtlas,S=ti(u,l.transform),M=c.layout.get("line-cap")==="round",D=T.getDash(d.from,M),L=T.getDash(d.to,M),j=D.width*y.fromScale,z=L.width*y.toScale;return s.extend(fl(l,u,c),{u_patternscale_a:[S/j,-D.height/2],u_patternscale_b:[S/z,-L.height/2],u_sdfgamma:T.width/(256*Math.min(j,z)*s.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:D.y,u_tex_y_b:L.y,u_mix:y.t})};function ti(l,u){return 1/ai(l,1,u.tileZoom)}function cf(l,u,c){return l.translatePosMatrix(u.tileID.posMatrix,u,c.paint.get("line-translate"),c.paint.get("line-translate-anchor"))}var yA=function(l,u,c,d,y){return{u_matrix:l,u_tl_parent:u,u_scale_parent:c,u_buffer_scale:1,u_fade_t:d.mix,u_opacity:d.opacity*y.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:y.paint.get("raster-brightness-min"),u_brightness_high:y.paint.get("raster-brightness-max"),u_saturation_factor:(S=y.paint.get("raster-saturation"),S>0?1-1/(1.001-S):-S),u_contrast_factor:(T=y.paint.get("raster-contrast"),T>0?1/(1-T):1+T),u_spin_weights:uf(y.paint.get("raster-hue-rotate"))};var T,S};function uf(l){l*=Math.PI/180;var u=Math.sin(l),c=Math.cos(l);return[(2*c+1)/3,(-Math.sqrt(3)*u-c+1)/3,(Math.sqrt(3)*u-c+1)/3]}var $c,Al=function(l,u,c,d,y,T,S,M,D,L){var j=y.transform;return{u_is_size_zoom_constant:+(l==="constant"||l==="source"),u_is_size_feature_constant:+(l==="constant"||l==="camera"),u_size_t:u?u.uSizeT:0,u_size:u?u.uSize:0,u_camera_to_center_distance:j.cameraToCenterDistance,u_pitch:j.pitch/360*2*Math.PI,u_rotate_symbol:+c,u_aspect_ratio:j.width/j.height,u_fade_change:y.options.fadeDuration?y.symbolFadeChange:1,u_matrix:T,u_label_plane_matrix:S,u_coord_matrix:M,u_is_text:+D,u_pitch_with_map:+d,u_texsize:L,u_texture:0}},Jl=function(l,u,c,d,y,T,S,M,D,L,j){var z=y.transform;return s.extend(Al(l,u,c,d,y,T,S,M,D,L),{u_gamma_scale:d?Math.cos(z._pitch)*z.cameraToCenterDistance:1,u_device_pixel_ratio:s.browser.devicePixelRatio,u_is_halo:+j})},Zc=function(l,u,c,d,y,T,S,M,D,L){return s.extend(Jl(l,u,c,d,y,T,S,M,!0,D,!0),{u_texsize_icon:L,u_texture_icon:1})},yn=function(l,u,c){return{u_matrix:l,u_opacity:u,u_color:c}},fa=function(l,u,c,d,y,T){return s.extend(function(S,M,D,L){var j=D.imageManager.getPattern(S.from.toString()),z=D.imageManager.getPattern(S.to.toString()),W=D.imageManager.getPixelSize(),te=W.width,Q=W.height,ie=Math.pow(2,L.tileID.overscaledZ),K=L.tileSize*Math.pow(2,D.transform.tileZoom)/ie,J=K*(L.tileID.canonical.x+L.tileID.wrap*ie),_e=K*L.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:j.tl,u_pattern_br_a:j.br,u_pattern_tl_b:z.tl,u_pattern_br_b:z.br,u_texsize:[te,Q],u_mix:M.t,u_pattern_size_a:j.displaySize,u_pattern_size_b:z.displaySize,u_scale_a:M.fromScale,u_scale_b:M.toScale,u_tile_units_to_pixels:1/ai(L,1,D.transform.tileZoom),u_pixel_coord_upper:[J>>16,_e>>16],u_pixel_coord_lower:[65535&J,65535&_e]}}(d,T,c,y),{u_matrix:l,u_opacity:u})},da={fillExtrusion:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_lightpos:new s.Uniform3f(l,u.u_lightpos),u_lightintensity:new s.Uniform1f(l,u.u_lightintensity),u_lightcolor:new s.Uniform3f(l,u.u_lightcolor),u_vertical_gradient:new s.Uniform1f(l,u.u_vertical_gradient),u_opacity:new s.Uniform1f(l,u.u_opacity)}},fillExtrusionPattern:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_lightpos:new s.Uniform3f(l,u.u_lightpos),u_lightintensity:new s.Uniform1f(l,u.u_lightintensity),u_lightcolor:new s.Uniform3f(l,u.u_lightcolor),u_vertical_gradient:new s.Uniform1f(l,u.u_vertical_gradient),u_height_factor:new s.Uniform1f(l,u.u_height_factor),u_image:new s.Uniform1i(l,u.u_image),u_texsize:new s.Uniform2f(l,u.u_texsize),u_pixel_coord_upper:new s.Uniform2f(l,u.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(l,u.u_pixel_coord_lower),u_scale:new s.Uniform3f(l,u.u_scale),u_fade:new s.Uniform1f(l,u.u_fade),u_opacity:new s.Uniform1f(l,u.u_opacity)}},fill:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix)}},fillPattern:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_image:new s.Uniform1i(l,u.u_image),u_texsize:new s.Uniform2f(l,u.u_texsize),u_pixel_coord_upper:new s.Uniform2f(l,u.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(l,u.u_pixel_coord_lower),u_scale:new s.Uniform3f(l,u.u_scale),u_fade:new s.Uniform1f(l,u.u_fade)}},fillOutline:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_world:new s.Uniform2f(l,u.u_world)}},fillOutlinePattern:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_world:new s.Uniform2f(l,u.u_world),u_image:new s.Uniform1i(l,u.u_image),u_texsize:new s.Uniform2f(l,u.u_texsize),u_pixel_coord_upper:new s.Uniform2f(l,u.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(l,u.u_pixel_coord_lower),u_scale:new s.Uniform3f(l,u.u_scale),u_fade:new s.Uniform1f(l,u.u_fade)}},circle:function(l,u){return{u_camera_to_center_distance:new s.Uniform1f(l,u.u_camera_to_center_distance),u_scale_with_map:new s.Uniform1i(l,u.u_scale_with_map),u_pitch_with_map:new s.Uniform1i(l,u.u_pitch_with_map),u_extrude_scale:new s.Uniform2f(l,u.u_extrude_scale),u_device_pixel_ratio:new s.Uniform1f(l,u.u_device_pixel_ratio),u_matrix:new s.UniformMatrix4f(l,u.u_matrix)}},collisionBox:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_camera_to_center_distance:new s.Uniform1f(l,u.u_camera_to_center_distance),u_pixels_to_tile_units:new s.Uniform1f(l,u.u_pixels_to_tile_units),u_extrude_scale:new s.Uniform2f(l,u.u_extrude_scale),u_overscale_factor:new s.Uniform1f(l,u.u_overscale_factor)}},collisionCircle:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_inv_matrix:new s.UniformMatrix4f(l,u.u_inv_matrix),u_camera_to_center_distance:new s.Uniform1f(l,u.u_camera_to_center_distance),u_viewport_size:new s.Uniform2f(l,u.u_viewport_size)}},debug:function(l,u){return{u_color:new s.UniformColor(l,u.u_color),u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_overlay:new s.Uniform1i(l,u.u_overlay),u_overlay_scale:new s.Uniform1f(l,u.u_overlay_scale)}},clippingMask:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix)}},heatmap:function(l,u){return{u_extrude_scale:new s.Uniform1f(l,u.u_extrude_scale),u_intensity:new s.Uniform1f(l,u.u_intensity),u_matrix:new s.UniformMatrix4f(l,u.u_matrix)}},heatmapTexture:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_world:new s.Uniform2f(l,u.u_world),u_image:new s.Uniform1i(l,u.u_image),u_color_ramp:new s.Uniform1i(l,u.u_color_ramp),u_opacity:new s.Uniform1f(l,u.u_opacity)}},hillshade:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_image:new s.Uniform1i(l,u.u_image),u_latrange:new s.Uniform2f(l,u.u_latrange),u_light:new s.Uniform2f(l,u.u_light),u_shadow:new s.UniformColor(l,u.u_shadow),u_highlight:new s.UniformColor(l,u.u_highlight),u_accent:new s.UniformColor(l,u.u_accent)}},hillshadePrepare:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_image:new s.Uniform1i(l,u.u_image),u_dimension:new s.Uniform2f(l,u.u_dimension),u_zoom:new s.Uniform1f(l,u.u_zoom),u_unpack:new s.Uniform4f(l,u.u_unpack)}},line:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_ratio:new s.Uniform1f(l,u.u_ratio),u_device_pixel_ratio:new s.Uniform1f(l,u.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(l,u.u_units_to_pixels)}},lineGradient:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_ratio:new s.Uniform1f(l,u.u_ratio),u_device_pixel_ratio:new s.Uniform1f(l,u.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(l,u.u_units_to_pixels),u_image:new s.Uniform1i(l,u.u_image),u_image_height:new s.Uniform1f(l,u.u_image_height)}},linePattern:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_texsize:new s.Uniform2f(l,u.u_texsize),u_ratio:new s.Uniform1f(l,u.u_ratio),u_device_pixel_ratio:new s.Uniform1f(l,u.u_device_pixel_ratio),u_image:new s.Uniform1i(l,u.u_image),u_units_to_pixels:new s.Uniform2f(l,u.u_units_to_pixels),u_scale:new s.Uniform3f(l,u.u_scale),u_fade:new s.Uniform1f(l,u.u_fade)}},lineSDF:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_ratio:new s.Uniform1f(l,u.u_ratio),u_device_pixel_ratio:new s.Uniform1f(l,u.u_device_pixel_ratio),u_units_to_pixels:new s.Uniform2f(l,u.u_units_to_pixels),u_patternscale_a:new s.Uniform2f(l,u.u_patternscale_a),u_patternscale_b:new s.Uniform2f(l,u.u_patternscale_b),u_sdfgamma:new s.Uniform1f(l,u.u_sdfgamma),u_image:new s.Uniform1i(l,u.u_image),u_tex_y_a:new s.Uniform1f(l,u.u_tex_y_a),u_tex_y_b:new s.Uniform1f(l,u.u_tex_y_b),u_mix:new s.Uniform1f(l,u.u_mix)}},raster:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_tl_parent:new s.Uniform2f(l,u.u_tl_parent),u_scale_parent:new s.Uniform1f(l,u.u_scale_parent),u_buffer_scale:new s.Uniform1f(l,u.u_buffer_scale),u_fade_t:new s.Uniform1f(l,u.u_fade_t),u_opacity:new s.Uniform1f(l,u.u_opacity),u_image0:new s.Uniform1i(l,u.u_image0),u_image1:new s.Uniform1i(l,u.u_image1),u_brightness_low:new s.Uniform1f(l,u.u_brightness_low),u_brightness_high:new s.Uniform1f(l,u.u_brightness_high),u_saturation_factor:new s.Uniform1f(l,u.u_saturation_factor),u_contrast_factor:new s.Uniform1f(l,u.u_contrast_factor),u_spin_weights:new s.Uniform3f(l,u.u_spin_weights)}},symbolIcon:function(l,u){return{u_is_size_zoom_constant:new s.Uniform1i(l,u.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(l,u.u_is_size_feature_constant),u_size_t:new s.Uniform1f(l,u.u_size_t),u_size:new s.Uniform1f(l,u.u_size),u_camera_to_center_distance:new s.Uniform1f(l,u.u_camera_to_center_distance),u_pitch:new s.Uniform1f(l,u.u_pitch),u_rotate_symbol:new s.Uniform1i(l,u.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(l,u.u_aspect_ratio),u_fade_change:new s.Uniform1f(l,u.u_fade_change),u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(l,u.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(l,u.u_coord_matrix),u_is_text:new s.Uniform1i(l,u.u_is_text),u_pitch_with_map:new s.Uniform1i(l,u.u_pitch_with_map),u_texsize:new s.Uniform2f(l,u.u_texsize),u_texture:new s.Uniform1i(l,u.u_texture)}},symbolSDF:function(l,u){return{u_is_size_zoom_constant:new s.Uniform1i(l,u.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(l,u.u_is_size_feature_constant),u_size_t:new s.Uniform1f(l,u.u_size_t),u_size:new s.Uniform1f(l,u.u_size),u_camera_to_center_distance:new s.Uniform1f(l,u.u_camera_to_center_distance),u_pitch:new s.Uniform1f(l,u.u_pitch),u_rotate_symbol:new s.Uniform1i(l,u.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(l,u.u_aspect_ratio),u_fade_change:new s.Uniform1f(l,u.u_fade_change),u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(l,u.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(l,u.u_coord_matrix),u_is_text:new s.Uniform1i(l,u.u_is_text),u_pitch_with_map:new s.Uniform1i(l,u.u_pitch_with_map),u_texsize:new s.Uniform2f(l,u.u_texsize),u_texture:new s.Uniform1i(l,u.u_texture),u_gamma_scale:new s.Uniform1f(l,u.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(l,u.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(l,u.u_is_halo)}},symbolTextAndIcon:function(l,u){return{u_is_size_zoom_constant:new s.Uniform1i(l,u.u_is_size_zoom_constant),u_is_size_feature_constant:new s.Uniform1i(l,u.u_is_size_feature_constant),u_size_t:new s.Uniform1f(l,u.u_size_t),u_size:new s.Uniform1f(l,u.u_size),u_camera_to_center_distance:new s.Uniform1f(l,u.u_camera_to_center_distance),u_pitch:new s.Uniform1f(l,u.u_pitch),u_rotate_symbol:new s.Uniform1i(l,u.u_rotate_symbol),u_aspect_ratio:new s.Uniform1f(l,u.u_aspect_ratio),u_fade_change:new s.Uniform1f(l,u.u_fade_change),u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_label_plane_matrix:new s.UniformMatrix4f(l,u.u_label_plane_matrix),u_coord_matrix:new s.UniformMatrix4f(l,u.u_coord_matrix),u_is_text:new s.Uniform1i(l,u.u_is_text),u_pitch_with_map:new s.Uniform1i(l,u.u_pitch_with_map),u_texsize:new s.Uniform2f(l,u.u_texsize),u_texsize_icon:new s.Uniform2f(l,u.u_texsize_icon),u_texture:new s.Uniform1i(l,u.u_texture),u_texture_icon:new s.Uniform1i(l,u.u_texture_icon),u_gamma_scale:new s.Uniform1f(l,u.u_gamma_scale),u_device_pixel_ratio:new s.Uniform1f(l,u.u_device_pixel_ratio),u_is_halo:new s.Uniform1i(l,u.u_is_halo)}},background:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_opacity:new s.Uniform1f(l,u.u_opacity),u_color:new s.UniformColor(l,u.u_color)}},backgroundPattern:function(l,u){return{u_matrix:new s.UniformMatrix4f(l,u.u_matrix),u_opacity:new s.Uniform1f(l,u.u_opacity),u_image:new s.Uniform1i(l,u.u_image),u_pattern_tl_a:new s.Uniform2f(l,u.u_pattern_tl_a),u_pattern_br_a:new s.Uniform2f(l,u.u_pattern_br_a),u_pattern_tl_b:new s.Uniform2f(l,u.u_pattern_tl_b),u_pattern_br_b:new s.Uniform2f(l,u.u_pattern_br_b),u_texsize:new s.Uniform2f(l,u.u_texsize),u_mix:new s.Uniform1f(l,u.u_mix),u_pattern_size_a:new s.Uniform2f(l,u.u_pattern_size_a),u_pattern_size_b:new s.Uniform2f(l,u.u_pattern_size_b),u_scale_a:new s.Uniform1f(l,u.u_scale_a),u_scale_b:new s.Uniform1f(l,u.u_scale_b),u_pixel_coord_upper:new s.Uniform2f(l,u.u_pixel_coord_upper),u_pixel_coord_lower:new s.Uniform2f(l,u.u_pixel_coord_lower),u_tile_units_to_pixels:new s.Uniform1f(l,u.u_tile_units_to_pixels)}}};function pl(l,u,c,d,y,T,S){for(var M=l.context,D=M.gl,L=l.useProgram("collisionBox"),j=[],z=0,W=0,te=0;te<d.length;te++){var Q=d[te],ie=u.getTile(Q),K=ie.getBucket(c);if(K){var J=Q.posMatrix;y[0]===0&&y[1]===0||(J=l.translatePosMatrix(Q.posMatrix,ie,y,T));var _e=S?K.textCollisionBox:K.iconCollisionBox,Se=K.collisionCircleArray;if(Se.length>0){var Ie=s.create(),Me=J;s.mul(Ie,K.placementInvProjMatrix,l.transform.glCoordMatrix),s.mul(Ie,Ie,K.placementViewportMatrix),j.push({circleArray:Se,circleOffset:W,transform:Me,invTransform:Ie}),W=z+=Se.length/4}_e&&L.draw(M,D.LINES,fe.disabled,be.disabled,l.colorModeForRenderPass(),De.disabled,Bs(J,l.transform,ie),c.id,_e.layoutVertexBuffer,_e.indexBuffer,_e.segments,null,l.transform.zoom,null,null,_e.collisionVertexBuffer)}}if(S&&j.length){var Ge=l.useProgram("collisionCircle"),Qe=new s.StructArrayLayout2f1f2i16;Qe.resize(4*z),Qe._trim();for(var st=0,rt=0,lt=j;rt<lt.length;rt+=1)for(var At=lt[rt],Tt=0;Tt<At.circleArray.length/4;Tt++){var ft=4*Tt,Zt=At.circleArray[ft+0],xt=At.circleArray[ft+1],or=At.circleArray[ft+2],Tr=At.circleArray[ft+3];Qe.emplace(st++,Zt,xt,or,Tr,0),Qe.emplace(st++,Zt,xt,or,Tr,1),Qe.emplace(st++,Zt,xt,or,Tr,2),Qe.emplace(st++,Zt,xt,or,Tr,3)}(!$c||$c.length<2*z)&&($c=function(Wi){var Jn=2*Wi,Bn=new s.StructArrayLayout3ui6;Bn.resize(Jn),Bn._trim();for(var Li=0;Li<Jn;Li++){var Qi=6*Li;Bn.uint16[Qi+0]=4*Li+0,Bn.uint16[Qi+1]=4*Li+1,Bn.uint16[Qi+2]=4*Li+2,Bn.uint16[Qi+3]=4*Li+2,Bn.uint16[Qi+4]=4*Li+3,Bn.uint16[Qi+5]=4*Li+0}return Bn}(z));for(var hr=M.createIndexBuffer($c,!0),cr=M.createVertexBuffer(Qe,s.collisionCircleLayout.members,!0),wr=0,ar=j;wr<ar.length;wr+=1){var nr=ar[wr],wn=af(nr.transform,nr.invTransform,l.transform);Ge.draw(M,D.TRIANGLES,fe.disabled,be.disabled,l.colorModeForRenderPass(),De.disabled,wn,c.id,cr,hr,s.SegmentVector.simpleSegment(0,2*nr.circleOffset,nr.circleArray.length,nr.circleArray.length/2),null,l.transform.zoom,null,null,null)}cr.destroy(),hr.destroy()}}var ys=s.identity(new Float32Array(16));function hf(l,u,c,d,y,T){var S=s.getAnchorAlignment(l),M=-(S.horizontalAlign-.5)*u,D=-(S.verticalAlign-.5)*c,L=s.evaluateVariableOffset(l,d);return new s.Point((M/y+L[0])*T,(D/y+L[1])*T)}function vs(l,u,c,d,y,T,S,M,D,L,j){var z=l.text.placedSymbolArray,W=l.text.dynamicLayoutVertexArray,te=l.icon.dynamicLayoutVertexArray,Q={};W.clear();for(var ie=0;ie<z.length;ie++){var K=z.get(ie),J=K.hidden||!K.crossTileID||l.allowVerticalPlacement&&!K.placedOrientation?null:d[K.crossTileID];if(J){var _e=new s.Point(K.anchorX,K.anchorY),Se=Ar(_e,c?M:S),Ie=pr(T.cameraToCenterDistance,Se.signedDistanceFromCamera),Me=y.evaluateSizeForFeature(l.textSizeData,L,K)*Ie/s.ONE_EM;c&&(Me*=l.tilePixelRatio/D);for(var Ge=hf(J.anchor,J.width,J.height,J.textOffset,J.textBoxScale,Me),Qe=c?Ar(_e.add(Ge),S).point:Se.point.add(u?Ge.rotate(-T.angle):Ge),st=l.allowVerticalPlacement&&K.placedOrientation===s.WritingMode.vertical?Math.PI/2:0,rt=0;rt<K.numGlyphs;rt++)s.addDynamicAttributes(W,Qe,st);j&&K.associatedIconIndex>=0&&(Q[K.associatedIconIndex]={shiftedAnchor:Qe,angle:st})}else ue(K.numGlyphs,W)}if(j){te.clear();for(var lt=l.icon.placedSymbolArray,At=0;At<lt.length;At++){var Tt=lt.get(At);if(Tt.hidden)ue(Tt.numGlyphs,te);else{var ft=Q[At];if(ft)for(var Zt=0;Zt<Tt.numGlyphs;Zt++)s.addDynamicAttributes(te,ft.shiftedAnchor,ft.angle);else ue(Tt.numGlyphs,te)}}l.icon.dynamicLayoutVertexBuffer.updateData(te)}l.text.dynamicLayoutVertexBuffer.updateData(W)}function Ju(l,u,c){return c.iconsInText&&u?"symbolTextAndIcon":l?"symbolSDF":"symbolIcon"}function Vo(l,u,c,d,y,T,S,M,D,L,j,z){for(var W=l.context,te=W.gl,Q=l.transform,ie=M==="map",K=D==="map",J=ie&&c.layout.get("symbol-placement")!=="point",_e=ie&&!K&&!J,Se=c.layout.get("symbol-sort-key").constantOr(1)!==void 0,Ie=!1,Me=l.depthModeForSublayer(0,fe.ReadOnly),Ge=c.layout.get("text-variable-anchor"),Qe=[],st=0,rt=d;st<rt.length;st+=1){var lt=rt[st],At=u.getTile(lt),Tt=At.getBucket(c);if(Tt){var ft=y?Tt.text:Tt.icon;if(ft&&ft.segments.get().length){var Zt=ft.programConfigurations.get(c.id),xt=y||Tt.sdfIcons,or=y?Tt.textSizeData:Tt.iconSizeData,Tr=K||Q.pitch!==0,hr=l.useProgram(Ju(xt,y,Tt),Zt),cr=s.evaluateSizeForZoom(or,Q.zoom),wr=void 0,ar=[0,0],nr=void 0,wn=void 0,Wi=null,Jn=void 0;if(y)nr=At.glyphAtlasTexture,wn=te.LINEAR,wr=At.glyphAtlasTexture.size,Tt.iconsInText&&(ar=At.imageAtlasTexture.size,Wi=At.imageAtlasTexture,Jn=Tr||l.options.rotating||l.options.zooming||or.kind==="composite"||or.kind==="camera"?te.LINEAR:te.NEAREST);else{var Bn=c.layout.get("icon-size").constantOr(0)!==1||Tt.iconsNeedLinear;nr=At.imageAtlasTexture,wn=xt||l.options.rotating||l.options.zooming||Bn||Tr?te.LINEAR:te.NEAREST,wr=At.imageAtlasTexture.size}var Li=ai(At,1,l.transform.zoom),Qi=Fr(lt.posMatrix,K,ie,l.transform,Li),ks=zr(lt.posMatrix,K,ie,l.transform,Li),fs=Ge&&Tt.hasTextData(),bl=c.layout.get("icon-text-fit")!=="none"&&fs&&Tt.hasIconData();J&&me(Tt,lt.posMatrix,l,y,Qi,ks,K,L);var xs=l.translatePosMatrix(lt.posMatrix,At,T,S),Wo=J||y&&Ge||bl?ys:Qi,bo=l.translatePosMatrix(ks,At,T,S,!0),nh=xt&&c.paint.get(y?"text-halo-width":"icon-halo-width").constantOr(1)!==0,ou={program:hr,buffers:ft,uniformValues:xt?Tt.iconsInText?Zc(or.kind,cr,_e,K,l,xs,Wo,bo,wr,ar):Jl(or.kind,cr,_e,K,l,xs,Wo,bo,y,wr,!0):Al(or.kind,cr,_e,K,l,xs,Wo,bo,y,wr),atlasTexture:nr,atlasTextureIcon:Wi,atlasInterpolation:wn,atlasInterpolationIcon:Jn,isSDF:xt,hasHalo:nh};if(Se&&Tt.canOverlap){Ie=!0;for(var xl=0,au=ft.segments.get();xl<au.length;xl+=1){var sh=au[xl];Qe.push({segments:new s.SegmentVector([sh]),sortKey:sh.sortKey,state:ou})}}else Qe.push({segments:ft.segments,sortKey:0,state:ou})}}}Ie&&Qe.sort(function(wl,lc){return wl.sortKey-lc.sortKey});for(var ya=0,oh=Qe;ya<oh.length;ya+=1){var va=oh[ya],Tn=va.state;if(W.activeTexture.set(te.TEXTURE0),Tn.atlasTexture.bind(Tn.atlasInterpolation,te.CLAMP_TO_EDGE),Tn.atlasTextureIcon&&(W.activeTexture.set(te.TEXTURE1),Tn.atlasTextureIcon&&Tn.atlasTextureIcon.bind(Tn.atlasInterpolationIcon,te.CLAMP_TO_EDGE)),Tn.isSDF){var Na=Tn.uniformValues;Tn.hasHalo&&(Na.u_is_halo=1,fo(Tn.buffers,va.segments,c,l,Tn.program,Me,j,z,Na)),Na.u_is_halo=0}fo(Tn.buffers,va.segments,c,l,Tn.program,Me,j,z,Tn.uniformValues)}}function fo(l,u,c,d,y,T,S,M,D){var L=d.context;y.draw(L,L.gl.TRIANGLES,T,S,M,De.disabled,D,c.id,l.layoutVertexBuffer,l.indexBuffer,u,c.paint,d.transform.zoom,l.programConfigurations.get(c.id),l.dynamicLayoutVertexBuffer,l.opacityVertexBuffer)}function Aa(l,u,c,d,y,T,S){var M,D,L,j,z,W=l.context.gl,te=c.paint.get("fill-pattern"),Q=te&&te.constantOr(1),ie=c.getCrossfadeParameters();S?(D=Q&&!c.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",M=W.LINES):(D=Q?"fillPattern":"fill",M=W.TRIANGLES);for(var K=0,J=d;K<J.length;K+=1){var _e=J[K],Se=u.getTile(_e);if(!Q||Se.patternsLoaded()){var Ie=Se.getBucket(c);if(Ie){var Me=Ie.programConfigurations.get(c.id),Ge=l.useProgram(D,Me);Q&&(l.context.activeTexture.set(W.TEXTURE0),Se.imageAtlasTexture.bind(W.LINEAR,W.CLAMP_TO_EDGE),Me.updatePaintBuffers(ie));var Qe=te.constantOr(null);if(Qe&&Se.imageAtlas){var st=Se.imageAtlas,rt=st.patternPositions[Qe.to.toString()],lt=st.patternPositions[Qe.from.toString()];rt&<&&Me.setConstantPatternPositions(rt,lt)}var At=l.translatePosMatrix(_e.posMatrix,Se,c.paint.get("fill-translate"),c.paint.get("fill-translate-anchor"));if(S){j=Ie.indexBuffer2,z=Ie.segments2;var Tt=[W.drawingBufferWidth,W.drawingBufferHeight];L=D==="fillOutlinePattern"&&Q?Wc(At,l,ie,Se,Tt):of(At,Tt)}else j=Ie.indexBuffer,z=Ie.segments,L=Q?Js(At,l,ie,Se):ua(At);Ge.draw(l.context,M,y,l.stencilModeForClipping(_e),T,De.disabled,L,c.id,Ie.layoutVertexBuffer,j,z,c.paint,l.transform.zoom,Me)}}}}function Oa(l,u,c,d,y,T,S){for(var M=l.context,D=M.gl,L=c.paint.get("fill-extrusion-pattern"),j=L.constantOr(1),z=c.getCrossfadeParameters(),W=c.paint.get("fill-extrusion-opacity"),te=0,Q=d;te<Q.length;te+=1){var ie=Q[te],K=u.getTile(ie),J=K.getBucket(c);if(J){var _e=J.programConfigurations.get(c.id),Se=l.useProgram(j?"fillExtrusionPattern":"fillExtrusion",_e);j&&(l.context.activeTexture.set(D.TEXTURE0),K.imageAtlasTexture.bind(D.LINEAR,D.CLAMP_TO_EDGE),_e.updatePaintBuffers(z));var Ie=L.constantOr(null);if(Ie&&K.imageAtlas){var Me=K.imageAtlas,Ge=Me.patternPositions[Ie.to.toString()],Qe=Me.patternPositions[Ie.from.toString()];Ge&&Qe&&_e.setConstantPatternPositions(Ge,Qe)}var st=l.translatePosMatrix(ie.posMatrix,K,c.paint.get("fill-extrusion-translate"),c.paint.get("fill-extrusion-translate-anchor")),rt=c.paint.get("fill-extrusion-vertical-gradient"),lt=j?Ba(st,l,rt,W,ie,z,K):sf(st,l,rt,W);Se.draw(M,M.gl.TRIANGLES,y,T,S,De.backCCW,lt,c.id,J.layoutVertexBuffer,J.indexBuffer,J.segments,c.paint,l.transform.zoom,_e)}}}function Kc(l,u,c,d,y,T){var S=l.context,M=S.gl,D=u.fbo;if(D){var L=l.useProgram("hillshade");S.activeTexture.set(M.TEXTURE0),M.bindTexture(M.TEXTURE_2D,D.colorAttachment.get());var j=function(z,W,te){var Q=te.paint.get("hillshade-shadow-color"),ie=te.paint.get("hillshade-highlight-color"),K=te.paint.get("hillshade-accent-color"),J=te.paint.get("hillshade-illumination-direction")*(Math.PI/180);te.paint.get("hillshade-illumination-anchor")==="viewport"&&(J-=z.transform.angle);var _e,Se,Ie,Me=!z.options.moving;return{u_matrix:z.transform.calculatePosMatrix(W.tileID.toUnwrapped(),Me),u_image:0,u_latrange:(_e=W.tileID,Se=Math.pow(2,_e.canonical.z),Ie=_e.canonical.y,[new s.MercatorCoordinate(0,Ie/Se).toLngLat().lat,new s.MercatorCoordinate(0,(Ie+1)/Se).toLngLat().lat]),u_light:[te.paint.get("hillshade-exaggeration"),J],u_shadow:Q,u_highlight:ie,u_accent:K}}(l,u,c);L.draw(S,M.TRIANGLES,d,y,T,De.disabled,j,c.id,l.rasterBoundsBuffer,l.quadTriangleIndexBuffer,l.rasterBoundsSegments)}}function ff(l,u,c,d,y,T){var S=l.context,M=S.gl,D=u.dem;if(D&&D.data){var L=D.dim,j=D.stride,z=D.getPixels();if(S.activeTexture.set(M.TEXTURE1),S.pixelStoreUnpackPremultiplyAlpha.set(!1),u.demTexture=u.demTexture||l.getTileTexture(j),u.demTexture){var W=u.demTexture;W.update(z,{premultiply:!1}),W.bind(M.NEAREST,M.CLAMP_TO_EDGE)}else u.demTexture=new s.Texture(S,z,M.RGBA,{premultiply:!1}),u.demTexture.bind(M.NEAREST,M.CLAMP_TO_EDGE);S.activeTexture.set(M.TEXTURE0);var te=u.fbo;if(!te){var Q=new s.Texture(S,{width:L,height:L,data:null},M.RGBA);Q.bind(M.LINEAR,M.CLAMP_TO_EDGE),(te=u.fbo=S.createFramebuffer(L,L,!0)).colorAttachment.set(Q.texture)}S.bindFramebuffer.set(te.framebuffer),S.viewport.set([0,0,L,L]),l.useProgram("hillshadePrepare").draw(S,M.TRIANGLES,d,y,T,De.disabled,function(ie,K){var J=K.stride,_e=s.create();return s.ortho(_e,0,s.EXTENT,-s.EXTENT,0,0,1),s.translate(_e,_e,[0,-s.EXTENT,0]),{u_matrix:_e,u_image:1,u_dimension:[J,J],u_zoom:ie.overscaledZ,u_unpack:K.getUnpackVector()}}(u.tileID,D),c.id,l.rasterBoundsBuffer,l.quadTriangleIndexBuffer,l.rasterBoundsSegments),u.needsHillshadePrepare=!1}}function Yc(l,u,c,d,y){var T=d.paint.get("raster-fade-duration");if(T>0){var S=s.browser.now(),M=(S-l.timeAdded)/T,D=u?(S-u.timeAdded)/T:-1,L=c.getSource(),j=y.coveringZoomLevel({tileSize:L.tileSize,roundZoom:L.roundZoom}),z=!u||Math.abs(u.tileID.overscaledZ-j)>Math.abs(l.tileID.overscaledZ-j),W=z&&l.refreshedUponExpiration?1:s.clamp(z?M:1-D,0,1);return l.refreshedUponExpiration&&M>=1&&(l.refreshedUponExpiration=!1),u?{opacity:1,mix:1-W}:{opacity:W,mix:0}}return{opacity:1,mix:0}}var Ql=new s.Color(1,0,0,1),df=new s.Color(0,1,0,1),Af=new s.Color(0,0,1,1),ec=new s.Color(1,0,1,1),Jc=new s.Color(0,1,1,1);function Da(l,u,c,d){tc(l,0,u+c/2,l.transform.width,c,d)}function pa(l,u,c,d){tc(l,u-c/2,0,c,l.transform.height,d)}function tc(l,u,c,d,y,T){var S=l.context,M=S.gl;M.enable(M.SCISSOR_TEST),M.scissor(u*s.browser.devicePixelRatio,c*s.browser.devicePixelRatio,d*s.browser.devicePixelRatio,y*s.browser.devicePixelRatio),S.clear({color:T}),M.disable(M.SCISSOR_TEST)}function gl(l,u,c){var d=l.context,y=d.gl,T=c.posMatrix,S=l.useProgram("debug"),M=fe.disabled,D=be.disabled,L=l.colorModeForRenderPass();d.activeTexture.set(y.TEXTURE0),l.emptyTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),S.draw(d,y.LINE_STRIP,M,D,L,De.disabled,zo(T,s.Color.red),"$debug",l.debugBuffer,l.tileBorderIndexBuffer,l.debugSegments);var j=u.getTileByID(c.key).latestRawTileData,z=Math.floor((j&&j.byteLength||0)/1024),W=u.getTile(c).tileSize,te=512/Math.min(W,512)*(c.overscaledZ/l.transform.zoom)*.5,Q=c.canonical.toString();c.overscaledZ!==c.canonical.z&&(Q+=" => "+c.overscaledZ),function(ie,K){ie.initDebugOverlayCanvas();var J=ie.debugOverlayCanvas,_e=ie.context.gl,Se=ie.debugOverlayCanvas.getContext("2d");Se.clearRect(0,0,J.width,J.height),Se.shadowColor="white",Se.shadowBlur=2,Se.lineWidth=1.5,Se.strokeStyle="white",Se.textBaseline="top",Se.font="bold 36px Open Sans, sans-serif",Se.fillText(K,5,5),Se.strokeText(K,5,5),ie.debugOverlayTexture.update(J),ie.debugOverlayTexture.bind(_e.LINEAR,_e.CLAMP_TO_EDGE)}(l,Q+" "+z+"kb"),S.draw(d,y.TRIANGLES,M,D,Oe.alphaBlended,De.disabled,zo(T,s.Color.transparent,te),"$debug",l.debugBuffer,l.quadTriangleIndexBuffer,l.debugSegments)}var Fa={symbol:function(l,u,c,d,y){if(l.renderPass==="translucent"){var T=be.disabled,S=l.colorModeForRenderPass();c.layout.get("text-variable-anchor")&&function(M,D,L,j,z,W,te){for(var Q=D.transform,ie=z==="map",K=W==="map",J=0,_e=M;J<_e.length;J+=1){var Se=_e[J],Ie=j.getTile(Se),Me=Ie.getBucket(L);if(Me&&Me.text&&Me.text.segments.get().length){var Ge=s.evaluateSizeForZoom(Me.textSizeData,Q.zoom),Qe=ai(Ie,1,D.transform.zoom),st=Fr(Se.posMatrix,K,ie,D.transform,Qe),rt=L.layout.get("icon-text-fit")!=="none"&&Me.hasIconData();if(Ge){var lt=Math.pow(2,Q.zoom-Ie.tileID.overscaledZ);vs(Me,ie,K,te,s.symbolSize,Q,st,Se.posMatrix,lt,Ge,rt)}}}}(d,l,c,u,c.layout.get("text-rotation-alignment"),c.layout.get("text-pitch-alignment"),y),c.paint.get("icon-opacity").constantOr(1)!==0&&Vo(l,u,c,d,!1,c.paint.get("icon-translate"),c.paint.get("icon-translate-anchor"),c.layout.get("icon-rotation-alignment"),c.layout.get("icon-pitch-alignment"),c.layout.get("icon-keep-upright"),T,S),c.paint.get("text-opacity").constantOr(1)!==0&&Vo(l,u,c,d,!0,c.paint.get("text-translate"),c.paint.get("text-translate-anchor"),c.layout.get("text-rotation-alignment"),c.layout.get("text-pitch-alignment"),c.layout.get("text-keep-upright"),T,S),u.map.showCollisionBoxes&&(pl(l,u,c,d,c.paint.get("text-translate"),c.paint.get("text-translate-anchor"),!0),pl(l,u,c,d,c.paint.get("icon-translate"),c.paint.get("icon-translate-anchor"),!1))}},circle:function(l,u,c,d){if(l.renderPass==="translucent"){var y=c.paint.get("circle-opacity"),T=c.paint.get("circle-stroke-width"),S=c.paint.get("circle-stroke-opacity"),M=c.layout.get("circle-sort-key").constantOr(1)!==void 0;if(y.constantOr(1)!==0||T.constantOr(1)!==0&&S.constantOr(1)!==0){for(var D=l.context,L=D.gl,j=l.depthModeForSublayer(0,fe.ReadOnly),z=be.disabled,W=l.colorModeForRenderPass(),te=[],Q=0;Q<d.length;Q++){var ie=d[Q],K=u.getTile(ie),J=K.getBucket(c);if(J){var _e=J.programConfigurations.get(c.id),Se={programConfiguration:_e,program:l.useProgram("circle",_e),layoutVertexBuffer:J.layoutVertexBuffer,indexBuffer:J.indexBuffer,uniformValues:Xc(l,ie,K,c)};if(M)for(var Ie=0,Me=J.segments.get();Ie<Me.length;Ie+=1){var Ge=Me[Ie];te.push({segments:new s.SegmentVector([Ge]),sortKey:Ge.sortKey,state:Se})}else te.push({segments:J.segments,sortKey:0,state:Se})}}M&&te.sort(function(At,Tt){return At.sortKey-Tt.sortKey});for(var Qe=0,st=te;Qe<st.length;Qe+=1){var rt=st[Qe],lt=rt.state;lt.program.draw(D,L.TRIANGLES,j,z,W,De.disabled,lt.uniformValues,c.id,lt.layoutVertexBuffer,lt.indexBuffer,rt.segments,c.paint,l.transform.zoom,lt.programConfiguration)}}}},heatmap:function(l,u,c,d){if(c.paint.get("heatmap-opacity")!==0)if(l.renderPass==="offscreen"){var y=l.context,T=y.gl,S=be.disabled,M=new Oe([T.ONE,T.ONE],s.Color.transparent,[!0,!0,!0,!0]);(function(te,Q,ie){var K=te.gl;te.activeTexture.set(K.TEXTURE1),te.viewport.set([0,0,Q.width/4,Q.height/4]);var J=ie.heatmapFbo;if(J)K.bindTexture(K.TEXTURE_2D,J.colorAttachment.get()),te.bindFramebuffer.set(J.framebuffer);else{var _e=K.createTexture();K.bindTexture(K.TEXTURE_2D,_e),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_S,K.CLAMP_TO_EDGE),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_WRAP_T,K.CLAMP_TO_EDGE),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MIN_FILTER,K.LINEAR),K.texParameteri(K.TEXTURE_2D,K.TEXTURE_MAG_FILTER,K.LINEAR),J=ie.heatmapFbo=te.createFramebuffer(Q.width/4,Q.height/4,!1),function(Se,Ie,Me,Ge){var Qe=Se.gl;Qe.texImage2D(Qe.TEXTURE_2D,0,Qe.RGBA,Ie.width/4,Ie.height/4,0,Qe.RGBA,Se.extRenderToTextureHalfFloat?Se.extTextureHalfFloat.HALF_FLOAT_OES:Qe.UNSIGNED_BYTE,null),Ge.colorAttachment.set(Me)}(te,Q,_e,J)}})(y,l,c),y.clear({color:s.Color.transparent});for(var D=0;D<d.length;D++){var L=d[D];if(!u.hasRenderableParent(L)){var j=u.getTile(L),z=j.getBucket(c);if(z){var W=z.programConfigurations.get(c.id);l.useProgram("heatmap",W).draw(y,T.TRIANGLES,fe.disabled,S,M,De.disabled,lf(L.posMatrix,j,l.transform.zoom,c.paint.get("heatmap-intensity")),c.id,z.layoutVertexBuffer,z.indexBuffer,z.segments,c.paint,l.transform.zoom,W)}}}y.viewport.set([0,0,l.width,l.height])}else l.renderPass==="translucent"&&(l.context.setColorMode(l.colorModeForRenderPass()),function(te,Q){var ie=te.context,K=ie.gl,J=Q.heatmapFbo;if(J){ie.activeTexture.set(K.TEXTURE0),K.bindTexture(K.TEXTURE_2D,J.colorAttachment.get()),ie.activeTexture.set(K.TEXTURE1);var _e=Q.colorRampTexture;_e||(_e=Q.colorRampTexture=new s.Texture(ie,Q.colorRamp,K.RGBA)),_e.bind(K.LINEAR,K.CLAMP_TO_EDGE),te.useProgram("heatmapTexture").draw(ie,K.TRIANGLES,fe.disabled,be.disabled,te.colorModeForRenderPass(),De.disabled,function(Se,Ie,Me,Ge){var Qe=s.create();s.ortho(Qe,0,Se.width,Se.height,0,0,1);var st=Se.context.gl;return{u_matrix:Qe,u_world:[st.drawingBufferWidth,st.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:Ie.paint.get("heatmap-opacity")}}(te,Q),Q.id,te.viewportBuffer,te.quadTriangleIndexBuffer,te.viewportSegments,Q.paint,te.transform.zoom)}}(l,c))},line:function(l,u,c,d){if(l.renderPass==="translucent"){var y=c.paint.get("line-opacity"),T=c.paint.get("line-width");if(y.constantOr(1)!==0&&T.constantOr(1)!==0)for(var S=l.depthModeForSublayer(0,fe.ReadOnly),M=l.colorModeForRenderPass(),D=c.paint.get("line-dasharray"),L=c.paint.get("line-pattern"),j=L.constantOr(1),z=c.paint.get("line-gradient"),W=c.getCrossfadeParameters(),te=j?"linePattern":D?"lineSDF":z?"lineGradient":"line",Q=l.context,ie=Q.gl,K=!0,J=0,_e=d;J<_e.length;J+=1){var Se=_e[J],Ie=u.getTile(Se);if(!j||Ie.patternsLoaded()){var Me=Ie.getBucket(c);if(Me){var Ge=Me.programConfigurations.get(c.id),Qe=l.context.program.get(),st=l.useProgram(te,Ge),rt=K||st.program!==Qe,lt=L.constantOr(null);if(lt&&Ie.imageAtlas){var At=Ie.imageAtlas,Tt=At.patternPositions[lt.to.toString()],ft=At.patternPositions[lt.from.toString()];Tt&&ft&&Ge.setConstantPatternPositions(Tt,ft)}var Zt=j?dl(l,Ie,c,W):D?qc(l,Ie,c,D,W):z?ei(l,Ie,c,Me.lineClipsArray.length):fl(l,Ie,c);if(j)Q.activeTexture.set(ie.TEXTURE0),Ie.imageAtlasTexture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE),Ge.updatePaintBuffers(W);else if(D&&(rt||l.lineAtlas.dirty))Q.activeTexture.set(ie.TEXTURE0),l.lineAtlas.bind(Q);else if(z){var xt=Me.gradients[c.id],or=xt.texture;if(c.gradientVersion!==xt.version){var Tr=256;if(c.stepInterpolant){var hr=u.getSource().maxzoom,cr=Se.canonical.z===hr?Math.ceil(1<<l.transform.maxZoom-Se.canonical.z):1;Tr=s.clamp(s.nextPowerOfTwo(Me.maxLineLength/s.EXTENT*1024*cr),256,Q.maxTextureSize)}xt.gradient=s.renderColorRamp({expression:c.gradientExpression(),evaluationKey:"lineProgress",resolution:Tr,image:xt.gradient||void 0,clips:Me.lineClipsArray}),xt.texture?xt.texture.update(xt.gradient):xt.texture=new s.Texture(Q,xt.gradient,ie.RGBA),xt.version=c.gradientVersion,or=xt.texture}Q.activeTexture.set(ie.TEXTURE0),or.bind(c.stepInterpolant?ie.NEAREST:ie.LINEAR,ie.CLAMP_TO_EDGE)}st.draw(Q,ie.TRIANGLES,S,l.stencilModeForClipping(Se),M,De.disabled,Zt,c.id,Me.layoutVertexBuffer,Me.indexBuffer,Me.segments,c.paint,l.transform.zoom,Ge,Me.layoutVertexBuffer2),K=!1}}}}},fill:function(l,u,c,d){var y=c.paint.get("fill-color"),T=c.paint.get("fill-opacity");if(T.constantOr(1)!==0){var S=l.colorModeForRenderPass(),M=c.paint.get("fill-pattern"),D=l.opaquePassEnabledForLayer()&&!M.constantOr(1)&&y.constantOr(s.Color.transparent).a===1&&T.constantOr(0)===1?"opaque":"translucent";if(l.renderPass===D){var L=l.depthModeForSublayer(1,l.renderPass==="opaque"?fe.ReadWrite:fe.ReadOnly);Aa(l,u,c,d,L,S,!1)}if(l.renderPass==="translucent"&&c.paint.get("fill-antialias")){var j=l.depthModeForSublayer(c.getPaintProperty("fill-outline-color")?2:0,fe.ReadOnly);Aa(l,u,c,d,j,S,!0)}}},"fill-extrusion":function(l,u,c,d){var y=c.paint.get("fill-extrusion-opacity");if(y!==0&&l.renderPass==="translucent"){var T=new fe(l.context.gl.LEQUAL,fe.ReadWrite,l.depthRangeFor3D);if(y!==1||c.paint.get("fill-extrusion-pattern").constantOr(1))Oa(l,u,c,d,T,be.disabled,Oe.disabled),Oa(l,u,c,d,T,l.stencilModeFor3D(),l.colorModeForRenderPass());else{var S=l.colorModeForRenderPass();Oa(l,u,c,d,T,be.disabled,S)}}},hillshade:function(l,u,c,d){if(l.renderPass==="offscreen"||l.renderPass==="translucent"){for(var y=l.context,T=l.depthModeForSublayer(0,fe.ReadOnly),S=l.colorModeForRenderPass(),M=l.renderPass==="translucent"?l.stencilConfigForOverlap(d):[{},d],D=M[0],L=0,j=M[1];L<j.length;L+=1){var z=j[L],W=u.getTile(z);W.needsHillshadePrepare&&l.renderPass==="offscreen"?ff(l,W,c,T,be.disabled,S):l.renderPass==="translucent"&&Kc(l,W,c,T,D[z.overscaledZ],S)}y.viewport.set([0,0,l.width,l.height])}},raster:function(l,u,c,d){if(l.renderPass==="translucent"&&c.paint.get("raster-opacity")!==0&&d.length)for(var y=l.context,T=y.gl,S=u.getSource(),M=l.useProgram("raster"),D=l.colorModeForRenderPass(),L=S instanceof Qt?[{},d]:l.stencilConfigForOverlap(d),j=L[0],z=L[1],W=z[z.length-1].overscaledZ,te=!l.options.moving,Q=0,ie=z;Q<ie.length;Q+=1){var K=ie[Q],J=l.depthModeForSublayer(K.overscaledZ-W,c.paint.get("raster-opacity")===1?fe.ReadWrite:fe.ReadOnly,T.LESS),_e=u.getTile(K),Se=l.transform.calculatePosMatrix(K.toUnwrapped(),te);_e.registerFadeDuration(c.paint.get("raster-fade-duration"));var Ie=u.findLoadedParent(K,0),Me=Yc(_e,Ie,u,c,l.transform),Ge=void 0,Qe=void 0,st=c.paint.get("raster-resampling")==="nearest"?T.NEAREST:T.LINEAR;y.activeTexture.set(T.TEXTURE0),_e.texture.bind(st,T.CLAMP_TO_EDGE,T.LINEAR_MIPMAP_NEAREST),y.activeTexture.set(T.TEXTURE1),Ie?(Ie.texture.bind(st,T.CLAMP_TO_EDGE,T.LINEAR_MIPMAP_NEAREST),Ge=Math.pow(2,Ie.tileID.overscaledZ-_e.tileID.overscaledZ),Qe=[_e.tileID.canonical.x*Ge%1,_e.tileID.canonical.y*Ge%1]):_e.texture.bind(st,T.CLAMP_TO_EDGE,T.LINEAR_MIPMAP_NEAREST);var rt=yA(Se,Qe||[0,0],Ge||1,Me,c);S instanceof Qt?M.draw(y,T.TRIANGLES,J,be.disabled,D,De.disabled,rt,c.id,S.boundsBuffer,l.quadTriangleIndexBuffer,S.boundsSegments):M.draw(y,T.TRIANGLES,J,j[K.overscaledZ],D,De.disabled,rt,c.id,l.rasterBoundsBuffer,l.quadTriangleIndexBuffer,l.rasterBoundsSegments)}},background:function(l,u,c){var d=c.paint.get("background-color"),y=c.paint.get("background-opacity");if(y!==0){var T=l.context,S=T.gl,M=l.transform,D=M.tileSize,L=c.paint.get("background-pattern");if(!l.isPatternMissing(L)){var j=!L&&d.a===1&&y===1&&l.opaquePassEnabledForLayer()?"opaque":"translucent";if(l.renderPass===j){var z=be.disabled,W=l.depthModeForSublayer(0,j==="opaque"?fe.ReadWrite:fe.ReadOnly),te=l.colorModeForRenderPass(),Q=l.useProgram(L?"backgroundPattern":"background"),ie=M.coveringTiles({tileSize:D});L&&(T.activeTexture.set(S.TEXTURE0),l.imageManager.bind(l.context));for(var K=c.getCrossfadeParameters(),J=0,_e=ie;J<_e.length;J+=1){var Se=_e[J],Ie=l.transform.calculatePosMatrix(Se.toUnwrapped()),Me=L?fa(Ie,y,l,L,{tileID:Se,tileSize:D},K):yn(Ie,y,d);Q.draw(T,S.TRIANGLES,W,z,te,De.disabled,Me,c.id,l.tileExtentBuffer,l.quadTriangleIndexBuffer,l.tileExtentSegments)}}}}},debug:function(l,u,c){for(var d=0;d<c.length;d++)gl(l,u,c[d])},custom:function(l,u,c){var d=l.context,y=c.implementation;if(l.renderPass==="offscreen"){var T=y.prerender;T&&(l.setCustomLayerDefaults(),d.setColorMode(l.colorModeForRenderPass()),T.call(y,d.gl,l.transform.customLayerMatrix()),d.setDirty(),l.setBaseState())}else if(l.renderPass==="translucent"){l.setCustomLayerDefaults(),d.setColorMode(l.colorModeForRenderPass()),d.setStencilMode(be.disabled);var S=y.renderingMode==="3d"?new fe(l.context.gl.LEQUAL,fe.ReadWrite,l.depthRangeFor3D):l.depthModeForSublayer(0,fe.ReadOnly);d.setDepthMode(S),y.render(d.gl,l.transform.customLayerMatrix()),d.setDirty(),l.setBaseState(),d.bindFramebuffer.set(null)}}},Ai=function(l,u){this.context=new ce(l),this.transform=u,this._tileTextures={},this.setup(),this.numSublayers=we.maxUnderzooming+we.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ia,this.gpuTimers={}};Ai.prototype.resize=function(l,u){if(this.width=l*s.browser.devicePixelRatio,this.height=u*s.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var c=0,d=this.style._order;c<d.length;c+=1)this.style._layers[d[c]].resize()},Ai.prototype.setup=function(){var l=this.context,u=new s.StructArrayLayout2i4;u.emplaceBack(0,0),u.emplaceBack(s.EXTENT,0),u.emplaceBack(0,s.EXTENT),u.emplaceBack(s.EXTENT,s.EXTENT),this.tileExtentBuffer=l.createVertexBuffer(u,Hi.members),this.tileExtentSegments=s.SegmentVector.simpleSegment(0,0,4,2);var c=new s.StructArrayLayout2i4;c.emplaceBack(0,0),c.emplaceBack(s.EXTENT,0),c.emplaceBack(0,s.EXTENT),c.emplaceBack(s.EXTENT,s.EXTENT),this.debugBuffer=l.createVertexBuffer(c,Hi.members),this.debugSegments=s.SegmentVector.simpleSegment(0,0,4,5);var d=new s.StructArrayLayout4i8;d.emplaceBack(0,0,0,0),d.emplaceBack(s.EXTENT,0,s.EXTENT,0),d.emplaceBack(0,s.EXTENT,0,s.EXTENT),d.emplaceBack(s.EXTENT,s.EXTENT,s.EXTENT,s.EXTENT),this.rasterBoundsBuffer=l.createVertexBuffer(d,Ot.members),this.rasterBoundsSegments=s.SegmentVector.simpleSegment(0,0,4,2);var y=new s.StructArrayLayout2i4;y.emplaceBack(0,0),y.emplaceBack(1,0),y.emplaceBack(0,1),y.emplaceBack(1,1),this.viewportBuffer=l.createVertexBuffer(y,Hi.members),this.viewportSegments=s.SegmentVector.simpleSegment(0,0,4,2);var T=new s.StructArrayLayout1ui2;T.emplaceBack(0),T.emplaceBack(1),T.emplaceBack(3),T.emplaceBack(2),T.emplaceBack(0),this.tileBorderIndexBuffer=l.createIndexBuffer(T);var S=new s.StructArrayLayout3ui6;S.emplaceBack(0,1,2),S.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=l.createIndexBuffer(S),this.emptyTexture=new s.Texture(l,{width:1,height:1,data:new Uint8Array([0,0,0,0])},l.gl.RGBA);var M=this.context.gl;this.stencilClearMode=new be({func:M.ALWAYS,mask:0},0,255,M.ZERO,M.ZERO,M.ZERO)},Ai.prototype.clearStencil=function(){var l=this.context,u=l.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var c=s.create();s.ortho(c,0,this.width,this.height,0,0,1),s.scale(c,c,[u.drawingBufferWidth,u.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(l,u.TRIANGLES,fe.disabled,this.stencilClearMode,Oe.disabled,De.disabled,ha(c),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Ai.prototype._renderTileClippingMasks=function(l,u){if(this.currentStencilSource!==l.source&&l.isTileClipped()&&u&&u.length){this.currentStencilSource=l.source;var c=this.context,d=c.gl;this.nextStencilID+u.length>256&&this.clearStencil(),c.setColorMode(Oe.disabled),c.setDepthMode(fe.disabled);var y=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var T=0,S=u;T<S.length;T+=1){var M=S[T],D=this._tileClippingMaskIDs[M.key]=this.nextStencilID++;y.draw(c,d.TRIANGLES,fe.disabled,new be({func:d.ALWAYS,mask:0},D,255,d.KEEP,d.KEEP,d.REPLACE),Oe.disabled,De.disabled,ha(M.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Ai.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var l=this.nextStencilID++,u=this.context.gl;return new be({func:u.NOTEQUAL,mask:255},l,255,u.KEEP,u.KEEP,u.REPLACE)},Ai.prototype.stencilModeForClipping=function(l){var u=this.context.gl;return new be({func:u.EQUAL,mask:255},this._tileClippingMaskIDs[l.key],0,u.KEEP,u.KEEP,u.REPLACE)},Ai.prototype.stencilConfigForOverlap=function(l){var u,c=this.context.gl,d=l.sort(function(D,L){return L.overscaledZ-D.overscaledZ}),y=d[d.length-1].overscaledZ,T=d[0].overscaledZ-y+1;if(T>1){this.currentStencilSource=void 0,this.nextStencilID+T>256&&this.clearStencil();for(var S={},M=0;M<T;M++)S[M+y]=new be({func:c.GEQUAL,mask:255},M+this.nextStencilID,255,c.KEEP,c.KEEP,c.REPLACE);return this.nextStencilID+=T,[S,d]}return[(u={},u[y]=be.disabled,u),d]},Ai.prototype.colorModeForRenderPass=function(){var l=this.context.gl;return this._showOverdrawInspector?new Oe([l.CONSTANT_COLOR,l.ONE],new s.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Oe.unblended:Oe.alphaBlended},Ai.prototype.depthModeForSublayer=function(l,u,c){if(!this.opaquePassEnabledForLayer())return fe.disabled;var d=1-((1+this.currentLayer)*this.numSublayers+l)*this.depthEpsilon;return new fe(c||this.context.gl.LEQUAL,u,[d,d])},Ai.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Ai.prototype.render=function(l,u){var c=this;this.style=l,this.options=u,this.lineAtlas=l.lineAtlas,this.imageManager=l.imageManager,this.glyphManager=l.glyphManager,this.symbolFadeChange=l.placement.symbolFadeChange(s.browser.now()),this.imageManager.beginFrame();var d=this.style._order,y=this.style.sourceCaches;for(var T in y){var S=y[T];S.used&&S.prepare(this.context)}var M,D,L={},j={},z={};for(var W in y){var te=y[W];L[W]=te.getVisibleCoordinates(),j[W]=L[W].slice().reverse(),z[W]=te.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Q=0;Q<d.length;Q++)if(this.style._layers[d[Q]].is3D()){this.opaquePassCutoff=Q;break}this.renderPass="offscreen";for(var ie=0,K=d;ie<K.length;ie+=1){var J=this.style._layers[K[ie]];if(J.hasOffscreenPass()&&!J.isHidden(this.transform.zoom)){var _e=j[J.source];(J.type==="custom"||_e.length)&&this.renderLayer(this,y[J.source],J,_e)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:u.showOverdrawInspector?s.Color.black:s.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=u.showOverdrawInspector,this.depthRangeFor3D=[0,1-(l._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=d.length-1;this.currentLayer>=0;this.currentLayer--){var Se=this.style._layers[d[this.currentLayer]],Ie=y[Se.source],Me=L[Se.source];this._renderTileClippingMasks(Se,Me),this.renderLayer(this,Ie,Se,Me)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<d.length;this.currentLayer++){var Ge=this.style._layers[d[this.currentLayer]],Qe=y[Ge.source],st=(Ge.type==="symbol"?z:j)[Ge.source];this._renderTileClippingMasks(Ge,L[Ge.source]),this.renderLayer(this,Qe,Ge,st)}this.options.showTileBoundaries&&(s.values(this.style._layers).forEach(function(rt){rt.source&&!rt.isHidden(c.transform.zoom)&&(rt.source!==(D&&D.id)&&(D=c.style.sourceCaches[rt.source]),(!M||M.getSource().maxzoom<D.getSource().maxzoom)&&(M=D))}),M&&Fa.debug(this,M,M.getVisibleCoordinates())),this.options.showPadding&&function(rt){var lt=rt.transform.padding;Da(rt,rt.transform.height-(lt.top||0),3,Ql),Da(rt,lt.bottom||0,3,df),pa(rt,lt.left||0,3,Af),pa(rt,rt.transform.width-(lt.right||0),3,ec);var At=rt.transform.centerPoint;(function(Tt,ft,Zt,xt){tc(Tt,ft-1,Zt-10,2,20,xt),tc(Tt,ft-10,Zt-1,20,2,xt)})(rt,At.x,rt.transform.height-At.y,Jc)}(this),this.context.setDefault()},Ai.prototype.renderLayer=function(l,u,c,d){c.isHidden(this.transform.zoom)||(c.type==="background"||c.type==="custom"||d.length)&&(this.id=c.id,this.gpuTimingStart(c),Fa[c.type](l,u,c,d,this.style.placement.variableOffsets),this.gpuTimingEnd())},Ai.prototype.gpuTimingStart=function(l){if(this.options.gpuTiming){var u=this.context.extTimerQuery,c=this.gpuTimers[l.id];c||(c=this.gpuTimers[l.id]={calls:0,cpuTime:0,query:u.createQueryEXT()}),c.calls++,u.beginQueryEXT(u.TIME_ELAPSED_EXT,c.query)}},Ai.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var l=this.context.extTimerQuery;l.endQueryEXT(l.TIME_ELAPSED_EXT)}},Ai.prototype.collectGpuTimers=function(){var l=this.gpuTimers;return this.gpuTimers={},l},Ai.prototype.queryGpuTimers=function(l){var u={};for(var c in l){var d=l[c],y=this.context.extTimerQuery,T=y.getQueryObjectEXT(d.query,y.QUERY_RESULT_EXT)/1e6;y.deleteQueryEXT(d.query),u[c]=T}return u},Ai.prototype.translatePosMatrix=function(l,u,c,d,y){if(!c[0]&&!c[1])return l;var T=y?d==="map"?this.transform.angle:0:d==="viewport"?-this.transform.angle:0;if(T){var S=Math.sin(T),M=Math.cos(T);c=[c[0]*M-c[1]*S,c[0]*S+c[1]*M]}var D=[y?c[0]:ai(u,c[0],this.transform.zoom),y?c[1]:ai(u,c[1],this.transform.zoom),0],L=new Float32Array(16);return s.translate(L,l,D),L},Ai.prototype.saveTileTexture=function(l){var u=this._tileTextures[l.size[0]];u?u.push(l):this._tileTextures[l.size[0]]=[l]},Ai.prototype.getTileTexture=function(l){var u=this._tileTextures[l];return u&&u.length>0?u.pop():null},Ai.prototype.isPatternMissing=function(l){if(!l)return!1;if(!l.from||!l.to)return!0;var u=this.imageManager.getPattern(l.from.toString()),c=this.imageManager.getPattern(l.to.toString());return!u||!c},Ai.prototype.useProgram=function(l,u){this.cache=this.cache||{};var c=""+l+(u?u.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[c]||(this.cache[c]=new nf(this.context,l,_A[l],u,da[l],this._showOverdrawInspector)),this.cache[c]},Ai.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Ai.prototype.setBaseState=function(){var l=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(l.FUNC_ADD)},Ai.prototype.initDebugOverlayCanvas=function(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=s.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new s.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},Ai.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Qc=function(l,u){this.points=l,this.planes=u};Qc.fromInvProjectionMatrix=function(l,u,c){var d=Math.pow(2,c),y=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(S){return s.transformMat4([],S,l)}).map(function(S){return s.scale$1([],S,1/S[3]/u*d)}),T=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(S){var M=s.sub([],y[S[0]],y[S[1]]),D=s.sub([],y[S[2]],y[S[1]]),L=s.normalize([],s.cross([],M,D)),j=-s.dot(L,y[S[1]]);return L.concat(j)});return new Qc(y,T)};var La=function(l,u){this.min=l,this.max=u,this.center=s.scale$2([],s.add([],this.min,this.max),.5)};La.prototype.quadrant=function(l){for(var u=[l%2==0,l<2],c=s.clone$2(this.min),d=s.clone$2(this.max),y=0;y<u.length;y++)c[y]=u[y]?this.min[y]:this.center[y],d[y]=u[y]?this.center[y]:this.max[y];return d[2]=this.max[2],new La(c,d)},La.prototype.distanceX=function(l){return Math.max(Math.min(this.max[0],l[0]),this.min[0])-l[0]},La.prototype.distanceY=function(l){return Math.max(Math.min(this.max[1],l[1]),this.min[1])-l[1]},La.prototype.intersects=function(l){for(var u=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],c=!0,d=0;d<l.planes.length;d++){for(var y=l.planes[d],T=0,S=0;S<u.length;S++)T+=s.dot$1(y,u[S])>=0;if(T===0)return 0;T!==u.length&&(c=!1)}if(c)return 2;for(var M=0;M<3;M++){for(var D=Number.MAX_VALUE,L=-Number.MAX_VALUE,j=0;j<l.points.length;j++){var z=l.points[j][M]-this.min[M];D=Math.min(D,z),L=Math.max(L,z)}if(L<0||D>this.max[M]-this.min[M])return 0}return 1};var ga=function(l,u,c,d){if(l===void 0&&(l=0),u===void 0&&(u=0),c===void 0&&(c=0),d===void 0&&(d=0),isNaN(l)||l<0||isNaN(u)||u<0||isNaN(c)||c<0||isNaN(d)||d<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=l,this.bottom=u,this.left=c,this.right=d};ga.prototype.interpolate=function(l,u,c){return u.top!=null&&l.top!=null&&(this.top=s.number(l.top,u.top,c)),u.bottom!=null&&l.bottom!=null&&(this.bottom=s.number(l.bottom,u.bottom,c)),u.left!=null&&l.left!=null&&(this.left=s.number(l.left,u.left,c)),u.right!=null&&l.right!=null&&(this.right=s.number(l.right,u.right,c)),this},ga.prototype.getCenter=function(l,u){var c=s.clamp((this.left+l-this.right)/2,0,l),d=s.clamp((this.top+u-this.bottom)/2,0,u);return new s.Point(c,d)},ga.prototype.equals=function(l){return this.top===l.top&&this.bottom===l.bottom&&this.left===l.left&&this.right===l.right},ga.prototype.clone=function(){return new ga(this.top,this.bottom,this.left,this.right)},ga.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var kr=function(l,u,c,d,y){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=y===void 0||y,this._minZoom=l||0,this._maxZoom=u||22,this._minPitch=c??0,this._maxPitch=d??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new s.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ga,this._posMatrixCache={},this._alignedPosMatrixCache={}},li={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};kr.prototype.clone=function(){var l=new kr(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return l.tileSize=this.tileSize,l.latRange=this.latRange,l.width=this.width,l.height=this.height,l._center=this._center,l.zoom=this.zoom,l.angle=this.angle,l._fov=this._fov,l._pitch=this._pitch,l._unmodified=this._unmodified,l._edgeInsets=this._edgeInsets.clone(),l._calcMatrices(),l},li.minZoom.get=function(){return this._minZoom},li.minZoom.set=function(l){this._minZoom!==l&&(this._minZoom=l,this.zoom=Math.max(this.zoom,l))},li.maxZoom.get=function(){return this._maxZoom},li.maxZoom.set=function(l){this._maxZoom!==l&&(this._maxZoom=l,this.zoom=Math.min(this.zoom,l))},li.minPitch.get=function(){return this._minPitch},li.minPitch.set=function(l){this._minPitch!==l&&(this._minPitch=l,this.pitch=Math.max(this.pitch,l))},li.maxPitch.get=function(){return this._maxPitch},li.maxPitch.set=function(l){this._maxPitch!==l&&(this._maxPitch=l,this.pitch=Math.min(this.pitch,l))},li.renderWorldCopies.get=function(){return this._renderWorldCopies},li.renderWorldCopies.set=function(l){l===void 0?l=!0:l===null&&(l=!1),this._renderWorldCopies=l},li.worldSize.get=function(){return this.tileSize*this.scale},li.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},li.size.get=function(){return new s.Point(this.width,this.height)},li.bearing.get=function(){return-this.angle/Math.PI*180},li.bearing.set=function(l){var u=-s.wrap(l,-180,180)*Math.PI/180;this.angle!==u&&(this._unmodified=!1,this.angle=u,this._calcMatrices(),this.rotationMatrix=s.create$2(),s.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},li.pitch.get=function(){return this._pitch/Math.PI*180},li.pitch.set=function(l){var u=s.clamp(l,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==u&&(this._unmodified=!1,this._pitch=u,this._calcMatrices())},li.fov.get=function(){return this._fov/Math.PI*180},li.fov.set=function(l){l=Math.max(.01,Math.min(60,l)),this._fov!==l&&(this._unmodified=!1,this._fov=l/180*Math.PI,this._calcMatrices())},li.zoom.get=function(){return this._zoom},li.zoom.set=function(l){var u=Math.min(Math.max(l,this.minZoom),this.maxZoom);this._zoom!==u&&(this._unmodified=!1,this._zoom=u,this.scale=this.zoomScale(u),this.tileZoom=Math.floor(u),this.zoomFraction=u-this.tileZoom,this._constrain(),this._calcMatrices())},li.center.get=function(){return this._center},li.center.set=function(l){l.lat===this._center.lat&&l.lng===this._center.lng||(this._unmodified=!1,this._center=l,this._constrain(),this._calcMatrices())},li.padding.get=function(){return this._edgeInsets.toJSON()},li.padding.set=function(l){this._edgeInsets.equals(l)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,l,1),this._calcMatrices())},li.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},kr.prototype.isPaddingEqual=function(l){return this._edgeInsets.equals(l)},kr.prototype.interpolatePadding=function(l,u,c){this._unmodified=!1,this._edgeInsets.interpolate(l,u,c),this._constrain(),this._calcMatrices()},kr.prototype.coveringZoomLevel=function(l){var u=(l.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/l.tileSize));return Math.max(0,u)},kr.prototype.getVisibleUnwrappedCoordinates=function(l){var u=[new s.UnwrappedTileID(0,l)];if(this._renderWorldCopies)for(var c=this.pointCoordinate(new s.Point(0,0)),d=this.pointCoordinate(new s.Point(this.width,0)),y=this.pointCoordinate(new s.Point(this.width,this.height)),T=this.pointCoordinate(new s.Point(0,this.height)),S=Math.floor(Math.min(c.x,d.x,y.x,T.x)),M=Math.floor(Math.max(c.x,d.x,y.x,T.x)),D=S-1;D<=M+1;D++)D!==0&&u.push(new s.UnwrappedTileID(D,l));return u},kr.prototype.coveringTiles=function(l){var u=this.coveringZoomLevel(l),c=u;if(l.minzoom!==void 0&&u<l.minzoom)return[];l.maxzoom!==void 0&&u>l.maxzoom&&(u=l.maxzoom);var d=s.MercatorCoordinate.fromLngLat(this.center),y=Math.pow(2,u),T=[y*d.x,y*d.y,0],S=Qc.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,u),M=l.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(M=u);var D=function(rt){return{aabb:new La([rt*y,0,0],[(rt+1)*y,y,0]),zoom:0,x:0,y:0,wrap:rt,fullyVisible:!1}},L=[],j=[],z=u,W=l.reparseOverscaled?c:u;if(this._renderWorldCopies)for(var te=1;te<=3;te++)L.push(D(-te)),L.push(D(te));for(L.push(D(0));L.length>0;){var Q=L.pop(),ie=Q.x,K=Q.y,J=Q.fullyVisible;if(!J){var _e=Q.aabb.intersects(S);if(_e===0)continue;J=_e===2}var Se=Q.aabb.distanceX(T),Ie=Q.aabb.distanceY(T),Me=Math.max(Math.abs(Se),Math.abs(Ie));if(Q.zoom===z||Me>3+(1<<z-Q.zoom)-2&&Q.zoom>=M)j.push({tileID:new s.OverscaledTileID(Q.zoom===z?W:Q.zoom,Q.wrap,Q.zoom,ie,K),distanceSq:s.sqrLen([T[0]-.5-ie,T[1]-.5-K])});else for(var Ge=0;Ge<4;Ge++){var Qe=(ie<<1)+Ge%2,st=(K<<1)+(Ge>>1);L.push({aabb:Q.aabb.quadrant(Ge),zoom:Q.zoom+1,x:Qe,y:st,wrap:Q.wrap,fullyVisible:J})}}return j.sort(function(rt,lt){return rt.distanceSq-lt.distanceSq}).map(function(rt){return rt.tileID})},kr.prototype.resize=function(l,u){this.width=l,this.height=u,this.pixelsToGLUnits=[2/l,-2/u],this._constrain(),this._calcMatrices()},li.unmodified.get=function(){return this._unmodified},kr.prototype.zoomScale=function(l){return Math.pow(2,l)},kr.prototype.scaleZoom=function(l){return Math.log(l)/Math.LN2},kr.prototype.project=function(l){var u=s.clamp(l.lat,-this.maxValidLatitude,this.maxValidLatitude);return new s.Point(s.mercatorXfromLng(l.lng)*this.worldSize,s.mercatorYfromLat(u)*this.worldSize)},kr.prototype.unproject=function(l){return new s.MercatorCoordinate(l.x/this.worldSize,l.y/this.worldSize).toLngLat()},li.point.get=function(){return this.project(this.center)},kr.prototype.setLocationAtPoint=function(l,u){var c=this.pointCoordinate(u),d=this.pointCoordinate(this.centerPoint),y=this.locationCoordinate(l),T=new s.MercatorCoordinate(y.x-(c.x-d.x),y.y-(c.y-d.y));this.center=this.coordinateLocation(T),this._renderWorldCopies&&(this.center=this.center.wrap())},kr.prototype.locationPoint=function(l){return this.coordinatePoint(this.locationCoordinate(l))},kr.prototype.pointLocation=function(l){return this.coordinateLocation(this.pointCoordinate(l))},kr.prototype.locationCoordinate=function(l){return s.MercatorCoordinate.fromLngLat(l)},kr.prototype.coordinateLocation=function(l){return l.toLngLat()},kr.prototype.pointCoordinate=function(l){var u=[l.x,l.y,0,1],c=[l.x,l.y,1,1];s.transformMat4(u,u,this.pixelMatrixInverse),s.transformMat4(c,c,this.pixelMatrixInverse);var d=u[3],y=c[3],T=u[1]/d,S=c[1]/y,M=u[2]/d,D=c[2]/y,L=M===D?0:(0-M)/(D-M);return new s.MercatorCoordinate(s.number(u[0]/d,c[0]/y,L)/this.worldSize,s.number(T,S,L)/this.worldSize)},kr.prototype.coordinatePoint=function(l){var u=[l.x*this.worldSize,l.y*this.worldSize,0,1];return s.transformMat4(u,u,this.pixelMatrix),new s.Point(u[0]/u[3],u[1]/u[3])},kr.prototype.getBounds=function(){return new s.LngLatBounds().extend(this.pointLocation(new s.Point(0,0))).extend(this.pointLocation(new s.Point(this.width,0))).extend(this.pointLocation(new s.Point(this.width,this.height))).extend(this.pointLocation(new s.Point(0,this.height)))},kr.prototype.getMaxBounds=function(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new s.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},kr.prototype.setMaxBounds=function(l){l?(this.lngRange=[l.getWest(),l.getEast()],this.latRange=[l.getSouth(),l.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},kr.prototype.calculatePosMatrix=function(l,u){u===void 0&&(u=!1);var c=l.key,d=u?this._alignedPosMatrixCache:this._posMatrixCache;if(d[c])return d[c];var y=l.canonical,T=this.worldSize/this.zoomScale(y.z),S=y.x+Math.pow(2,y.z)*l.wrap,M=s.identity(new Float64Array(16));return s.translate(M,M,[S*T,y.y*T,0]),s.scale(M,M,[T/s.EXTENT,T/s.EXTENT,1]),s.multiply(M,u?this.alignedProjMatrix:this.projMatrix,M),d[c]=new Float32Array(M),d[c]},kr.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},kr.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var l,u,c,d,y=-90,T=90,S=-180,M=180,D=this.size,L=this._unmodified;if(this.latRange){var j=this.latRange;y=s.mercatorYfromLat(j[1])*this.worldSize,l=(T=s.mercatorYfromLat(j[0])*this.worldSize)-y<D.y?D.y/(T-y):0}if(this.lngRange){var z=this.lngRange;S=s.mercatorXfromLng(z[0])*this.worldSize,u=(M=s.mercatorXfromLng(z[1])*this.worldSize)-S<D.x?D.x/(M-S):0}var W=this.point,te=Math.max(u||0,l||0);if(te)return this.center=this.unproject(new s.Point(u?(M+S)/2:W.x,l?(T+y)/2:W.y)),this.zoom+=this.scaleZoom(te),this._unmodified=L,void(this._constraining=!1);if(this.latRange){var Q=W.y,ie=D.y/2;Q-ie<y&&(d=y+ie),Q+ie>T&&(d=T-ie)}if(this.lngRange){var K=W.x,J=D.x/2;K-J<S&&(c=S+J),K+J>M&&(c=M-J)}c===void 0&&d===void 0||(this.center=this.unproject(new s.Point(c!==void 0?c:W.x,d!==void 0?d:W.y))),this._unmodified=L,this._constraining=!1}},kr.prototype._calcMatrices=function(){if(this.height){var l=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var u=Math.PI/2+this._pitch,c=this._fov*(.5+l.y/this.height),d=Math.sin(c)*this.cameraToCenterDistance/Math.sin(s.clamp(Math.PI-u-c,.01,Math.PI-.01)),y=this.point,T=y.x,S=y.y,M=1.01*(Math.cos(Math.PI/2-this._pitch)*d+this.cameraToCenterDistance),D=this.height/50,L=new Float64Array(16);s.perspective(L,this._fov,this.width/this.height,D,M),L[8]=2*-l.x/this.width,L[9]=2*l.y/this.height,s.scale(L,L,[1,-1,1]),s.translate(L,L,[0,0,-this.cameraToCenterDistance]),s.rotateX(L,L,this._pitch),s.rotateZ(L,L,this.angle),s.translate(L,L,[-T,-S,0]),this.mercatorMatrix=s.scale([],L,[this.worldSize,this.worldSize,this.worldSize]),s.scale(L,L,[1,1,s.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=L,this.invProjMatrix=s.invert([],this.projMatrix);var j=this.width%2/2,z=this.height%2/2,W=Math.cos(this.angle),te=Math.sin(this.angle),Q=T-Math.round(T)+W*j+te*z,ie=S-Math.round(S)+W*z+te*j,K=new Float64Array(L);if(s.translate(K,K,[Q>.5?Q-1:Q,ie>.5?ie-1:ie,0]),this.alignedProjMatrix=K,L=s.create(),s.scale(L,L,[this.width/2,-this.height/2,1]),s.translate(L,L,[1,-1,0]),this.labelPlaneMatrix=L,L=s.create(),s.scale(L,L,[1,-1,1]),s.translate(L,L,[-1,-1,0]),s.scale(L,L,[2/this.width,2/this.height,1]),this.glCoordMatrix=L,this.pixelMatrix=s.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(L=s.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=L,this._posMatrixCache={},this._alignedPosMatrixCache={}}},kr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var l=this.pointCoordinate(new s.Point(0,0)),u=[l.x*this.worldSize,l.y*this.worldSize,0,1];return s.transformMat4(u,u,this.pixelMatrix)[3]/this.cameraToCenterDistance},kr.prototype.getCameraPoint=function(){var l=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.Point(0,l))},kr.prototype.getCameraQueryGeometry=function(l){var u=this.getCameraPoint();if(l.length===1)return[l[0],u];for(var c=u.x,d=u.y,y=u.x,T=u.y,S=0,M=l;S<M.length;S+=1){var D=M[S];c=Math.min(c,D.x),d=Math.min(d,D.y),y=Math.max(y,D.x),T=Math.max(T,D.y)}return[new s.Point(c,d),new s.Point(y,d),new s.Point(y,T),new s.Point(c,T),new s.Point(c,d)]},Object.defineProperties(kr.prototype,li);var Kn=function(l){var u,c,d,y;this._hashName=l&&encodeURIComponent(l),s.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(u=this._updateHashUnthrottled.bind(this),c=!1,d=null,y=function(){d=null,c&&(u(),d=setTimeout(y,300),c=!1)},function(){return c=!0,d||y(),d})};Kn.prototype.addTo=function(l){return this._map=l,s.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Kn.prototype.remove=function(){return s.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Kn.prototype.getHashString=function(l){var u=this._map.getCenter(),c=Math.round(100*this._map.getZoom())/100,d=Math.ceil((c*Math.LN2+Math.log(512/360/.5))/Math.LN10),y=Math.pow(10,d),T=Math.round(u.lng*y)/y,S=Math.round(u.lat*y)/y,M=this._map.getBearing(),D=this._map.getPitch(),L="";if(L+=l?"/"+T+"/"+S+"/"+c:c+"/"+S+"/"+T,(M||D)&&(L+="/"+Math.round(10*M)/10),D&&(L+="/"+Math.round(D)),this._hashName){var j=this._hashName,z=!1,W=s.window.location.hash.slice(1).split("&").map(function(te){var Q=te.split("=")[0];return Q===j?(z=!0,Q+"="+L):te}).filter(function(te){return te});return z||W.push(j+"="+L),"#"+W.join("&")}return"#"+L},Kn.prototype._getCurrentHash=function(){var l,u=this,c=s.window.location.hash.replace("#","");return this._hashName?(c.split("&").map(function(d){return d.split("=")}).forEach(function(d){d[0]===u._hashName&&(l=d)}),(l&&l[1]||"").split("/")):c.split("/")},Kn.prototype._onHashChange=function(){var l=this._getCurrentHash();if(l.length>=3&&!l.some(function(c){return isNaN(c)})){var u=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(l[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+l[2],+l[1]],zoom:+l[0],bearing:u,pitch:+(l[4]||0)}),!0}return!1},Kn.prototype._updateHashUnthrottled=function(){var l=s.window.location.href.replace(/(#.+)?$/,this.getHashString());try{s.window.history.replaceState(s.window.history.state,null,l)}catch{}};var ml={linearity:.3,easing:s.bezier(0,0,.3,1)},ma=s.extend({deceleration:2500,maxSpeed:1400},ml),rc=s.extend({deceleration:20,maxSpeed:1400},ml),vA=s.extend({deceleration:1e3,maxSpeed:360},ml),bA=s.extend({deceleration:1e3,maxSpeed:90},ml),ic=function(l){this._map=l,this.clear()};function nc(l,u){(!l.duration||l.duration<u.duration)&&(l.duration=u.duration,l.easing=u.easing)}function jo(l,u,c){var d=c.maxSpeed,y=c.linearity,T=c.deceleration,S=s.clamp(l*y/(u/1e3),-d,d),M=Math.abs(S)/(T*y);return{easing:c.easing,duration:1e3*M,amount:S*(M/2)}}ic.prototype.clear=function(){this._inertiaBuffer=[]},ic.prototype.record=function(l){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.browser.now(),settings:l})},ic.prototype._drainInertiaBuffer=function(){for(var l=this._inertiaBuffer,u=s.browser.now();l.length>0&&u-l[0].time>160;)l.shift()},ic.prototype._onMoveEnd=function(l){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var u={zoom:0,bearing:0,pitch:0,pan:new s.Point(0,0),pinchAround:void 0,around:void 0},c=0,d=this._inertiaBuffer;c<d.length;c+=1){var y=d[c].settings;u.zoom+=y.zoomDelta||0,u.bearing+=y.bearingDelta||0,u.pitch+=y.pitchDelta||0,y.panDelta&&u.pan._add(y.panDelta),y.around&&(u.around=y.around),y.pinchAround&&(u.pinchAround=y.pinchAround)}var T=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,S={};if(u.pan.mag()){var M=jo(u.pan.mag(),T,s.extend({},ma,l||{}));S.offset=u.pan.mult(M.amount/u.pan.mag()),S.center=this._map.transform.center,nc(S,M)}if(u.zoom){var D=jo(u.zoom,T,rc);S.zoom=this._map.transform.zoom+D.amount,nc(S,D)}if(u.bearing){var L=jo(u.bearing,T,vA);S.bearing=this._map.transform.bearing+s.clamp(L.amount,-179,179),nc(S,L)}if(u.pitch){var j=jo(u.pitch,T,bA);S.pitch=this._map.transform.pitch+j.amount,nc(S,j)}if(S.zoom||S.bearing){var z=u.pinchAround===void 0?u.around:u.pinchAround;S.around=z?this._map.unproject(z):this._map.getCenter()}return this.clear(),s.extend(S,{noMoveStart:!0})}};var Ji=function(l){function u(d,y,T,S){S===void 0&&(S={});var M=A.mousePos(y.getCanvasContainer(),T),D=y.unproject(M);l.call(this,d,s.extend({point:M,lngLat:D,originalEvent:T},S)),this._defaultPrevented=!1,this.target=y}l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u;var c={defaultPrevented:{configurable:!0}};return u.prototype.preventDefault=function(){this._defaultPrevented=!0},c.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(u.prototype,c),u}(s.Event),_l=function(l){function u(d,y,T){var S=d==="touchend"?T.changedTouches:T.touches,M=A.touchPos(y.getCanvasContainer(),S),D=M.map(function(z){return y.unproject(z)}),L=M.reduce(function(z,W,te,Q){return z.add(W.div(Q.length))},new s.Point(0,0)),j=y.unproject(L);l.call(this,d,{points:M,point:L,lngLats:D,lngLat:j,originalEvent:T}),this._defaultPrevented=!1}l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u;var c={defaultPrevented:{configurable:!0}};return u.prototype.preventDefault=function(){this._defaultPrevented=!0},c.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(u.prototype,c),u}(s.Event),pf=function(l){function u(d,y,T){l.call(this,d,{originalEvent:T}),this._defaultPrevented=!1}l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u;var c={defaultPrevented:{configurable:!0}};return u.prototype.preventDefault=function(){this._defaultPrevented=!0},c.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(u.prototype,c),u}(s.Event),Fi=function(l,u){this._map=l,this._clickTolerance=u.clickTolerance};Fi.prototype.reset=function(){delete this._mousedownPos},Fi.prototype.wheel=function(l){return this._firePreventable(new pf(l.type,this._map,l))},Fi.prototype.mousedown=function(l,u){return this._mousedownPos=u,this._firePreventable(new Ji(l.type,this._map,l))},Fi.prototype.mouseup=function(l){this._map.fire(new Ji(l.type,this._map,l))},Fi.prototype.click=function(l,u){this._mousedownPos&&this._mousedownPos.dist(u)>=this._clickTolerance||this._map.fire(new Ji(l.type,this._map,l))},Fi.prototype.dblclick=function(l){return this._firePreventable(new Ji(l.type,this._map,l))},Fi.prototype.mouseover=function(l){this._map.fire(new Ji(l.type,this._map,l))},Fi.prototype.mouseout=function(l){this._map.fire(new Ji(l.type,this._map,l))},Fi.prototype.touchstart=function(l){return this._firePreventable(new _l(l.type,this._map,l))},Fi.prototype.touchmove=function(l){this._map.fire(new _l(l.type,this._map,l))},Fi.prototype.touchend=function(l){this._map.fire(new _l(l.type,this._map,l))},Fi.prototype.touchcancel=function(l){this._map.fire(new _l(l.type,this._map,l))},Fi.prototype._firePreventable=function(l){if(this._map.fire(l),l.defaultPrevented)return{}},Fi.prototype.isEnabled=function(){return!0},Fi.prototype.isActive=function(){return!1},Fi.prototype.enable=function(){},Fi.prototype.disable=function(){};var Ct=function(l){this._map=l};Ct.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ct.prototype.mousemove=function(l){this._map.fire(new Ji(l.type,this._map,l))},Ct.prototype.mousedown=function(){this._delayContextMenu=!0},Ct.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ji("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ct.prototype.contextmenu=function(l){this._delayContextMenu?this._contextMenuEvent=l:this._map.fire(new Ji(l.type,this._map,l)),this._map.listens("contextmenu")&&l.preventDefault()},Ct.prototype.isEnabled=function(){return!0},Ct.prototype.isActive=function(){return!1},Ct.prototype.enable=function(){},Ct.prototype.disable=function(){};var Yn=function(l,u){this._map=l,this._el=l.getCanvasContainer(),this._container=l.getContainer(),this._clickTolerance=u.clickTolerance||1};function eu(l,u){for(var c={},d=0;d<l.length;d++)c[l[d].identifier]=u[d];return c}Yn.prototype.isEnabled=function(){return!!this._enabled},Yn.prototype.isActive=function(){return!!this._active},Yn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Yn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Yn.prototype.mousedown=function(l,u){this.isEnabled()&&l.shiftKey&&l.button===0&&(A.disableDrag(),this._startPos=this._lastPos=u,this._active=!0)},Yn.prototype.mousemoveWindow=function(l,u){if(this._active){var c=u;if(!(this._lastPos.equals(c)||!this._box&&c.dist(this._startPos)<this._clickTolerance)){var d=this._startPos;this._lastPos=c,this._box||(this._box=A.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",l));var y=Math.min(d.x,c.x),T=Math.max(d.x,c.x),S=Math.min(d.y,c.y),M=Math.max(d.y,c.y);A.setTransform(this._box,"translate("+y+"px,"+S+"px)"),this._box.style.width=T-y+"px",this._box.style.height=M-S+"px"}}},Yn.prototype.mouseupWindow=function(l,u){var c=this;if(this._active&&l.button===0){var d=this._startPos,y=u;if(this.reset(),A.suppressClick(),d.x!==y.x||d.y!==y.y)return this._map.fire(new s.Event("boxzoomend",{originalEvent:l})),{cameraAnimation:function(T){return T.fitScreenCoordinates(d,y,c._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",l)}},Yn.prototype.keydown=function(l){this._active&&l.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",l))},Yn.prototype.blur=function(){this.reset()},Yn.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(A.remove(this._box),this._box=null),A.enableDrag(),delete this._startPos,delete this._lastPos},Yn.prototype._fireEvent=function(l,u){return this._map.fire(new s.Event(l,{originalEvent:u}))};var yl=function(l){this.reset(),this.numTouches=l.numTouches};yl.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},yl.prototype.touchstart=function(l,u,c){(this.centroid||c.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=l.timeStamp),c.length===this.numTouches&&(this.centroid=function(d){for(var y=new s.Point(0,0),T=0,S=d;T<S.length;T+=1)y._add(S[T]);return y.div(d.length)}(u),this.touches=eu(c,u)))},yl.prototype.touchmove=function(l,u,c){if(!this.aborted&&this.centroid){var d=eu(c,u);for(var y in this.touches){var T=d[y];(!T||T.dist(this.touches[y])>30)&&(this.aborted=!0)}}},yl.prototype.touchend=function(l,u,c){if((!this.centroid||l.timeStamp-this.startTime>500)&&(this.aborted=!0),c.length===0){var d=!this.aborted&&this.centroid;if(this.reset(),d)return d}};var Qs=function(l){this.singleTap=new yl(l),this.numTaps=l.numTaps,this.reset()};Qs.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Qs.prototype.touchstart=function(l,u,c){this.singleTap.touchstart(l,u,c)},Qs.prototype.touchmove=function(l,u,c){this.singleTap.touchmove(l,u,c)},Qs.prototype.touchend=function(l,u,c){var d=this.singleTap.touchend(l,u,c);if(d){var y=l.timeStamp-this.lastTime<500,T=!this.lastTap||this.lastTap.dist(d)<30;if(y&&T||this.reset(),this.count++,this.lastTime=l.timeStamp,this.lastTap=d,this.count===this.numTaps)return this.reset(),d}};var as=function(){this._zoomIn=new Qs({numTouches:1,numTaps:2}),this._zoomOut=new Qs({numTouches:2,numTaps:1}),this.reset()};as.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},as.prototype.touchstart=function(l,u,c){this._zoomIn.touchstart(l,u,c),this._zoomOut.touchstart(l,u,c)},as.prototype.touchmove=function(l,u,c){this._zoomIn.touchmove(l,u,c),this._zoomOut.touchmove(l,u,c)},as.prototype.touchend=function(l,u,c){var d=this,y=this._zoomIn.touchend(l,u,c),T=this._zoomOut.touchend(l,u,c);return y?(this._active=!0,l.preventDefault(),setTimeout(function(){return d.reset()},0),{cameraAnimation:function(S){return S.easeTo({duration:300,zoom:S.getZoom()+1,around:S.unproject(y)},{originalEvent:l})}}):T?(this._active=!0,l.preventDefault(),setTimeout(function(){return d.reset()},0),{cameraAnimation:function(S){return S.easeTo({duration:300,zoom:S.getZoom()-1,around:S.unproject(T)},{originalEvent:l})}}):void 0},as.prototype.touchcancel=function(){this.reset()},as.prototype.enable=function(){this._enabled=!0},as.prototype.disable=function(){this._enabled=!1,this.reset()},as.prototype.isEnabled=function(){return this._enabled},as.prototype.isActive=function(){return this._active};var Qu={0:1,2:2},bt=function(l){this.reset(),this._clickTolerance=l.clickTolerance||1};bt.prototype.blur=function(){this.reset()},bt.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},bt.prototype._correctButton=function(l,u){return!1},bt.prototype._move=function(l,u){return{}},bt.prototype.mousedown=function(l,u){if(!this._lastPoint){var c=A.mouseButton(l);this._correctButton(l,c)&&(this._lastPoint=u,this._eventButton=c)}},bt.prototype.mousemoveWindow=function(l,u){var c=this._lastPoint;if(c){if(l.preventDefault(),function(d,y){var T=Qu[y];return d.buttons===void 0||(d.buttons&T)!==T}(l,this._eventButton))this.reset();else if(this._moved||!(u.dist(c)<this._clickTolerance))return this._moved=!0,this._lastPoint=u,this._move(c,u)}},bt.prototype.mouseupWindow=function(l){this._lastPoint&&A.mouseButton(l)===this._eventButton&&(this._moved&&A.suppressClick(),this.reset())},bt.prototype.enable=function(){this._enabled=!0},bt.prototype.disable=function(){this._enabled=!1,this.reset()},bt.prototype.isEnabled=function(){return this._enabled},bt.prototype.isActive=function(){return this._active};var tu=function(l){function u(){l.apply(this,arguments)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype.mousedown=function(c,d){l.prototype.mousedown.call(this,c,d),this._lastPoint&&(this._active=!0)},u.prototype._correctButton=function(c,d){return d===0&&!c.ctrlKey},u.prototype._move=function(c,d){return{around:d,panDelta:d.sub(c)}},u}(bt),sc=function(l){function u(){l.apply(this,arguments)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype._correctButton=function(c,d){return d===0&&c.ctrlKey||d===2},u.prototype._move=function(c,d){var y=.8*(d.x-c.x);if(y)return this._active=!0,{bearingDelta:y}},u.prototype.contextmenu=function(c){c.preventDefault()},u}(bt),eh=function(l){function u(){l.apply(this,arguments)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype._correctButton=function(c,d){return d===0&&c.ctrlKey||d===2},u.prototype._move=function(c,d){var y=-.5*(d.y-c.y);if(y)return this._active=!0,{pitchDelta:y}},u.prototype.contextmenu=function(c){c.preventDefault()},u}(bt),Os=function(l){this._minTouches=1,this._clickTolerance=l.clickTolerance||1,this.reset()};Os.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new s.Point(0,0)},Os.prototype.touchstart=function(l,u,c){return this._calculateTransform(l,u,c)},Os.prototype.touchmove=function(l,u,c){if(this._active&&!(c.length<this._minTouches))return l.preventDefault(),this._calculateTransform(l,u,c)},Os.prototype.touchend=function(l,u,c){this._calculateTransform(l,u,c),this._active&&c.length<this._minTouches&&this.reset()},Os.prototype.touchcancel=function(){this.reset()},Os.prototype._calculateTransform=function(l,u,c){c.length>0&&(this._active=!0);var d=eu(c,u),y=new s.Point(0,0),T=new s.Point(0,0),S=0;for(var M in d){var D=d[M],L=this._touches[M];L&&(y._add(D),T._add(D.sub(L)),S++,d[M]=D)}if(this._touches=d,!(S<this._minTouches)&&T.mag()){var j=T.div(S);if(this._sum._add(j),!(this._sum.mag()<this._clickTolerance))return{around:y.div(S),panDelta:j}}},Os.prototype.enable=function(){this._enabled=!0},Os.prototype.disable=function(){this._enabled=!1,this.reset()},Os.prototype.isEnabled=function(){return this._enabled},Os.prototype.isActive=function(){return this._active};var ls=function(){this.reset()};function ru(l,u,c){for(var d=0;d<l.length;d++)if(l[d].identifier===c)return u[d]}function iu(l,u){return Math.log(l/u)/Math.LN2}ls.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},ls.prototype._start=function(l){},ls.prototype._move=function(l,u,c){return{}},ls.prototype.touchstart=function(l,u,c){this._firstTwoTouches||c.length<2||(this._firstTwoTouches=[c[0].identifier,c[1].identifier],this._start([u[0],u[1]]))},ls.prototype.touchmove=function(l,u,c){if(this._firstTwoTouches){l.preventDefault();var d=this._firstTwoTouches,y=d[1],T=ru(c,u,d[0]),S=ru(c,u,y);if(T&&S){var M=this._aroundCenter?null:T.add(S).div(2);return this._move([T,S],M,l)}}},ls.prototype.touchend=function(l,u,c){if(this._firstTwoTouches){var d=this._firstTwoTouches,y=d[1],T=ru(c,u,d[0]),S=ru(c,u,y);T&&S||(this._active&&A.suppressClick(),this.reset())}},ls.prototype.touchcancel=function(){this.reset()},ls.prototype.enable=function(l){this._enabled=!0,this._aroundCenter=!!l&&l.around==="center"},ls.prototype.disable=function(){this._enabled=!1,this.reset()},ls.prototype.isEnabled=function(){return this._enabled},ls.prototype.isActive=function(){return this._active};var cs=function(l){function u(){l.apply(this,arguments)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype.reset=function(){l.prototype.reset.call(this),delete this._distance,delete this._startDistance},u.prototype._start=function(c){this._startDistance=this._distance=c[0].dist(c[1])},u.prototype._move=function(c,d){var y=this._distance;if(this._distance=c[0].dist(c[1]),this._active||!(Math.abs(iu(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:iu(this._distance,y),pinchAround:d}},u}(ls);function Ho(l,u){return 180*l.angleWith(u)/Math.PI}var gf=function(l){function u(){l.apply(this,arguments)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype.reset=function(){l.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},u.prototype._start=function(c){this._startVector=this._vector=c[0].sub(c[1]),this._minDiameter=c[0].dist(c[1])},u.prototype._move=function(c,d){var y=this._vector;if(this._vector=c[0].sub(c[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Ho(this._vector,y),pinchAround:d}},u.prototype._isBelowThreshold=function(c){this._minDiameter=Math.min(this._minDiameter,c.mag());var d=25/(Math.PI*this._minDiameter)*360,y=Ho(c,this._startVector);return Math.abs(y)<d},u}(ls);function oc(l){return Math.abs(l.y)>Math.abs(l.x)}var th=function(l){function u(){l.apply(this,arguments)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype.reset=function(){l.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},u.prototype._start=function(c){this._lastPoints=c,oc(c[0].sub(c[1]))&&(this._valid=!1)},u.prototype._move=function(c,d,y){var T=c[0].sub(this._lastPoints[0]),S=c[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(T,S,y.timeStamp),this._valid)return this._lastPoints=c,this._active=!0,{pitchDelta:(T.y+S.y)/2*-.5}},u.prototype.gestureBeginsVertically=function(c,d,y){if(this._valid!==void 0)return this._valid;var T=c.mag()>=2,S=d.mag()>=2;if(T||S){if(!T||!S)return this._firstMove===void 0&&(this._firstMove=y),y-this._firstMove<100&&void 0;var M=c.y>0==d.y>0;return oc(c)&&oc(d)&&M}},u}(ls),rh={panStep:100,bearingStep:15,pitchStep:10},Ds=function(){var l=rh;this._panStep=l.panStep,this._bearingStep=l.bearingStep,this._pitchStep=l.pitchStep,this._rotationDisabled=!1};function us(l){return l*(2-l)}Ds.prototype.blur=function(){this.reset()},Ds.prototype.reset=function(){this._active=!1},Ds.prototype.keydown=function(l){var u=this;if(!(l.altKey||l.ctrlKey||l.metaKey)){var c=0,d=0,y=0,T=0,S=0;switch(l.keyCode){case 61:case 107:case 171:case 187:c=1;break;case 189:case 109:case 173:c=-1;break;case 37:l.shiftKey?d=-1:(l.preventDefault(),T=-1);break;case 39:l.shiftKey?d=1:(l.preventDefault(),T=1);break;case 38:l.shiftKey?y=1:(l.preventDefault(),S=-1);break;case 40:l.shiftKey?y=-1:(l.preventDefault(),S=1);break;default:return}return this._rotationDisabled&&(d=0,y=0),{cameraAnimation:function(M){var D=M.getZoom();M.easeTo({duration:300,easeId:"keyboardHandler",easing:us,zoom:c?Math.round(D)+c*(l.shiftKey?2:1):D,bearing:M.getBearing()+d*u._bearingStep,pitch:M.getPitch()+y*u._pitchStep,offset:[-T*u._panStep,-S*u._panStep],center:M.getCenter()},{originalEvent:l})}}}},Ds.prototype.enable=function(){this._enabled=!0},Ds.prototype.disable=function(){this._enabled=!1,this.reset()},Ds.prototype.isEnabled=function(){return this._enabled},Ds.prototype.isActive=function(){return this._active},Ds.prototype.disableRotation=function(){this._rotationDisabled=!0},Ds.prototype.enableRotation=function(){this._rotationDisabled=!1};var Jt=function(l,u){this._map=l,this._el=l.getCanvasContainer(),this._handler=u,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,s.bindAll(["_onTimeout"],this)};Jt.prototype.setZoomRate=function(l){this._defaultZoomRate=l},Jt.prototype.setWheelZoomRate=function(l){this._wheelZoomRate=l},Jt.prototype.isEnabled=function(){return!!this._enabled},Jt.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Jt.prototype.isZooming=function(){return!!this._zooming},Jt.prototype.enable=function(l){this.isEnabled()||(this._enabled=!0,this._aroundCenter=l&&l.around==="center")},Jt.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Jt.prototype.wheel=function(l){if(this.isEnabled()){var u=l.deltaMode===s.window.WheelEvent.DOM_DELTA_LINE?40*l.deltaY:l.deltaY,c=s.browser.now(),d=c-(this._lastWheelEventTime||0);this._lastWheelEventTime=c,u!==0&&u%4.000244140625==0?this._type="wheel":u!==0&&Math.abs(u)<4?this._type="trackpad":d>400?(this._type=null,this._lastValue=u,this._timeout=setTimeout(this._onTimeout,40,l)):this._type||(this._type=Math.abs(d*u)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,u+=this._lastValue)),l.shiftKey&&u&&(u/=4),this._type&&(this._lastWheelEvent=l,this._delta-=u,this._active||this._start(l)),l.preventDefault()}},Jt.prototype._onTimeout=function(l){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(l)},Jt.prototype._start=function(l){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var u=A.mousePos(this._el,l);this._around=s.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(u)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Jt.prototype.renderFrame=function(){var l=this;if(this._frameId&&(this._frameId=null,this.isActive())){var u=this._map.transform;if(this._delta!==0){var c=this._type==="wheel"&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,d=2/(1+Math.exp(-Math.abs(this._delta*c)));this._delta<0&&d!==0&&(d=1/d);var y=typeof this._targetZoom=="number"?u.zoomScale(this._targetZoom):u.scale;this._targetZoom=Math.min(u.maxZoom,Math.max(u.minZoom,u.scaleZoom(y*d))),this._type==="wheel"&&(this._startZoom=u.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var T,S=typeof this._targetZoom=="number"?this._targetZoom:u.zoom,M=this._startZoom,D=this._easing,L=!1;if(this._type==="wheel"&&M&&D){var j=Math.min((s.browser.now()-this._lastWheelEventTime)/200,1),z=D(j);T=s.number(M,S,z),j<1?this._frameId||(this._frameId=!0):L=!0}else T=S,L=!0;return this._active=!0,L&&(this._active=!1,this._finishTimeout=setTimeout(function(){l._zooming=!1,l._handler._triggerRenderFrame(),delete l._targetZoom,delete l._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!L,zoomDelta:T-u.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Jt.prototype._smoothOutEasing=function(l){var u=s.ease;if(this._prevEase){var c=this._prevEase,d=(s.browser.now()-c.start)/c.duration,y=c.easing(d+.01)-c.easing(d),T=.27/Math.sqrt(y*y+1e-4)*.01,S=Math.sqrt(.0729-T*T);u=s.bezier(T,S,.25,1)}return this._prevEase={start:s.browser.now(),duration:l,easing:u},u},Jt.prototype.blur=function(){this.reset()},Jt.prototype.reset=function(){this._active=!1};var Ao=function(l,u){this._clickZoom=l,this._tapZoom=u};Ao.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Ao.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Ao.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Ao.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var Fs=function(){this.reset()};Fs.prototype.reset=function(){this._active=!1},Fs.prototype.blur=function(){this.reset()},Fs.prototype.dblclick=function(l,u){return l.preventDefault(),{cameraAnimation:function(c){c.easeTo({duration:300,zoom:c.getZoom()+(l.shiftKey?-1:1),around:c.unproject(u)},{originalEvent:l})}}},Fs.prototype.enable=function(){this._enabled=!0},Fs.prototype.disable=function(){this._enabled=!1,this.reset()},Fs.prototype.isEnabled=function(){return this._enabled},Fs.prototype.isActive=function(){return this._active};var Gi=function(){this._tap=new Qs({numTouches:1,numTaps:1}),this.reset()};Gi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},Gi.prototype.touchstart=function(l,u,c){this._swipePoint||(this._tapTime&&l.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?c.length>0&&(this._swipePoint=u[0],this._swipeTouch=c[0].identifier):this._tap.touchstart(l,u,c))},Gi.prototype.touchmove=function(l,u,c){if(this._tapTime){if(this._swipePoint){if(c[0].identifier!==this._swipeTouch)return;var d=u[0],y=d.y-this._swipePoint.y;return this._swipePoint=d,l.preventDefault(),this._active=!0,{zoomDelta:y/128}}}else this._tap.touchmove(l,u,c)},Gi.prototype.touchend=function(l,u,c){this._tapTime?this._swipePoint&&c.length===0&&this.reset():this._tap.touchend(l,u,c)&&(this._tapTime=l.timeStamp)},Gi.prototype.touchcancel=function(){this.reset()},Gi.prototype.enable=function(){this._enabled=!0},Gi.prototype.disable=function(){this._enabled=!1,this.reset()},Gi.prototype.isEnabled=function(){return this._enabled},Gi.prototype.isActive=function(){return this._active};var vn=function(l,u,c){this._el=l,this._mousePan=u,this._touchPan=c};vn.prototype.enable=function(l){this._inertiaOptions=l||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},vn.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},vn.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},vn.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var _a=function(l,u,c){this._pitchWithRotate=l.pitchWithRotate,this._mouseRotate=u,this._mousePitch=c};_a.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},_a.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},_a.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},_a.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var eo=function(l,u,c,d){this._el=l,this._touchZoom=u,this._touchRotate=c,this._tapDragZoom=d,this._rotationDisabled=!1,this._enabled=!0};eo.prototype.enable=function(l){this._touchZoom.enable(l),this._rotationDisabled||this._touchRotate.enable(l),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},eo.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},eo.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},eo.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},eo.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},eo.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Nn=function(l){return l.zoom||l.drag||l.pitch||l.rotate},vl=function(l){function u(){l.apply(this,arguments)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u}(s.Event);function jt(l){return l.panDelta&&l.panDelta.mag()||l.zoomDelta||l.bearingDelta||l.pitchDelta}var Lt=function(l,u){this._map=l,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ic(l),this._bearingSnap=u.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(u),s.bindAll(["handleEvent","handleWindowEvent"],this);var c=this._el;this._listeners=[[c,"touchstart",{passive:!0}],[c,"touchmove",{passive:!1}],[c,"touchend",void 0],[c,"touchcancel",void 0],[c,"mousedown",void 0],[c,"mousemove",void 0],[c,"mouseup",void 0],[s.window.document,"mousemove",{capture:!0}],[s.window.document,"mouseup",void 0],[c,"mouseover",void 0],[c,"mouseout",void 0],[c,"dblclick",void 0],[c,"click",void 0],[c,"keydown",{capture:!1}],[c,"keyup",void 0],[c,"wheel",{passive:!1}],[c,"contextmenu",void 0],[s.window,"blur",void 0]];for(var d=0,y=this._listeners;d<y.length;d+=1){var T=y[d],S=T[0];A.addEventListener(S,T[1],S===s.window.document?this.handleWindowEvent:this.handleEvent,T[2])}};Lt.prototype.destroy=function(){for(var l=0,u=this._listeners;l<u.length;l+=1){var c=u[l],d=c[0];A.removeEventListener(d,c[1],d===s.window.document?this.handleWindowEvent:this.handleEvent,c[2])}},Lt.prototype._addDefaultHandlers=function(l){var u=this._map,c=u.getCanvasContainer();this._add("mapEvent",new Fi(u,l));var d=u.boxZoom=new Yn(u,l);this._add("boxZoom",d);var y=new as,T=new Fs;u.doubleClickZoom=new Ao(T,y),this._add("tapZoom",y),this._add("clickZoom",T);var S=new Gi;this._add("tapDragZoom",S);var M=u.touchPitch=new th;this._add("touchPitch",M);var D=new sc(l),L=new eh(l);u.dragRotate=new _a(l,D,L),this._add("mouseRotate",D,["mousePitch"]),this._add("mousePitch",L,["mouseRotate"]);var j=new tu(l),z=new Os(l);u.dragPan=new vn(c,j,z),this._add("mousePan",j),this._add("touchPan",z,["touchZoom","touchRotate"]);var W=new gf,te=new cs;u.touchZoomRotate=new eo(c,te,W,S),this._add("touchRotate",W,["touchPan","touchZoom"]),this._add("touchZoom",te,["touchPan","touchRotate"]);var Q=u.scrollZoom=new Jt(u,this);this._add("scrollZoom",Q,["mousePan"]);var ie=u.keyboard=new Ds;this._add("keyboard",ie),this._add("blockableMapEvent",new Ct(u));for(var K=0,J=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];K<J.length;K+=1){var _e=J[K];l.interactive&&l[_e]&&u[_e].enable(l[_e])}},Lt.prototype._add=function(l,u,c){this._handlers.push({handlerName:l,handler:u,allowed:c}),this._handlersById[l]=u},Lt.prototype.stop=function(l){if(!this._updatingCamera){for(var u=0,c=this._handlers;u<c.length;u+=1)c[u].handler.reset();this._inertia.clear(),this._fireEvents({},{},l),this._changes=[]}},Lt.prototype.isActive=function(){for(var l=0,u=this._handlers;l<u.length;l+=1)if(u[l].handler.isActive())return!0;return!1},Lt.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},Lt.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},Lt.prototype.isMoving=function(){return!!Nn(this._eventsInProgress)||this.isZooming()},Lt.prototype._blockedByActive=function(l,u,c){for(var d in l)if(d!==c&&(!u||u.indexOf(d)<0))return!0;return!1},Lt.prototype.handleWindowEvent=function(l){this.handleEvent(l,l.type+"Window")},Lt.prototype._getMapTouches=function(l){for(var u=[],c=0,d=l;c<d.length;c+=1){var y=d[c];this._el.contains(y.target)&&u.push(y)}return u},Lt.prototype.handleEvent=function(l,u){this._updatingCamera=!0;for(var c=l.type==="renderFrame"?void 0:l,d={needsRenderFrame:!1},y={},T={},S=l.touches?this._getMapTouches(l.touches):void 0,M=S?A.touchPos(this._el,S):A.mousePos(this._el,l),D=0,L=this._handlers;D<L.length;D+=1){var j=L[D],z=j.handlerName,W=j.handler,te=j.allowed;if(W.isEnabled()){var Q=void 0;this._blockedByActive(T,te,z)?W.reset():W[u||l.type]&&(Q=W[u||l.type](l,M,S),this.mergeHandlerResult(d,y,Q,z,c),Q&&Q.needsRenderFrame&&this._triggerRenderFrame()),(Q||W.isActive())&&(T[z]=W)}}var ie={};for(var K in this._previousActiveHandlers)T[K]||(ie[K]=c);this._previousActiveHandlers=T,(Object.keys(ie).length||jt(d))&&(this._changes.push([d,y,ie]),this._triggerRenderFrame()),(Object.keys(T).length||jt(d))&&this._map._stop(!0),this._updatingCamera=!1;var J=d.cameraAnimation;J&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],J(this._map))},Lt.prototype.mergeHandlerResult=function(l,u,c,d,y){if(c){s.extend(l,c);var T={handlerName:d,originalEvent:c.originalEvent||y};c.zoomDelta!==void 0&&(u.zoom=T),c.panDelta!==void 0&&(u.drag=T),c.pitchDelta!==void 0&&(u.pitch=T),c.bearingDelta!==void 0&&(u.rotate=T)}},Lt.prototype._applyChanges=function(){for(var l={},u={},c={},d=0,y=this._changes;d<y.length;d+=1){var T=y[d],S=T[0],M=T[1],D=T[2];S.panDelta&&(l.panDelta=(l.panDelta||new s.Point(0,0))._add(S.panDelta)),S.zoomDelta&&(l.zoomDelta=(l.zoomDelta||0)+S.zoomDelta),S.bearingDelta&&(l.bearingDelta=(l.bearingDelta||0)+S.bearingDelta),S.pitchDelta&&(l.pitchDelta=(l.pitchDelta||0)+S.pitchDelta),S.around!==void 0&&(l.around=S.around),S.pinchAround!==void 0&&(l.pinchAround=S.pinchAround),S.noInertia&&(l.noInertia=S.noInertia),s.extend(u,M),s.extend(c,D)}this._updateMapTransform(l,u,c),this._changes=[]},Lt.prototype._updateMapTransform=function(l,u,c){var d=this._map,y=d.transform;if(!jt(l))return this._fireEvents(u,c,!0);var T=l.panDelta,S=l.zoomDelta,M=l.bearingDelta,D=l.pitchDelta,L=l.around,j=l.pinchAround;j!==void 0&&(L=j),d._stop(!0),L=L||d.transform.centerPoint;var z=y.pointLocation(T?L.sub(T):L);M&&(y.bearing+=M),D&&(y.pitch+=D),S&&(y.zoom+=S),y.setLocationAtPoint(z,L),this._map._update(),l.noInertia||this._inertia.record(l),this._fireEvents(u,c,!0)},Lt.prototype._fireEvents=function(l,u,c){var d=this,y=Nn(this._eventsInProgress),T=Nn(l),S={};for(var M in l)this._eventsInProgress[M]||(S[M+"start"]=l[M].originalEvent),this._eventsInProgress[M]=l[M];for(var D in!y&&T&&this._fireEvent("movestart",T.originalEvent),S)this._fireEvent(D,S[D]);for(var L in T&&this._fireEvent("move",T.originalEvent),l)this._fireEvent(L,l[L].originalEvent);var j,z={};for(var W in this._eventsInProgress){var te=this._eventsInProgress[W],Q=te.handlerName,ie=te.originalEvent;this._handlersById[Q].isActive()||(delete this._eventsInProgress[W],z[W+"end"]=j=u[Q]||ie)}for(var K in z)this._fireEvent(K,z[K]);var J=Nn(this._eventsInProgress);if(c&&(y||T)&&!J){this._updatingCamera=!0;var _e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Se=function(Ie){return Ie!==0&&-d._bearingSnap<Ie&&Ie<d._bearingSnap};_e?(Se(_e.bearing||this._map.getBearing())&&(_e.bearing=0),this._map.easeTo(_e,{originalEvent:j})):(this._map.fire(new s.Event("moveend",{originalEvent:j})),Se(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},Lt.prototype._fireEvent=function(l,u){this._map.fire(new s.Event(l,u?{originalEvent:u}:{}))},Lt.prototype._requestFrame=function(){var l=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(u){delete l._frameId,l.handleEvent(new vl("renderFrame",{timeStamp:u})),l._applyChanges()})},Lt.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var ac=function(l){function u(c,d){l.call(this),this._moving=!1,this._zooming=!1,this.transform=c,this._bearingSnap=d.bearingSnap,s.bindAll(["_renderFrameCallback"],this)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype.getCenter=function(){return new s.LngLat(this.transform.center.lng,this.transform.center.lat)},u.prototype.setCenter=function(c,d){return this.jumpTo({center:c},d)},u.prototype.panBy=function(c,d,y){return c=s.Point.convert(c).mult(-1),this.panTo(this.transform.center,s.extend({offset:c},d),y)},u.prototype.panTo=function(c,d,y){return this.easeTo(s.extend({center:c},d),y)},u.prototype.getZoom=function(){return this.transform.zoom},u.prototype.setZoom=function(c,d){return this.jumpTo({zoom:c},d),this},u.prototype.zoomTo=function(c,d,y){return this.easeTo(s.extend({zoom:c},d),y)},u.prototype.zoomIn=function(c,d){return this.zoomTo(this.getZoom()+1,c,d),this},u.prototype.zoomOut=function(c,d){return this.zoomTo(this.getZoom()-1,c,d),this},u.prototype.getBearing=function(){return this.transform.bearing},u.prototype.setBearing=function(c,d){return this.jumpTo({bearing:c},d),this},u.prototype.getPadding=function(){return this.transform.padding},u.prototype.setPadding=function(c,d){return this.jumpTo({padding:c},d),this},u.prototype.rotateTo=function(c,d,y){return this.easeTo(s.extend({bearing:c},d),y)},u.prototype.resetNorth=function(c,d){return this.rotateTo(0,s.extend({duration:1e3},c),d),this},u.prototype.resetNorthPitch=function(c,d){return this.easeTo(s.extend({bearing:0,pitch:0,duration:1e3},c),d),this},u.prototype.snapToNorth=function(c,d){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(c,d):this},u.prototype.getPitch=function(){return this.transform.pitch},u.prototype.setPitch=function(c,d){return this.jumpTo({pitch:c},d),this},u.prototype.cameraForBounds=function(c,d){c=s.LngLatBounds.convert(c);var y=d&&d.bearing||0;return this._cameraForBoxAndBearing(c.getNorthWest(),c.getSouthEast(),y,d)},u.prototype._cameraForBoxAndBearing=function(c,d,y,T){var S={top:0,bottom:0,right:0,left:0};if(typeof(T=s.extend({padding:S,offset:[0,0],maxZoom:this.transform.maxZoom},T)).padding=="number"){var M=T.padding;T.padding={top:M,bottom:M,right:M,left:M}}T.padding=s.extend(S,T.padding);var D=this.transform,L=D.padding,j=D.project(s.LngLat.convert(c)),z=D.project(s.LngLat.convert(d)),W=j.rotate(-y*Math.PI/180),te=z.rotate(-y*Math.PI/180),Q=new s.Point(Math.max(W.x,te.x),Math.max(W.y,te.y)),ie=new s.Point(Math.min(W.x,te.x),Math.min(W.y,te.y)),K=Q.sub(ie),J=(D.width-(L.left+L.right+T.padding.left+T.padding.right))/K.x,_e=(D.height-(L.top+L.bottom+T.padding.top+T.padding.bottom))/K.y;if(!(_e<0||J<0)){var Se=Math.min(D.scaleZoom(D.scale*Math.min(J,_e)),T.maxZoom),Ie=typeof T.offset.x=="number"?new s.Point(T.offset.x,T.offset.y):s.Point.convert(T.offset),Me=new s.Point((T.padding.left-T.padding.right)/2,(T.padding.top-T.padding.bottom)/2).rotate(y*Math.PI/180),Ge=Ie.add(Me).mult(D.scale/D.zoomScale(Se));return{center:D.unproject(j.add(z).div(2).sub(Ge)),zoom:Se,bearing:y}}s.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},u.prototype.fitBounds=function(c,d,y){return this._fitInternal(this.cameraForBounds(c,d),d,y)},u.prototype.fitScreenCoordinates=function(c,d,y,T,S){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(s.Point.convert(c)),this.transform.pointLocation(s.Point.convert(d)),y,T),T,S)},u.prototype._fitInternal=function(c,d,y){return c?(delete(d=s.extend(c,d)).padding,d.linear?this.easeTo(d,y):this.flyTo(d,y)):this},u.prototype.jumpTo=function(c,d){this.stop();var y=this.transform,T=!1,S=!1,M=!1;return"zoom"in c&&y.zoom!==+c.zoom&&(T=!0,y.zoom=+c.zoom),c.center!==void 0&&(y.center=s.LngLat.convert(c.center)),"bearing"in c&&y.bearing!==+c.bearing&&(S=!0,y.bearing=+c.bearing),"pitch"in c&&y.pitch!==+c.pitch&&(M=!0,y.pitch=+c.pitch),c.padding==null||y.isPaddingEqual(c.padding)||(y.padding=c.padding),this.fire(new s.Event("movestart",d)).fire(new s.Event("move",d)),T&&this.fire(new s.Event("zoomstart",d)).fire(new s.Event("zoom",d)).fire(new s.Event("zoomend",d)),S&&this.fire(new s.Event("rotatestart",d)).fire(new s.Event("rotate",d)).fire(new s.Event("rotateend",d)),M&&this.fire(new s.Event("pitchstart",d)).fire(new s.Event("pitch",d)).fire(new s.Event("pitchend",d)),this.fire(new s.Event("moveend",d))},u.prototype.easeTo=function(c,d){var y=this;this._stop(!1,c.easeId),((c=s.extend({offset:[0,0],duration:500,easing:s.ease},c)).animate===!1||!c.essential&&s.browser.prefersReducedMotion)&&(c.duration=0);var T=this.transform,S=this.getZoom(),M=this.getBearing(),D=this.getPitch(),L=this.getPadding(),j="zoom"in c?+c.zoom:S,z="bearing"in c?this._normalizeBearing(c.bearing,M):M,W="pitch"in c?+c.pitch:D,te="padding"in c?c.padding:T.padding,Q=s.Point.convert(c.offset),ie=T.centerPoint.add(Q),K=T.pointLocation(ie),J=s.LngLat.convert(c.center||K);this._normalizeCenter(J);var _e,Se,Ie=T.project(K),Me=T.project(J).sub(Ie),Ge=T.zoomScale(j-S);c.around&&(_e=s.LngLat.convert(c.around),Se=T.locationPoint(_e));var Qe={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||j!==S,this._rotating=this._rotating||M!==z,this._pitching=this._pitching||W!==D,this._padding=!T.isPaddingEqual(te),this._easeId=c.easeId,this._prepareEase(d,c.noMoveStart,Qe),this._ease(function(st){if(y._zooming&&(T.zoom=s.number(S,j,st)),y._rotating&&(T.bearing=s.number(M,z,st)),y._pitching&&(T.pitch=s.number(D,W,st)),y._padding&&(T.interpolatePadding(L,te,st),ie=T.centerPoint.add(Q)),_e)T.setLocationAtPoint(_e,Se);else{var rt=T.zoomScale(T.zoom-S),lt=j>S?Math.min(2,Ge):Math.max(.5,Ge),At=Math.pow(lt,1-st),Tt=T.unproject(Ie.add(Me.mult(st*At)).mult(rt));T.setLocationAtPoint(T.renderWorldCopies?Tt.wrap():Tt,ie)}y._fireMoveEvents(d)},function(st){y._afterEase(d,st)},c),this},u.prototype._prepareEase=function(c,d,y){y===void 0&&(y={}),this._moving=!0,d||y.moving||this.fire(new s.Event("movestart",c)),this._zooming&&!y.zooming&&this.fire(new s.Event("zoomstart",c)),this._rotating&&!y.rotating&&this.fire(new s.Event("rotatestart",c)),this._pitching&&!y.pitching&&this.fire(new s.Event("pitchstart",c))},u.prototype._fireMoveEvents=function(c){this.fire(new s.Event("move",c)),this._zooming&&this.fire(new s.Event("zoom",c)),this._rotating&&this.fire(new s.Event("rotate",c)),this._pitching&&this.fire(new s.Event("pitch",c))},u.prototype._afterEase=function(c,d){if(!this._easeId||!d||this._easeId!==d){delete this._easeId;var y=this._zooming,T=this._rotating,S=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,y&&this.fire(new s.Event("zoomend",c)),T&&this.fire(new s.Event("rotateend",c)),S&&this.fire(new s.Event("pitchend",c)),this.fire(new s.Event("moveend",c))}},u.prototype.flyTo=function(c,d){var y=this;if(!c.essential&&s.browser.prefersReducedMotion){var T=s.pick(c,["center","zoom","bearing","pitch","around"]);return this.jumpTo(T,d)}this.stop(),c=s.extend({offset:[0,0],speed:1.2,curve:1.42,easing:s.ease},c);var S=this.transform,M=this.getZoom(),D=this.getBearing(),L=this.getPitch(),j=this.getPadding(),z="zoom"in c?s.clamp(+c.zoom,S.minZoom,S.maxZoom):M,W="bearing"in c?this._normalizeBearing(c.bearing,D):D,te="pitch"in c?+c.pitch:L,Q="padding"in c?c.padding:S.padding,ie=S.zoomScale(z-M),K=s.Point.convert(c.offset),J=S.centerPoint.add(K),_e=S.pointLocation(J),Se=s.LngLat.convert(c.center||_e);this._normalizeCenter(Se);var Ie=S.project(_e),Me=S.project(Se).sub(Ie),Ge=c.curve,Qe=Math.max(S.width,S.height),st=Qe/ie,rt=Me.mag();if("minZoom"in c){var lt=s.clamp(Math.min(c.minZoom,M,z),S.minZoom,S.maxZoom),At=Qe/S.zoomScale(lt-M);Ge=Math.sqrt(At/rt*2)}var Tt=Ge*Ge;function ft(ar){var nr=(st*st-Qe*Qe+(ar?-1:1)*Tt*Tt*rt*rt)/(2*(ar?st:Qe)*Tt*rt);return Math.log(Math.sqrt(nr*nr+1)-nr)}function Zt(ar){return(Math.exp(ar)-Math.exp(-ar))/2}function xt(ar){return(Math.exp(ar)+Math.exp(-ar))/2}var or=ft(0),Tr=function(ar){return xt(or)/xt(or+Ge*ar)},hr=function(ar){return Qe*((xt(or)*(Zt(nr=or+Ge*ar)/xt(nr))-Zt(or))/Tt)/rt;var nr},cr=(ft(1)-or)/Ge;if(Math.abs(rt)<1e-6||!isFinite(cr)){if(Math.abs(Qe-st)<1e-6)return this.easeTo(c,d);var wr=st<Qe?-1:1;cr=Math.abs(Math.log(st/Qe))/Ge,hr=function(){return 0},Tr=function(ar){return Math.exp(wr*Ge*ar)}}return c.duration="duration"in c?+c.duration:1e3*cr/("screenSpeed"in c?+c.screenSpeed/Ge:+c.speed),c.maxDuration&&c.duration>c.maxDuration&&(c.duration=0),this._zooming=!0,this._rotating=D!==W,this._pitching=te!==L,this._padding=!S.isPaddingEqual(Q),this._prepareEase(d,!1),this._ease(function(ar){var nr=ar*cr,wn=1/Tr(nr);S.zoom=ar===1?z:M+S.scaleZoom(wn),y._rotating&&(S.bearing=s.number(D,W,ar)),y._pitching&&(S.pitch=s.number(L,te,ar)),y._padding&&(S.interpolatePadding(j,Q,ar),J=S.centerPoint.add(K));var Wi=ar===1?Se:S.unproject(Ie.add(Me.mult(hr(nr))).mult(wn));S.setLocationAtPoint(S.renderWorldCopies?Wi.wrap():Wi,J),y._fireMoveEvents(d)},function(){return y._afterEase(d)},c),this},u.prototype.isEasing=function(){return!!this._easeFrameId},u.prototype.stop=function(){return this._stop()},u.prototype._stop=function(c,d){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var y=this._onEaseEnd;delete this._onEaseEnd,y.call(this,d)}if(!c){var T=this.handlers;T&&T.stop(!1)}return this},u.prototype._ease=function(c,d,y){y.animate===!1||y.duration===0?(c(1),d()):(this._easeStart=s.browser.now(),this._easeOptions=y,this._onEaseFrame=c,this._onEaseEnd=d,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},u.prototype._renderFrameCallback=function(){var c=Math.min((s.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(c)),c<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},u.prototype._normalizeBearing=function(c,d){c=s.wrap(c,-180,180);var y=Math.abs(c-d);return Math.abs(c-360-d)<y&&(c-=360),Math.abs(c+360-d)<y&&(c+=360),c},u.prototype._normalizeCenter=function(c){var d=this.transform;if(d.renderWorldCopies&&!d.lngRange){var y=c.lng-d.center.lng;c.lng+=y>180?-360:y<-180?360:0}},u}(s.Evented),Un=function(l){l===void 0&&(l={}),this.options=l,s.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Un.prototype.getDefaultPosition=function(){return"bottom-right"},Un.prototype.onAdd=function(l){var u=this.options&&this.options.compact;return this._map=l,this._container=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=A.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=A.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),u&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),u===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Un.prototype.onRemove=function(){A.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Un.prototype._setElementTitle=function(l,u){var c=this._map._getUIString("AttributionControl."+u);l.title=c,l.setAttribute("aria-label",c)},Un.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Un.prototype._updateEditLink=function(){var l=this._editLink;l||(l=this._editLink=this._container.querySelector(".mapbox-improve-map"));var u=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||s.config.ACCESS_TOKEN}];if(l){var c=u.reduce(function(d,y,T){return y.value&&(d+=y.key+"="+y.value+(T<u.length-1?"&":"")),d},"?");l.href=s.config.FEEDBACK_URL+"/"+c+(this._map._hash?this._map._hash.getHashString(!0):""),l.rel="noopener nofollow",this._setElementTitle(l,"MapFeedback")}},Un.prototype._updateData=function(l){!l||l.sourceDataType!=="metadata"&&l.sourceDataType!=="visibility"&&l.dataType!=="style"||(this._updateAttributions(),this._updateEditLink())},Un.prototype._updateAttributions=function(){if(this._map.style){var l=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?l=l.concat(this.options.customAttribution.map(function(M){return typeof M!="string"?"":M})):typeof this.options.customAttribution=="string"&&l.push(this.options.customAttribution)),this._map.style.stylesheet){var u=this._map.style.stylesheet;this.styleOwner=u.owner,this.styleId=u.id}var c=this._map.style.sourceCaches;for(var d in c){var y=c[d];if(y.used){var T=y.getSource();T.attribution&&l.indexOf(T.attribution)<0&&l.push(T.attribution)}}l.sort(function(M,D){return M.length-D.length});var S=(l=l.filter(function(M,D){for(var L=D+1;L<l.length;L++)if(l[L].indexOf(M)>=0)return!1;return!0})).join(" | ");S!==this._attribHTML&&(this._attribHTML=S,l.length?(this._innerContainer.innerHTML=S,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Un.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var to=function(){s.bindAll(["_updateLogo"],this),s.bindAll(["_updateCompact"],this)};to.prototype.onAdd=function(l){this._map=l,this._container=A.create("div","mapboxgl-ctrl");var u=A.create("a","mapboxgl-ctrl-logo");return u.target="_blank",u.rel="noopener nofollow",u.href="https://www.mapbox.com/",u.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),u.setAttribute("rel","noopener nofollow"),this._container.appendChild(u),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},to.prototype.onRemove=function(){A.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},to.prototype.getDefaultPosition=function(){return"bottom-left"},to.prototype._updateLogo=function(l){l&&l.sourceDataType!=="metadata"||(this._container.style.display=this._logoRequired()?"block":"none")},to.prototype._logoRequired=function(){if(this._map.style){var l=this._map.style.sourceCaches;for(var u in l)if(l[u].getSource().mapbox_logo)return!0;return!1}},to.prototype._updateCompact=function(){var l=this._container.children;if(l.length){var u=l[0];this._map.getCanvasContainer().offsetWidth<250?u.classList.add("mapboxgl-compact"):u.classList.remove("mapboxgl-compact")}};var bn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};bn.prototype.add=function(l){var u=++this._id;return this._queue.push({callback:l,id:u,cancelled:!1}),u},bn.prototype.remove=function(l){for(var u=this._currentlyRunning,c=0,d=u?this._queue.concat(u):this._queue;c<d.length;c+=1){var y=d[c];if(y.id===l)return void(y.cancelled=!0)}},bn.prototype.run=function(l){l===void 0&&(l=0);var u=this._currentlyRunning=this._queue;this._queue=[];for(var c=0,d=u;c<d.length;c+=1){var y=d[c];if(!y.cancelled&&(y.callback(l),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},bn.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var po={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},ih=s.window.HTMLImageElement,ro=s.window.HTMLElement,Rr=s.window.ImageBitmap,$t={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},io=function(l){function u(d){var y=this;if((d=s.extend({},$t,d)).minZoom!=null&&d.maxZoom!=null&&d.minZoom>d.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(d.minPitch!=null&&d.maxPitch!=null&&d.minPitch>d.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(d.minPitch!=null&&d.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(d.maxPitch!=null&&d.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var T=new kr(d.minZoom,d.maxZoom,d.minPitch,d.maxPitch,d.renderWorldCopies);if(l.call(this,T,d),this._interactive=d.interactive,this._maxTileCacheSize=d.maxTileCacheSize,this._failIfMajorPerformanceCaveat=d.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=d.preserveDrawingBuffer,this._antialias=d.antialias,this._trackResize=d.trackResize,this._bearingSnap=d.bearingSnap,this._refreshExpiredTiles=d.refreshExpiredTiles,this._fadeDuration=d.fadeDuration,this._crossSourceCollisions=d.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=d.collectResourceTiming,this._renderTaskQueue=new bn,this._controls=[],this._mapId=s.uniqueId(),this._locale=s.extend({},po,d.locale),this._clickTolerance=d.clickTolerance,this._requestManager=new s.RequestManager(d.transformRequest,d.accessToken),typeof d.container=="string"){if(this._container=s.window.document.getElementById(d.container),!this._container)throw new Error("Container '"+d.container+"' not found.")}else{if(!(d.container instanceof ro))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=d.container}if(d.maxBounds&&this.setMaxBounds(d.maxBounds),s.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return y._update(!1)}),this.on("moveend",function(){return y._update(!1)}),this.on("zoom",function(){return y._update(!0)}),s.window!==void 0&&(s.window.addEventListener("online",this._onWindowOnline,!1),s.window.addEventListener("resize",this._onWindowResize,!1),s.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new Lt(this,d),this._hash=d.hash&&new Kn(typeof d.hash=="string"&&d.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:d.center,zoom:d.zoom,bearing:d.bearing,pitch:d.pitch}),d.bounds&&(this.resize(),this.fitBounds(d.bounds,s.extend({},d.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=d.localIdeographFontFamily,d.style&&this.setStyle(d.style,{localIdeographFontFamily:d.localIdeographFontFamily}),d.attributionControl&&this.addControl(new Un({customAttribution:d.customAttribution})),this.addControl(new to,d.logoPosition),this.on("style.load",function(){y.transform.unmodified&&y.jumpTo(y.style.stylesheet)}),this.on("data",function(S){y._update(S.dataType==="style"),y.fire(new s.Event(S.dataType+"data",S))}),this.on("dataloading",function(S){y.fire(new s.Event(S.dataType+"dataloading",S))})}l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u;var c={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return u.prototype._getMapId=function(){return this._mapId},u.prototype.addControl=function(d,y){if(y===void 0&&(y=d.getDefaultPosition?d.getDefaultPosition():"top-right"),!d||!d.onAdd)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var T=d.onAdd(this);this._controls.push(d);var S=this._controlPositions[y];return y.indexOf("bottom")!==-1?S.insertBefore(T,S.firstChild):S.appendChild(T),this},u.prototype.removeControl=function(d){if(!d||!d.onRemove)return this.fire(new s.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var y=this._controls.indexOf(d);return y>-1&&this._controls.splice(y,1),d.onRemove(this),this},u.prototype.hasControl=function(d){return this._controls.indexOf(d)>-1},u.prototype.resize=function(d){var y=this._containerDimensions(),T=y[0],S=y[1];if(T===this.transform.width&&S===this.transform.height)return this;this._resizeCanvas(T,S),this.transform.resize(T,S),this.painter.resize(T,S);var M=!this._moving;return M&&this.fire(new s.Event("movestart",d)).fire(new s.Event("move",d)),this.fire(new s.Event("resize",d)),M&&this.fire(new s.Event("moveend",d)),this},u.prototype.getBounds=function(){return this.transform.getBounds()},u.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},u.prototype.setMaxBounds=function(d){return this.transform.setMaxBounds(s.LngLatBounds.convert(d)),this._update()},u.prototype.setMinZoom=function(d){if((d=d??-2)>=-2&&d<=this.transform.maxZoom)return this.transform.minZoom=d,this._update(),this.getZoom()<d&&this.setZoom(d),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},u.prototype.getMinZoom=function(){return this.transform.minZoom},u.prototype.setMaxZoom=function(d){if((d=d??22)>=this.transform.minZoom)return this.transform.maxZoom=d,this._update(),this.getZoom()>d&&this.setZoom(d),this;throw new Error("maxZoom must be greater than the current minZoom")},u.prototype.getMaxZoom=function(){return this.transform.maxZoom},u.prototype.setMinPitch=function(d){if((d=d??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(d>=0&&d<=this.transform.maxPitch)return this.transform.minPitch=d,this._update(),this.getPitch()<d&&this.setPitch(d),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},u.prototype.getMinPitch=function(){return this.transform.minPitch},u.prototype.setMaxPitch=function(d){if((d=d??60)>60)throw new Error("maxPitch must be less than or equal to 60");if(d>=this.transform.minPitch)return this.transform.maxPitch=d,this._update(),this.getPitch()>d&&this.setPitch(d),this;throw new Error("maxPitch must be greater than the current minPitch")},u.prototype.getMaxPitch=function(){return this.transform.maxPitch},u.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},u.prototype.setRenderWorldCopies=function(d){return this.transform.renderWorldCopies=d,this._update()},u.prototype.project=function(d){return this.transform.locationPoint(s.LngLat.convert(d))},u.prototype.unproject=function(d){return this.transform.pointLocation(s.Point.convert(d))},u.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},u.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},u.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},u.prototype._createDelegatedListener=function(d,y,T){var S,M=this;if(d==="mouseenter"||d==="mouseover"){var D=!1;return{layer:y,listener:T,delegates:{mousemove:function(j){var z=M.getLayer(y)?M.queryRenderedFeatures(j.point,{layers:[y]}):[];z.length?D||(D=!0,T.call(M,new Ji(d,M,j.originalEvent,{features:z}))):D=!1},mouseout:function(){D=!1}}}}if(d==="mouseleave"||d==="mouseout"){var L=!1;return{layer:y,listener:T,delegates:{mousemove:function(j){(M.getLayer(y)?M.queryRenderedFeatures(j.point,{layers:[y]}):[]).length?L=!0:L&&(L=!1,T.call(M,new Ji(d,M,j.originalEvent)))},mouseout:function(j){L&&(L=!1,T.call(M,new Ji(d,M,j.originalEvent)))}}}}return{layer:y,listener:T,delegates:(S={},S[d]=function(j){var z=M.getLayer(y)?M.queryRenderedFeatures(j.point,{layers:[y]}):[];z.length&&(j.features=z,T.call(M,j),delete j.features)},S)}},u.prototype.on=function(d,y,T){if(T===void 0)return l.prototype.on.call(this,d,y);var S=this._createDelegatedListener(d,y,T);for(var M in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[d]=this._delegatedListeners[d]||[],this._delegatedListeners[d].push(S),S.delegates)this.on(M,S.delegates[M]);return this},u.prototype.once=function(d,y,T){if(T===void 0)return l.prototype.once.call(this,d,y);var S=this._createDelegatedListener(d,y,T);for(var M in S.delegates)this.once(M,S.delegates[M]);return this},u.prototype.off=function(d,y,T){var S=this;return T===void 0?l.prototype.off.call(this,d,y):(this._delegatedListeners&&this._delegatedListeners[d]&&function(M){for(var D=M[d],L=0;L<D.length;L++){var j=D[L];if(j.layer===y&&j.listener===T){for(var z in j.delegates)S.off(z,j.delegates[z]);return D.splice(L,1),S}}}(this._delegatedListeners),this)},u.prototype.queryRenderedFeatures=function(d,y){if(!this.style)return[];var T;if(y!==void 0||d===void 0||d instanceof s.Point||Array.isArray(d)||(y=d,d=void 0),y=y||{},(d=d||[[0,0],[this.transform.width,this.transform.height]])instanceof s.Point||typeof d[0]=="number")T=[s.Point.convert(d)];else{var S=s.Point.convert(d[0]),M=s.Point.convert(d[1]);T=[S,new s.Point(M.x,S.y),M,new s.Point(S.x,M.y),S]}return this.style.queryRenderedFeatures(T,y,this.transform)},u.prototype.querySourceFeatures=function(d,y){return this.style.querySourceFeatures(d,y)},u.prototype.setStyle=function(d,y){return(y=s.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&d?(this._diffStyle(d,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(d,y))},u.prototype._getUIString=function(d){var y=this._locale[d];if(y==null)throw new Error("Missing UI string '"+d+"'");return y},u.prototype._updateStyle=function(d,y){return this.style&&(this.style.setEventedParent(null),this.style._remove()),d?(this.style=new os(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof d=="string"?this.style.loadURL(d):this.style.loadJSON(d),this):(delete this.style,this)},u.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new os(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},u.prototype._diffStyle=function(d,y){var T=this;if(typeof d=="string"){var S=this._requestManager.normalizeStyleURL(d),M=this._requestManager.transformRequest(S,s.ResourceType.Style);s.getJSON(M,function(D,L){D?T.fire(new s.ErrorEvent(D)):L&&T._updateDiff(L,y)})}else typeof d=="object"&&this._updateDiff(d,y)},u.prototype._updateDiff=function(d,y){try{this.style.setState(d)&&this._update(!0)}catch(T){s.warnOnce("Unable to perform style diff: "+(T.message||T.error||T)+". Rebuilding the style from scratch."),this._updateStyle(d,y)}},u.prototype.getStyle=function(){if(this.style)return this.style.serialize()},u.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():s.warnOnce("There is no style added to the map.")},u.prototype.addSource=function(d,y){return this._lazyInitEmptyStyle(),this.style.addSource(d,y),this._update(!0)},u.prototype.isSourceLoaded=function(d){var y=this.style&&this.style.sourceCaches[d];if(y!==void 0)return y.loaded();this.fire(new s.ErrorEvent(new Error("There is no source with ID '"+d+"'")))},u.prototype.areTilesLoaded=function(){var d=this.style&&this.style.sourceCaches;for(var y in d){var T=d[y]._tiles;for(var S in T){var M=T[S];if(M.state!=="loaded"&&M.state!=="errored")return!1}}return!0},u.prototype.addSourceType=function(d,y,T){return this._lazyInitEmptyStyle(),this.style.addSourceType(d,y,T)},u.prototype.removeSource=function(d){return this.style.removeSource(d),this._update(!0)},u.prototype.getSource=function(d){return this.style.getSource(d)},u.prototype.addImage=function(d,y,T){T===void 0&&(T={});var S=T.pixelRatio;S===void 0&&(S=1);var M=T.sdf;M===void 0&&(M=!1);var D=T.stretchX,L=T.stretchY,j=T.content;if(this._lazyInitEmptyStyle(),y instanceof ih||Rr&&y instanceof Rr){var z=s.browser.getImageData(y);this.style.addImage(d,{data:new s.RGBAImage({width:z.width,height:z.height},z.data),pixelRatio:S,stretchX:D,stretchY:L,content:j,sdf:M,version:0})}else{if(y.width===void 0||y.height===void 0)return this.fire(new s.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var W=y;this.style.addImage(d,{data:new s.RGBAImage({width:y.width,height:y.height},new Uint8Array(y.data)),pixelRatio:S,stretchX:D,stretchY:L,content:j,sdf:M,version:0,userImage:W}),W.onAdd&&W.onAdd(this,d)}},u.prototype.updateImage=function(d,y){var T=this.style.getImage(d);if(!T)return this.fire(new s.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var S=y instanceof ih||Rr&&y instanceof Rr?s.browser.getImageData(y):y,M=S.width,D=S.height,L=S.data;return M===void 0||D===void 0?this.fire(new s.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):M!==T.data.width||D!==T.data.height?this.fire(new s.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(T.data.replace(L,!(y instanceof ih||Rr&&y instanceof Rr)),void this.style.updateImage(d,T))},u.prototype.hasImage=function(d){return d?!!this.style.getImage(d):(this.fire(new s.ErrorEvent(new Error("Missing required image id"))),!1)},u.prototype.removeImage=function(d){this.style.removeImage(d)},u.prototype.loadImage=function(d,y){s.getImage(this._requestManager.transformRequest(d,s.ResourceType.Image),y)},u.prototype.listImages=function(){return this.style.listImages()},u.prototype.addLayer=function(d,y){return this._lazyInitEmptyStyle(),this.style.addLayer(d,y),this._update(!0)},u.prototype.moveLayer=function(d,y){return this.style.moveLayer(d,y),this._update(!0)},u.prototype.removeLayer=function(d){return this.style.removeLayer(d),this._update(!0)},u.prototype.getLayer=function(d){return this.style.getLayer(d)},u.prototype.setLayerZoomRange=function(d,y,T){return this.style.setLayerZoomRange(d,y,T),this._update(!0)},u.prototype.setFilter=function(d,y,T){return T===void 0&&(T={}),this.style.setFilter(d,y,T),this._update(!0)},u.prototype.getFilter=function(d){return this.style.getFilter(d)},u.prototype.setPaintProperty=function(d,y,T,S){return S===void 0&&(S={}),this.style.setPaintProperty(d,y,T,S),this._update(!0)},u.prototype.getPaintProperty=function(d,y){return this.style.getPaintProperty(d,y)},u.prototype.setLayoutProperty=function(d,y,T,S){return S===void 0&&(S={}),this.style.setLayoutProperty(d,y,T,S),this._update(!0)},u.prototype.getLayoutProperty=function(d,y){return this.style.getLayoutProperty(d,y)},u.prototype.setLight=function(d,y){return y===void 0&&(y={}),this._lazyInitEmptyStyle(),this.style.setLight(d,y),this._update(!0)},u.prototype.getLight=function(){return this.style.getLight()},u.prototype.setFeatureState=function(d,y){return this.style.setFeatureState(d,y),this._update()},u.prototype.removeFeatureState=function(d,y){return this.style.removeFeatureState(d,y),this._update()},u.prototype.getFeatureState=function(d){return this.style.getFeatureState(d)},u.prototype.getContainer=function(){return this._container},u.prototype.getCanvasContainer=function(){return this._canvasContainer},u.prototype.getCanvas=function(){return this._canvas},u.prototype._containerDimensions=function(){var d=0,y=0;return this._container&&(d=this._container.clientWidth||400,y=this._container.clientHeight||300),[d,y]},u.prototype._detectMissingCSS=function(){s.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&s.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},u.prototype._setupContainer=function(){var d=this._container;d.classList.add("mapboxgl-map"),(this._missingCSSCanary=A.create("div","mapboxgl-canary",d)).style.visibility="hidden",this._detectMissingCSS();var y=this._canvasContainer=A.create("div","mapboxgl-canvas-container",d);this._interactive&&y.classList.add("mapboxgl-interactive"),this._canvas=A.create("canvas","mapboxgl-canvas",y),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var T=this._containerDimensions();this._resizeCanvas(T[0],T[1]);var S=this._controlContainer=A.create("div","mapboxgl-control-container",d),M=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(D){M[D]=A.create("div","mapboxgl-ctrl-"+D,S)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},u.prototype._resizeCanvas=function(d,y){var T=s.browser.devicePixelRatio||1;this._canvas.width=T*d,this._canvas.height=T*y,this._canvas.style.width=d+"px",this._canvas.style.height=y+"px"},u.prototype._setupPainter=function(){var d=s.extend({},f.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),y=this._canvas.getContext("webgl",d)||this._canvas.getContext("experimental-webgl",d);y?(this.painter=new Ai(y,this.transform),s.webpSupported.testSupport(y)):this.fire(new s.ErrorEvent(new Error("Failed to initialize WebGL")))},u.prototype._contextLost=function(d){d.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new s.Event("webglcontextlost",{originalEvent:d}))},u.prototype._contextRestored=function(d){this._setupPainter(),this.resize(),this._update(),this.fire(new s.Event("webglcontextrestored",{originalEvent:d}))},u.prototype._onMapScroll=function(d){if(d.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},u.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},u.prototype._update=function(d){return this.style?(this._styleDirty=this._styleDirty||d,this._sourcesDirty=!0,this.triggerRepaint(),this):this},u.prototype._requestRenderFrame=function(d){return this._update(),this._renderTaskQueue.add(d)},u.prototype._cancelRenderFrame=function(d){this._renderTaskQueue.remove(d)},u.prototype._render=function(d){var y,T=this,S=0,M=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(y=M.createQueryEXT(),M.beginQueryEXT(M.TIME_ELAPSED_EXT,y),S=s.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(d),!this._removed){var D=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var L=this.transform.zoom,j=s.browser.now();this.style.zoomHistory.update(L,j);var z=new s.EvaluationParameters(L,{now:j,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),W=z.crossFadingFactor();W===1&&W===this._crossFadingFactor||(D=!0,this._crossFadingFactor=W),this.style.update(z)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new s.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new s.Event("load"))),this.style&&(this.style.hasTransitions()||D)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var te=s.browser.now()-S;M.endQueryEXT(M.TIME_ELAPSED_EXT,y),setTimeout(function(){var K=M.getQueryObjectEXT(y,M.QUERY_RESULT_EXT)/1e6;M.deleteQueryEXT(y),T.fire(new s.Event("gpu-timing-frame",{cpuTime:te,gpuTime:K}))},50)}if(this.listens("gpu-timing-layer")){var Q=this.painter.collectGpuTimers();setTimeout(function(){var K=T.painter.queryGpuTimers(Q);T.fire(new s.Event("gpu-timing-layer",{layerTimes:K}))},50)}var ie=this._sourcesDirty||this._styleDirty||this._placementDirty;return ie||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new s.Event("idle")),!this._loaded||this._fullyLoaded||ie||(this._fullyLoaded=!0),this}},u.prototype.remove=function(){this._hash&&this._hash.remove();for(var d=0,y=this._controls;d<y.length;d+=1)y[d].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),s.window!==void 0&&(s.window.removeEventListener("resize",this._onWindowResize,!1),s.window.removeEventListener("orientationchange",this._onWindowResize,!1),s.window.removeEventListener("online",this._onWindowOnline,!1));var T=this.painter.context.gl.getExtension("WEBGL_lose_context");T&&T.loseContext(),Cr(this._canvasContainer),Cr(this._controlContainer),Cr(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new s.Event("remove"))},u.prototype.triggerRepaint=function(){var d=this;this.style&&!this._frame&&(this._frame=s.browser.frame(function(y){d._frame=null,d._render(y)}))},u.prototype._onWindowOnline=function(){this._update()},u.prototype._onWindowResize=function(d){this._trackResize&&this.resize({originalEvent:d})._update()},c.showTileBoundaries.get=function(){return!!this._showTileBoundaries},c.showTileBoundaries.set=function(d){this._showTileBoundaries!==d&&(this._showTileBoundaries=d,this._update())},c.showPadding.get=function(){return!!this._showPadding},c.showPadding.set=function(d){this._showPadding!==d&&(this._showPadding=d,this._update())},c.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},c.showCollisionBoxes.set=function(d){this._showCollisionBoxes!==d&&(this._showCollisionBoxes=d,d?this.style._generateCollisionBoxes():this._update())},c.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},c.showOverdrawInspector.set=function(d){this._showOverdrawInspector!==d&&(this._showOverdrawInspector=d,this._update())},c.repaint.get=function(){return!!this._repaint},c.repaint.set=function(d){this._repaint!==d&&(this._repaint=d,this.triggerRepaint())},c.vertices.get=function(){return!!this._vertices},c.vertices.set=function(d){this._vertices=d,this._update()},u.prototype._setCacheLimits=function(d,y){s.setCacheLimits(d,y)},c.version.get=function(){return s.version},Object.defineProperties(u.prototype,c),u}(ac);function Cr(l){l.parentNode&&l.parentNode.removeChild(l)}var xn={showCompass:!0,showZoom:!0,visualizePitch:!1},go=function(l){var u=this;this.options=s.extend({},xn,l),this._container=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(c){return c.preventDefault()}),this.options.showZoom&&(s.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(c){return u._map.zoomIn({},{originalEvent:c})}),A.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(c){return u._map.zoomOut({},{originalEvent:c})}),A.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(s.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(c){u.options.visualizePitch?u._map.resetNorthPitch({},{originalEvent:c}):u._map.resetNorth({},{originalEvent:c})}),this._compassIcon=A.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};go.prototype._updateZoomButtons=function(){var l=this._map.getZoom(),u=l===this._map.getMaxZoom(),c=l===this._map.getMinZoom();this._zoomInButton.disabled=u,this._zoomOutButton.disabled=c,this._zoomInButton.setAttribute("aria-disabled",u.toString()),this._zoomOutButton.setAttribute("aria-disabled",c.toString())},go.prototype._rotateCompassArrow=function(){var l=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=l},go.prototype.onAdd=function(l){return this._map=l,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new zn(this._map,this._compass,this.options.visualizePitch)),this._container},go.prototype.onRemove=function(){A.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},go.prototype._createButton=function(l,u){var c=A.create("button",l,this._container);return c.type="button",c.addEventListener("click",u),c},go.prototype._setButtonTitle=function(l,u){var c=this._map._getUIString("NavigationControl."+u);l.title=c,l.setAttribute("aria-label",c)};var zn=function(l,u,c){c===void 0&&(c=!1),this._clickTolerance=10,this.element=u,this.mouseRotate=new sc({clickTolerance:l.dragRotate._mouseRotate._clickTolerance}),this.map=l,c&&(this.mousePitch=new eh({clickTolerance:l.dragRotate._mousePitch._clickTolerance})),s.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),A.addEventListener(u,"mousedown",this.mousedown),A.addEventListener(u,"touchstart",this.touchstart,{passive:!1}),A.addEventListener(u,"touchmove",this.touchmove),A.addEventListener(u,"touchend",this.touchend),A.addEventListener(u,"touchcancel",this.reset)};function Ls(l,u,c){if(l=new s.LngLat(l.lng,l.lat),u){var d=new s.LngLat(l.lng-360,l.lat),y=new s.LngLat(l.lng+360,l.lat),T=c.locationPoint(l).distSqr(u);c.locationPoint(d).distSqr(u)<T?l=d:c.locationPoint(y).distSqr(u)<T&&(l=y)}for(;Math.abs(l.lng-c.center.lng)>180;){var S=c.locationPoint(l);if(S.x>=0&&S.y>=0&&S.x<=c.width&&S.y<=c.height)break;l.lng>c.center.lng?l.lng-=360:l.lng+=360}return l}zn.prototype.down=function(l,u){this.mouseRotate.mousedown(l,u),this.mousePitch&&this.mousePitch.mousedown(l,u),A.disableDrag()},zn.prototype.move=function(l,u){var c=this.map,d=this.mouseRotate.mousemoveWindow(l,u);if(d&&d.bearingDelta&&c.setBearing(c.getBearing()+d.bearingDelta),this.mousePitch){var y=this.mousePitch.mousemoveWindow(l,u);y&&y.pitchDelta&&c.setPitch(c.getPitch()+y.pitchDelta)}},zn.prototype.off=function(){var l=this.element;A.removeEventListener(l,"mousedown",this.mousedown),A.removeEventListener(l,"touchstart",this.touchstart,{passive:!1}),A.removeEventListener(l,"touchmove",this.touchmove),A.removeEventListener(l,"touchend",this.touchend),A.removeEventListener(l,"touchcancel",this.reset),this.offTemp()},zn.prototype.offTemp=function(){A.enableDrag(),A.removeEventListener(s.window,"mousemove",this.mousemove),A.removeEventListener(s.window,"mouseup",this.mouseup)},zn.prototype.mousedown=function(l){this.down(s.extend({},l,{ctrlKey:!0,preventDefault:function(){return l.preventDefault()}}),A.mousePos(this.element,l)),A.addEventListener(s.window,"mousemove",this.mousemove),A.addEventListener(s.window,"mouseup",this.mouseup)},zn.prototype.mousemove=function(l){this.move(l,A.mousePos(this.element,l))},zn.prototype.mouseup=function(l){this.mouseRotate.mouseupWindow(l),this.mousePitch&&this.mousePitch.mouseupWindow(l),this.offTemp()},zn.prototype.touchstart=function(l){l.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=A.touchPos(this.element,l.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return l.preventDefault()}},this._startPos))},zn.prototype.touchmove=function(l){l.targetTouches.length!==1?this.reset():(this._lastPos=A.touchPos(this.element,l.targetTouches)[0],this.move({preventDefault:function(){return l.preventDefault()}},this._lastPos))},zn.prototype.touchend=function(l){l.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},zn.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var mo={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function un(l,u,c){var d=l.classList;for(var y in mo)d.remove("mapboxgl-"+c+"-anchor-"+y);d.add("mapboxgl-"+c+"-anchor-"+u)}var Go,_o=function(l){function u(c,d){if(l.call(this),(c instanceof s.window.HTMLElement||d)&&(c=s.extend({element:c},d)),s.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=c&&c.anchor||"center",this._color=c&&c.color||"#3FB1CE",this._scale=c&&c.scale||1,this._draggable=c&&c.draggable||!1,this._clickTolerance=c&&c.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=c&&c.rotation||0,this._rotationAlignment=c&&c.rotationAlignment||"auto",this._pitchAlignment=c&&c.pitchAlignment&&c.pitchAlignment!=="auto"?c.pitchAlignment:this._rotationAlignment,c&&c.element)this._element=c.element,this._offset=s.Point.convert(c&&c.offset||[0,0]);else{this._defaultMarker=!0,this._element=A.create("div"),this._element.setAttribute("aria-label","Map marker");var y=A.createNS("http://www.w3.org/2000/svg","svg");y.setAttributeNS(null,"display","block"),y.setAttributeNS(null,"height","41px"),y.setAttributeNS(null,"width","27px"),y.setAttributeNS(null,"viewBox","0 0 27 41");var T=A.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"stroke","none"),T.setAttributeNS(null,"stroke-width","1"),T.setAttributeNS(null,"fill","none"),T.setAttributeNS(null,"fill-rule","evenodd");var S=A.createNS("http://www.w3.org/2000/svg","g");S.setAttributeNS(null,"fill-rule","nonzero");var M=A.createNS("http://www.w3.org/2000/svg","g");M.setAttributeNS(null,"transform","translate(3.0, 29.0)"),M.setAttributeNS(null,"fill","#000000");for(var D=0,L=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];D<L.length;D+=1){var j=L[D],z=A.createNS("http://www.w3.org/2000/svg","ellipse");z.setAttributeNS(null,"opacity","0.04"),z.setAttributeNS(null,"cx","10.5"),z.setAttributeNS(null,"cy","5.80029008"),z.setAttributeNS(null,"rx",j.rx),z.setAttributeNS(null,"ry",j.ry),M.appendChild(z)}var W=A.createNS("http://www.w3.org/2000/svg","g");W.setAttributeNS(null,"fill",this._color);var te=A.createNS("http://www.w3.org/2000/svg","path");te.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),W.appendChild(te);var Q=A.createNS("http://www.w3.org/2000/svg","g");Q.setAttributeNS(null,"opacity","0.25"),Q.setAttributeNS(null,"fill","#000000");var ie=A.createNS("http://www.w3.org/2000/svg","path");ie.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Q.appendChild(ie);var K=A.createNS("http://www.w3.org/2000/svg","g");K.setAttributeNS(null,"transform","translate(6.0, 7.0)"),K.setAttributeNS(null,"fill","#FFFFFF");var J=A.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"transform","translate(8.0, 8.0)");var _e=A.createNS("http://www.w3.org/2000/svg","circle");_e.setAttributeNS(null,"fill","#000000"),_e.setAttributeNS(null,"opacity","0.25"),_e.setAttributeNS(null,"cx","5.5"),_e.setAttributeNS(null,"cy","5.5"),_e.setAttributeNS(null,"r","5.4999962");var Se=A.createNS("http://www.w3.org/2000/svg","circle");Se.setAttributeNS(null,"fill","#FFFFFF"),Se.setAttributeNS(null,"cx","5.5"),Se.setAttributeNS(null,"cy","5.5"),Se.setAttributeNS(null,"r","5.4999962"),J.appendChild(_e),J.appendChild(Se),S.appendChild(M),S.appendChild(W),S.appendChild(Q),S.appendChild(K),S.appendChild(J),y.appendChild(S),y.setAttributeNS(null,"height",41*this._scale+"px"),y.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(y),this._offset=s.Point.convert(c&&c.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(Ie){Ie.preventDefault()}),this._element.addEventListener("mousedown",function(Ie){Ie.preventDefault()}),un(this._element,this._anchor,"marker"),this._popup=null}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype.addTo=function(c){return this.remove(),this._map=c,c.getCanvasContainer().appendChild(this._element),c.on("move",this._update),c.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},u.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),A.remove(this._element),this._popup&&this._popup.remove(),this},u.prototype.getLngLat=function(){return this._lngLat},u.prototype.setLngLat=function(c){return this._lngLat=s.LngLat.convert(c),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},u.prototype.getElement=function(){return this._element},u.prototype.setPopup=function(c){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),c){if(!("offset"in c.options)){var d=Math.sqrt(Math.pow(13.5,2)/2);c.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[d,-1*(24.6+d)],"bottom-right":[-d,-1*(24.6+d)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=c,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},u.prototype._onKeyPress=function(c){var d=c.code,y=c.charCode||c.keyCode;d!=="Space"&&d!=="Enter"&&y!==32&&y!==13||this.togglePopup()},u.prototype._onMapClick=function(c){var d=c.originalEvent.target,y=this._element;this._popup&&(d===y||y.contains(d))&&this.togglePopup()},u.prototype.getPopup=function(){return this._popup},u.prototype.togglePopup=function(){var c=this._popup;return c?(c.isOpen()?c.remove():c.addTo(this._map),this):this},u.prototype._update=function(c){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Ls(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var d="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?d="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(d="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var y="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?y="rotateX(0deg)":this._pitchAlignment==="map"&&(y="rotateX("+this._map.getPitch()+"deg)"),c&&c.type!=="moveend"||(this._pos=this._pos.round()),A.setTransform(this._element,mo[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+y+" "+d)}},u.prototype.getOffset=function(){return this._offset},u.prototype.setOffset=function(c){return this._offset=s.Point.convert(c),this._update(),this},u.prototype._onMove=function(c){if(!this._isDragging){var d=this._clickTolerance||this._map._clickTolerance;this._isDragging=c.point.dist(this._pointerdownPos)>=d}this._isDragging&&(this._pos=c.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new s.Event("dragstart"))),this.fire(new s.Event("drag")))},u.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new s.Event("dragend")),this._state="inactive"},u.prototype._addDragHandler=function(c){this._element.contains(c.originalEvent.target)&&(c.preventDefault(),this._positionDelta=c.point.sub(this._pos).add(this._offset),this._pointerdownPos=c.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},u.prototype.setDraggable=function(c){return this._draggable=!!c,this._map&&(c?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},u.prototype.isDraggable=function(){return this._draggable},u.prototype.setRotation=function(c){return this._rotation=c||0,this._update(),this},u.prototype.getRotation=function(){return this._rotation},u.prototype.setRotationAlignment=function(c){return this._rotationAlignment=c||"auto",this._update(),this},u.prototype.getRotationAlignment=function(){return this._rotationAlignment},u.prototype.setPitchAlignment=function(c){return this._pitchAlignment=c&&c!=="auto"?c:this._rotationAlignment,this._update(),this},u.prototype.getPitchAlignment=function(){return this._pitchAlignment},u}(s.Evented),nu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},_t=0,St=!1,su=function(l){function u(c){l.call(this),this.options=s.extend({},nu,c),s.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype.onAdd=function(c){var d;return this._map=c,this._container=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),d=this._setupUI,Go!==void 0?d(Go):s.window.navigator.permissions!==void 0?s.window.navigator.permissions.query({name:"geolocation"}).then(function(y){d(Go=y.state!=="denied")}):d(Go=!!s.window.navigator.geolocation),this._container},u.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(s.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),A.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,_t=0,St=!1},u.prototype._isOutOfMapMaxBounds=function(c){var d=this._map.getMaxBounds(),y=c.coords;return d&&(y.longitude<d.getWest()||y.longitude>d.getEast()||y.latitude<d.getSouth()||y.latitude>d.getNorth())},u.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},u.prototype._onSuccess=function(c){if(this._map){if(this._isOutOfMapMaxBounds(c))return this._setErrorState(),this.fire(new s.Event("outofmaxbounds",c)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=c,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(c),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(c),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("geolocate",c)),this._finish()}},u.prototype._updateCamera=function(c){var d=new s.LngLat(c.coords.longitude,c.coords.latitude),y=c.coords.accuracy,T=this._map.getBearing(),S=s.extend({bearing:T},this.options.fitBoundsOptions);this._map.fitBounds(d.toBounds(y),S,{geolocateSource:!0})},u.prototype._updateMarker=function(c){if(c){var d=new s.LngLat(c.coords.longitude,c.coords.latitude);this._accuracyCircleMarker.setLngLat(d).addTo(this._map),this._userLocationDotMarker.setLngLat(d).addTo(this._map),this._accuracy=c.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},u.prototype._updateCircleRadius=function(){var c=this._map._container.clientHeight/2,d=this._map.unproject([0,c]),y=this._map.unproject([1,c]),T=d.distanceTo(y),S=Math.ceil(2*this._accuracy/T);this._circleElement.style.width=S+"px",this._circleElement.style.height=S+"px"},u.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},u.prototype._onError=function(c){if(this._map){if(this.options.trackUserLocation)if(c.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var d=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=d,this._geolocateButton.setAttribute("aria-label",d),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(c.code===3&&St)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new s.Event("error",c)),this._finish()}},u.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},u.prototype._setupUI=function(c){var d=this;if(this._container.addEventListener("contextmenu",function(S){return S.preventDefault()}),this._geolocateButton=A.create("button","mapboxgl-ctrl-geolocate",this._container),A.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",c===!1){s.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var y=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=y,this._geolocateButton.setAttribute("aria-label",y)}else{var T=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=T,this._geolocateButton.setAttribute("aria-label",T)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=A.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new _o(this._dotElement),this._circleElement=A.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new _o({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(S){S.geolocateSource||d._watchState!=="ACTIVE_LOCK"||S.originalEvent&&S.originalEvent.type==="resize"||(d._watchState="BACKGROUND",d._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),d._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),d.fire(new s.Event("trackuserlocationend")))})},u.prototype.trigger=function(){if(!this._setup)return s.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new s.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":_t--,St=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new s.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new s.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){var c;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++_t>1?(c={maximumAge:6e5,timeout:0},St=!0):(c=this.options.positionOptions,St=!1),this._geolocationWatchID=s.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,c)}}else s.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},u.prototype._clearWatch=function(){s.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},u}(s.Evented),yo={maxWidth:100,unit:"metric"},no=function(l){this.options=s.extend({},yo,l),s.bindAll(["_onMove","setUnit"],this)};function ka(l,u,c){var d=c&&c.maxWidth||100,y=l._container.clientHeight/2,T=l.unproject([0,y]),S=l.unproject([d,y]),M=T.distanceTo(S);if(c&&c.unit==="imperial"){var D=3.2808*M;D>5280?hs(u,d,D/5280,l._getUIString("ScaleControl.Miles")):hs(u,d,D,l._getUIString("ScaleControl.Feet"))}else c&&c.unit==="nautical"?hs(u,d,M/1852,l._getUIString("ScaleControl.NauticalMiles")):M>=1e3?hs(u,d,M/1e3,l._getUIString("ScaleControl.Kilometers")):hs(u,d,M,l._getUIString("ScaleControl.Meters"))}function hs(l,u,c,d){var y,T,S,M=(y=c,(T=Math.pow(10,(""+Math.floor(y)).length-1))*(S=(S=y/T)>=10?10:S>=5?5:S>=3?3:S>=2?2:S>=1?1:function(D){var L=Math.pow(10,Math.ceil(-Math.log(D)/Math.LN10));return Math.round(D*L)/L}(S)));l.style.width=u*(M/c)+"px",l.innerHTML=M+" "+d}no.prototype.getDefaultPosition=function(){return"bottom-left"},no.prototype._onMove=function(){ka(this._map,this._container,this.options)},no.prototype.onAdd=function(l){return this._map=l,this._container=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",l.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},no.prototype.onRemove=function(){A.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},no.prototype.setUnit=function(l){this.options.unit=l,ka(this._map,this._container,this.options)};var bs=function(l){this._fullscreen=!1,l&&l.container&&(l.container instanceof s.window.HTMLElement?this._container=l.container:s.warnOnce("Full screen control 'container' must be a DOM element.")),s.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in s.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in s.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in s.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in s.window.document&&(this._fullscreenchange="MSFullscreenChange")};bs.prototype.onAdd=function(l){return this._map=l,this._container||(this._container=this._map.getContainer()),this._controlContainer=A.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",s.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},bs.prototype.onRemove=function(){A.remove(this._controlContainer),this._map=null,s.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},bs.prototype._checkFullscreenSupport=function(){return!!(s.window.document.fullscreenEnabled||s.window.document.mozFullScreenEnabled||s.window.document.msFullscreenEnabled||s.window.document.webkitFullscreenEnabled)},bs.prototype._setupUI=function(){var l=this._fullscreenButton=A.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);A.create("span","mapboxgl-ctrl-icon",l).setAttribute("aria-hidden",!0),l.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),s.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},bs.prototype._updateTitle=function(){var l=this._getTitle();this._fullscreenButton.setAttribute("aria-label",l),this._fullscreenButton.title=l},bs.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},bs.prototype._isFullscreen=function(){return this._fullscreen},bs.prototype._changeIcon=function(){(s.window.document.fullscreenElement||s.window.document.mozFullScreenElement||s.window.document.webkitFullscreenElement||s.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},bs.prototype._onClickFullscreen=function(){this._isFullscreen()?s.window.document.exitFullscreen?s.window.document.exitFullscreen():s.window.document.mozCancelFullScreen?s.window.document.mozCancelFullScreen():s.window.document.msExitFullscreen?s.window.document.msExitFullscreen():s.window.document.webkitCancelFullScreen&&s.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var vo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},m=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),g=function(l){function u(c){l.call(this),this.options=s.extend(Object.create(vo),c),s.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return l&&(u.__proto__=l),(u.prototype=Object.create(l&&l.prototype)).constructor=u,u.prototype.addTo=function(c){return this._map&&this.remove(),this._map=c,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new s.Event("open")),this},u.prototype.isOpen=function(){return!!this._map},u.prototype.remove=function(){return this._content&&A.remove(this._content),this._container&&(A.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new s.Event("close")),this},u.prototype.getLngLat=function(){return this._lngLat},u.prototype.setLngLat=function(c){return this._lngLat=s.LngLat.convert(c),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},u.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},u.prototype.getElement=function(){return this._container},u.prototype.setText=function(c){return this.setDOMContent(s.window.document.createTextNode(c))},u.prototype.setHTML=function(c){var d,y=s.window.document.createDocumentFragment(),T=s.window.document.createElement("body");for(T.innerHTML=c;d=T.firstChild;)y.appendChild(d);return this.setDOMContent(y)},u.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},u.prototype.setMaxWidth=function(c){return this.options.maxWidth=c,this._update(),this},u.prototype.setDOMContent=function(c){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=A.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(c),this._createCloseButton(),this._update(),this._focusFirstElement(),this},u.prototype.addClassName=function(c){this._container&&this._container.classList.add(c)},u.prototype.removeClassName=function(c){this._container&&this._container.classList.remove(c)},u.prototype.setOffset=function(c){return this.options.offset=c,this._update(),this},u.prototype.toggleClassName=function(c){if(this._container)return this._container.classList.toggle(c)},u.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=A.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},u.prototype._onMouseUp=function(c){this._update(c.point)},u.prototype._onMouseMove=function(c){this._update(c.point)},u.prototype._onDrag=function(c){this._update(c.point)},u.prototype._update=function(c){var d=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=A.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=A.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(z){return d._container.classList.add(z)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Ls(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||c)){var y=this._pos=this._trackPointer&&c?c:this._map.project(this._lngLat),T=this.options.anchor,S=function z(W){if(W){if(typeof W=="number"){var te=Math.round(Math.sqrt(.5*Math.pow(W,2)));return{center:new s.Point(0,0),top:new s.Point(0,W),"top-left":new s.Point(te,te),"top-right":new s.Point(-te,te),bottom:new s.Point(0,-W),"bottom-left":new s.Point(te,-te),"bottom-right":new s.Point(-te,-te),left:new s.Point(W,0),right:new s.Point(-W,0)}}if(W instanceof s.Point||Array.isArray(W)){var Q=s.Point.convert(W);return{center:Q,top:Q,"top-left":Q,"top-right":Q,bottom:Q,"bottom-left":Q,"bottom-right":Q,left:Q,right:Q}}return{center:s.Point.convert(W.center||[0,0]),top:s.Point.convert(W.top||[0,0]),"top-left":s.Point.convert(W["top-left"]||[0,0]),"top-right":s.Point.convert(W["top-right"]||[0,0]),bottom:s.Point.convert(W.bottom||[0,0]),"bottom-left":s.Point.convert(W["bottom-left"]||[0,0]),"bottom-right":s.Point.convert(W["bottom-right"]||[0,0]),left:s.Point.convert(W.left||[0,0]),right:s.Point.convert(W.right||[0,0])}}return z(new s.Point(0,0))}(this.options.offset);if(!T){var M,D=this._container.offsetWidth,L=this._container.offsetHeight;M=y.y+S.bottom.y<L?["top"]:y.y>this._map.transform.height-L?["bottom"]:[],y.x<D/2?M.push("left"):y.x>this._map.transform.width-D/2&&M.push("right"),T=M.length===0?"bottom":M.join("-")}var j=y.add(S[T]).round();A.setTransform(this._container,mo[T]+" translate("+j.x+"px,"+j.y+"px)"),un(this._container,T,"popup")}},u.prototype._focusFirstElement=function(){if(this.options.focusAfterOpen&&this._container){var c=this._container.querySelector(m);c&&c.focus()}},u.prototype._onClose=function(){this.remove()},u}(s.Evented),b={version:s.version,supported:f,setRTLTextPlugin:s.setRTLTextPlugin,getRTLTextPluginStatus:s.getRTLTextPluginStatus,Map:io,NavigationControl:go,GeolocateControl:su,AttributionControl:Un,ScaleControl:no,FullscreenControl:bs,Popup:g,Marker:_o,Style:os,LngLat:s.LngLat,LngLatBounds:s.LngLatBounds,Point:s.Point,MercatorCoordinate:s.MercatorCoordinate,Evented:s.Evented,config:s.config,prewarm:function(){qe().acquire(ke)},clearPrewarmedResources:function(){var l=ne;l&&(l.isPreloaded()&&l.numActive()===1?(l.release(ke),ne=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return s.config.ACCESS_TOKEN},set accessToken(l){s.config.ACCESS_TOKEN=l},get baseApiUrl(){return s.config.API_URL},set baseApiUrl(l){s.config.API_URL=l},get workerCount(){return _.workerCount},set workerCount(l){_.workerCount=l},get maxParallelImageRequests(){return s.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(l){s.config.MAX_PARALLEL_IMAGE_REQUESTS=l},clearStorage:function(l){s.clearTileCache(l)},workerUrl:""};return b}),n})})(R4);var Mq=R4.exports;const Wl=oA(Mq);var Rq=1e-7;function xb(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function B4(t,e){if(t===e)return!0;if(xb(t)&&xb(e)){if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(!B4(t[r],e[r]))return!1;return!0}return Math.abs(t-e)<=Rq}function bg(t,e,r){return Math.max(e,Math.min(r,t))}function Vm(t,e,r){return xb(t)?t.map(function(i,n){return Vm(i,e[n],r)}):r*e+(1-r)*t}function Ga(t,e){if(!t)throw new Error(e||"react-map-gl: assertion failed.")}function IC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function MC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?IC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var Ph={minZoom:0,maxZoom:24,minPitch:0,maxPitch:60},Pv={pitch:0,bearing:0,altitude:1.5},RC=5,Bq=1.2,Ud=function(){function t(e){var r=e.width,i=e.height,n=e.latitude,o=e.longitude,s=e.zoom,f=e.bearing,A=f===void 0?Pv.bearing:f,v=e.pitch,w=v===void 0?Pv.pitch:v,C=e.altitude,I=C===void 0?Pv.altitude:C,B=e.maxZoom,F=B===void 0?Ph.maxZoom:B,k=e.minZoom,V=k===void 0?Ph.minZoom:k,G=e.maxPitch,Y=G===void 0?Ph.maxPitch:G,Z=e.minPitch,se=Z===void 0?Ph.minPitch:Z,ge=e.transitionDuration,Ee=e.transitionEasing,Ve=e.transitionInterpolator,Fe=e.transitionInterruption,pe=e.startPanLngLat,Te=e.startZoomLngLat,Ae=e.startRotatePos,Le=e.startBearing,ze=e.startPitch,Xe=e.startZoom;Lu(this,t),Ga(Number.isFinite(r),"`width` must be supplied"),Ga(Number.isFinite(i),"`height` must be supplied"),Ga(Number.isFinite(o),"`longitude` must be supplied"),Ga(Number.isFinite(n),"`latitude` must be supplied"),Ga(Number.isFinite(s),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:r,height:i,latitude:n,longitude:o,zoom:s,bearing:A,pitch:w,altitude:I,maxZoom:F,minZoom:V,maxPitch:Y,minPitch:se,transitionDuration:ge,transitionEasing:Ee,transitionInterpolator:Ve,transitionInterruption:Fe}),this._state={startPanLngLat:pe,startZoomLngLat:Te,startRotatePos:Ae,startBearing:Le,startPitch:ze,startZoom:Xe}}return Fu(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getState",value:function(){return this._state}},{key:"panStart",value:function(r){var i=r.pos;return this._getUpdatedMapState({startPanLngLat:this._unproject(i)})}},{key:"pan",value:function(r){var i=r.pos,n=r.startPos,o=this._state.startPanLngLat||this._unproject(n);if(!o)return this;var s=this._calculateNewLngLat({startPanLngLat:o,pos:i}),f=Gn(s,2),A=f[0],v=f[1];return this._getUpdatedMapState({longitude:A,latitude:v})}},{key:"panEnd",value:function(){return this._getUpdatedMapState({startPanLngLat:null})}},{key:"rotateStart",value:function(r){var i=r.pos;return this._getUpdatedMapState({startRotatePos:i,startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(r){var i=r.pos,n=r.deltaAngleX,o=n===void 0?0:n,s=r.deltaAngleY,f=s===void 0?0:s,A=this._state,v=A.startRotatePos,w=A.startBearing,C=A.startPitch;if(!Number.isFinite(w)||!Number.isFinite(C))return this;var I;return i?I=this._calculateNewPitchAndBearing(MC(MC({},this._getRotationParams(i,v)),{},{startBearing:w,startPitch:C})):I={bearing:w+o,pitch:C+f},this._getUpdatedMapState(I)}},{key:"rotateEnd",value:function(){return this._getUpdatedMapState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(r){var i=r.pos;return this._getUpdatedMapState({startZoomLngLat:this._unproject(i),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(r){var i=r.pos,n=r.startPos,o=r.scale;Ga(o>0,"`scale` must be a positive number");var s=this._state,f=s.startZoom,A=s.startZoomLngLat;Number.isFinite(f)||(f=this._viewportProps.zoom,A=this._unproject(n)||this._unproject(i)),Ga(A,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var v=this._calculateNewZoom({scale:o,startZoom:f||0}),w=new jl(Object.assign({},this._viewportProps,{zoom:v})),C=w.getMapCenterByLngLatPosition({lngLat:A,pos:i}),I=Gn(C,2),B=I[0],F=I[1];return this._getUpdatedMapState({zoom:v,longitude:B,latitude:F})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(r){return new t(Object.assign({},this._viewportProps,this._state,r))}},{key:"_applyConstraints",value:function(r){var i=r.maxZoom,n=r.minZoom,o=r.zoom;r.zoom=bg(o,n,i);var s=r.maxPitch,f=r.minPitch,A=r.pitch;return r.pitch=bg(A,f,s),Object.assign(r,iq(r)),r}},{key:"_unproject",value:function(r){var i=new jl(this._viewportProps);return r&&i.unproject(r)}},{key:"_calculateNewLngLat",value:function(r){var i=r.startPanLngLat,n=r.pos,o=new jl(this._viewportProps);return o.getMapCenterByLngLatPosition({lngLat:i,pos:n})}},{key:"_calculateNewZoom",value:function(r){var i=r.scale,n=r.startZoom,o=this._viewportProps,s=o.maxZoom,f=o.minZoom,A=n+Math.log2(i);return bg(A,f,s)}},{key:"_calculateNewPitchAndBearing",value:function(r){var i=r.deltaScaleX,n=r.deltaScaleY,o=r.startBearing,s=r.startPitch;n=bg(n,-1,1);var f=this._viewportProps,A=f.minPitch,v=f.maxPitch,w=o+180*i,C=s;return n>0?C=s+n*(v-s):n<0&&(C=s-n*(A-s)),{pitch:C,bearing:w}}},{key:"_getRotationParams",value:function(r,i){var n=r[0]-i[0],o=r[1]-i[1],s=r[1],f=i[1],A=this._viewportProps,v=A.width,w=A.height,C=n/v,I=0;return o>0?Math.abs(w-f)>RC&&(I=o/(f-w)*Bq):o<0&&f>RC&&(I=1-s/f),I=Math.min(1,Math.max(-1,I)),{deltaScaleX:C,deltaScaleY:I}}}]),t}();function Oq(t){return t[0].toLowerCase()+t.slice(1)}function Dq(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ph;for(var r in e){var i=r.slice(0,3),n=Oq(r.slice(3));if(i==="min"&&t[n]<e[r]||i==="max"&&t[n]>e[r])return!1}return!0}function BC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function OC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?BC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):BC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var qh=it.createContext({viewport:null,map:null,container:null,onViewportChange:null,onViewStateChange:null,eventManager:null}),Y2=qh.Provider;function Fq(t){var e=t.value,r=t.children,i=it.useState(null),n=Gn(i,2),o=n[0],s=n[1],f=it.useContext(qh);return e=OC(OC({setMap:s},f),{},{map:f&&f.map||o},e),it.createElement(Y2,{value:e},r)}qh.Provider=Fq;var wb=typeof window<"u"?it.useLayoutEffect:it.useEffect;function DC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Ha(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?DC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):DC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var Lq="https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens",O4="A valid API access token is required to use Mapbox data";function kq(){}function D4(t){var e=t.props,r=t.width,i=t.height;return new jl(Ha(Ha(Ha({},e),e.viewState),{},{width:r,height:i}))}var Nq=401,FC={position:"absolute",width:"100%",height:"100%",overflow:"hidden"},Uq=Object.assign({},Xh.propTypes,{width:$e.oneOfType([$e.number,$e.string]),height:$e.oneOfType([$e.number,$e.string]),onResize:$e.func,disableTokenWarning:$e.bool,visible:$e.bool,className:$e.string,style:$e.object,visibilityConstraints:$e.object}),zq=Object.assign({},Xh.defaultProps,{disableTokenWarning:!1,visible:!0,onResize:kq,className:"",style:null,visibilityConstraints:Ph});function Vq(){var t={position:"absolute",left:0,top:0};return it.createElement("div",{key:"warning",id:"no-token-warning",style:t},it.createElement("h3",{key:"header"},O4),it.createElement("div",{key:"text"},"For information on setting up your basemap, read"),it.createElement("a",{key:"link",href:Lq},"Note on Map Tokens"))}function jq(t){return{getMap:function(){return t.current&&t.current.getMap()},queryRenderedFeatures:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.current&&t.current.getMap();return n&&n.queryRenderedFeatures(r,i)}}}var Fc=it.forwardRef(function(t,e){var r=it.useState(!0),i=Gn(r,2),n=i[0],o=i[1],s=it.useState({width:0,height:0}),f=Gn(s,2),A=f[0],v=f[1],w=it.useRef(null),C=it.useRef(null),I=it.useRef(null),B=it.useRef(null),F=it.useContext(qh);wb(function(){if(Fc.supported()){var Te=new Xh(Ha(Ha(Ha({},t),A),{},{mapboxgl:Wl,container:C.current,onError:function(ze){var Xe=ze.error&&ze.error.status||ze.status;Xe===Nq&&n&&(console.error(O4),o(!1)),t.onError(ze)}}));w.current=Te,F&&F.setMap&&F.setMap(Te.getMap());var Ae=new Tq(function(Le){if(Le[0].contentRect){var ze=Le[0].contentRect,Xe=ze.width,dt=ze.height;v({width:Xe,height:dt}),t.onResize({width:Xe,height:dt})}});return Ae.observe(I.current),function(){Te.finalize(),w.current=null,Ae.disconnect()}}},[]),wb(function(){w.current&&w.current.setProps(Ha(Ha({},t),A))});var k=w.current&&w.current.getMap();it.useImperativeHandle(e,function(){return jq(w)},[]);var V=it.useCallback(function(Te){var Ae=Te.target;Ae===B.current&&Ae.scrollTo(0,0)},[]),G=k&&it.createElement(Y2,{value:Ha(Ha({},F),{},{viewport:F.viewport||D4(Ha({map:k,props:t},A)),map:k,container:F.container||I.current})},it.createElement("div",{key:"map-overlays",className:"overlays",ref:B,style:FC,onScroll:V},t.children)),Y=t.className,Z=t.width,se=t.height,ge=t.style,Ee=t.visibilityConstraints,Ve=Object.assign({position:"relative"},ge,{width:Z,height:se}),Fe=t.visible&&Dq(t.viewState||t,Ee),pe=Object.assign({},FC,{visibility:Fe?"inherit":"hidden"});return it.createElement("div",{key:"map-container",ref:I,style:Ve},it.createElement("div",{key:"map-mapbox",ref:C,style:pe,className:Y}),G,!n&&!t.disableTokenWarning&&it.createElement(Vq,null))});Fc.supported=function(){return Wl&&Wl.supported()};Fc.propTypes=Uq;Fc.defaultProps=zq;function Hq(t,e){var r;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(r=Gq(t))||e){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(v){throw v},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
1762
1762
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,f;return{s:function(){r=t[Symbol.iterator]()},n:function(){var v=r.next();return o=v.done,v},e:function(v){s=!0,f=v},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw f}}}}function Gq(t,e){if(t){if(typeof t=="string")return LC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LC(t,e)}}function LC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}var F4=function(){function t(){Lu(this,t),Wt(this,"propNames",[])}return Fu(t,[{key:"arePropsEqual",value:function(r,i){var n=Hq(this.propNames||[]),o;try{for(n.s();!(o=n.n()).done;){var s=o.value;if(!B4(r[s],i[s]))return!1}}catch(f){n.e(f)}finally{n.f()}return!0}},{key:"initializeProps",value:function(r,i){return{start:r,end:i}}},{key:"interpolateProps",value:function(r,i,n){Ga(!1,"interpolateProps is not implemented")}},{key:"getDuration",value:function(r,i){return i.transitionDuration}}]),t}(),Wq={longitude:1,bearing:1};function jm(t){return Number.isFinite(t)||Array.isArray(t)}function Xq(t){return t in Wq}function Tb(t,e,r){return Xq(t)&&Math.abs(r-e)>180&&(r=r<0?r+360:r-360),r}function Iv(t,e){var r;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(r=qq(t))||e){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(v){throw v},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
1763
1763
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,f;return{s:function(){r=t[Symbol.iterator]()},n:function(){var v=r.next();return o=v.done,v},e:function(v){s=!0,f=v},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw f}}}}function qq(t,e){if(t){if(typeof t=="string")return kC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kC(t,e)}}function kC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function $q(t){var e=Zq();return function(){var i=Gd(t),n;if(e){var o=Gd(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return c2(this,n)}}function Zq(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var Kq=["longitude","latitude","zoom","bearing","pitch"],Yq=["latitude","longitude","zoom","width","height"],NC=["bearing","pitch"],Jq={speed:1.2,curve:1.414};(function(t){l2(r,t);var e=$q(r);function r(){var i,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Lu(this,r),i=e.call(this),Wt(yu(i),"propNames",Kq),i.props=Object.assign({},Jq,n),i}return Fu(r,[{key:"initializeProps",value:function(n,o){var s={},f={},A=Iv(Yq),v;try{for(A.s();!(v=A.n()).done;){var w=v.value,C=n[w],I=o[w];Ga(jm(C)&&jm(I),"".concat(w," must be supplied for transition")),s[w]=C,f[w]=Tb(w,C,I)}}catch(Y){A.e(Y)}finally{A.f()}var B=Iv(NC),F;try{for(B.s();!(F=B.n()).done;){var k=F.value,V=n[k]||0,G=o[k]||0;s[k]=V,f[k]=Tb(k,V,G)}}catch(Y){B.e(Y)}finally{B.f()}return{start:s,end:f}}},{key:"interpolateProps",value:function(n,o,s){var f=sq(n,o,s,this.props),A=Iv(NC),v;try{for(A.s();!(v=A.n()).done;){var w=v.value;f[w]=Vm(n[w],o[w],s)}}catch(C){A.e(C)}finally{A.f()}return f}},{key:"getDuration",value:function(n,o){var s=o.transitionDuration;return s==="auto"&&(s=oq(n,o,this.props)),s}}]),r})(F4);function UC(t,e){var r;if(typeof Symbol>"u"||t[Symbol.iterator]==null){if(Array.isArray(t)||(r=Qq(t))||e){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(v){throw v},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
1764
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,f;return{s:function(){r=t[Symbol.iterator]()},n:function(){var v=r.next();return o=v.done,v},e:function(v){s=!0,f=v},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw f}}}}function Qq(t,e){if(t){if(typeof t=="string")return zC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zC(t,e)}}function zC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function e$(t){var e=t$();return function(){var i=Gd(t),n;if(e){var o=Gd(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return c2(this,n)}}function t$(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var r$=["longitude","latitude","zoom","bearing","pitch"],Ep=function(t){l2(r,t);var e=e$(r);function r(){var i,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Lu(this,r),i=e.call(this),Array.isArray(n)&&(n={transitionProps:n}),i.propNames=n.transitionProps||r$,n.around&&(i.around=n.around),i}return Fu(r,[{key:"initializeProps",value:function(n,o){var s={},f={};if(this.around){s.around=this.around;var A=new jl(n).unproject(this.around);Object.assign(f,o,{around:new jl(o).project(A),aroundLngLat:A})}var v=UC(this.propNames),w;try{for(v.s();!(w=v.n()).done;){var C=w.value,I=n[C],B=o[C];Ga(jm(I)&&jm(B),"".concat(C," must be supplied for transition")),s[C]=I,f[C]=Tb(C,I,B)}}catch(F){v.e(F)}finally{v.f()}return{start:s,end:f}}},{key:"interpolateProps",value:function(n,o,s){var f={},A=UC(this.propNames),v;try{for(A.s();!(v=A.n()).done;){var w=v.value;f[w]=Vm(n[w],o[w],s)}}catch(k){A.e(k)}finally{A.f()}if(o.around){var C=new jl(Object.assign({},o,f)).getMapCenterByLngLatPosition({lngLat:o.aroundLngLat,pos:Vm(n.around,o.around,s)}),I=Gn(C,2),B=I[0],F=I[1];f.longitude=B,f.latitude=F}return f}}]),r}(F4),Sp=function(){};function i$(t,e){var r=t(e);return function(i){return 1/(1-r)*(t(i*(1-e)+e)-r)}}var Cp={BREAK:1,SNAP_TO_END:2,IGNORE:3,UPDATE:4},n$={transitionDuration:0,transitionEasing:function(e){return e},transitionInterpolator:new Ep,transitionInterruption:Cp.BREAK,onTransitionStart:Sp,onTransitionInterrupt:Sp,onTransitionEnd:Sp},J2=function(){function t(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Lu(this,t),Wt(this,"_animationFrame",null),Wt(this,"_onTransitionFrame",function(){e._animationFrame=requestAnimationFrame(e._onTransitionFrame),e._updateViewport()}),this.props=null,this.onViewportChange=r.onViewportChange||Sp,this.onStateChange=r.onStateChange||Sp,this.time=r.getTime||Date.now}return Fu(t,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(r){var i=this.props;if(this.props=r,!i||this._shouldIgnoreViewportChange(i,r))return!1;if(this._isTransitionEnabled(r)){var n=Object.assign({},i),o=Object.assign({},r);if(this._isTransitionInProgress()&&(i.onTransitionInterrupt(),this.state.interruption===Cp.SNAP_TO_END?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===Cp.UPDATE)){var s=this.time(),f=(s-this.state.startTime)/this.state.duration;o.transitionDuration=this.state.duration-(s-this.state.startTime),o.transitionEasing=i$(this.state.easing,f),o.transitionInterpolator=n.transitionInterpolator}return o.onTransitionStart(),this._triggerTransition(n,o),!0}return this._isTransitionInProgress()&&(i.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return!!this._animationFrame}},{key:"_isTransitionEnabled",value:function(r){var i=r.transitionDuration,n=r.transitionInterpolator;return(i>0||i==="auto")&&!!n}},{key:"_isUpdateDueToCurrentTransition",value:function(r){return this.state.propsInTransition?this.state.interpolator.arePropsEqual(r,this.state.propsInTransition):!1}},{key:"_shouldIgnoreViewportChange",value:function(r,i){return r?this._isTransitionInProgress()?this.state.interruption===Cp.IGNORE||this._isUpdateDueToCurrentTransition(i):this._isTransitionEnabled(i)?i.transitionInterpolator.arePropsEqual(r,i):!0:!0}},{key:"_triggerTransition",value:function(r,i){Ga(this._isTransitionEnabled(i)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var n=i.transitionInterpolator,o=n.getDuration?n.getDuration(r,i):i.transitionDuration;if(o!==0){var s=i.transitionInterpolator.initializeProps(r,i),f={inTransition:!0,isZooming:r.zoom!==i.zoom,isPanning:r.longitude!==i.longitude||r.latitude!==i.latitude,isRotating:r.bearing!==i.bearing||r.pitch!==i.pitch};this.state={duration:o,easing:i.transitionEasing,interpolator:i.transitionInterpolator,interruption:i.transitionInterruption,startTime:this.time(),startProps:s.start,endProps:s.end,animation:null,propsInTransition:{}},this._onTransitionFrame(),this.onStateChange(f)}}},{key:"_endTransition",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1})}},{key:"_updateViewport",value:function(){var r=this.time(),i=this.state,n=i.startTime,o=i.duration,s=i.easing,f=i.interpolator,A=i.startProps,v=i.endProps,w=!1,C=(r-n)/o;C>=1&&(C=1,w=!0),C=s(C);var I=f.interpolateProps(A,v,C),B=new Ud(Object.assign({},this.props,I));this.state.propsInTransition=B.getViewportProps(),this.onViewportChange(this.state.propsInTransition,this.props),w&&(this._endTransition(),this.props.onTransitionEnd())}}]),t}();Wt(J2,"defaultProps",n$);function VC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function ao(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?VC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):VC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var gh={transitionDuration:0},yc={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new Ep,transitionInterruption:Cp.BREAK},xg=300,wg=function(e){return 1-(1-e)*(1-e)},Jf={WHEEL:["wheel"],PAN:["panstart","panmove","panend"],PINCH:["pinchstart","pinchmove","pinchend"],TRIPLE_PAN:["tripanstart","tripanmove","tripanend"],DOUBLE_TAP:["doubletap"],KEYBOARD:["keydown"]},L4=function(){function t(){var e=this;Lu(this,t),Wt(this,"events",[]),Wt(this,"scrollZoom",!0),Wt(this,"dragPan",!0),Wt(this,"dragRotate",!0),Wt(this,"doubleClickZoom",!0),Wt(this,"touchZoom",!0),Wt(this,"touchRotate",!1),Wt(this,"keyboard",!0),Wt(this,"_interactionState",{isDragging:!1}),Wt(this,"_events",{}),Wt(this,"_setInteractionState",function(r){Object.assign(e._interactionState,r),e.onStateChange&&e.onStateChange(e._interactionState)}),Wt(this,"_onTransition",function(r,i){e.onViewportChange(r,e._interactionState,i)}),this.handleEvent=this.handleEvent.bind(this),this._transitionManager=new J2({onViewportChange:this._onTransition,onStateChange:this._setInteractionState})}return Fu(t,[{key:"handleEvent",value:function(r){this.mapState=this.getMapState();var i=this._eventStartBlocked;switch(r.type){case"panstart":return i?!1:this._onPanStart(r);case"panmove":return this._onPan(r);case"panend":return this._onPanEnd(r);case"pinchstart":return i?!1:this._onPinchStart(r);case"pinchmove":return this._onPinch(r);case"pinchend":return this._onPinchEnd(r);case"tripanstart":return i?!1:this._onTriplePanStart(r);case"tripanmove":return this._onTriplePan(r);case"tripanend":return this._onTriplePanEnd(r);case"doubletap":return this._onDoubleTap(r);case"wheel":return this._onWheel(r);case"keydown":return this._onKeyDown(r);default:return!1}}},{key:"getCenter",value:function(r){var i=r.offsetCenter,n=i.x,o=i.y;return[n,o]}},{key:"isFunctionKeyPressed",value:function(r){var i=r.srcEvent;return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}},{key:"blockEvents",value:function(r){var i=this,n=setTimeout(function(){i._eventStartBlocked===n&&(i._eventStartBlocked=null)},r);this._eventStartBlocked=n}},{key:"updateViewport",value:function(r,i,n){var o=this.mapState instanceof Ud?this.mapState.getViewportProps():this.mapState,s=ao(ao({},r.getViewportProps()),i),f=Object.keys(s).some(function(A){return o[A]!==s[A]});this._state=r.getState(),this._setInteractionState(n),f&&this.onViewportChange(s,this._interactionState,o)}},{key:"getMapState",value:function(r){return new Ud(ao(ao(ao({},this.mapStateProps),this._state),r))}},{key:"isDragging",value:function(){return this._interactionState.isDragging}},{key:"setOptions",value:function(r){var i=r.onViewportChange,n=r.onStateChange,o=r.eventManager,s=o===void 0?this.eventManager:o,f=r.isInteractive,A=f===void 0?!0:f,v=r.scrollZoom,w=v===void 0?this.scrollZoom:v,C=r.dragPan,I=C===void 0?this.dragPan:C,B=r.dragRotate,F=B===void 0?this.dragRotate:B,k=r.doubleClickZoom,V=k===void 0?this.doubleClickZoom:k,G=r.touchZoom,Y=G===void 0?this.touchZoom:G,Z=r.touchRotate,se=Z===void 0?this.touchRotate:Z,ge=r.keyboard,Ee=ge===void 0?this.keyboard:ge;this.onViewportChange=i,this.onStateChange=n;var Ve=this.mapStateProps||{},Fe=Ve.height!==r.height||Ve.width!==r.width;this.mapStateProps=r,Fe&&(this.mapState=Ve,this.updateViewport(new Ud(r))),this._transitionManager.processViewportChange(r),this.eventManager!==s&&(this.eventManager=s,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(Jf.WHEEL,A&&!!w),this.toggleEvents(Jf.PAN,A&&!!(I||F)),this.toggleEvents(Jf.PINCH,A&&!!(Y||se)),this.toggleEvents(Jf.TRIPLE_PAN,A&&!!se),this.toggleEvents(Jf.DOUBLE_TAP,A&&!!V),this.toggleEvents(Jf.KEYBOARD,A&&!!Ee),this.scrollZoom=w,this.dragPan=I,this.dragRotate=F,this.doubleClickZoom=V,this.touchZoom=Y,this.touchRotate=se,this.keyboard=Ee}},{key:"toggleEvents",value:function(r,i){var n=this;this.eventManager&&r.forEach(function(o){n._events[o]!==i&&(n._events[o]=i,i?n.eventManager.on(o,n.handleEvent):n.eventManager.off(o,n.handleEvent))})}},{key:"_onPanStart",value:function(r){var i=this.getCenter(r);this._panRotate=this.isFunctionKeyPressed(r)||r.rightButton;var n=this._panRotate?this.mapState.rotateStart({pos:i}):this.mapState.panStart({pos:i});return this.updateViewport(n,gh,{isDragging:!0}),!0}},{key:"_onPan",value:function(r){return this.isDragging()?this._panRotate?this._onPanRotate(r):this._onPanMove(r):!1}},{key:"_onPanEnd",value:function(r){return this.isDragging()?this._panRotate?this._onPanRotateEnd(r):this._onPanMoveEnd(r):!1}},{key:"_onPanMove",value:function(r){if(!this.dragPan)return!1;var i=this.getCenter(r),n=this.mapState.pan({pos:i});return this.updateViewport(n,gh,{isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(r){if(this.dragPan){var i=this.dragPan.inertia,n=i===void 0?xg:i;if(n&&r.velocity){var o=this.getCenter(r),s=[o[0]+r.velocityX*n/2,o[1]+r.velocityY*n/2],f=this.mapState.pan({pos:s}).panEnd();return this.updateViewport(f,ao(ao({},yc),{},{transitionDuration:n,transitionEasing:wg}),{isDragging:!1,isPanning:!0}),!0}}var A=this.mapState.panEnd();return this.updateViewport(A,null,{isDragging:!1,isPanning:!1}),!0}},{key:"_onPanRotate",value:function(r){if(!this.dragRotate)return!1;var i=this.getCenter(r),n=this.mapState.rotate({pos:i});return this.updateViewport(n,gh,{isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(r){if(this.dragRotate){var i=this.dragRotate.inertia,n=i===void 0?xg:i;if(n&&r.velocity){var o=this.getCenter(r),s=[o[0]+r.velocityX*n/2,o[1]+r.velocityY*n/2],f=this.mapState.rotate({pos:s}).rotateEnd();return this.updateViewport(f,ao(ao({},yc),{},{transitionDuration:n,transitionEasing:wg}),{isDragging:!1,isRotating:!0}),!0}}var A=this.mapState.panEnd();return this.updateViewport(A,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onWheel",value:function(r){if(!this.scrollZoom)return!1;var i=this.scrollZoom,n=i.speed,o=n===void 0?.01:n,s=i.smooth,f=s===void 0?!1:s;r.preventDefault();var A=this.getCenter(r),v=r.delta,w=2/(1+Math.exp(-Math.abs(v*o)));v<0&&w!==0&&(w=1/w);var C=this.mapState.zoom({pos:A,scale:w});return C.getViewportProps().zoom===this.mapStateProps.zoom?!1:(this.updateViewport(C,ao(ao({},yc),{},{transitionInterpolator:new Ep({around:A}),transitionDuration:f?250:1}),{isPanning:!0,isZooming:!0}),!0)}},{key:"_onPinchStart",value:function(r){var i=this.getCenter(r),n=this.mapState.zoomStart({pos:i}).rotateStart({pos:i});return this._startPinchRotation=r.rotation,this._lastPinchEvent=r,this.updateViewport(n,gh,{isDragging:!0}),!0}},{key:"_onPinch",value:function(r){if(!this.isDragging()||!this.touchZoom&&!this.touchRotate)return!1;var i=this.mapState;if(this.touchZoom){var n=r.scale,o=this.getCenter(r);i=i.zoom({pos:o,scale:n})}if(this.touchRotate){var s=r.rotation;i=i.rotate({deltaAngleX:this._startPinchRotation-s})}return this.updateViewport(i,gh,{isDragging:!0,isPanning:!!this.touchZoom,isZooming:!!this.touchZoom,isRotating:!!this.touchRotate}),this._lastPinchEvent=r,!0}},{key:"_onPinchEnd",value:function(r){if(!this.isDragging())return!1;if(this.touchZoom){var i=this.touchZoom.inertia,n=i===void 0?xg:i,o=this._lastPinchEvent;if(n&&o&&r.scale!==o.scale){var s=this.getCenter(r),f=this.mapState.rotateEnd(),A=Math.log2(r.scale),v=(A-Math.log2(o.scale))/(r.deltaTime-o.deltaTime),w=Math.pow(2,A+v*n/2);return f=f.zoom({pos:s,scale:w}).zoomEnd(),this.updateViewport(f,ao(ao({},yc),{},{transitionInterpolator:new Ep({around:s}),transitionDuration:n,transitionEasing:wg}),{isDragging:!1,isPanning:!!this.touchZoom,isZooming:!!this.touchZoom,isRotating:!1}),this.blockEvents(n),!0}}var C=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(C,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),this._startPinchRotation=null,this._lastPinchEvent=null,!0}},{key:"_onTriplePanStart",value:function(r){var i=this.getCenter(r),n=this.mapState.rotateStart({pos:i});return this.updateViewport(n,gh,{isDragging:!0}),!0}},{key:"_onTriplePan",value:function(r){if(!this.isDragging()||!this.touchRotate)return!1;var i=this.getCenter(r);i[0]-=r.deltaX;var n=this.mapState.rotate({pos:i});return this.updateViewport(n,gh,{isRotating:!0}),!0}},{key:"_onTriplePanEnd",value:function(r){if(!this.isDragging())return!1;if(this.touchRotate){var i=this.touchRotate.inertia,n=i===void 0?xg:i;if(n&&r.velocityY){var o=this.getCenter(r),s=[o[0],o[1]+=r.velocityY*n/2],f=this.mapState.rotate({pos:s});return this.updateViewport(f,ao(ao({},yc),{},{transitionDuration:n,transitionEasing:wg}),{isDragging:!1,isRotating:!0}),this.blockEvents(n),!1}}var A=this.mapState.rotateEnd();return this.updateViewport(A,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(r){if(!this.doubleClickZoom)return!1;var i=this.getCenter(r),n=this.isFunctionKeyPressed(r),o=this.mapState.zoom({pos:i,scale:n?.5:2});return this.updateViewport(o,Object.assign({},yc,{transitionInterpolator:new Ep({around:i})}),{isZooming:!0}),!0}},{key:"_onKeyDown",value:function(r){if(!this.keyboard)return!1;var i=this.isFunctionKeyPressed(r),n=this.keyboard,o=n.zoomSpeed,s=o===void 0?2:o,f=n.moveSpeed,A=f===void 0?100:f,v=n.rotateSpeedX,w=v===void 0?15:v,C=n.rotateSpeedY,I=C===void 0?10:C,B=this.mapStateProps,F;switch(r.srcEvent.keyCode){case 189:i?F=this.getMapState({zoom:B.zoom-Math.log2(s)-1}):F=this.getMapState({zoom:B.zoom-Math.log2(s)});break;case 187:i?F=this.getMapState({zoom:B.zoom+Math.log2(s)+1}):F=this.getMapState({zoom:B.zoom+Math.log2(s)});break;case 37:i?F=this.getMapState({bearing:B.bearing-w}):F=this.mapState.pan({pos:[A,0],startPos:[0,0]});break;case 39:i?F=this.getMapState({bearing:B.bearing+w}):F=this.mapState.pan({pos:[-A,0],startPos:[0,0]});break;case 38:i?F=this.getMapState({pitch:B.pitch+I}):F=this.mapState.pan({pos:[0,A],startPos:[0,0]});break;case 40:i?F=this.getMapState({pitch:B.pitch-I}):F=this.mapState.pan({pos:[0,-A],startPos:[0,0]});break;default:return!1}return this.updateViewport(F,yc)}}]),t}();function jC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function gc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var s$=Object.assign({},Fc.propTypes,{maxZoom:$e.number,minZoom:$e.number,maxPitch:$e.number,minPitch:$e.number,onViewStateChange:$e.func,onViewportChange:$e.func,onInteractionStateChange:$e.func,transitionDuration:$e.oneOfType([$e.number,$e.string]),transitionInterpolator:$e.object,transitionInterruption:$e.number,transitionEasing:$e.func,onTransitionStart:$e.func,onTransitionInterrupt:$e.func,onTransitionEnd:$e.func,scrollZoom:$e.oneOfType([$e.bool,$e.object]),dragPan:$e.oneOfType([$e.bool,$e.object]),dragRotate:$e.oneOfType([$e.bool,$e.object]),doubleClickZoom:$e.bool,touchZoom:$e.oneOfType([$e.bool,$e.object]),touchRotate:$e.oneOfType([$e.bool,$e.object]),keyboard:$e.oneOfType([$e.bool,$e.object]),onHover:$e.func,onClick:$e.func,onDblClick:$e.func,onContextMenu:$e.func,onMouseDown:$e.func,onMouseMove:$e.func,onMouseUp:$e.func,onTouchStart:$e.func,onTouchMove:$e.func,onTouchEnd:$e.func,onMouseEnter:$e.func,onMouseLeave:$e.func,onMouseOut:$e.func,onWheel:$e.func,touchAction:$e.string,eventRecognizerOptions:$e.object,clickRadius:$e.number,interactiveLayerIds:$e.array,getCursor:$e.func,controller:$e.instanceOf(L4)}),o$=function(e){var r=e.isDragging,i=e.isHovering;return r?"grabbing":i?"pointer":"grab"},a$=Object.assign({},Fc.defaultProps,Ph,J2.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(e){return e.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",eventRecognizerOptions:{},clickRadius:0,getCursor:o$});function Q2(t){if(t.lngLat||!t.offsetCenter)return t;var e=t.offsetCenter,r=e.x,i=e.y;if(!Number.isFinite(r)||!Number.isFinite(i))return t;var n=[r,i];return t.point=n,t.lngLat=this.viewport.unproject(n),t}function k4(t){var e=this.map;if(!e||!t)return null;var r={},i=this.props.clickRadius;this.props.interactiveLayerIds&&(r.layers=this.props.interactiveLayerIds);try{return e.queryRenderedFeatures(i?[[t[0]-i,t[1]+i],[t[0]+i,t[1]-i]]:t,r)}catch{return null}}function Ec(t,e){var r=this.props[t];r&&r(Q2.call(this,e))}function l$(t){Ec.call(this,t.pointerType==="touch"?"onTouchStart":"onMouseDown",t)}function c$(t){Ec.call(this,t.pointerType==="touch"?"onTouchEnd":"onMouseUp",t)}function u$(t){if(Ec.call(this,t.pointerType==="touch"?"onTouchMove":"onMouseMove",t),!this.state.isDragging){var e=this.props,r=e.onHover,i=e.interactiveLayerIds,n;t=Q2.call(this,t),(i||r)&&(n=k4.call(this,t.point));var o=!!(i&&n&&n.length>0),s=o&&!this.state.isHovering,f=!o&&this.state.isHovering;(r||s)&&(t.features=n,r&&r(t)),s&&Ec.call(this,"onMouseEnter",t),f&&Ec.call(this,"onMouseLeave",t),(s||f)&&this.setState({isHovering:o})}}function HC(t){var e=this.props,r=e.onClick,i=e.onNativeClick,n=e.onDblClick,o=e.doubleClickZoom,s=[],f=n||o;switch(t.type){case"anyclick":s.push(i),f||s.push(r);break;case"click":f&&s.push(r);break}s=s.filter(Boolean),s.length&&(t=Q2.call(this,t),t.features=k4.call(this,t.point),s.forEach(function(A){return A(t)}))}function h$(t){return{getMap:t.current&&t.current.getMap,queryRenderedFeatures:t.current&&t.current.queryRenderedFeatures}}var ex=it.forwardRef(function(t,e){var r=it.useContext(qh),i=it.useMemo(function(){return t.controller||new L4},[]),n=it.useMemo(function(){return new e4(null,{touchAction:t.touchAction,recognizerOptions:t.eventRecognizerOptions})},[]),o=it.useRef(null),s=it.useRef(null),f=it.useRef({width:0,height:0,state:{isHovering:!1,isDragging:!1}}),A=f.current;A.props=t,A.map=s.current&&s.current.getMap(),A.setState=function(Ee){A.state=gc(gc({},A.state),Ee),o.current.style.cursor=t.getCursor(A.state)};var v=!0,w,C,I=function(Ve,Fe,pe){if(v){w=[Ve,Fe,pe];return}var Te=A.props,Ae=Te.onViewStateChange,Le=Te.onViewportChange;Ae&&Ae({viewState:Ve,interactionState:Fe,oldViewState:pe}),Le&&Le(Ve,Fe,pe)};it.useImperativeHandle(e,function(){return h$(s)},[]);var B=it.useMemo(function(){return gc(gc({},r),{},{eventManager:n,container:r.container||o.current})},[r,o.current]);B.onViewportChange=I,B.viewport=r.viewport||D4(A),A.viewport=B.viewport;var F=function(Ve){var Fe=Ve.isDragging,pe=Fe===void 0?!1:Fe;if(pe!==A.state.isDragging&&A.setState({isDragging:pe}),v){C=Ve;return}var Te=A.props.onInteractionStateChange;Te&&Te(Ve)},k=function(){A.width&&A.height&&i.setOptions(gc(gc(gc({},A.props),A.props.viewState),{},{isInteractive:!!(A.props.onViewStateChange||A.props.onViewportChange),onViewportChange:I,onStateChange:F,eventManager:n,width:A.width,height:A.height}))},V=function(Ve){var Fe=Ve.width,pe=Ve.height;A.width=Fe,A.height=pe,k(),A.props.onResize({width:Fe,height:pe})};it.useEffect(function(){return n.setElement(o.current),n.on({pointerdown:l$.bind(A),pointermove:u$.bind(A),pointerup:c$.bind(A),pointerleave:Ec.bind(A,"onMouseOut"),click:HC.bind(A),anyclick:HC.bind(A),dblclick:Ec.bind(A,"onDblClick"),wheel:Ec.bind(A,"onWheel"),contextmenu:Ec.bind(A,"onContextMenu")}),function(){n.destroy()}},[]),wb(function(){w&&I.apply(void 0,BL(w)),C&&F(C)}),k();var G=t.width,Y=t.height,Z=t.style,se=t.getCursor,ge=it.useMemo(function(){return gc(gc({position:"relative"},Z),{},{width:G,height:Y,cursor:se(A.state)})},[Z,G,Y,se,A.state]);return(!w||!A._child)&&(A._child=it.createElement(Y2,{value:B},it.createElement("div",{key:"event-canvas",ref:o,style:ge},it.createElement(Fc,jM({},t,{width:"100%",height:"100%",style:null,onResize:V,ref:s}))))),v=!1,A._child});ex.supported=Fc.supported;ex.propTypes=s$;ex.defaultProps=a$;$e.string.isRequired,$e.string;var f$=["fill","line","symbol","circle","fill-extrusion","raster","background","heatmap","hillshade"];$e.oneOf(f$).isRequired,$e.string,$e.string,$e.string;var Nu={captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0,capturePointerMove:!1},sl={captureScroll:$e.bool,captureDrag:$e.bool,captureClick:$e.bool,captureDoubleClick:$e.bool,capturePointerMove:$e.bool};function d$(t){var e=t.containerRef.current,r=t.context.eventManager;if(!(!e||!r)){var i={wheel:function(o){var s=t.props;s.captureScroll&&o.stopPropagation(),s.onScroll&&s.onScroll(o,t)},panstart:function(o){var s=t.props;s.captureDrag&&o.stopPropagation(),s.onDragStart&&s.onDragStart(o,t)},anyclick:function(o){var s=t.props;s.captureClick&&o.stopPropagation(),s.onNativeClick&&s.onNativeClick(o,t)},click:function(o){var s=t.props;s.captureClick&&o.stopPropagation(),s.onClick&&s.onClick(o,t)},dblclick:function(o){var s=t.props;s.captureDoubleClick&&o.stopPropagation(),s.onDoubleClick&&s.onDoubleClick(o,t)},pointermove:function(o){var s=t.props;s.capturePointerMove&&o.stopPropagation(),s.onPointerMove&&s.onPointerMove(o,t)}};return r.watch(i,e),function(){r.off(i)}}}function Uu(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=it.useContext(qh),r=it.useRef(null),i=it.useRef({props:t,state:{},context:e,containerRef:r}),n=i.current;return n.props=t,n.context=e,it.useEffect(function(){return d$(n)},[e.eventManager]),n}function A$(t){var e=p$();return function(){var i=Gd(t),n;if(e){var o=Gd(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return c2(this,n)}}function p$(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function g$(t){var e=t.instance,r=Uu(t),i=r.context,n=r.containerRef;return e._context=i,e._containerRef=n,e._render()}var N4=function(t){l2(r,t);var e=A$(r);function r(){var i;Lu(this,r);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return i=e.call.apply(e,[this].concat(o)),Wt(yu(i),"_context",{}),Wt(yu(i),"_containerRef",it.createRef()),Wt(yu(i),"_onScroll",function(f){}),Wt(yu(i),"_onDragStart",function(f){}),Wt(yu(i),"_onDblClick",function(f){}),Wt(yu(i),"_onClick",function(f){}),Wt(yu(i),"_onPointerMove",function(f){}),i}return Fu(r,[{key:"_render",value:function(){throw new Error("_render() not implemented")}},{key:"render",value:function(){return it.createElement(g$,jM({instance:this},this.props,{onScroll:this._onScroll,onDragStart:this._onDragStart,onDblClick:this._onDblClick,onClick:this._onClick,onPointerMove:this._onPointerMove}))}}]),r}(it.PureComponent);Wt(N4,"propTypes",sl);Wt(N4,"defaultProps",Nu);function GC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function WC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?GC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):GC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var m$=Object.assign({},sl,{draggable:$e.bool,onDrag:$e.func,onDragEnd:$e.func,onDragStart:$e.func,offsetLeft:$e.number,offsetTop:$e.number}),_$=Object.assign({},Nu,{draggable:!1,offsetLeft:0,offsetTop:0});function U4(t){var e=t.offsetCenter,r=e.x,i=e.y;return[r,i]}function y$(t,e){var r=t.center,i=r.x,n=r.y;if(e){var o=e.getBoundingClientRect();return[o.left-i,o.top-n]}return null}function tx(t,e,r,i){var n=t[0]+e[0]-r.offsetLeft,o=t[1]+e[1]-r.offsetTop;return i.viewport.unproject([n,o])}function v$(t,e){var r=e.props,i=e.callbacks,n=e.state,o=e.context,s=e.containerRef,f=r.draggable;if(f){t.stopPropagation();var A=U4(t),v=y$(t,s.current);if(n.setDragPos(A),n.setDragOffset(v),i.onDragStart&&v){var w=Object.assign({},t);w.lngLat=tx(A,v,r,o),i.onDragStart(w)}}}function b$(t,e){var r=e.props,i=e.callbacks,n=e.state,o=e.context;t.stopPropagation();var s=U4(t);n.setDragPos(s);var f=n.dragOffset;if(i.onDrag&&f){var A=Object.assign({},t);A.lngLat=tx(s,f,r,o),i.onDrag(A)}}function x$(t,e){var r=e.props,i=e.callbacks,n=e.state,o=e.context;t.stopPropagation();var s=n.dragPos,f=n.dragOffset;if(n.setDragPos(null),n.setDragOffset(null),i.onDragEnd&&s&&f){var A=Object.assign({},t);A.lngLat=tx(s,f,r,o),i.onDragEnd(A)}}function w$(t,e){var r=e.state;t.stopPropagation(),r.setDragPos(null),r.setDragOffset(null)}function T$(t){var e=t.context.eventManager;if(!(!e||!t.state.dragPos)){var r={panmove:function(n){return b$(n,t)},panend:function(n){return x$(n,t)},pancancel:function(n){return w$(n,t)}};return e.watch(r),function(){e.off(r)}}}function E$(t){var e=it.useState(null),r=Gn(e,2),i=r[0],n=r[1],o=it.useState(null),s=Gn(o,2),f=s[0],A=s[1],v=Uu(WC(WC({},t),{},{onDragStart:v$}));return v.callbacks=t,v.state.dragPos=i,v.state.setDragPos=n,v.state.dragOffset=f,v.state.setDragOffset=A,it.useEffect(function(){return T$(v)},[v.context.eventManager,!!i]),v}var XC=typeof window<"u"&&window.devicePixelRatio||1,Gp=function(e){return Math.round(e*XC)/XC},qC=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"x";if(e===null)return r;var n=i==="x"?e.offsetWidth:e.offsetHeight;return Gp(r/100*n)/n*100};function $C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function S$(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$C(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$C(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var C$=Object.assign({},m$,{className:$e.string,longitude:$e.number.isRequired,latitude:$e.number.isRequired,style:$e.object}),P$=Object.assign({},_$,{className:""});function I$(t){var e=t.props,r=t.state,i=t.context,n=e.longitude,o=e.latitude,s=e.offsetLeft,f=e.offsetTop,A=r.dragPos,v=r.dragOffset;if(A&&v)return[A[0]+v[0],A[1]+v[1]];var w=i.viewport.project([n,o]),C=Gn(w,2),I=C[0],B=C[1];return I+=s,B+=f,[I,B]}function rx(t){var e=E$(t),r=e.state,i=e.containerRef,n=t.children,o=t.className,s=t.draggable,f=t.style,A=r.dragPos,v=I$(e),w=Gn(v,2),C=w[0],I=w[1],B="translate(".concat(Gp(C),"px, ").concat(Gp(I),"px)"),F=s?A?"grabbing":"grab":"auto",k=it.useMemo(function(){var G=S$({position:"absolute",left:0,top:0,transform:B,cursor:F},f);return it.createElement("div",{className:"mapboxgl-marker ".concat(o),ref:e.containerRef,style:G},n)},[n,o]),V=i.current;return V&&(V.style.transform=B,V.style.cursor=F),k}rx.defaultProps=P$;rx.propTypes=C$;it.memo(rx);var Wp={top:{x:.5,y:0},"top-left":{x:0,y:0},"top-right":{x:1,y:0},bottom:{x:.5,y:1},"bottom-left":{x:0,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5}},M$=Object.keys(Wp);function R$(t){var e=t.x,r=t.y,i=t.width,n=t.height,o=t.selfWidth,s=t.selfHeight,f=t.anchor,A=t.padding,v=A===void 0?0:A,w=Wp[f],C=w.x,I=w.y,B=r-I*s,F=B+s,k=Math.max(0,v-B)+Math.max(0,F-n+v);if(k>0){var V=I,G=k;for(I=0;I<=1;I+=.5)B=r-I*s,F=B+s,k=Math.max(0,v-B)+Math.max(0,F-n+v),k<G&&(G=k,V=I);I=V}var Y=.5;I===.5&&(C=Math.floor(C),Y=1);var Z=e-C*o,se=Z+o,ge=Math.max(0,v-Z)+Math.max(0,se-i+v);if(ge>0){var Ee=C,Ve=ge;for(C=0;C<=1;C+=Y)Z=e-C*o,se=Z+o,ge=Math.max(0,v-Z)+Math.max(0,se-i+v),ge<Ve&&(Ve=ge,Ee=C);C=Ee}return M$.find(function(Fe){var pe=Wp[Fe];return pe.x===C&&pe.y===I})||f}var B$=Object.assign({},sl,{className:$e.string,longitude:$e.number.isRequired,latitude:$e.number.isRequired,altitude:$e.number,offsetLeft:$e.number,offsetTop:$e.number,tipSize:$e.number,closeButton:$e.bool,closeOnClick:$e.bool,anchor:$e.oneOf(Object.keys(Wp)),dynamicPosition:$e.bool,sortByDepth:$e.bool,onClose:$e.func}),O$=Object.assign({},Nu,{className:"",altitude:0,offsetLeft:0,offsetTop:0,tipSize:10,anchor:"bottom",dynamicPosition:!0,sortByDepth:!1,closeButton:!0,closeOnClick:!0,onClose:function(){}});function D$(t,e,r,i){var n=Gn(i,2),o=n[0],s=n[1],f=t.anchor,A=t.dynamicPosition,v=t.tipSize;return r&&A?R$({x:o,y:s,anchor:f,padding:v,width:e.width,height:e.height,selfWidth:r.clientWidth,selfHeight:r.clientHeight}):f}function F$(t,e,r,i,n){var o=Gn(i,3),s=o[0],f=o[1],A=o[2],v=t.offsetLeft,w=t.offsetTop,C=t.sortByDepth,I=Wp[n],B=s+v,F=f+w,k=qC(r,-I.x*100),V=qC(r,-I.y*100,"y"),G={position:"absolute",transform:`
|
1764
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,f;return{s:function(){r=t[Symbol.iterator]()},n:function(){var v=r.next();return o=v.done,v},e:function(v){s=!0,f=v},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(s)throw f}}}}function Qq(t,e){if(t){if(typeof t=="string")return zC(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zC(t,e)}}function zC(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function e$(t){var e=t$();return function(){var i=Gd(t),n;if(e){var o=Gd(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return c2(this,n)}}function t$(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var r$=["longitude","latitude","zoom","bearing","pitch"],Ep=function(t){l2(r,t);var e=e$(r);function r(){var i,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Lu(this,r),i=e.call(this),Array.isArray(n)&&(n={transitionProps:n}),i.propNames=n.transitionProps||r$,n.around&&(i.around=n.around),i}return Fu(r,[{key:"initializeProps",value:function(n,o){var s={},f={};if(this.around){s.around=this.around;var A=new jl(n).unproject(this.around);Object.assign(f,o,{around:new jl(o).project(A),aroundLngLat:A})}var v=UC(this.propNames),w;try{for(v.s();!(w=v.n()).done;){var C=w.value,I=n[C],B=o[C];Ga(jm(I)&&jm(B),"".concat(C," must be supplied for transition")),s[C]=I,f[C]=Tb(C,I,B)}}catch(F){v.e(F)}finally{v.f()}return{start:s,end:f}}},{key:"interpolateProps",value:function(n,o,s){var f={},A=UC(this.propNames),v;try{for(A.s();!(v=A.n()).done;){var w=v.value;f[w]=Vm(n[w],o[w],s)}}catch(k){A.e(k)}finally{A.f()}if(o.around){var C=new jl(Object.assign({},o,f)).getMapCenterByLngLatPosition({lngLat:o.aroundLngLat,pos:Vm(n.around,o.around,s)}),I=Gn(C,2),B=I[0],F=I[1];f.longitude=B,f.latitude=F}return f}}]),r}(F4),Sp=function(){};function i$(t,e){var r=t(e);return function(i){return 1/(1-r)*(t(i*(1-e)+e)-r)}}var Cp={BREAK:1,SNAP_TO_END:2,IGNORE:3,UPDATE:4},n$={transitionDuration:0,transitionEasing:function(e){return e},transitionInterpolator:new Ep,transitionInterruption:Cp.BREAK,onTransitionStart:Sp,onTransitionInterrupt:Sp,onTransitionEnd:Sp},J2=function(){function t(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Lu(this,t),Wt(this,"_animationFrame",null),Wt(this,"_onTransitionFrame",function(){e._animationFrame=requestAnimationFrame(e._onTransitionFrame),e._updateViewport()}),this.props=null,this.onViewportChange=r.onViewportChange||Sp,this.onStateChange=r.onStateChange||Sp,this.time=r.getTime||Date.now}return Fu(t,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(r){var i=this.props;if(this.props=r,!i||this._shouldIgnoreViewportChange(i,r))return!1;if(this._isTransitionEnabled(r)){var n=Object.assign({},i),o=Object.assign({},r);if(this._isTransitionInProgress()&&(i.onTransitionInterrupt(),this.state.interruption===Cp.SNAP_TO_END?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===Cp.UPDATE)){var s=this.time(),f=(s-this.state.startTime)/this.state.duration;o.transitionDuration=this.state.duration-(s-this.state.startTime),o.transitionEasing=i$(this.state.easing,f),o.transitionInterpolator=n.transitionInterpolator}return o.onTransitionStart(),this._triggerTransition(n,o),!0}return this._isTransitionInProgress()&&(i.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return!!this._animationFrame}},{key:"_isTransitionEnabled",value:function(r){var i=r.transitionDuration,n=r.transitionInterpolator;return(i>0||i==="auto")&&!!n}},{key:"_isUpdateDueToCurrentTransition",value:function(r){return this.state.propsInTransition?this.state.interpolator.arePropsEqual(r,this.state.propsInTransition):!1}},{key:"_shouldIgnoreViewportChange",value:function(r,i){return r?this._isTransitionInProgress()?this.state.interruption===Cp.IGNORE||this._isUpdateDueToCurrentTransition(i):this._isTransitionEnabled(i)?i.transitionInterpolator.arePropsEqual(r,i):!0:!0}},{key:"_triggerTransition",value:function(r,i){Ga(this._isTransitionEnabled(i)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var n=i.transitionInterpolator,o=n.getDuration?n.getDuration(r,i):i.transitionDuration;if(o!==0){var s=i.transitionInterpolator.initializeProps(r,i),f={inTransition:!0,isZooming:r.zoom!==i.zoom,isPanning:r.longitude!==i.longitude||r.latitude!==i.latitude,isRotating:r.bearing!==i.bearing||r.pitch!==i.pitch};this.state={duration:o,easing:i.transitionEasing,interpolator:i.transitionInterpolator,interruption:i.transitionInterruption,startTime:this.time(),startProps:s.start,endProps:s.end,animation:null,propsInTransition:{}},this._onTransitionFrame(),this.onStateChange(f)}}},{key:"_endTransition",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1})}},{key:"_updateViewport",value:function(){var r=this.time(),i=this.state,n=i.startTime,o=i.duration,s=i.easing,f=i.interpolator,A=i.startProps,v=i.endProps,w=!1,C=(r-n)/o;C>=1&&(C=1,w=!0),C=s(C);var I=f.interpolateProps(A,v,C),B=new Ud(Object.assign({},this.props,I));this.state.propsInTransition=B.getViewportProps(),this.onViewportChange(this.state.propsInTransition,this.props),w&&(this._endTransition(),this.props.onTransitionEnd())}}]),t}();Wt(J2,"defaultProps",n$);function VC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function ao(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?VC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):VC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var gh={transitionDuration:0},yc={transitionDuration:300,transitionEasing:function(e){return e},transitionInterpolator:new Ep,transitionInterruption:Cp.BREAK},xg=300,wg=function(e){return 1-(1-e)*(1-e)},Jf={WHEEL:["wheel"],PAN:["panstart","panmove","panend"],PINCH:["pinchstart","pinchmove","pinchend"],TRIPLE_PAN:["tripanstart","tripanmove","tripanend"],DOUBLE_TAP:["doubletap"],KEYBOARD:["keydown"]},L4=function(){function t(){var e=this;Lu(this,t),Wt(this,"events",[]),Wt(this,"scrollZoom",!0),Wt(this,"dragPan",!0),Wt(this,"dragRotate",!0),Wt(this,"doubleClickZoom",!0),Wt(this,"touchZoom",!0),Wt(this,"touchRotate",!1),Wt(this,"keyboard",!0),Wt(this,"_interactionState",{isDragging:!1}),Wt(this,"_events",{}),Wt(this,"_setInteractionState",function(r){Object.assign(e._interactionState,r),e.onStateChange&&e.onStateChange(e._interactionState)}),Wt(this,"_onTransition",function(r,i){e.onViewportChange(r,e._interactionState,i)}),this.handleEvent=this.handleEvent.bind(this),this._transitionManager=new J2({onViewportChange:this._onTransition,onStateChange:this._setInteractionState})}return Fu(t,[{key:"handleEvent",value:function(r){this.mapState=this.getMapState();var i=this._eventStartBlocked;switch(r.type){case"panstart":return i?!1:this._onPanStart(r);case"panmove":return this._onPan(r);case"panend":return this._onPanEnd(r);case"pinchstart":return i?!1:this._onPinchStart(r);case"pinchmove":return this._onPinch(r);case"pinchend":return this._onPinchEnd(r);case"tripanstart":return i?!1:this._onTriplePanStart(r);case"tripanmove":return this._onTriplePan(r);case"tripanend":return this._onTriplePanEnd(r);case"doubletap":return this._onDoubleTap(r);case"wheel":return this._onWheel(r);case"keydown":return this._onKeyDown(r);default:return!1}}},{key:"getCenter",value:function(r){var i=r.offsetCenter,n=i.x,o=i.y;return[n,o]}},{key:"isFunctionKeyPressed",value:function(r){var i=r.srcEvent;return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}},{key:"blockEvents",value:function(r){var i=this,n=setTimeout(function(){i._eventStartBlocked===n&&(i._eventStartBlocked=null)},r);this._eventStartBlocked=n}},{key:"updateViewport",value:function(r,i,n){var o=this.mapState instanceof Ud?this.mapState.getViewportProps():this.mapState,s=ao(ao({},r.getViewportProps()),i),f=Object.keys(s).some(function(A){return o[A]!==s[A]});this._state=r.getState(),this._setInteractionState(n),f&&this.onViewportChange(s,this._interactionState,o)}},{key:"getMapState",value:function(r){return new Ud(ao(ao(ao({},this.mapStateProps),this._state),r))}},{key:"isDragging",value:function(){return this._interactionState.isDragging}},{key:"setOptions",value:function(r){var i=r.onViewportChange,n=r.onStateChange,o=r.eventManager,s=o===void 0?this.eventManager:o,f=r.isInteractive,A=f===void 0?!0:f,v=r.scrollZoom,w=v===void 0?this.scrollZoom:v,C=r.dragPan,I=C===void 0?this.dragPan:C,B=r.dragRotate,F=B===void 0?this.dragRotate:B,k=r.doubleClickZoom,V=k===void 0?this.doubleClickZoom:k,G=r.touchZoom,Y=G===void 0?this.touchZoom:G,Z=r.touchRotate,se=Z===void 0?this.touchRotate:Z,ge=r.keyboard,Ee=ge===void 0?this.keyboard:ge;this.onViewportChange=i,this.onStateChange=n;var Ve=this.mapStateProps||{},Fe=Ve.height!==r.height||Ve.width!==r.width;this.mapStateProps=r,Fe&&(this.mapState=Ve,this.updateViewport(new Ud(r))),this._transitionManager.processViewportChange(r),this.eventManager!==s&&(this.eventManager=s,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(Jf.WHEEL,A&&!!w),this.toggleEvents(Jf.PAN,A&&!!(I||F)),this.toggleEvents(Jf.PINCH,A&&!!(Y||se)),this.toggleEvents(Jf.TRIPLE_PAN,A&&!!se),this.toggleEvents(Jf.DOUBLE_TAP,A&&!!V),this.toggleEvents(Jf.KEYBOARD,A&&!!Ee),this.scrollZoom=w,this.dragPan=I,this.dragRotate=F,this.doubleClickZoom=V,this.touchZoom=Y,this.touchRotate=se,this.keyboard=Ee}},{key:"toggleEvents",value:function(r,i){var n=this;this.eventManager&&r.forEach(function(o){n._events[o]!==i&&(n._events[o]=i,i?n.eventManager.on(o,n.handleEvent):n.eventManager.off(o,n.handleEvent))})}},{key:"_onPanStart",value:function(r){var i=this.getCenter(r);this._panRotate=this.isFunctionKeyPressed(r)||r.rightButton;var n=this._panRotate?this.mapState.rotateStart({pos:i}):this.mapState.panStart({pos:i});return this.updateViewport(n,gh,{isDragging:!0}),!0}},{key:"_onPan",value:function(r){return this.isDragging()?this._panRotate?this._onPanRotate(r):this._onPanMove(r):!1}},{key:"_onPanEnd",value:function(r){return this.isDragging()?this._panRotate?this._onPanRotateEnd(r):this._onPanMoveEnd(r):!1}},{key:"_onPanMove",value:function(r){if(!this.dragPan)return!1;var i=this.getCenter(r),n=this.mapState.pan({pos:i});return this.updateViewport(n,gh,{isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(r){if(this.dragPan){var i=this.dragPan.inertia,n=i===void 0?xg:i;if(n&&r.velocity){var o=this.getCenter(r),s=[o[0]+r.velocityX*n/2,o[1]+r.velocityY*n/2],f=this.mapState.pan({pos:s}).panEnd();return this.updateViewport(f,ao(ao({},yc),{},{transitionDuration:n,transitionEasing:wg}),{isDragging:!1,isPanning:!0}),!0}}var A=this.mapState.panEnd();return this.updateViewport(A,null,{isDragging:!1,isPanning:!1}),!0}},{key:"_onPanRotate",value:function(r){if(!this.dragRotate)return!1;var i=this.getCenter(r),n=this.mapState.rotate({pos:i});return this.updateViewport(n,gh,{isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(r){if(this.dragRotate){var i=this.dragRotate.inertia,n=i===void 0?xg:i;if(n&&r.velocity){var o=this.getCenter(r),s=[o[0]+r.velocityX*n/2,o[1]+r.velocityY*n/2],f=this.mapState.rotate({pos:s}).rotateEnd();return this.updateViewport(f,ao(ao({},yc),{},{transitionDuration:n,transitionEasing:wg}),{isDragging:!1,isRotating:!0}),!0}}var A=this.mapState.panEnd();return this.updateViewport(A,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onWheel",value:function(r){if(!this.scrollZoom)return!1;var i=this.scrollZoom,n=i.speed,o=n===void 0?.01:n,s=i.smooth,f=s===void 0?!1:s;r.preventDefault();var A=this.getCenter(r),v=r.delta,w=2/(1+Math.exp(-Math.abs(v*o)));v<0&&w!==0&&(w=1/w);var C=this.mapState.zoom({pos:A,scale:w});return C.getViewportProps().zoom===this.mapStateProps.zoom?!1:(this.updateViewport(C,ao(ao({},yc),{},{transitionInterpolator:new Ep({around:A}),transitionDuration:f?250:1}),{isPanning:!0,isZooming:!0}),!0)}},{key:"_onPinchStart",value:function(r){var i=this.getCenter(r),n=this.mapState.zoomStart({pos:i}).rotateStart({pos:i});return this._startPinchRotation=r.rotation,this._lastPinchEvent=r,this.updateViewport(n,gh,{isDragging:!0}),!0}},{key:"_onPinch",value:function(r){if(!this.isDragging()||!this.touchZoom&&!this.touchRotate)return!1;var i=this.mapState;if(this.touchZoom){var n=r.scale,o=this.getCenter(r);i=i.zoom({pos:o,scale:n})}if(this.touchRotate){var s=r.rotation;i=i.rotate({deltaAngleX:this._startPinchRotation-s})}return this.updateViewport(i,gh,{isDragging:!0,isPanning:!!this.touchZoom,isZooming:!!this.touchZoom,isRotating:!!this.touchRotate}),this._lastPinchEvent=r,!0}},{key:"_onPinchEnd",value:function(r){if(!this.isDragging())return!1;if(this.touchZoom){var i=this.touchZoom.inertia,n=i===void 0?xg:i,o=this._lastPinchEvent;if(n&&o&&r.scale!==o.scale){var s=this.getCenter(r),f=this.mapState.rotateEnd(),A=Math.log2(r.scale),v=(A-Math.log2(o.scale))/(r.deltaTime-o.deltaTime),w=Math.pow(2,A+v*n/2);return f=f.zoom({pos:s,scale:w}).zoomEnd(),this.updateViewport(f,ao(ao({},yc),{},{transitionInterpolator:new Ep({around:s}),transitionDuration:n,transitionEasing:wg}),{isDragging:!1,isPanning:!!this.touchZoom,isZooming:!!this.touchZoom,isRotating:!1}),this.blockEvents(n),!0}}var C=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(C,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),this._startPinchRotation=null,this._lastPinchEvent=null,!0}},{key:"_onTriplePanStart",value:function(r){var i=this.getCenter(r),n=this.mapState.rotateStart({pos:i});return this.updateViewport(n,gh,{isDragging:!0}),!0}},{key:"_onTriplePan",value:function(r){if(!this.isDragging()||!this.touchRotate)return!1;var i=this.getCenter(r);i[0]-=r.deltaX;var n=this.mapState.rotate({pos:i});return this.updateViewport(n,gh,{isRotating:!0}),!0}},{key:"_onTriplePanEnd",value:function(r){if(!this.isDragging())return!1;if(this.touchRotate){var i=this.touchRotate.inertia,n=i===void 0?xg:i;if(n&&r.velocityY){var o=this.getCenter(r),s=[o[0],o[1]+=r.velocityY*n/2],f=this.mapState.rotate({pos:s});return this.updateViewport(f,ao(ao({},yc),{},{transitionDuration:n,transitionEasing:wg}),{isDragging:!1,isRotating:!0}),this.blockEvents(n),!1}}var A=this.mapState.rotateEnd();return this.updateViewport(A,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(r){if(!this.doubleClickZoom)return!1;var i=this.getCenter(r),n=this.isFunctionKeyPressed(r),o=this.mapState.zoom({pos:i,scale:n?.5:2});return this.updateViewport(o,Object.assign({},yc,{transitionInterpolator:new Ep({around:i})}),{isZooming:!0}),!0}},{key:"_onKeyDown",value:function(r){if(!this.keyboard)return!1;var i=this.isFunctionKeyPressed(r),n=this.keyboard,o=n.zoomSpeed,s=o===void 0?2:o,f=n.moveSpeed,A=f===void 0?100:f,v=n.rotateSpeedX,w=v===void 0?15:v,C=n.rotateSpeedY,I=C===void 0?10:C,B=this.mapStateProps,F;switch(r.srcEvent.keyCode){case 189:i?F=this.getMapState({zoom:B.zoom-Math.log2(s)-1}):F=this.getMapState({zoom:B.zoom-Math.log2(s)});break;case 187:i?F=this.getMapState({zoom:B.zoom+Math.log2(s)+1}):F=this.getMapState({zoom:B.zoom+Math.log2(s)});break;case 37:i?F=this.getMapState({bearing:B.bearing-w}):F=this.mapState.pan({pos:[A,0],startPos:[0,0]});break;case 39:i?F=this.getMapState({bearing:B.bearing+w}):F=this.mapState.pan({pos:[-A,0],startPos:[0,0]});break;case 38:i?F=this.getMapState({pitch:B.pitch+I}):F=this.mapState.pan({pos:[0,A],startPos:[0,0]});break;case 40:i?F=this.getMapState({pitch:B.pitch-I}):F=this.mapState.pan({pos:[0,-A],startPos:[0,0]});break;default:return!1}return this.updateViewport(F,yc)}}]),t}();function jC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function gc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var s$=Object.assign({},Fc.propTypes,{maxZoom:$e.number,minZoom:$e.number,maxPitch:$e.number,minPitch:$e.number,onViewStateChange:$e.func,onViewportChange:$e.func,onInteractionStateChange:$e.func,transitionDuration:$e.oneOfType([$e.number,$e.string]),transitionInterpolator:$e.object,transitionInterruption:$e.number,transitionEasing:$e.func,onTransitionStart:$e.func,onTransitionInterrupt:$e.func,onTransitionEnd:$e.func,scrollZoom:$e.oneOfType([$e.bool,$e.object]),dragPan:$e.oneOfType([$e.bool,$e.object]),dragRotate:$e.oneOfType([$e.bool,$e.object]),doubleClickZoom:$e.bool,touchZoom:$e.oneOfType([$e.bool,$e.object]),touchRotate:$e.oneOfType([$e.bool,$e.object]),keyboard:$e.oneOfType([$e.bool,$e.object]),onHover:$e.func,onClick:$e.func,onDblClick:$e.func,onContextMenu:$e.func,onMouseDown:$e.func,onMouseMove:$e.func,onMouseUp:$e.func,onTouchStart:$e.func,onTouchMove:$e.func,onTouchEnd:$e.func,onMouseEnter:$e.func,onMouseLeave:$e.func,onMouseOut:$e.func,onWheel:$e.func,touchAction:$e.string,eventRecognizerOptions:$e.object,clickRadius:$e.number,interactiveLayerIds:$e.array,getCursor:$e.func,controller:$e.instanceOf(L4)}),o$=function(e){var r=e.isDragging,i=e.isHovering;return r?"grabbing":i?"pointer":"grab"},a$=Object.assign({},Fc.defaultProps,Ph,J2.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(e){return e.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",eventRecognizerOptions:{},clickRadius:0,getCursor:o$});function Q2(t){if(t.lngLat||!t.offsetCenter)return t;var e=t.offsetCenter,r=e.x,i=e.y;if(!Number.isFinite(r)||!Number.isFinite(i))return t;var n=[r,i];return t.point=n,t.lngLat=this.viewport.unproject(n),t}function k4(t){var e=this.map;if(!e||!t)return null;var r={},i=this.props.clickRadius;this.props.interactiveLayerIds&&(r.layers=this.props.interactiveLayerIds);try{return e.queryRenderedFeatures(i?[[t[0]-i,t[1]+i],[t[0]+i,t[1]-i]]:t,r)}catch{return null}}function Ec(t,e){var r=this.props[t];r&&r(Q2.call(this,e))}function l$(t){Ec.call(this,t.pointerType==="touch"?"onTouchStart":"onMouseDown",t)}function c$(t){Ec.call(this,t.pointerType==="touch"?"onTouchEnd":"onMouseUp",t)}function u$(t){if(Ec.call(this,t.pointerType==="touch"?"onTouchMove":"onMouseMove",t),!this.state.isDragging){var e=this.props,r=e.onHover,i=e.interactiveLayerIds,n;t=Q2.call(this,t),(i||r)&&(n=k4.call(this,t.point));var o=!!(i&&n&&n.length>0),s=o&&!this.state.isHovering,f=!o&&this.state.isHovering;(r||s)&&(t.features=n,r&&r(t)),s&&Ec.call(this,"onMouseEnter",t),f&&Ec.call(this,"onMouseLeave",t),(s||f)&&this.setState({isHovering:o})}}function HC(t){var e=this.props,r=e.onClick,i=e.onNativeClick,n=e.onDblClick,o=e.doubleClickZoom,s=[],f=n||o;switch(t.type){case"anyclick":s.push(i),f||s.push(r);break;case"click":f&&s.push(r);break}s=s.filter(Boolean),s.length&&(t=Q2.call(this,t),t.features=k4.call(this,t.point),s.forEach(function(A){return A(t)}))}function h$(t){return{getMap:t.current&&t.current.getMap,queryRenderedFeatures:t.current&&t.current.queryRenderedFeatures}}var ex=it.forwardRef(function(t,e){var r=it.useContext(qh),i=it.useMemo(function(){return t.controller||new L4},[]),n=it.useMemo(function(){return new e4(null,{touchAction:t.touchAction,recognizerOptions:t.eventRecognizerOptions})},[]),o=it.useRef(null),s=it.useRef(null),f=it.useRef({width:0,height:0,state:{isHovering:!1,isDragging:!1}}),A=f.current;A.props=t,A.map=s.current&&s.current.getMap(),A.setState=function(Ee){A.state=gc(gc({},A.state),Ee),o.current.style.cursor=t.getCursor(A.state)};var v=!0,w,C,I=function(Ve,Fe,pe){if(v){w=[Ve,Fe,pe];return}var Te=A.props,Ae=Te.onViewStateChange,Le=Te.onViewportChange;Ae&&Ae({viewState:Ve,interactionState:Fe,oldViewState:pe}),Le&&Le(Ve,Fe,pe)};it.useImperativeHandle(e,function(){return h$(s)},[]);var B=it.useMemo(function(){return gc(gc({},r),{},{eventManager:n,container:r.container||o.current})},[r,o.current]);B.onViewportChange=I,B.viewport=r.viewport||D4(A),A.viewport=B.viewport;var F=function(Ve){var Fe=Ve.isDragging,pe=Fe===void 0?!1:Fe;if(pe!==A.state.isDragging&&A.setState({isDragging:pe}),v){C=Ve;return}var Te=A.props.onInteractionStateChange;Te&&Te(Ve)},k=function(){A.width&&A.height&&i.setOptions(gc(gc(gc({},A.props),A.props.viewState),{},{isInteractive:!!(A.props.onViewStateChange||A.props.onViewportChange),onViewportChange:I,onStateChange:F,eventManager:n,width:A.width,height:A.height}))},V=function(Ve){var Fe=Ve.width,pe=Ve.height;A.width=Fe,A.height=pe,k(),A.props.onResize({width:Fe,height:pe})};it.useEffect(function(){return n.setElement(o.current),n.on({pointerdown:l$.bind(A),pointermove:u$.bind(A),pointerup:c$.bind(A),pointerleave:Ec.bind(A,"onMouseOut"),click:HC.bind(A),anyclick:HC.bind(A),dblclick:Ec.bind(A,"onDblClick"),wheel:Ec.bind(A,"onWheel"),contextmenu:Ec.bind(A,"onContextMenu")}),function(){n.destroy()}},[]),wb(function(){w&&I.apply(void 0,RL(w)),C&&F(C)}),k();var G=t.width,Y=t.height,Z=t.style,se=t.getCursor,ge=it.useMemo(function(){return gc(gc({position:"relative"},Z),{},{width:G,height:Y,cursor:se(A.state)})},[Z,G,Y,se,A.state]);return(!w||!A._child)&&(A._child=it.createElement(Y2,{value:B},it.createElement("div",{key:"event-canvas",ref:o,style:ge},it.createElement(Fc,jM({},t,{width:"100%",height:"100%",style:null,onResize:V,ref:s}))))),v=!1,A._child});ex.supported=Fc.supported;ex.propTypes=s$;ex.defaultProps=a$;$e.string.isRequired,$e.string;var f$=["fill","line","symbol","circle","fill-extrusion","raster","background","heatmap","hillshade"];$e.oneOf(f$).isRequired,$e.string,$e.string,$e.string;var Nu={captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0,capturePointerMove:!1},sl={captureScroll:$e.bool,captureDrag:$e.bool,captureClick:$e.bool,captureDoubleClick:$e.bool,capturePointerMove:$e.bool};function d$(t){var e=t.containerRef.current,r=t.context.eventManager;if(!(!e||!r)){var i={wheel:function(o){var s=t.props;s.captureScroll&&o.stopPropagation(),s.onScroll&&s.onScroll(o,t)},panstart:function(o){var s=t.props;s.captureDrag&&o.stopPropagation(),s.onDragStart&&s.onDragStart(o,t)},anyclick:function(o){var s=t.props;s.captureClick&&o.stopPropagation(),s.onNativeClick&&s.onNativeClick(o,t)},click:function(o){var s=t.props;s.captureClick&&o.stopPropagation(),s.onClick&&s.onClick(o,t)},dblclick:function(o){var s=t.props;s.captureDoubleClick&&o.stopPropagation(),s.onDoubleClick&&s.onDoubleClick(o,t)},pointermove:function(o){var s=t.props;s.capturePointerMove&&o.stopPropagation(),s.onPointerMove&&s.onPointerMove(o,t)}};return r.watch(i,e),function(){r.off(i)}}}function Uu(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=it.useContext(qh),r=it.useRef(null),i=it.useRef({props:t,state:{},context:e,containerRef:r}),n=i.current;return n.props=t,n.context=e,it.useEffect(function(){return d$(n)},[e.eventManager]),n}function A$(t){var e=p$();return function(){var i=Gd(t),n;if(e){var o=Gd(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return c2(this,n)}}function p$(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function g$(t){var e=t.instance,r=Uu(t),i=r.context,n=r.containerRef;return e._context=i,e._containerRef=n,e._render()}var N4=function(t){l2(r,t);var e=A$(r);function r(){var i;Lu(this,r);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return i=e.call.apply(e,[this].concat(o)),Wt(yu(i),"_context",{}),Wt(yu(i),"_containerRef",it.createRef()),Wt(yu(i),"_onScroll",function(f){}),Wt(yu(i),"_onDragStart",function(f){}),Wt(yu(i),"_onDblClick",function(f){}),Wt(yu(i),"_onClick",function(f){}),Wt(yu(i),"_onPointerMove",function(f){}),i}return Fu(r,[{key:"_render",value:function(){throw new Error("_render() not implemented")}},{key:"render",value:function(){return it.createElement(g$,jM({instance:this},this.props,{onScroll:this._onScroll,onDragStart:this._onDragStart,onDblClick:this._onDblClick,onClick:this._onClick,onPointerMove:this._onPointerMove}))}}]),r}(it.PureComponent);Wt(N4,"propTypes",sl);Wt(N4,"defaultProps",Nu);function GC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function WC(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?GC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):GC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var m$=Object.assign({},sl,{draggable:$e.bool,onDrag:$e.func,onDragEnd:$e.func,onDragStart:$e.func,offsetLeft:$e.number,offsetTop:$e.number}),_$=Object.assign({},Nu,{draggable:!1,offsetLeft:0,offsetTop:0});function U4(t){var e=t.offsetCenter,r=e.x,i=e.y;return[r,i]}function y$(t,e){var r=t.center,i=r.x,n=r.y;if(e){var o=e.getBoundingClientRect();return[o.left-i,o.top-n]}return null}function tx(t,e,r,i){var n=t[0]+e[0]-r.offsetLeft,o=t[1]+e[1]-r.offsetTop;return i.viewport.unproject([n,o])}function v$(t,e){var r=e.props,i=e.callbacks,n=e.state,o=e.context,s=e.containerRef,f=r.draggable;if(f){t.stopPropagation();var A=U4(t),v=y$(t,s.current);if(n.setDragPos(A),n.setDragOffset(v),i.onDragStart&&v){var w=Object.assign({},t);w.lngLat=tx(A,v,r,o),i.onDragStart(w)}}}function b$(t,e){var r=e.props,i=e.callbacks,n=e.state,o=e.context;t.stopPropagation();var s=U4(t);n.setDragPos(s);var f=n.dragOffset;if(i.onDrag&&f){var A=Object.assign({},t);A.lngLat=tx(s,f,r,o),i.onDrag(A)}}function x$(t,e){var r=e.props,i=e.callbacks,n=e.state,o=e.context;t.stopPropagation();var s=n.dragPos,f=n.dragOffset;if(n.setDragPos(null),n.setDragOffset(null),i.onDragEnd&&s&&f){var A=Object.assign({},t);A.lngLat=tx(s,f,r,o),i.onDragEnd(A)}}function w$(t,e){var r=e.state;t.stopPropagation(),r.setDragPos(null),r.setDragOffset(null)}function T$(t){var e=t.context.eventManager;if(!(!e||!t.state.dragPos)){var r={panmove:function(n){return b$(n,t)},panend:function(n){return x$(n,t)},pancancel:function(n){return w$(n,t)}};return e.watch(r),function(){e.off(r)}}}function E$(t){var e=it.useState(null),r=Gn(e,2),i=r[0],n=r[1],o=it.useState(null),s=Gn(o,2),f=s[0],A=s[1],v=Uu(WC(WC({},t),{},{onDragStart:v$}));return v.callbacks=t,v.state.dragPos=i,v.state.setDragPos=n,v.state.dragOffset=f,v.state.setDragOffset=A,it.useEffect(function(){return T$(v)},[v.context.eventManager,!!i]),v}var XC=typeof window<"u"&&window.devicePixelRatio||1,Gp=function(e){return Math.round(e*XC)/XC},qC=function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"x";if(e===null)return r;var n=i==="x"?e.offsetWidth:e.offsetHeight;return Gp(r/100*n)/n*100};function $C(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function S$(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$C(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$C(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var C$=Object.assign({},m$,{className:$e.string,longitude:$e.number.isRequired,latitude:$e.number.isRequired,style:$e.object}),P$=Object.assign({},_$,{className:""});function I$(t){var e=t.props,r=t.state,i=t.context,n=e.longitude,o=e.latitude,s=e.offsetLeft,f=e.offsetTop,A=r.dragPos,v=r.dragOffset;if(A&&v)return[A[0]+v[0],A[1]+v[1]];var w=i.viewport.project([n,o]),C=Gn(w,2),I=C[0],B=C[1];return I+=s,B+=f,[I,B]}function rx(t){var e=E$(t),r=e.state,i=e.containerRef,n=t.children,o=t.className,s=t.draggable,f=t.style,A=r.dragPos,v=I$(e),w=Gn(v,2),C=w[0],I=w[1],B="translate(".concat(Gp(C),"px, ").concat(Gp(I),"px)"),F=s?A?"grabbing":"grab":"auto",k=it.useMemo(function(){var G=S$({position:"absolute",left:0,top:0,transform:B,cursor:F},f);return it.createElement("div",{className:"mapboxgl-marker ".concat(o),ref:e.containerRef,style:G},n)},[n,o]),V=i.current;return V&&(V.style.transform=B,V.style.cursor=F),k}rx.defaultProps=P$;rx.propTypes=C$;it.memo(rx);var Wp={top:{x:.5,y:0},"top-left":{x:0,y:0},"top-right":{x:1,y:0},bottom:{x:.5,y:1},"bottom-left":{x:0,y:1},"bottom-right":{x:1,y:1},left:{x:0,y:.5},right:{x:1,y:.5}},M$=Object.keys(Wp);function R$(t){var e=t.x,r=t.y,i=t.width,n=t.height,o=t.selfWidth,s=t.selfHeight,f=t.anchor,A=t.padding,v=A===void 0?0:A,w=Wp[f],C=w.x,I=w.y,B=r-I*s,F=B+s,k=Math.max(0,v-B)+Math.max(0,F-n+v);if(k>0){var V=I,G=k;for(I=0;I<=1;I+=.5)B=r-I*s,F=B+s,k=Math.max(0,v-B)+Math.max(0,F-n+v),k<G&&(G=k,V=I);I=V}var Y=.5;I===.5&&(C=Math.floor(C),Y=1);var Z=e-C*o,se=Z+o,ge=Math.max(0,v-Z)+Math.max(0,se-i+v);if(ge>0){var Ee=C,Ve=ge;for(C=0;C<=1;C+=Y)Z=e-C*o,se=Z+o,ge=Math.max(0,v-Z)+Math.max(0,se-i+v),ge<Ve&&(Ve=ge,Ee=C);C=Ee}return M$.find(function(Fe){var pe=Wp[Fe];return pe.x===C&&pe.y===I})||f}var B$=Object.assign({},sl,{className:$e.string,longitude:$e.number.isRequired,latitude:$e.number.isRequired,altitude:$e.number,offsetLeft:$e.number,offsetTop:$e.number,tipSize:$e.number,closeButton:$e.bool,closeOnClick:$e.bool,anchor:$e.oneOf(Object.keys(Wp)),dynamicPosition:$e.bool,sortByDepth:$e.bool,onClose:$e.func}),O$=Object.assign({},Nu,{className:"",altitude:0,offsetLeft:0,offsetTop:0,tipSize:10,anchor:"bottom",dynamicPosition:!0,sortByDepth:!1,closeButton:!0,closeOnClick:!0,onClose:function(){}});function D$(t,e,r,i){var n=Gn(i,2),o=n[0],s=n[1],f=t.anchor,A=t.dynamicPosition,v=t.tipSize;return r&&A?R$({x:o,y:s,anchor:f,padding:v,width:e.width,height:e.height,selfWidth:r.clientWidth,selfHeight:r.clientHeight}):f}function F$(t,e,r,i,n){var o=Gn(i,3),s=o[0],f=o[1],A=o[2],v=t.offsetLeft,w=t.offsetTop,C=t.sortByDepth,I=Wp[n],B=s+v,F=f+w,k=qC(r,-I.x*100),V=qC(r,-I.y*100,"y"),G={position:"absolute",transform:`
|
1765
1765
|
translate(`.concat(k,"%, ").concat(V,`%)
|
1766
1766
|
translate(`).concat(Gp(B),"px, ").concat(Gp(F),`px)
|
1767
1767
|
`),display:void 0,zIndex:void 0};return C&&(A>1||A<-1||s<0||s>e.width||f<0||f>e.height?G.display="none":G.zIndex=Math.floor((1-A)/2*1e5)),G}function ix(t){var e=it.useRef(null),r=Uu(t),i=r.context,n=r.containerRef,o=it.useState(!1),s=Gn(o,2),f=s[1];it.useEffect(function(){f(!0)},[e.current]),it.useEffect(function(){if(i.eventManager&&t.closeOnClick){var se=function(){return r.props.onClose()};return i.eventManager.on("anyclick",se),function(){i.eventManager.off("anyclick",se)}}},[i.eventManager,t.closeOnClick]);var A=i.viewport,v=t.className,w=t.longitude,C=t.latitude,I=t.altitude,B=t.tipSize,F=t.closeButton,k=t.children,V=A.project([w,C,I]),G=D$(t,A,e.current,V),Y=F$(t,A,n.current,V,G),Z=it.useCallback(function(se){r.props.onClose();var ge=r.context.eventManager;ge&&ge.once("click",function(Ee){return Ee.stopPropagation()},se.target)},[]);return it.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(G," ").concat(v),style:Y,ref:n},it.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:B}}),it.createElement("div",{key:"content",ref:e,className:"mapboxgl-popup-content"},F&&it.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button",onClick:Z},"×"),k))}ix.propTypes=B$;ix.defaultProps=O$;it.memo(ix);function ZC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function L$(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ZC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ZC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var k$=Object.assign({},sl,{toggleLabel:$e.string,className:$e.string,style:$e.object,compact:$e.bool,customAttribution:$e.oneOfType([$e.string,$e.arrayOf($e.string)])}),N$=Object.assign({},Nu,{className:"",toggleLabel:"Toggle Attribution"});function U$(t,e,r,i){var n=new Wl.AttributionControl(t);return n._map=e,n._container=r,n._innerContainer=i,n._updateAttributions(),n._updateEditLink(),e.on("styledata",n._updateData),e.on("sourcedata",n._updateData),n}function z$(t){t._map.off("styledata",t._updateData),t._map.off("sourcedata",t._updateData)}function nx(t){var e=Uu(t),r=e.context,i=e.containerRef,n=it.useRef(null),o=it.useState(!1),s=Gn(o,2),f=s[0],A=s[1];it.useEffect(function(){var I;return r.map&&(I=U$({customAttribution:t.customAttribution},r.map,i.current,n.current)),function(){return I&&z$(I)}},[r.map]);var v=t.compact===void 0?r.viewport.width<=640:t.compact;it.useEffect(function(){!v&&f&&A(!1)},[v]);var w=it.useCallback(function(){return A(function(I){return!I})},[]),C=it.useMemo(function(){return L$({position:"absolute"},t.style)},[t.style]);return it.createElement("div",{style:C,className:t.className},it.createElement("div",{ref:i,"aria-pressed":f,className:"mapboxgl-ctrl mapboxgl-ctrl-attrib ".concat(v?"mapboxgl-compact":""," ").concat(f?"mapboxgl-compact-show":"")},it.createElement("button",{type:"button",className:"mapboxgl-ctrl-attrib-button",title:t.toggleLabel,onClick:w}),it.createElement("div",{ref:n,className:"mapboxgl-ctrl-attrib-inner",role:"list"})))}nx.propTypes=k$;nx.defaultProps=N$;it.memo(nx);function KC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function V$(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?KC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):KC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var j$=Object.assign({},sl,{className:$e.string,style:$e.object,container:$e.object,label:$e.string}),H$=Object.assign({},Nu,{className:"",container:null,label:"Toggle fullscreen"});function sx(t){var e=Uu(t),r=e.context,i=e.containerRef,n=it.useState(!1),o=Gn(n,2),s=o[0],f=o[1],A=it.useState(!1),v=Gn(A,2),w=v[0],C=v[1],I=it.useState(null),B=Gn(I,2),F=B[0],k=B[1];it.useEffect(function(){var ge=new Wl.FullscreenControl;k(ge),C(ge._checkFullscreenSupport());var Ee=function(){var Fe=!ge._fullscreen;ge._fullscreen=Fe,f(Fe)};return xc.addEventListener(ge._fullscreenchange,Ee),function(){xc.removeEventListener(ge._fullscreenchange,Ee)}},[]);var V=function(){F&&(F._container=t.container||r.container,F._onClickFullscreen())},G=it.useMemo(function(){return V$({position:"absolute"},t.style)},[t.style]);if(!w)return null;var Y=t.className,Z=t.label,se=s?"shrink":"fullscreen";return it.createElement("div",{style:G,className:Y},it.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:i},it.createElement("button",{key:se,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(se),type:"button",title:Z,onClick:V},it.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}sx.propTypes=j$;sx.defaultProps=H$;it.memo(sx);var Qf;function G$(){return Qf!==void 0?Promise.resolve(Qf):window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(function(t){return Qf=t.state!=="denied",Qf}):(Qf=!!window.navigator.geolocation,Promise.resolve(Qf))}function YC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function W$(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?YC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):YC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var JC=function(){},X$=Object.assign({},sl,{className:$e.string,style:$e.object,label:$e.string,disabledLabel:$e.string,auto:$e.bool,positionOptions:$e.object,fitBoundsOptions:$e.object,trackUserLocation:$e.bool,showUserLocation:$e.bool,showAccuracyCircle:$e.bool,showUserHeading:$e.bool,onViewStateChange:$e.func,onViewportChange:$e.func,onGeolocate:$e.func}),q$=Object.assign({},Nu,{className:"",label:"Find My Location",disabledLabel:"Location Not Available",auto:!1,positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0,showUserHeading:!1,showAccuracyCircle:!0,onGeolocate:function(){}});function $$(t){var e=new Wl.LngLat(t.coords.longitude,t.coords.latitude),r=t.coords.accuracy,i=e.toBounds(r);return[[i._ne.lng,i._ne.lat],[i._sw.lng,i._sw.lat]]}function Z$(t,e,r){var i=new Wl.GeolocateControl(e);i._container=xc.createElement("div"),i._map={on:function(){},_getUIString:function(){return""}},i._setupUI(!0),i._map=t.map,i._geolocateButton=r;var n=t.eventManager;return i.options.trackUserLocation&&n&&n.on("panstart",function(){i._watchState==="ACTIVE_LOCK"&&(i._watchState="BACKGROUND",r.classList.add("mapboxgl-ctrl-geolocate-background"),r.classList.remove("mapboxgl-ctrl-geolocate-active"))}),i.on("geolocate",e.onGeolocate),i}function K$(t,e){var r=e.context,i=e.props,n=$$(t),o=r.viewport.fitBounds(n,i.fitBoundsOptions),s=o.longitude,f=o.latitude,A=o.zoom,v=Object.assign({},r.viewport,{longitude:s,latitude:f,zoom:A}),w=new Ud(v),C=Object.assign({},w.getViewportProps(),yc),I=i.onViewportChange||r.onViewportChange||JC,B=i.onViewStateChange||r.onViewStateChange||JC;B({viewState:C}),I(C)}function ox(t){var e=Uu(t),r=e.context,i=e.containerRef,n=it.useRef(null),o=it.useState(null),s=Gn(o,2),f=s[0],A=s[1],v=it.useState(!1),w=Gn(v,2),C=w[0],I=w[1];it.useEffect(function(){var Z;return r.map&&G$().then(function(se){I(se),n.current&&(Z=Z$(r,t,n.current),Z._updateCamera=function(ge){return K$(ge,e)},A(Z))}),function(){Z&&Z._clearWatch()}},[r.map]);var B=it.useCallback(function(){f&&(f.options=e.props,f.trigger())},[f]);it.useEffect(function(){t.auto&&B()},[f,t.auto]),it.useEffect(function(){f&&f._onZoom()},[r.viewport.zoom]);var F=t.className,k=t.label,V=t.disabledLabel,G=t.trackUserLocation,Y=it.useMemo(function(){return W$({position:"absolute"},t.style)},[t.style]);return it.createElement("div",{style:Y,className:F},it.createElement("div",{key:"geolocate-control",className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:i},it.createElement("button",{key:"geolocate",className:"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",ref:n,disabled:!C,"aria-pressed":!G,type:"button",title:C?k:V,"aria-label":C?k:V,onClick:B},it.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}ox.propTypes=X$;ox.defaultProps=q$;it.memo(ox);function Y$(t,e){for(var r=(t||"").split(".").map(Number),i=e.split(".").map(Number),n=0;n<3;n++){var o=r[n]||0,s=i[n]||0;if(o<s)return-1;if(o>s)return 1}return 0}function QC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function J$(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?QC(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):QC(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var e3=function(){},Q$=Object.assign({},sl,{className:$e.string,style:$e.object,onViewStateChange:$e.func,onViewportChange:$e.func,showCompass:$e.bool,showZoom:$e.bool,zoomInLabel:$e.string,zoomOutLabel:$e.string,compassLabel:$e.string}),eZ=Object.assign({},Nu,{className:"",showCompass:!0,showZoom:!0,zoomInLabel:"Zoom In",zoomOutLabel:"Zoom Out",compassLabel:"Reset North"}),tZ=1,Eb=2;function rZ(t){return Y$(t,"1.6.0")>=0?Eb:tZ}function Mv(t,e,r){var i=t.viewport,n=new Ud(Object.assign({},i,r)),o=Object.assign({},n.getViewportProps(),yc),s=e.onViewportChange||t.onViewportChange||e3,f=e.onViewStateChange||t.onViewStateChange||e3;f({viewState:o}),s(o)}function Rv(t,e,r,i){return it.createElement("button",{key:t,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(t),type:"button",title:e,onClick:r},i||it.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}function iZ(t){var e=it.useMemo(function(){return t.map?rZ(t.map.version):Eb},[t.map]),r=t.viewport.bearing,i={transform:"rotate(".concat(-r,"deg)")};return e===Eb?it.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:i}):it.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:i})}function ax(t){var e=Uu(t),r=e.context,i=e.containerRef,n=function(){Mv(r,t,{zoom:r.viewport.zoom+1})},o=function(){Mv(r,t,{zoom:r.viewport.zoom-1})},s=function(){Mv(r,t,{bearing:0,pitch:0})},f=t.className,A=t.showCompass,v=t.showZoom,w=t.zoomInLabel,C=t.zoomOutLabel,I=t.compassLabel,B=it.useMemo(function(){return J$({position:"absolute"},t.style)},[t.style]);return it.createElement("div",{style:B,className:f},it.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:i},v&&Rv("zoom-in",w,n),v&&Rv("zoom-out",C,o),A&&Rv("compass",I,s,iZ(r))))}ax.propTypes=Q$;ax.defaultProps=eZ;const nZ=it.memo(ax);function t3(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function sZ(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?t3(Object(r),!0).forEach(function(i){Wt(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):t3(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}var oZ=Object.assign({},sl,{className:$e.string,style:$e.object,maxWidth:$e.number,unit:$e.oneOf(["imperial","metric","nautical"])}),aZ=Object.assign({},Nu,{className:"",maxWidth:100,unit:"metric"});function lx(t){var e=Uu(t),r=e.context,i=e.containerRef,n=it.useState(null),o=Gn(n,2),s=o[0],f=o[1];it.useEffect(function(){if(r.map){var v=new Wl.ScaleControl;v._map=r.map,v._container=i.current,f(v)}},[r.map]),s&&(s.options=t,s._onMove&&s._onMove());var A=it.useMemo(function(){return sZ({position:"absolute"},t.style)},[t.style]);return it.createElement("div",{style:A,className:t.className},it.createElement("div",{ref:i,className:"mapboxgl-ctrl mapboxgl-ctrl-scale"}))}lx.propTypes=oZ;lx.defaultProps=aZ;it.memo(lx);Object.assign({},sl,{redraw:$e.func.isRequired});Object.assign({},sl,{redraw:$e.func.isRequired,style:$e.object});Object.assign({},sl,{redraw:$e.func.isRequired,style:$e.object});Wl&&Wl.setRTLTextPlugin;/* @license
|
@@ -1778,7 +1778,7 @@ License: MIT
|
|
1778
1778
|
`:"\r"}function Ve(Fe,pe,Te,Ae){I.errors.push({type:Fe,code:pe,message:Te,row:Ae})}}function Xp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Sb(t){t=t||{};var e=t.delimiter,r=t.newline,i=t.comments,n=t.step,o=t.preview,s=t.fastMode,f;t.quoteChar===void 0?f='"':f=t.quoteChar;var A=f;if(t.escapeChar!==void 0&&(A=t.escapeChar),(typeof e!="string"||Ko.BAD_DELIMITERS.indexOf(e)>-1)&&(e=","),i===e)throw new Error("Comment character same as delimiter");i===!0?i="#":(typeof i!="string"||Ko.BAD_DELIMITERS.indexOf(i)>-1)&&(i=!1),r!==`
|
1779
1779
|
`&&r!=="\r"&&r!==`\r
|
1780
1780
|
`&&(r=`
|
1781
|
-
`);var v=0,w=!1;this.parse=function(C,I,B){if(typeof C!="string")throw new Error("Input must be a string");var F=C.length,k=e.length,V=r.length,G=i.length,Y=co(n);v=0;var Z=[],se=[],ge=[],Ee=0;if(!C)return Ot();if(s||s!==!1&&C.indexOf(f)===-1){for(var Ve=C.split(r),Fe=0;Fe<Ve.length;Fe++){if(ge=Ve[Fe],v+=ge.length,Fe!==Ve.length-1)v+=r.length;else if(B)return Ot();if(!(i&&ge.substr(0,G)===i)){if(Y){if(Z=[],gr(ge.split(e)),Qt(),w)return Ot()}else gr(ge.split(e));if(o&&Fe>=o)return Z=Z.slice(0,o),Ot(!0)}}return Ot()}for(var pe=C.indexOf(e,v),Te=C.indexOf(r,v),Ae=new RegExp(Xp(A)+Xp(f),"g"),Le;;){if(C[v]===f){for(Le=v,v++;;){if(Le=C.indexOf(f,Le+1),Le===-1)return B||se.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Z.length,index:v}),_r();if(Le===F-1){var ze=C.substring(v,Le).replace(Ae,f);return _r(ze)}if(f===A&&C[Le+1]===A){Le++;continue}if(!(f!==A&&Le!==0&&C[Le-1]===A)){var Xe=Te===-1?pe:Math.min(pe,Te),dt=mr(Xe);if(C[Le+1+dt]===e){if(ge.push(C.substring(v,Le).replace(Ae,f)),v=Le+1+dt+k,pe=C.indexOf(e,v),Te=C.indexOf(r,v),Y&&(Qt(),w))return Ot();if(o&&Z.length>=o)return Ot(!0);break}var Nt=mr(Te);if(C.substr(Le+1+Nt,V)===r){if(ge.push(C.substring(v,Le).replace(Ae,f)),rr(Le+1+Nt+V),pe=C.indexOf(e,v),Y&&(Qt(),w))return Ot();if(o&&Z.length>=o)return Ot(!0);break}se.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Z.length,index:v}),Le++}}if(Y&&(Qt(),w))return Ot();if(o&&Z.length>=o)return Ot(!0);continue}if(i&&ge.length===0&&C.substr(v,G)===i){if(Te===-1)return Ot();v=Te+V,Te=C.indexOf(r,v),pe=C.indexOf(e,v);continue}if(pe!==-1&&(pe<Te||Te===-1)){ge.push(C.substring(v,pe)),v=pe+k,pe=C.indexOf(e,v);continue}if(Te!==-1){if(ge.push(C.substring(v,Te)),rr(Te+V),Y&&(Qt(),w))return Ot();if(o&&Z.length>=o)return Ot(!0);continue}break}return _r();function gr(qt){Z.push(qt),Ee=v}function mr(qt){var Rt=0;if(qt!==-1){var ut=C.substring(Le+1,qt);ut&&ut.trim()===""&&(Rt=ut.length)}return Rt}function _r(qt){return B||(typeof qt>"u"&&(qt=C.substr(v)),ge.push(qt),v=F,gr(ge),Y&&Qt()),Ot()}function rr(qt){v=qt,gr(ge),ge=[],Te=C.indexOf(r,v)}function Ot(qt,Rt){var ut=Rt||!1;return{data:ut?Z[0]:Z,errors:se,meta:{delimiter:e,linebreak:r,aborted:w,truncated:!!qt,cursor:Ee+(I||0)}}}function Qt(){n(Ot(void 0,!0)),Z=[],se=[]}},this.abort=function(){w=!0},this.getCharIndex=function(){return v}}function cx(t){if(typeof t!="object"||t===null)return t;var e=Array.isArray(t)?[]:{};for(var r in t)e[r]=cx(t[r]);return e}function co(t){return typeof t=="function"}const{ChunkStreamer:j4}=Ko;function Hm(t){t=t||{},j4.call(this,t),this.textDecoder=new TextDecoder(this._config.encoding),this.stream=async function(e){this._input=e;try{for await(const r of e)this.parseChunk(this.getStringChunk(r));this._finished=!0,this.parseChunk("")}catch(r){this._sendError(r)}},this._nextChunk=function(){},this.getStringChunk=function(e){return typeof e=="string"?e:this.textDecoder.decode(e,{stream:!0})}}Hm.prototype=Object.create(j4.prototype);Hm.prototype.constructor=Hm;const uZ="4.2.4",ux="object-row-table",hx={dataType:null,batchType:null,id:"csv",module:"csv",name:"CSV",version:uZ,extensions:["csv","tsv","dsv"],mimeTypes:["text/csv","text/tab-separated-values","text/dsv"],category:"table",parse:async(t,e)=>i3(new TextDecoder().decode(t),e),parseText:(t,e)=>i3(t,e),parseInBatches:hZ,options:{csv:{shape:ux,optimizeMemoryUsage:!1,header:"auto",columnPrefix:"column",quoteChar:'"',escapeChar:'"',dynamicTyping:!0,comments:!1,skipEmptyLines:!0,delimitersToGuess:[","," ","|",";"]}}};async function i3(t,e){const r={...hx.options.csv,...e==null?void 0:e.csv},i=fZ(t),o=r.header==="auto"?H4(i):!!r.header,s={...r,header:o,download:!1,transformHeader:o?G4():void 0,error:C=>{throw new Error(C)}},f=Ko.parse(t,s),A=f.data,v=f.meta.fields||W4(r.columnPrefix,i.length),w=r.shape||ux;switch(w){case"object-row-table":return{shape:"object-row-table",data:A.map(C=>Array.isArray(C)?mR(C,v):C)};case"array-row-table":return{shape:"array-row-table",data:A.map(C=>Array.isArray(C)?C:_R(C,v))};default:throw new Error(w)}}function hZ(t,e){e={...e},e.batchSize==="auto"&&(e.batchSize=4e3);const r={...hx.options.csv,...e==null?void 0:e.csv},i=new J8;let n=!0,o=null,s=null,f=null;const A={...r,header:!1,download:!1,chunkSize:1024*1024*5,skipEmptyLines:!1,step(v){let w=v.data;if(r.skipEmptyLines&&w.flat().join("").trim()==="")return;const C=v.meta.cursor;if(n&&!o&&(r.header==="auto"?H4(w):!!r.header)){o=w.map(G4());return}n&&(n=!1,o||(o=W4(r.columnPrefix,w.length)),f=dZ(w,o)),r.optimizeMemoryUsage&&(w=JSON.parse(JSON.stringify(w)));const I=r.shape||ux;s=s||new C1(f,{shape:I,...e});try{s.addRow(w);const B=s&&s.getFullBatch({bytesUsed:C});B&&i.enqueue(B)}catch(B){i.enqueue(B)}},complete(v){try{const w=v.meta.cursor,C=s&&s.getFinalBatch({bytesUsed:w});C&&i.enqueue(C)}catch(w){i.enqueue(w)}i.close()}};return Ko.parse(t,A,Hm),i}function H4(t){return t&&t.every(e=>typeof e=="string")}function fZ(t){return Ko.parse(t,{download:!1,dynamicTyping:!0,preview:1}).data[0]}function G4(){const t=new Set;return e=>{let r=e,i=1;for(;t.has(r);)r=`${e}.${i}`,i++;return t.add(r),r}}function W4(t,e=0){const r=[];for(let i=0;i<e;i++)r.push(`${t}${i+1}`);return r}function dZ(t,e){const r=e?{}:[];for(let i=0;i<t.length;i++){const n=e&&e[i]||i;switch(typeof t[i]){case"number":case"boolean":r[n]={name:String(n),index:i,type:Float32Array};break;case"string":default:r[n]={name:String(n),index:i,type:Array}}}return r}function Yo(t,e){if(!t)throw new Error(e||"assert failed: gltf")}const X4={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},q4={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},AZ=1.33,n3=["SCALAR","VEC2","VEC3","VEC4"],pZ=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],gZ=new Map(pZ),mZ={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},_Z={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},yZ={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function $4(t){return n3[t-1]||n3[0]}function fx(t){const e=gZ.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function dx(t,e){const r=yZ[t.componentType],i=mZ[t.type],n=_Z[t.componentType],o=t.count*i,s=t.count*i*n;Yo(s>=0&&s<=e.byteLength);const f=q4[t.componentType],A=X4[t.type];return{ArrayType:r,length:o,byteLength:s,componentByteSize:f,numberOfComponentsInElement:A}}function Z4(t){let{images:e,bufferViews:r}=t;e=e||[],r=r||[];const i=e.map(s=>s.bufferView);r=r.filter(s=>!i.includes(s));const n=r.reduce((s,f)=>s+f.byteLength,0),o=e.reduce((s,f)=>{const{width:A,height:v}=f.image;return s+A*v},0);return n+Math.ceil(4*o*AZ)}function vZ(t,e,r){const i=t.bufferViews[r];Yo(i);const n=i.buffer,o=e[n];Yo(o);const s=(i.byteOffset||0)+o.byteOffset;return new Uint8Array(o.arrayBuffer,s,i.byteLength)}function bZ(t,e,r){var k,V;const i=typeof r=="number"?(k=t.accessors)==null?void 0:k[r]:r;if(!i)throw new Error(`No gltf accessor ${JSON.stringify(r)}`);const n=(V=t.bufferViews)==null?void 0:V[i.bufferView||0];if(!n)throw new Error(`No gltf buffer view for accessor ${n}`);const{arrayBuffer:o,byteOffset:s}=e[n.buffer],f=(s||0)+(i.byteOffset||0)+(n.byteOffset||0),{ArrayType:A,length:v,componentByteSize:w,numberOfComponentsInElement:C}=dx(i,n),I=w*C,B=n.byteStride||I;if(typeof n.byteStride>"u"||n.byteStride===I)return new A(o,f,v);const F=new A(v);for(let G=0;G<i.count;G++){const Y=new A(o,f+G*B,C);F.set(Y,G*C)}return F}function xZ(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class qs{constructor(e){U(this,"gltf");U(this,"sourceBuffers");U(this,"byteLength");this.gltf={json:(e==null?void 0:e.json)||xZ(),buffers:(e==null?void 0:e.buffers)||[],images:(e==null?void 0:e.images)||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}hasExtension(e){const r=this.getUsedExtensions().find(n=>n===e),i=this.getRequiredExtensions().find(n=>n===e);return typeof r=="string"||typeof i=="string"}getExtension(e){const r=this.getUsedExtensions().find(n=>n===e),i=this.json.extensions||{};return r?i[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(i=>i===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,r){return(e.extensions||{})[r]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,r){if(typeof r=="object")return r;const i=this.json[e]&&this.json[e][r];if(!i)throw new Error(`glTF file error: Could not find ${e}[${r}]`);return i}getTypedArrayForBufferView(e){e=this.getBufferView(e);const r=e.buffer,i=this.gltf.buffers[r];Yo(i);const n=(e.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,n,e.byteLength)}getTypedArrayForAccessor(e){const r=this.getAccessor(e);return bZ(this.gltf.json,this.gltf.buffers,r)}getTypedArrayForImageData(e){e=this.getAccessor(e);const r=this.getBufferView(e.bufferView),n=this.getBuffer(r.buffer).data,o=r.byteOffset||0;return new Uint8Array(n,o,r.byteLength)}addApplicationData(e,r){return this.json[e]=r,this}addExtraData(e,r){return this.json.extras=this.json.extras||{},this.json.extras[e]=r,this}addObjectExtension(e,r,i){return e.extensions=e.extensions||{},e.extensions[r]=i,this.registerUsedExtension(r),this}setObjectExtension(e,r,i){const n=e.extensions||{};n[r]=i}removeObjectExtension(e,r){const i=(e==null?void 0:e.extensions)||{};if(i[r]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const n=this.json.extensionsRemoved;n.includes(r)||n.push(r)}delete i[r]}addExtension(e,r={}){return Yo(r),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=r,this.registerUsedExtension(e),r}addRequiredExtension(e,r={}){return Yo(r),this.addExtension(e,r),this.registerRequiredExtension(e),r}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(r=>r===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(r=>r===e)||this.json.extensionsRequired.push(e)}removeExtension(e){var r;if((r=this.json.extensions)!=null&&r[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const i=this.json.extensionsRemoved;i.includes(e)||i.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:r}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:r}),this.json.scenes.length-1}addNode(e){const{meshIndex:r,matrix:i}=e;this.json.nodes=this.json.nodes||[];const n={mesh:r};return i&&(n.matrix=i),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(e){const{attributes:r,indices:i,material:n,mode:o=4}=e,f={primitives:[{attributes:this._addAttributes(r),mode:o}]};if(i){const A=this._addIndices(i);f.primitives[0].indices=A}return Number.isFinite(n)&&(f.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(f),this.json.meshes.length-1}addPointCloud(e){const i={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addImage(e,r){const i=v2(e),n=r||(i==null?void 0:i.mimeType),s={bufferView:this.addBufferView(e),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(e,r=0,i=this.byteLength){const n=e.byteLength;Yo(Number.isFinite(n)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const o={buffer:r,byteOffset:i,byteLength:n};return this.byteLength+=i0(n,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(o),this.json.bufferViews.length-1}addAccessor(e,r){const i={bufferView:e,type:$4(r.size),componentType:r.componentType,count:r.count,max:r.max,min:r.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(i),this.json.accessors.length-1}addBinaryBuffer(e,r={size:3}){const i=this.addBufferView(e);let n={min:r.min,max:r.max};(!n.min||!n.max)&&(n=this._getAccessorMinMax(e,r.size));const o={size:r.size,componentType:fx(e),count:Math.round(e.length/r.size),min:n.min,max:n.max};return this.addAccessor(i,Object.assign(o,r))}addTexture(e){const{imageIndex:r}=e,i={source:r};return this.json.textures=this.json.textures||[],this.json.textures.push(i),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){var o,s;this.gltf.buffers=[];const e=this.byteLength,r=new ArrayBuffer(e),i=new Uint8Array(r);let n=0;for(const f of this.sourceBuffers||[])n=Sk(f,i,n);(s=(o=this.json)==null?void 0:o.buffers)!=null&&s[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=r,this.sourceBuffers=[r]}_removeStringFromArray(e,r){let i=!0;for(;i;){const n=e.indexOf(r);n>-1?e.splice(n,1):i=!1}}_addAttributes(e={}){const r={};for(const i in e){const n=e[i],o=this._getGltfAttributeName(i),s=this.addBinaryBuffer(n.value,n);r[o]=s}return r}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,r){const i={min:null,max:null};if(e.length<r)return i;i.min=[],i.max=[];const n=e.subarray(0,r);for(const o of n)i.min.push(o),i.max.push(o);for(let o=r;o<e.length;o+=r)for(let s=0;s<r;s++)i.min[0+s]=Math.min(i.min[0+s],e[o+s]),i.max[0+s]=Math.max(i.max[0+s],e[o+s]);return i}}function s3(t){return(t%1+1)%1}const K4={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},wZ={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},Y4={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function Ax(t,e){return Y4[e]*K4[t]}function D_(t,e,r,i){if(r!=="UINT8"&&r!=="UINT16"&&r!=="UINT32"&&r!=="UINT64")return null;const n=t.getTypedArrayForBufferView(e),o=F_(n,"SCALAR",r,i+1);return o instanceof BigInt64Array||o instanceof BigUint64Array?null:o}function F_(t,e,r,i=1){const n=K4[e],o=wZ[r],s=Y4[r],f=i*n,A=f*s;let v=t.buffer,w=t.byteOffset;return w%s!==0&&(v=new Uint8Array(v).slice(w,w+A).buffer,w=0),new o(v,w,f)}function px(t,e,r){var v,w,C,I,B;const i=`TEXCOORD_${e.texCoord||0}`,n=r.attributes[i],o=t.getTypedArrayForAccessor(n),s=t.gltf.json,f=e.index,A=(w=(v=s.textures)==null?void 0:v[f])==null?void 0:w.source;if(typeof A<"u"){const F=(I=(C=s.images)==null?void 0:C[A])==null?void 0:I.mimeType,k=(B=t.gltf.images)==null?void 0:B[A];if(k&&typeof k.width<"u"){const V=[];for(let G=0;G<o.length;G+=2){const Y=TZ(k,F,o,G,e.channels);V.push(Y)}return V}}return[]}function J4(t,e,r,i,n){if(!(r!=null&&r.length))return;const o=[];for(const w of r){let C=i.findIndex(I=>I===w);C===-1&&(C=i.push(w)-1),o.push(C)}const s=new Uint32Array(o),f=t.gltf.buffers.push({arrayBuffer:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength})-1,A=t.addBufferView(s,f,0),v=t.addAccessor(A,{size:1,componentType:fx(s),count:s.length});n.attributes[e]=v}function TZ(t,e,r,i,n=[0]){const o={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},s=r[i],f=r[i+1];let A=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(A=4);const v=EZ(s,f,t,A);let w=0;for(const C of n){const I=typeof C=="number"?Object.values(o)[C]:o[C],B=v+I.offset,F=yR(t);if(F.data.length<=B)throw new Error(`${F.data.length} <= ${B}`);const k=F.data[B];w|=k<<I.shift}return w}function EZ(t,e,r,i=1){const n=r.width,o=s3(t)*(n-1),s=Math.round(o),f=r.height,A=s3(e)*(f-1),v=Math.round(A),w=r.components?r.components:i;return(v*n+s)*w}function Q4(t,e,r,i,n){const o=[];for(let s=0;s<e;s++){const f=r[s],A=r[s+1]-r[s];if(A+f>i)break;const v=f/n,w=A/n;o.push(t.slice(v,v+w))}return o}function eO(t,e,r){const i=[];for(let n=0;n<e;n++){const o=n*r;i.push(t.slice(o,o+r))}return i}function tO(t,e,r,i){if(r)throw new Error("Not implemented - arrayOffsets for strings is specified");if(i){const n=[],o=new TextDecoder("utf8");let s=0;for(let f=0;f<t;f++){const A=i[f+1]-i[f];if(A+s<=e.length){const v=e.subarray(s,A+s),w=o.decode(v);n.push(w),s+=A}}return n}return[]}const rO="EXT_mesh_features",SZ=rO;async function CZ(t,e){const r=new qs(t);PZ(r,e)}function PZ(t,e){const r=t.gltf.json;if(r.meshes)for(const i of r.meshes)for(const n of i.primitives)IZ(t,n,e)}function IZ(t,e,r){var o,s,f;if(!((o=r==null?void 0:r.gltf)!=null&&o.loadBuffers))return;const i=(s=e.extensions)==null?void 0:s[rO],n=i==null?void 0:i.featureIds;if(n)for(const A of n){let v;if(typeof A.attribute<"u"){const w=`_FEATURE_ID_${A.attribute}`,C=e.attributes[w];v=t.getTypedArrayForAccessor(C)}else typeof A.texture<"u"&&((f=r==null?void 0:r.gltf)!=null&&f.loadImages)?v=px(t,A.texture,e):v=[];A.data=v}}const MZ=Object.freeze(Object.defineProperty({__proto__:null,decode:CZ,name:SZ},Symbol.toStringTag,{value:"Module"})),gx="EXT_structural_metadata",RZ=gx;async function BZ(t,e){const r=new qs(t);OZ(r,e)}function OZ(t,e){var i,n;if(!((i=e.gltf)!=null&&i.loadBuffers))return;const r=t.getExtension(gx);r&&((n=e.gltf)!=null&&n.loadImages&&DZ(t,r),FZ(t,r))}function DZ(t,e){const r=e.propertyTextures,i=t.gltf.json;if(r&&i.meshes)for(const n of i.meshes)for(const o of n.primitives)kZ(t,r,o,e)}function FZ(t,e){const r=e.schema;if(!r)return;const i=r.classes,n=e.propertyTables;if(i&&n)for(const o in i){const s=LZ(n,o);s&&UZ(t,r,s)}}function LZ(t,e){for(const r of t)if(r.class===e)return r;return null}function kZ(t,e,r,i){var s;if(!e)return;const n=(s=r.extensions)==null?void 0:s[gx],o=n==null?void 0:n.propertyTextures;if(o)for(const f of o){const A=e[f];NZ(t,A,r,i)}}function NZ(t,e,r,i){var o;if(!e.properties)return;i.dataAttributeNames||(i.dataAttributeNames=[]);const n=e.class;for(const s in e.properties){const f=`${n}_${s}`,A=(o=e.properties)==null?void 0:o[s];if(!A)continue;A.data||(A.data=[]);const v=A.data,w=px(t,A,r);w!==null&&(J4(t,f,w,v,r),A.data=v,i.dataAttributeNames.push(f))}}function UZ(t,e,r){var o,s;const i=(o=e.classes)==null?void 0:o[r.class];if(!i)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${r.class}`);const n=r.count;for(const f in i.properties){const A=i.properties[f],v=(s=r.properties)==null?void 0:s[f];if(v){const w=zZ(t,e,A,n,v);v.data=w}}}function zZ(t,e,r,i,n){let o=[];const s=n.values,f=t.getTypedArrayForBufferView(s),A=VZ(t,r,n,i),v=jZ(t,n,i);switch(r.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{o=HZ(r,i,f,A);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${r.type}`);case"STRING":{o=tO(i,f,A,v);break}case"ENUM":{o=GZ(e,r,i,f,A);break}default:throw new Error(`Unknown classProperty type ${r.type}`)}return o}function VZ(t,e,r,i){return e.array&&typeof e.count>"u"&&typeof r.arrayOffsets<"u"?D_(t,r.arrayOffsets,r.arrayOffsetType||"UINT32",i):null}function jZ(t,e,r){return typeof e.stringOffsets<"u"?D_(t,e.stringOffsets,e.stringOffsetType||"UINT32",r):null}function HZ(t,e,r,i){const n=t.array,o=t.count,s=Ax(t.type,t.componentType),f=r.byteLength/s;let A;return t.componentType?A=F_(r,t.type,t.componentType,f):A=r,n?i?Q4(A,e,i,r.length,s):o?eO(A,e,o):[]:A}function GZ(t,e,r,i,n){var C;const o=e.enumType;if(!o)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const s=(C=t.enums)==null?void 0:C[o];if(!s)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${o}`);const f=s.valueType||"UINT16",A=Ax(e.type,f),v=i.byteLength/A;let w=F_(i,e.type,f,v);if(w||(w=i),e.array){if(n)return WZ({valuesData:w,numberOfElements:r,arrayOffsets:n,valuesDataBytesLength:i.length,elementSize:A,enumEntry:s});const I=e.count;return I?XZ(w,r,I,s):[]}return mx(w,0,r,s)}function WZ(t){const{valuesData:e,numberOfElements:r,arrayOffsets:i,valuesDataBytesLength:n,elementSize:o,enumEntry:s}=t,f=[];for(let A=0;A<r;A++){const v=i[A],w=i[A+1]-i[A];if(w+v>n)break;const C=v/o,I=w/o,B=mx(e,C,I,s);f.push(B)}return f}function XZ(t,e,r,i){const n=[];for(let o=0;o<e;o++){const s=r*o,f=mx(t,s,r,i);n.push(f)}return n}function mx(t,e,r,i){const n=[];for(let o=0;o<r;o++)if(t instanceof BigInt64Array||t instanceof BigUint64Array)n.push("");else{const s=t[e+o],f=qZ(i,s);f?n.push(f.name):n.push("")}return n}function qZ(t,e){for(const r of t.values)if(r.value===e)return r;return null}const $Z=Object.freeze(Object.defineProperty({__proto__:null,decode:BZ,name:RZ},Symbol.toStringTag,{value:"Module"})),iO="EXT_feature_metadata",ZZ=iO;async function KZ(t,e){const r=new qs(t);YZ(r,e)}function YZ(t,e){var i,n;if(!((i=e.gltf)!=null&&i.loadBuffers))return;const r=t.getExtension(iO);r&&((n=e.gltf)!=null&&n.loadImages&&JZ(t,r),QZ(t,r))}function JZ(t,e){const r=e.schema;if(!r)return;const i=r.classes,{featureTextures:n}=e;if(i&&n)for(const o in i){const s=i[o],f=tK(n,o);f&&iK(t,f,s)}}function QZ(t,e){const r=e.schema;if(!r)return;const i=r.classes,n=e.featureTables;if(i&&n)for(const o in i){const s=eK(n,o);s&&rK(t,r,s)}}function eK(t,e){for(const r in t){const i=t[r];if(i.class===e)return i}return null}function tK(t,e){for(const r in t){const i=t[r];if(i.class===e)return i}return null}function rK(t,e,r){var o,s;if(!r.class)return;const i=(o=e.classes)==null?void 0:o[r.class];if(!i)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${r.class}`);const n=r.count;for(const f in i.properties){const A=i.properties[f],v=(s=r.properties)==null?void 0:s[f];if(v){const w=nK(t,e,A,n,v);v.data=w}}}function iK(t,e,r){var n;const i=e.class;for(const o in r.properties){const s=(n=e==null?void 0:e.properties)==null?void 0:n[o];if(s){const f=cK(t,s,i);s.data=f}}}function nK(t,e,r,i,n){let o=[];const s=n.bufferView,f=t.getTypedArrayForBufferView(s),A=sK(t,r,n,i),v=oK(t,r,n,i);return r.type==="STRING"||r.componentType==="STRING"?o=tO(i,f,A,v):aK(r)&&(o=lK(r,i,f,A)),o}function sK(t,e,r,i){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof r.arrayOffsetBufferView<"u"?D_(t,r.arrayOffsetBufferView,r.offsetType||"UINT32",i):null}function oK(t,e,r,i){return typeof r.stringOffsetBufferView<"u"?D_(t,r.stringOffsetBufferView,r.offsetType||"UINT32",i):null}function aK(t){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(t.type)||typeof t.componentType<"u"&&e.includes(t.componentType)}function lK(t,e,r,i){const n=t.type==="ARRAY",o=t.componentCount,s="SCALAR",f=t.componentType||t.type,A=Ax(s,f),v=r.byteLength/A,w=F_(r,s,f,v);return n?i?Q4(w,e,i,r.length,A):o?eO(w,e,o):[]:w}function cK(t,e,r){const i=t.gltf.json;if(!i.meshes)return[];const n=[];for(const o of i.meshes)for(const s of o.primitives)uK(t,r,e,n,s);return n}function uK(t,e,r,i,n){const o={channels:r.channels,...r.texture},s=px(t,o,n);s&&J4(t,e,s,i,n)}const hK=Object.freeze(Object.defineProperty({__proto__:null,decode:KZ,name:ZZ},Symbol.toStringTag,{value:"Module"})),fK="4.2.4",dK="4.2.4",Gm={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let o3;async function a3(t){ek(t.modules);const e=tk("basis");return e||(o3||(o3=AK(t)),await o3)}async function AK(t){let e=null,r=null;return[e,r]=await Promise.all([await Rh(Gm.TRANSCODER,"textures",t),await Rh(Gm.TRANSCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await pK(e,r)}function pK(t,e){const r={};return e&&(r.wasmBinary=e),new Promise(i=>{t(r).then(n=>{const{BasisFile:o,initializeBasis:s}=n;s(),i({BasisFile:o})})})}let Bv;async function l3(t){const e=t.modules||{};return e.basisEncoder?e.basisEncoder:(Bv=Bv||gK(t),await Bv)}async function gK(t){let e=null,r=null;return[e,r]=await Promise.all([await Rh(Gm.ENCODER,"textures",t),await Rh(Gm.ENCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await mK(e,r)}function mK(t,e){const r={};return e&&(r.wasmBinary=e),new Promise(i=>{t(r).then(n=>{const{BasisFile:o,KTX2File:s,initializeBasis:f,BasisEncoder:A}=n;f(),i({BasisFile:o,KTX2File:s,BasisEncoder:A})})})}const ed={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},_K=["","WEBKIT_","MOZ_"],c3={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let Tg=null;function yK(t){if(!Tg){t=t||vK()||void 0,Tg=new Set;for(const e of _K)for(const r in c3)if(t&&t.getExtension(`${e}${r}`)){const i=c3[r];Tg.add(i)}}return Tg}function vK(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}var u3,h3,f3,d3,A3,p3,g3,m3;(function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"})(u3||(u3={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(h3||(h3={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(f3||(f3={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(d3||(d3={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(A3||(A3={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(p3||(p3={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(g3||(g3={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(m3||(m3={}));const qo=[171,75,84,88,32,50,48,187,13,10,26,10];function bK(t){const e=new Uint8Array(t);return!(e.byteLength<qo.length||e[0]!==qo[0]||e[1]!==qo[1]||e[2]!==qo[2]||e[3]!==qo[3]||e[4]!==qo[4]||e[5]!==qo[5]||e[6]!==qo[6]||e[7]!==qo[7]||e[8]!==qo[8]||e[9]!==qo[9]||e[10]!==qo[10]||e[11]!==qo[11])}const xK={etc1:{basisFormat:0,compressed:!0,format:ed.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:ed.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:ed.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:ed.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:ed.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:ed.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function wK(t,e){if(e.basis.containerFormat==="auto"){if(bK(t)){const i=await l3(e);return _3(i.KTX2File,t,e)}const{BasisFile:r}=await a3(e);return Ov(r,t,e)}switch(e.basis.module){case"encoder":const r=await l3(e);switch(e.basis.containerFormat){case"ktx2":return _3(r.KTX2File,t,e);case"basis":default:return Ov(r.BasisFile,t,e)}case"transcoder":default:const{BasisFile:i}=await a3(e);return Ov(i,t,e)}}function Ov(t,e,r){const i=new t(new Uint8Array(e));try{if(!i.startTranscoding())throw new Error("Failed to start basis transcoding");const n=i.getNumImages(),o=[];for(let s=0;s<n;s++){const f=i.getNumLevels(s),A=[];for(let v=0;v<f;v++)A.push(TK(i,s,v,r));o.push(A)}return o}finally{i.close(),i.delete()}}function TK(t,e,r,i){const n=t.getImageWidth(e,r),o=t.getImageHeight(e,r),s=t.getHasAlpha(),{compressed:f,format:A,basisFormat:v}=nO(i,s),w=t.getImageTranscodedSizeInBytes(e,r,v),C=new Uint8Array(w);if(!t.transcodeImage(C,e,r,v,0,0))throw new Error("failed to start Basis transcoding");return{width:n,height:o,data:C,compressed:f,format:A,hasAlpha:s}}function _3(t,e,r){const i=new t(new Uint8Array(e));try{if(!i.startTranscoding())throw new Error("failed to start KTX2 transcoding");const n=i.getLevels(),o=[];for(let s=0;s<n;s++){o.push(EK(i,s,r));break}return[o]}finally{i.close(),i.delete()}}function EK(t,e,r){const{alphaFlag:i,height:n,width:o}=t.getImageLevelInfo(e,0,0),{compressed:s,format:f,basisFormat:A}=nO(r,i),v=t.getImageTranscodedSizeInBytes(e,0,0,A),w=new Uint8Array(v);if(!t.transcodeImage(w,e,0,0,A,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:o,height:n,data:w,compressed:s,levelSize:v,hasAlpha:i,format:f}}function nO(t,e){let r=t&&t.basis&&t.basis.format;return r==="auto"&&(r=sO()),typeof r=="object"&&(r=e?r.alpha:r.noAlpha),r=r.toLowerCase(),xK[r]}function sO(){const t=yK();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}const SK={dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:dK,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},CK={...SK,parse:wK},eA=!0,y3=1735152710,_x=12,Wm=8,PK=1313821514,IK=5130562,MK=0,RK=0,BK=1;function OK(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}function DK(t,e=0,r={}){const i=new DataView(t),{magic:n=y3}=r,o=i.getUint32(e,!1);return o===n||o===y3}function FK(t,e,r=0,i={}){const n=new DataView(e),o=OK(n,r+0),s=n.getUint32(r+4,eA),f=n.getUint32(r+8,eA);switch(Object.assign(t,{header:{byteOffset:r,byteLength:f,hasBinChunk:!1},type:o,version:s,json:{},binChunks:[]}),r+=_x,t.version){case 1:return LK(t,n,r);case 2:return kK(t,n,r,i={});default:throw new Error(`Invalid GLB version ${t.version}. Only supports version 1 and 2.`)}}function LK(t,e,r){Ni(t.header.byteLength>_x+Wm);const i=e.getUint32(r+0,eA),n=e.getUint32(r+4,eA);return r+=Wm,Ni(n===MK),Cb(t,e,r,i),r+=i,r+=Pb(t,e,r,t.header.byteLength),r}function kK(t,e,r,i){return Ni(t.header.byteLength>_x+Wm),NK(t,e,r,i),r+t.header.byteLength}function NK(t,e,r,i){for(;r+8<=t.header.byteLength;){const n=e.getUint32(r+0,eA),o=e.getUint32(r+4,eA);switch(r+=Wm,o){case PK:Cb(t,e,r,n);break;case IK:Pb(t,e,r,n);break;case RK:i.strict||Cb(t,e,r,n);break;case BK:i.strict||Pb(t,e,r,n);break}r+=i0(n,4)}return r}function Cb(t,e,r,i){const n=new Uint8Array(e.buffer,r,i),s=new TextDecoder("utf8").decode(n);return t.json=JSON.parse(s),i0(i,4)}function Pb(t,e,r,i){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:r,byteLength:i,arrayBuffer:e.buffer}),i0(i,4)}function oO(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const i=e.baseUri||e.uri;if(!i)throw new Error(`'baseUri' must be provided to resolve relative url ${t}`);return i.substr(0,i.lastIndexOf("/")+1)+t}const UK="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",zK="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",VK=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),jK=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),HK={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},GK={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function WK(t,e,r,i,n,o="NONE"){const s=await XK();ZK(s,s.exports[GK[n]],t,e,r,i,s.exports[HK[o||"NONE"]])}let Dv;async function XK(){return Dv||(Dv=qK()),Dv}async function qK(){let t=UK;WebAssembly.validate(VK)&&(t=zK,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate($K(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function $K(t){const e=new Uint8Array(t.length);for(let i=0;i<t.length;++i){const n=t.charCodeAt(i);e[i]=n>96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}let r=0;for(let i=0;i<t.length;++i)e[r++]=e[i]<60?jK[e[i]]:(e[i]-60)*64+e[++i];return e.buffer.slice(0,r)}function ZK(t,e,r,i,n,o,s){const f=t.exports.sbrk,A=i+3&-4,v=f(A*n),w=f(o.length),C=new Uint8Array(t.exports.memory.buffer);C.set(o,w);const I=e(v,i,n,w,o.length);if(I===0&&s&&s(v,A,n),r.set(C.subarray(v,v+i*n)),f(v-f(0)),I!==0)throw new Error(`Malformed buffer data: ${I}`)}const Xm="EXT_meshopt_compression",KK=Xm;async function YK(t,e){var n,o;const r=new qs(t);if(!((n=e==null?void 0:e.gltf)!=null&&n.decompressMeshes)||!((o=e.gltf)!=null&&o.loadBuffers))return;const i=[];for(const s of t.json.bufferViews||[])i.push(JK(r,s));await Promise.all(i),r.removeExtension(Xm)}async function JK(t,e){const r=t.getObjectExtension(e,Xm);if(r){const{byteOffset:i=0,byteLength:n=0,byteStride:o,count:s,mode:f,filter:A="NONE",buffer:v}=r,w=t.gltf.buffers[v],C=new Uint8Array(w.arrayBuffer,w.byteOffset+i,n),I=new Uint8Array(t.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await WK(I,s,o,C,f,A),t.removeObjectExtension(e,Xm)}}const QK=Object.freeze(Object.defineProperty({__proto__:null,decode:YK,name:KK},Symbol.toStringTag,{value:"Module"})),gd="EXT_texture_webp",eY=gd;function tY(t,e){const r=new qs(t);if(!R5("image/webp")){if(r.getRequiredExtensions().includes(gd))throw new Error(`gltf: Required extension ${gd} not supported by browser`);return}const{json:i}=r;for(const n of i.textures||[]){const o=r.getObjectExtension(n,gd);o&&(n.source=o.source),r.removeObjectExtension(n,gd)}r.removeExtension(gd)}const rY=Object.freeze(Object.defineProperty({__proto__:null,name:eY,preprocess:tY},Symbol.toStringTag,{value:"Module"})),lm="KHR_texture_basisu",iY=lm;function nY(t,e){const r=new qs(t),{json:i}=r;for(const n of i.textures||[]){const o=r.getObjectExtension(n,lm);o&&(n.source=o.source,r.removeObjectExtension(n,lm))}r.removeExtension(lm)}const sY=Object.freeze(Object.defineProperty({__proto__:null,name:iY,preprocess:nY},Symbol.toStringTag,{value:"Module"})),oY="4.2.4",aY={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:oY,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function lY(t,e,r){const i=aO(e.metadata),n=[],o=cY(e.attributes);for(const s in t){const f=t[s],A=v3(s,f,o[s]);n.push(A)}if(r){const s=v3("indices",r);n.push(s)}return{fields:n,metadata:i}}function cY(t){const e={};for(const r in t){const i=t[r];e[i.name||"undefined"]=i}return e}function v3(t,e,r){const i=r?aO(r.metadata):void 0;return K8(t,e,i)}function aO(t){Object.entries(t);const e={};for(const r in t)e[`${r}.string`]=JSON.stringify(t[r]);return e}const b3={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},uY={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},hY=4;class fY{constructor(e){U(this,"draco");U(this,"decoder");U(this,"metadataQuerier");this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,r={}){const i=new this.draco.DecoderBuffer;i.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(r);const n=this.decoder.GetEncodedGeometryType(i),o=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let s;switch(n){case this.draco.TRIANGULAR_MESH:s=this.decoder.DecodeBufferToMesh(i,o);break;case this.draco.POINT_CLOUD:s=this.decoder.DecodeBufferToPointCloud(i,o);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!s.ok()||!o.ptr){const I=`DRACO decompression failed: ${s.error_msg()}`;throw new Error(I)}const f=this._getDracoLoaderData(o,n,r),A=this._getMeshData(o,f,r),v=_2(A.attributes),w=lY(A.attributes,f,A.indices);return{loader:"draco",loaderData:f,header:{vertexCount:o.num_points(),boundingBox:v},...A,schema:w}}finally{this.draco.destroy(i),o&&this.draco.destroy(o)}}_getDracoLoaderData(e,r,i){const n=this._getTopLevelMetadata(e),o=this._getDracoAttributes(e,i);return{geometry_type:r,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:n,attributes:o}}_getDracoAttributes(e,r){const i={};for(let n=0;n<e.num_attributes();n++){const o=this.decoder.GetAttribute(e,n),s=this._getAttributeMetadata(e,n);i[o.unique_id()]={unique_id:o.unique_id(),attribute_type:o.attribute_type(),data_type:o.data_type(),num_components:o.num_components(),byte_offset:o.byte_offset(),byte_stride:o.byte_stride(),normalized:o.normalized(),attribute_index:n,metadata:s};const f=this._getQuantizationTransform(o,r);f&&(i[o.unique_id()].quantization_transform=f);const A=this._getOctahedronTransform(o,r);A&&(i[o.unique_id()].octahedron_transform=A)}return i}_getMeshData(e,r,i){const n=this._getMeshAttributes(r,e,i);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(e instanceof this.draco.Mesh)switch(i.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(e),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(e),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(e,r,i){const n={};for(const o of Object.values(e.attributes)){const s=this._deduceAttributeName(o,i);o.name=s;const f=this._getAttributeValues(r,o);if(f){const{value:A,size:v}=f;n[s]={value:A,size:v,byteOffset:o.byte_offset,byteStride:o.byte_stride,normalized:o.normalized}}}return n}_getTriangleListIndices(e){const i=e.num_faces()*3,n=i*hY,o=this.draco._malloc(n);try{return this.decoder.GetTrianglesUInt32Array(e,n,o),new Uint32Array(this.draco.HEAPF32.buffer,o,i).slice()}finally{this.draco._free(o)}}_getTriangleStripIndices(e){const r=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,r),pY(r)}finally{this.draco.destroy(r)}}_getAttributeValues(e,r){const i=uY[r.data_type];if(!i)return console.warn(`DRACO: Unsupported attribute type ${r.data_type}`),null;const n=r.num_components,s=e.num_points()*n,f=s*i.BYTES_PER_ELEMENT,A=dY(this.draco,i);let v;const w=this.draco._malloc(f);try{const C=this.decoder.GetAttribute(e,r.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,C,A,f,w),v=new i(this.draco.HEAPF32.buffer,w,s).slice()}finally{this.draco._free(w)}return{value:v,size:n}}_deduceAttributeName(e,r){const i=e.unique_id;for(const[s,f]of Object.entries(r.extraAttributes||{}))if(f===i)return s;const n=e.attribute_type;for(const s in b3)if(this.draco[s]===n)return b3[s];const o=r.attributeNameEntry||"name";return e.metadata[o]?e.metadata[o].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(e){const r=this.decoder.GetMetadata(e);return this._getDracoMetadata(r)}_getAttributeMetadata(e,r){const i=this.decoder.GetAttributeMetadata(e,r);return this._getDracoMetadata(i)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const r={},i=this.metadataQuerier.NumEntries(e);for(let n=0;n<i;n++){const o=this.metadataQuerier.GetEntryName(e,n);r[o]=this._getDracoMetadataField(e,o)}return r}_getDracoMetadataField(e,r){const i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,r,i);const n=AY(i);return{int:this.metadataQuerier.GetIntEntry(e,r),string:this.metadataQuerier.GetStringEntry(e,r),double:this.metadataQuerier.GetDoubleEntry(e,r),intArray:n}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(e){const{quantizedAttributes:r=[],octahedronAttributes:i=[]}=e,n=[...r,...i];for(const o of n)this.decoder.SkipAttributeTransform(this.draco[o])}_getQuantizationTransform(e,r){const{quantizedAttributes:i=[]}=r,n=e.attribute_type();if(i.map(s=>this.decoder[s]).includes(n)){const s=new this.draco.AttributeQuantizationTransform;try{if(s.InitFromAttribute(e))return{quantization_bits:s.quantization_bits(),range:s.range(),min_values:new Float32Array([1,2,3]).map(f=>s.min_value(f))}}finally{this.draco.destroy(s)}}return null}_getOctahedronTransform(e,r){const{octahedronAttributes:i=[]}=r,n=e.attribute_type();if(i.map(s=>this.decoder[s]).includes(n)){const s=new this.draco.AttributeQuantizationTransform;try{if(s.InitFromAttribute(e))return{quantization_bits:s.quantization_bits()}}finally{this.draco.destroy(s)}}return null}}function dY(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}function AY(t){const e=t.size(),r=new Int32Array(e);for(let i=0;i<e;i++)r[i]=t.GetValue(i);return r}function pY(t){const e=t.size(),r=new Int32Array(e);for(let i=0;i<e;i++)r[i]=t.GetValue(i);return r}const gY="1.5.6",mY="1.4.1",Fv=`https://www.gstatic.com/draco/versioned/decoders/${gY}`,Co={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},Lv={[Co.DECODER]:`${Fv}/${Co.DECODER}`,[Co.DECODER_WASM]:`${Fv}/${Co.DECODER_WASM}`,[Co.FALLBACK_DECODER]:`${Fv}/${Co.FALLBACK_DECODER}`,[Co.ENCODER]:`https://raw.githubusercontent.com/google/draco/${mY}/javascript/${Co.ENCODER}`};let kv;async function _Y(t){const e=t.modules||{};return e.draco3d?kv||(kv=e.draco3d.createDecoderModule({}).then(r=>({draco:r}))):kv||(kv=yY(t)),await kv}async function yY(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await Rh(Lv[Co.FALLBACK_DECODER],"draco",t,Co.FALLBACK_DECODER);break;case"wasm":default:[e,r]=await Promise.all([await Rh(Lv[Co.DECODER],"draco",t,Co.DECODER),await Rh(Lv[Co.DECODER_WASM],"draco",t,Co.DECODER_WASM)])}return e=e||globalThis.DracoDecoderModule,await vY(e,r)}function vY(t,e){const r={};return e&&(r.wasmBinary=e),new Promise(i=>{t({...r,onModuleLoaded:n=>i({draco:n})})})}const lO={...aY,parse:bY};async function bY(t,e){const{draco:r}=await _Y(e),i=new fY(r);try{return i.parseSync(t,e==null?void 0:e.draco)}finally{i.destroy()}}function xY(t){const e={};for(const r in t){const i=t[r];if(r!=="indices"){const n=cO(i);e[r]=n}}return e}function cO(t){const{buffer:e,size:r,count:i}=wY(t);return{value:e,size:r,byteOffset:0,count:i,type:$4(r),componentType:fx(e)}}function wY(t){let e=t,r=1,i=0;return t&&t.value&&(e=t.value,r=t.size||1),e&&(ArrayBuffer.isView(e)||(e=TY(e,Float32Array)),i=e.length/r),{buffer:e,size:r,count:i}}function TY(t,e,r=!1){return t?Array.isArray(t)?new e(t):r&&!(t instanceof e)?new e(t):t:null}const Lh="KHR_draco_mesh_compression",EY=Lh;function SY(t,e,r){const i=new qs(t);for(const n of uO(i))i.getObjectExtension(n,Lh)}async function CY(t,e,r){var o;if(!((o=e==null?void 0:e.gltf)!=null&&o.decompressMeshes))return;const i=new qs(t),n=[];for(const s of uO(i))i.getObjectExtension(s,Lh)&&n.push(IY(i,s,e,r));await Promise.all(n),i.removeExtension(Lh)}function PY(t,e={}){const r=new qs(t);for(const i of r.json.meshes||[])MY(),r.addRequiredExtension(Lh)}async function IY(t,e,r,i){const n=t.getObjectExtension(e,Lh);if(!n)return;const o=t.getTypedArrayForBufferView(n.bufferView),s=f2(o.buffer,o.byteOffset),f={...r};delete f["3d-tiles"];const A=await aA(s,lO,f,i),v=xY(A.attributes);for(const[w,C]of Object.entries(v))if(w in e.attributes){const I=e.attributes[w],B=t.getAccessor(I);B!=null&&B.min&&(B!=null&&B.max)&&(C.min=B.min,C.max=B.max)}e.attributes=v,A.indices&&(e.indices=cO(A.indices)),t.removeObjectExtension(e,Lh),RY(e)}function MY(t,e,r=4,i,n){if(!i.DracoWriter)throw new Error("options.gltf.DracoWriter not provided")}function RY(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*uO(t){for(const e of t.json.meshes||[])for(const r of e.primitives)yield r}const BY=Object.freeze(Object.defineProperty({__proto__:null,decode:CY,encode:PY,name:EY,preprocess:SY},Symbol.toStringTag,{value:"Module"})),L_="KHR_texture_transform",OY=L_,Eg=new Ke,DY=new Mn,FY=new Mn;async function LY(t,e){var o;if(!new qs(t).hasExtension(L_)||!((o=e.gltf)!=null&&o.loadBuffers))return;const n=t.json.materials||[];for(let s=0;s<n.length;s++)kY(s,t)}function kY(t,e){var o,s,f,A;const r=(o=e.json.materials)==null?void 0:o[t],i=[(s=r==null?void 0:r.pbrMetallicRoughness)==null?void 0:s.baseColorTexture,r==null?void 0:r.emissiveTexture,r==null?void 0:r.normalTexture,r==null?void 0:r.occlusionTexture,(f=r==null?void 0:r.pbrMetallicRoughness)==null?void 0:f.metallicRoughnessTexture],n=[];for(const v of i)v&&((A=v==null?void 0:v.extensions)!=null&&A[L_])&&NY(e,t,v,n)}function NY(t,e,r,i){const n=UY(r,i);if(!n)return;const o=t.json.meshes||[];for(const s of o)for(const f of s.primitives){const A=f.material;Number.isFinite(A)&&e===A&&zY(t,f,n)}}function UY(t,e){var s;const r=(s=t.extensions)==null?void 0:s[L_],{texCoord:i=0}=t,{texCoord:n=i}=r;if(!(e.findIndex(([f,A])=>f===i&&A===n)!==-1)){const f=HY(r);return i!==n&&(t.texCoord=n),e.push([i,n]),{originalTexCoord:i,texCoord:n,matrix:f}}return null}function zY(t,e,r){var f,A;const{originalTexCoord:i,texCoord:n,matrix:o}=r,s=e.attributes[`TEXCOORD_${i}`];if(Number.isFinite(s)){const v=(f=t.json.accessors)==null?void 0:f[s];if(v&&v.bufferView){const w=(A=t.json.bufferViews)==null?void 0:A[v.bufferView];if(w){const{arrayBuffer:C,byteOffset:I}=t.buffers[w.buffer],B=(I||0)+(v.byteOffset||0)+(w.byteOffset||0),{ArrayType:F,length:k}=dx(v,w),V=q4[v.componentType],G=X4[v.type],Y=w.byteStride||V*G,Z=new Float32Array(k);for(let se=0;se<v.count;se++){const ge=new F(C,B+se*Y,2);Eg.set(ge[0],ge[1],1),Eg.transformByMatrix3(o),Z.set([Eg[0],Eg[1]],se*G)}i===n?VY(v,w,t.buffers,Z):jY(n,v,e,t,Z)}}}}function VY(t,e,r,i){t.componentType=5126,r.push({arrayBuffer:i.buffer,byteOffset:0,byteLength:i.buffer.byteLength}),e.buffer=r.length-1,e.byteLength=i.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function jY(t,e,r,i,n){i.buffers.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength});const o=i.json.bufferViews;if(!o)return;o.push({buffer:i.buffers.length-1,byteLength:n.buffer.byteLength,byteOffset:0});const s=i.json.accessors;s&&(s.push({bufferView:(o==null?void 0:o.length)-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),r.attributes[`TEXCOORD_${t}`]=s.length-1)}function HY(t){const{offset:e=[0,0],rotation:r=0,scale:i=[1,1]}=t,n=new Mn().set(1,0,0,0,1,0,e[0],e[1],1),o=DY.set(Math.cos(r),Math.sin(r),0,-Math.sin(r),Math.cos(r),0,0,0,1),s=FY.set(i[0],0,0,0,i[1],0,0,0,1);return n.multiplyRight(o).multiplyRight(s)}const GY=Object.freeze(Object.defineProperty({__proto__:null,decode:LY,name:OY},Symbol.toStringTag,{value:"Module"})),Ih="KHR_lights_punctual",WY=Ih;async function XY(t){const e=new qs(t),{json:r}=e,i=e.getExtension(Ih);i&&(e.json.lights=i.lights,e.removeExtension(Ih));for(const n of r.nodes||[]){const o=e.getObjectExtension(n,Ih);o&&(n.light=o.light),e.removeObjectExtension(n,Ih)}}async function qY(t){const e=new qs(t),{json:r}=e;if(r.lights){const i=e.addExtension(Ih);Yo(!i.lights),i.lights=r.lights,delete r.lights}if(e.json.lights){for(const i of e.json.lights){const n=i.node;e.addObjectExtension(n,Ih,i)}delete e.json.lights}}const $Y=Object.freeze(Object.defineProperty({__proto__:null,decode:XY,encode:qY,name:WY},Symbol.toStringTag,{value:"Module"})),qp="KHR_materials_unlit",ZY=qp;async function KY(t){const e=new qs(t),{json:r}=e;for(const i of r.materials||[])i.extensions&&i.extensions.KHR_materials_unlit&&(i.unlit=!0),e.removeObjectExtension(i,qp);e.removeExtension(qp)}function YY(t){const e=new qs(t),{json:r}=e;if(e.materials)for(const i of r.materials||[])i.unlit&&(delete i.unlit,e.addObjectExtension(i,qp,{}),e.addExtension(qp))}const JY=Object.freeze(Object.defineProperty({__proto__:null,decode:KY,encode:YY,name:ZY},Symbol.toStringTag,{value:"Module"})),gp="KHR_techniques_webgl",QY=gp;async function eJ(t){const e=new qs(t),{json:r}=e,i=e.getExtension(gp);if(i){const n=rJ(i,e);for(const o of r.materials||[]){const s=e.getObjectExtension(o,gp);s&&(o.technique=Object.assign({},s,n[s.technique]),o.technique.values=iJ(o.technique,e)),e.removeObjectExtension(o,gp)}e.removeExtension(gp)}}async function tJ(t,e){}function rJ(t,e){const{programs:r=[],shaders:i=[],techniques:n=[]}=t,o=new TextDecoder;return i.forEach(s=>{if(Number.isFinite(s.bufferView))s.code=o.decode(e.getTypedArrayForBufferView(s.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),r.forEach(s=>{s.fragmentShader=i[s.fragmentShader],s.vertexShader=i[s.vertexShader]}),n.forEach(s=>{s.program=r[s.program]}),n}function iJ(t,e){const r=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(i=>{t.uniforms[i].value&&!(i in r)&&(r[i]=t.uniforms[i].value)}),Object.keys(r).forEach(i=>{typeof r[i]=="object"&&r[i].index!==void 0&&(r[i].texture=e.getTexture(r[i].index))}),r}const nJ=Object.freeze(Object.defineProperty({__proto__:null,decode:eJ,encode:tJ,name:QY},Symbol.toStringTag,{value:"Module"})),hO=[$Z,MZ,QK,rY,sY,BY,$Y,JY,nJ,GY,hK];function sJ(t,e={},r){var n;const i=hO.filter(o=>fO(o.name,e));for(const o of i)(n=o.preprocess)==null||n.call(o,t,e,r)}async function oJ(t,e={},r){var n;const i=hO.filter(o=>fO(o.name,e));for(const o of i)await((n=o.decode)==null?void 0:n.call(o,t,e,r))}function fO(t,e){var n;const r=((n=e==null?void 0:e.gltf)==null?void 0:n.excludeExtensions)||{};return!(t in r&&!r[t])}const Nv="KHR_binary_glTF";function aJ(t){const e=new qs(t),{json:r}=e;for(const i of r.images||[]){const n=e.getObjectExtension(i,Nv);n&&Object.assign(i,n),e.removeObjectExtension(i,Nv)}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,e.removeExtension(Nv)}const x3={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},lJ={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class cJ{constructor(){U(this,"idToIndexMap",{animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}});U(this,"json")}normalize(e,r){this.json=e.json;const i=e.json;switch(i.asset&&i.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${i.asset.version}`);return}if(!r.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(i),this._convertTopLevelObjectsToArrays(i),aJ(e),this._convertObjectIdsToArrayIndices(i),this._updateObjects(i),this._updateMaterial(i)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const r in x3)this._convertTopLevelObjectToArray(e,r)}_convertTopLevelObjectToArray(e,r){const i=e[r];if(!(!i||Array.isArray(i))){e[r]=[];for(const n in i){const o=i[n];o.id=o.id||n;const s=e[r].length;e[r].push(o),this.idToIndexMap[r][n]=s}}}_convertObjectIdsToArrayIndices(e){for(const r in x3)this._convertIdsToIndices(e,r);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const r of e.textures)this._convertTextureIds(r);for(const r of e.meshes)this._convertMeshIds(r);for(const r of e.nodes)this._convertNodeIds(r);for(const r of e.scenes)this._convertSceneIds(r)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const r of e.primitives){const{attributes:i,indices:n,material:o}=r;for(const s in i)i[s]=this._convertIdToIndex(i[s],"accessor");n&&(r.indices=this._convertIdToIndex(n,"accessor")),o&&(r.material=this._convertIdToIndex(o,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(r=>this._convertIdToIndex(r,"node"))),e.meshes&&(e.meshes=e.meshes.map(r=>this._convertIdToIndex(r,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(r=>this._convertIdToIndex(r,"node")))}_convertIdsToIndices(e,r){e[r]||(console.warn(`gltf v1: json doesn't contain attribute ${r}`),e[r]=[]);for(const i of e[r])for(const n in i){const o=i[n],s=this._convertIdToIndex(o,n);i[n]=s}}_convertIdToIndex(e,r){const i=lJ[r];if(i in this.idToIndexMap){const n=this.idToIndexMap[i][e];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${r} with id ${e}`);return n}return e}_updateObjects(e){for(const r of this.json.buffers)delete r.type}_updateMaterial(e){var r,i,n;for(const o of e.materials){o.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const s=((r=o.values)==null?void 0:r.tex)||((i=o.values)==null?void 0:i.texture2d_0)||((n=o.values)==null?void 0:n.diffuseTex),f=e.textures.findIndex(A=>A.id===s);f!==-1&&(o.pbrMetallicRoughness.baseColorTexture={index:f})}}}function uJ(t,e={}){return new cJ().normalize(t,e)}async function hJ(t,e,r=0,i,n){var o,s,f;return fJ(t,e,r,i),uJ(t,{normalize:(o=i==null?void 0:i.gltf)==null?void 0:o.normalize}),sJ(t,i,n),(s=i==null?void 0:i.gltf)!=null&&s.loadBuffers&&t.json.buffers&&await dJ(t,i,n),(f=i==null?void 0:i.gltf)!=null&&f.loadImages&&await AJ(t,i,n),await oJ(t,i,n),t}function fJ(t,e,r,i){if(i.uri&&(t.baseUri=i.uri),e instanceof ArrayBuffer&&!DK(e,r,i)&&(e=new TextDecoder().decode(e)),typeof e=="string")t.json=xk(e);else if(e instanceof ArrayBuffer){const s={};r=FK(s,e,r,i.glb),Yo(s.type==="glTF",`Invalid GLB magic string ${s.type}`),t._glb=s,t.json=s.json}else Yo(!1,"GLTF: must be ArrayBuffer or string");const n=t.json.buffers||[];if(t.buffers=new Array(n.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:s}=t._glb;t.buffers[0]={arrayBuffer:s[0].arrayBuffer,byteOffset:s[0].byteOffset,byteLength:s[0].byteLength}}const o=t.json.images||[];t.images=new Array(o.length).fill({})}async function dJ(t,e,r){var n,o;const i=t.json.buffers||[];for(let s=0;s<i.length;++s){const f=i[s];if(f.uri){const{fetch:A}=r;Yo(A);const v=oO(f.uri,e),w=await((n=r==null?void 0:r.fetch)==null?void 0:n.call(r,v)),C=await((o=w==null?void 0:w.arrayBuffer)==null?void 0:o.call(w));t.buffers[s]={arrayBuffer:C,byteOffset:0,byteLength:C.byteLength},delete f.uri}else t.buffers[s]===null&&(t.buffers[s]={arrayBuffer:new ArrayBuffer(f.byteLength),byteOffset:0,byteLength:f.byteLength})}}async function AJ(t,e,r){const i=pJ(t),n=t.json.images||[],o=[];for(const s of i)o.push(gJ(t,n[s],s,e,r));return await Promise.all(o)}function pJ(t){const e=new Set,r=t.json.textures||[];for(const i of r)i.source!==void 0&&e.add(i.source);return Array.from(e).sort()}async function gJ(t,e,r,i,n){let o;if(e.uri&&!e.hasOwnProperty("bufferView")){const f=oO(e.uri,i),{fetch:A}=n;o=await(await A(f)).arrayBuffer(),e.bufferView={data:o}}if(Number.isFinite(e.bufferView)){const f=vZ(t.json,t.buffers,e.bufferView);o=f2(f.buffer,f.byteOffset,f.byteLength)}Yo(o,"glTF image has no data");let s=await aA(o,[Lp,CK],{...i,mimeType:e.mimeType,basis:i.basis||{format:sO()}},n);s&&s[0]&&(s={compressed:!0,mipmaps:!1,width:s[0].width,height:s[0].height,data:s[0]}),t.images=t.images||[],t.images[r]=s}const tA={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:fK,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:mJ,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function mJ(t,e={},r){e={...tA.options,...e},e.gltf={...tA.options.gltf,...e.gltf};const{byteOffset:i=0}=e;return await hJ({},t,i,e,r)}const _J={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},yJ={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},xa={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},vJ={magFilter:xa.TEXTURE_MAG_FILTER,minFilter:xa.TEXTURE_MIN_FILTER,wrapS:xa.TEXTURE_WRAP_S,wrapT:xa.TEXTURE_WRAP_T},bJ={[xa.TEXTURE_MAG_FILTER]:xa.LINEAR,[xa.TEXTURE_MIN_FILTER]:xa.NEAREST_MIPMAP_LINEAR,[xa.TEXTURE_WRAP_S]:xa.REPEAT,[xa.TEXTURE_WRAP_T]:xa.REPEAT};function xJ(){return{id:"default-sampler",parameters:bJ}}function wJ(t){return yJ[t]}function TJ(t){return _J[t]}class EJ{constructor(){U(this,"baseUri","");U(this,"jsonUnprocessed");U(this,"json");U(this,"buffers",[]);U(this,"images",[])}postProcess(e,r={}){const{json:i,buffers:n=[],images:o=[]}=e,{baseUri:s=""}=e;return Yo(i),this.baseUri=s,this.buffers=n,this.images=o,this.jsonUnprocessed=i,this.json=this._resolveTree(e.json,r),this.json}_resolveTree(e,r={}){const i={...e};return this.json=i,e.bufferViews&&(i.bufferViews=e.bufferViews.map((n,o)=>this._resolveBufferView(n,o))),e.images&&(i.images=e.images.map((n,o)=>this._resolveImage(n,o))),e.samplers&&(i.samplers=e.samplers.map((n,o)=>this._resolveSampler(n,o))),e.textures&&(i.textures=e.textures.map((n,o)=>this._resolveTexture(n,o))),e.accessors&&(i.accessors=e.accessors.map((n,o)=>this._resolveAccessor(n,o))),e.materials&&(i.materials=e.materials.map((n,o)=>this._resolveMaterial(n,o))),e.meshes&&(i.meshes=e.meshes.map((n,o)=>this._resolveMesh(n,o))),e.nodes&&(i.nodes=e.nodes.map((n,o)=>this._resolveNode(n,o)),i.nodes=i.nodes.map((n,o)=>this._resolveNodeChildren(n))),e.skins&&(i.skins=e.skins.map((n,o)=>this._resolveSkin(n,o))),e.scenes&&(i.scenes=e.scenes.map((n,o)=>this._resolveScene(n,o))),typeof this.json.scene=="number"&&i.scenes&&(i.scene=i.scenes[this.json.scene]),i}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,r){if(typeof r=="object")return r;const i=e&&e[r];return i||console.warn(`glTF file error: Could not find ${e}[${r}]`),i}_resolveScene(e,r){return{...e,id:e.id||`scene-${r}`,nodes:(e.nodes||[]).map(i=>this.getNode(i))}}_resolveNode(e,r){const i={...e,id:(e==null?void 0:e.id)||`node-${r}`};return e.mesh!==void 0&&(i.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(i.camera=this.getCamera(e.camera)),e.skin!==void 0&&(i.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(i.mesh=e.meshes.reduce((n,o)=>{const s=this.getMesh(o);return n.id=s.id,n.primitives=n.primitives.concat(s.primitives),n},{primitives:[]})),i}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(r=>this.getNode(r))),e}_resolveSkin(e,r){const i=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${r}`,inverseBindMatrices:i}}_resolveMesh(e,r){const i={...e,id:e.id||`mesh-${r}`,primitives:[]};return e.primitives&&(i.primitives=e.primitives.map(n=>{const o={...n,attributes:{},indices:void 0,material:void 0},s=n.attributes;for(const f in s)o.attributes[f]=this.getAccessor(s[f]);return n.indices!==void 0&&(o.indices=this.getAccessor(n.indices)),n.material!==void 0&&(o.material=this.getMaterial(n.material)),o})),i}_resolveMaterial(e,r){const i={...e,id:e.id||`material-${r}`};if(i.normalTexture&&(i.normalTexture={...i.normalTexture},i.normalTexture.texture=this.getTexture(i.normalTexture.index)),i.occlusionTexture&&(i.occlusionTexture={...i.occlusionTexture},i.occlusionTexture.texture=this.getTexture(i.occlusionTexture.index)),i.emissiveTexture&&(i.emissiveTexture={...i.emissiveTexture},i.emissiveTexture.texture=this.getTexture(i.emissiveTexture.index)),i.emissiveFactor||(i.emissiveFactor=i.emissiveTexture?[1,1,1]:[0,0,0]),i.pbrMetallicRoughness){i.pbrMetallicRoughness={...i.pbrMetallicRoughness};const n=i.pbrMetallicRoughness;n.baseColorTexture&&(n.baseColorTexture={...n.baseColorTexture},n.baseColorTexture.texture=this.getTexture(n.baseColorTexture.index)),n.metallicRoughnessTexture&&(n.metallicRoughnessTexture={...n.metallicRoughnessTexture},n.metallicRoughnessTexture.texture=this.getTexture(n.metallicRoughnessTexture.index))}return i}_resolveAccessor(e,r){const i=wJ(e.componentType),n=TJ(e.type),o=i*n,s={...e,id:e.id||`accessor-${r}`,bytesPerComponent:i,components:n,bytesPerElement:o,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(s.bufferView=this.getBufferView(e.bufferView)),s.bufferView){const f=s.bufferView.buffer,{ArrayType:A,byteLength:v}=dx(s,s.bufferView),w=(s.bufferView.byteOffset||0)+(s.byteOffset||0)+f.byteOffset;let C=f.arrayBuffer.slice(w,w+v);s.bufferView.byteStride&&(C=this._getValueFromInterleavedBuffer(f,w,s.bufferView.byteStride,s.bytesPerElement,s.count)),s.value=new A(C)}return s}_getValueFromInterleavedBuffer(e,r,i,n,o){const s=new Uint8Array(o*n);for(let f=0;f<o;f++){const A=r+f*i;s.set(new Uint8Array(e.arrayBuffer.slice(A,A+n)),f*n)}return s.buffer}_resolveTexture(e,r){return{...e,id:e.id||`texture-${r}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):xJ(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,r){const i={id:e.id||`sampler-${r}`,...e,parameters:{}};for(const n in i){const o=this._enumSamplerParameter(n);o!==void 0&&(i.parameters[o]=i[n])}return i}_enumSamplerParameter(e){return vJ[e]}_resolveImage(e,r){const i={...e,id:e.id||`image-${r}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},n=this.images[r];return n&&(i.image=n),i}_resolveBufferView(e,r){const i=e.buffer,n=this.buffers[i].arrayBuffer;let o=this.buffers[i].byteOffset||0;return e.byteOffset&&(o+=e.byteOffset),{id:`bufferView-${r}`,...e,buffer:this.buffers[i],data:new Uint8Array(n,o,e.byteLength)}}_resolveCamera(e,r){const i={...e,id:e.id||`camera-${r}`};return i.perspective,i.orthographic,i}}function yx(t,e){return new EJ().postProcess(t,e)}const SJ=({error:t,width:e,deltaType:r})=>t instanceof CJ?ms(Wy,{width:e,name:"No Mapbox token provided",message:Ll(aE,{children:[Ll("p",{children:["To use ",Ll(Gy,{children:["st.",r]})," or"," ",ms(Gy,{children:"st.map"})," you need to set up a Mapbox access token."]}),Ll("p",{children:["To get a token, create an account at"," ",ms("a",{href:"https://mapbox.com",children:"https://mapbox.com"}),". It's free for moderate usage levels!"]}),Ll("p",{children:["Once you have a token, just set it using the Streamlit config option ",ms(Gy,{children:"mapbox.token"})," and don't forget to restart your Streamlit server at this point if it's still running, then reload this tab."]}),Ll("p",{children:["See"," ",ms("a",{href:"https://docs.streamlit.io/develop/api-reference/configuration/config.toml",children:"our documentation"})," ","for more info on how to set config options."]})]})}):t instanceof dO?ms(Wy,{width:e,name:"Error fetching Streamlit Mapbox token",message:Ll(aE,{children:[ms("p",{children:"This app requires an internet connection."}),ms("p",{children:"Please check your connection and try again."}),Ll("p",{children:["If you think this is a bug, please file bug report"," ",ms("a",{href:"https://github.com/streamlit/streamlit/issues/new/choose",children:"here"}),"."]})]})}):ms(Wy,{width:e,name:"Error fetching Streamlit Mapbox token",message:t.message});class CJ extends Error{}class dO extends Error{}const w3="https://data.streamlit.io/tokens.json",T3="mapbox",PJ=t=>e=>{const i=class i extends it.PureComponent{constructor(o){super(o),this.initMapboxToken=async()=>{try{const s=await TL.get(w3),{[T3]:f}=s.data;if(!f)throw new Error(`Missing token ${T3}`);this.setState({mapboxToken:f,isFetching:!1})}catch(s){const f=PL(s);throw this.setState({mapboxTokenError:f,isFetching:!1}),new dO(`${f.message} (${w3})`)}},this.render=()=>{const{mapboxToken:s,mapboxTokenError:f,isFetching:A}=this.state,{width:v}=this.props;return f?ms(SJ,{width:v,error:f,deltaType:t}):A?ms(EL,{element:lE.create({style:lE.SkeletonStyle.ELEMENT})}):ms(e,{...this.props,mapboxToken:s,width:v})},this.state={isFetching:!0,mapboxToken:void 0,mapboxTokenError:void 0}}componentDidMount(){const o=this.props.element.mapboxToken||this.context.libConfig.mapboxToken;o?this.setState({mapboxToken:o,isFetching:!1}):this.initMapboxToken()}};i.displayName=`withMapboxToken(${e.displayName||e.name})`,i.contextType=SL;let r=i;return CL(r,e)},E3=HM("div",{target:"eb2pg7u0"})(({width:t,height:e})=>({position:"relative",height:e,width:t})),IJ=HM("div",{target:"eb2pg7u1"})(({theme:t})=>({position:"absolute",right:"2.625rem",top:t.spacing.md,zIndex:t.zIndices.priority,".mapboxgl-ctrl.mapboxgl-ctrl-group":{overflow:"hidden",background:t.colors.bgColor},"button:not(:disabled)":{background:t.colors.bgColor,width:t.iconSizes.twoXL,height:t.iconSizes.twoXL,"& + button":{borderTopColor:t.colors.borderColor},".mapboxgl-ctrl-icon":{backgroundSize:t.iconSizes.twoXL,"&:hover":{backgroundColor:t.colors.darkenedBgMix25}},"& span":{filter:GM(t)?"":"invert(100%)"}}})),MJ=({container:t,element:e,heightFallback:r="auto",isFullScreen:i,shouldUseContainerWidth:n,widthFallback:o="auto"})=>{const s=it.useMemo(()=>n||i?"100%":e.width||t.width||o,[t.width,e.width,i,n,o]),f=it.useMemo(()=>i&&t.height?t.height:e.height||t.height||r,[i,e.height,t.height,r]);return{width:s,height:f}},RJ=`#version 300 es
|
1781
|
+
`);var v=0,w=!1;this.parse=function(C,I,B){if(typeof C!="string")throw new Error("Input must be a string");var F=C.length,k=e.length,V=r.length,G=i.length,Y=co(n);v=0;var Z=[],se=[],ge=[],Ee=0;if(!C)return Ot();if(s||s!==!1&&C.indexOf(f)===-1){for(var Ve=C.split(r),Fe=0;Fe<Ve.length;Fe++){if(ge=Ve[Fe],v+=ge.length,Fe!==Ve.length-1)v+=r.length;else if(B)return Ot();if(!(i&&ge.substr(0,G)===i)){if(Y){if(Z=[],gr(ge.split(e)),Qt(),w)return Ot()}else gr(ge.split(e));if(o&&Fe>=o)return Z=Z.slice(0,o),Ot(!0)}}return Ot()}for(var pe=C.indexOf(e,v),Te=C.indexOf(r,v),Ae=new RegExp(Xp(A)+Xp(f),"g"),Le;;){if(C[v]===f){for(Le=v,v++;;){if(Le=C.indexOf(f,Le+1),Le===-1)return B||se.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Z.length,index:v}),_r();if(Le===F-1){var ze=C.substring(v,Le).replace(Ae,f);return _r(ze)}if(f===A&&C[Le+1]===A){Le++;continue}if(!(f!==A&&Le!==0&&C[Le-1]===A)){var Xe=Te===-1?pe:Math.min(pe,Te),dt=mr(Xe);if(C[Le+1+dt]===e){if(ge.push(C.substring(v,Le).replace(Ae,f)),v=Le+1+dt+k,pe=C.indexOf(e,v),Te=C.indexOf(r,v),Y&&(Qt(),w))return Ot();if(o&&Z.length>=o)return Ot(!0);break}var Nt=mr(Te);if(C.substr(Le+1+Nt,V)===r){if(ge.push(C.substring(v,Le).replace(Ae,f)),rr(Le+1+Nt+V),pe=C.indexOf(e,v),Y&&(Qt(),w))return Ot();if(o&&Z.length>=o)return Ot(!0);break}se.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Z.length,index:v}),Le++}}if(Y&&(Qt(),w))return Ot();if(o&&Z.length>=o)return Ot(!0);continue}if(i&&ge.length===0&&C.substr(v,G)===i){if(Te===-1)return Ot();v=Te+V,Te=C.indexOf(r,v),pe=C.indexOf(e,v);continue}if(pe!==-1&&(pe<Te||Te===-1)){ge.push(C.substring(v,pe)),v=pe+k,pe=C.indexOf(e,v);continue}if(Te!==-1){if(ge.push(C.substring(v,Te)),rr(Te+V),Y&&(Qt(),w))return Ot();if(o&&Z.length>=o)return Ot(!0);continue}break}return _r();function gr(qt){Z.push(qt),Ee=v}function mr(qt){var Rt=0;if(qt!==-1){var ut=C.substring(Le+1,qt);ut&&ut.trim()===""&&(Rt=ut.length)}return Rt}function _r(qt){return B||(typeof qt>"u"&&(qt=C.substr(v)),ge.push(qt),v=F,gr(ge),Y&&Qt()),Ot()}function rr(qt){v=qt,gr(ge),ge=[],Te=C.indexOf(r,v)}function Ot(qt,Rt){var ut=Rt||!1;return{data:ut?Z[0]:Z,errors:se,meta:{delimiter:e,linebreak:r,aborted:w,truncated:!!qt,cursor:Ee+(I||0)}}}function Qt(){n(Ot(void 0,!0)),Z=[],se=[]}},this.abort=function(){w=!0},this.getCharIndex=function(){return v}}function cx(t){if(typeof t!="object"||t===null)return t;var e=Array.isArray(t)?[]:{};for(var r in t)e[r]=cx(t[r]);return e}function co(t){return typeof t=="function"}const{ChunkStreamer:j4}=Ko;function Hm(t){t=t||{},j4.call(this,t),this.textDecoder=new TextDecoder(this._config.encoding),this.stream=async function(e){this._input=e;try{for await(const r of e)this.parseChunk(this.getStringChunk(r));this._finished=!0,this.parseChunk("")}catch(r){this._sendError(r)}},this._nextChunk=function(){},this.getStringChunk=function(e){return typeof e=="string"?e:this.textDecoder.decode(e,{stream:!0})}}Hm.prototype=Object.create(j4.prototype);Hm.prototype.constructor=Hm;const uZ="4.2.4",ux="object-row-table",hx={dataType:null,batchType:null,id:"csv",module:"csv",name:"CSV",version:uZ,extensions:["csv","tsv","dsv"],mimeTypes:["text/csv","text/tab-separated-values","text/dsv"],category:"table",parse:async(t,e)=>i3(new TextDecoder().decode(t),e),parseText:(t,e)=>i3(t,e),parseInBatches:hZ,options:{csv:{shape:ux,optimizeMemoryUsage:!1,header:"auto",columnPrefix:"column",quoteChar:'"',escapeChar:'"',dynamicTyping:!0,comments:!1,skipEmptyLines:!0,delimitersToGuess:[","," ","|",";"]}}};async function i3(t,e){const r={...hx.options.csv,...e==null?void 0:e.csv},i=fZ(t),o=r.header==="auto"?H4(i):!!r.header,s={...r,header:o,download:!1,transformHeader:o?G4():void 0,error:C=>{throw new Error(C)}},f=Ko.parse(t,s),A=f.data,v=f.meta.fields||W4(r.columnPrefix,i.length),w=r.shape||ux;switch(w){case"object-row-table":return{shape:"object-row-table",data:A.map(C=>Array.isArray(C)?mR(C,v):C)};case"array-row-table":return{shape:"array-row-table",data:A.map(C=>Array.isArray(C)?C:_R(C,v))};default:throw new Error(w)}}function hZ(t,e){e={...e},e.batchSize==="auto"&&(e.batchSize=4e3);const r={...hx.options.csv,...e==null?void 0:e.csv},i=new J8;let n=!0,o=null,s=null,f=null;const A={...r,header:!1,download:!1,chunkSize:1024*1024*5,skipEmptyLines:!1,step(v){let w=v.data;if(r.skipEmptyLines&&w.flat().join("").trim()==="")return;const C=v.meta.cursor;if(n&&!o&&(r.header==="auto"?H4(w):!!r.header)){o=w.map(G4());return}n&&(n=!1,o||(o=W4(r.columnPrefix,w.length)),f=dZ(w,o)),r.optimizeMemoryUsage&&(w=JSON.parse(JSON.stringify(w)));const I=r.shape||ux;s=s||new C1(f,{shape:I,...e});try{s.addRow(w);const B=s&&s.getFullBatch({bytesUsed:C});B&&i.enqueue(B)}catch(B){i.enqueue(B)}},complete(v){try{const w=v.meta.cursor,C=s&&s.getFinalBatch({bytesUsed:w});C&&i.enqueue(C)}catch(w){i.enqueue(w)}i.close()}};return Ko.parse(t,A,Hm),i}function H4(t){return t&&t.every(e=>typeof e=="string")}function fZ(t){return Ko.parse(t,{download:!1,dynamicTyping:!0,preview:1}).data[0]}function G4(){const t=new Set;return e=>{let r=e,i=1;for(;t.has(r);)r=`${e}.${i}`,i++;return t.add(r),r}}function W4(t,e=0){const r=[];for(let i=0;i<e;i++)r.push(`${t}${i+1}`);return r}function dZ(t,e){const r=e?{}:[];for(let i=0;i<t.length;i++){const n=e&&e[i]||i;switch(typeof t[i]){case"number":case"boolean":r[n]={name:String(n),index:i,type:Float32Array};break;case"string":default:r[n]={name:String(n),index:i,type:Array}}}return r}function Yo(t,e){if(!t)throw new Error(e||"assert failed: gltf")}const X4={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},q4={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},AZ=1.33,n3=["SCALAR","VEC2","VEC3","VEC4"],pZ=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],gZ=new Map(pZ),mZ={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},_Z={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},yZ={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function $4(t){return n3[t-1]||n3[0]}function fx(t){const e=gZ.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function dx(t,e){const r=yZ[t.componentType],i=mZ[t.type],n=_Z[t.componentType],o=t.count*i,s=t.count*i*n;Yo(s>=0&&s<=e.byteLength);const f=q4[t.componentType],A=X4[t.type];return{ArrayType:r,length:o,byteLength:s,componentByteSize:f,numberOfComponentsInElement:A}}function Z4(t){let{images:e,bufferViews:r}=t;e=e||[],r=r||[];const i=e.map(s=>s.bufferView);r=r.filter(s=>!i.includes(s));const n=r.reduce((s,f)=>s+f.byteLength,0),o=e.reduce((s,f)=>{const{width:A,height:v}=f.image;return s+A*v},0);return n+Math.ceil(4*o*AZ)}function vZ(t,e,r){const i=t.bufferViews[r];Yo(i);const n=i.buffer,o=e[n];Yo(o);const s=(i.byteOffset||0)+o.byteOffset;return new Uint8Array(o.arrayBuffer,s,i.byteLength)}function bZ(t,e,r){var k,V;const i=typeof r=="number"?(k=t.accessors)==null?void 0:k[r]:r;if(!i)throw new Error(`No gltf accessor ${JSON.stringify(r)}`);const n=(V=t.bufferViews)==null?void 0:V[i.bufferView||0];if(!n)throw new Error(`No gltf buffer view for accessor ${n}`);const{arrayBuffer:o,byteOffset:s}=e[n.buffer],f=(s||0)+(i.byteOffset||0)+(n.byteOffset||0),{ArrayType:A,length:v,componentByteSize:w,numberOfComponentsInElement:C}=dx(i,n),I=w*C,B=n.byteStride||I;if(typeof n.byteStride>"u"||n.byteStride===I)return new A(o,f,v);const F=new A(v);for(let G=0;G<i.count;G++){const Y=new A(o,f+G*B,C);F.set(Y,G*C)}return F}function xZ(){return{asset:{version:"2.0",generator:"loaders.gl"},buffers:[],extensions:{},extensionsRequired:[],extensionsUsed:[]}}class qs{constructor(e){U(this,"gltf");U(this,"sourceBuffers");U(this,"byteLength");this.gltf={json:(e==null?void 0:e.json)||xZ(),buffers:(e==null?void 0:e.buffers)||[],images:(e==null?void 0:e.images)||[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(e){return this.json[e]}getExtraData(e){return(this.json.extras||{})[e]}hasExtension(e){const r=this.getUsedExtensions().find(n=>n===e),i=this.getRequiredExtensions().find(n=>n===e);return typeof r=="string"||typeof i=="string"}getExtension(e){const r=this.getUsedExtensions().find(n=>n===e),i=this.json.extensions||{};return r?i[e]:null}getRequiredExtension(e){return this.getRequiredExtensions().find(i=>i===e)?this.getExtension(e):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getRemovedExtensions(){return this.json.extensionsRemoved||[]}getObjectExtension(e,r){return(e.extensions||{})[r]}getScene(e){return this.getObject("scenes",e)}getNode(e){return this.getObject("nodes",e)}getSkin(e){return this.getObject("skins",e)}getMesh(e){return this.getObject("meshes",e)}getMaterial(e){return this.getObject("materials",e)}getAccessor(e){return this.getObject("accessors",e)}getTexture(e){return this.getObject("textures",e)}getSampler(e){return this.getObject("samplers",e)}getImage(e){return this.getObject("images",e)}getBufferView(e){return this.getObject("bufferViews",e)}getBuffer(e){return this.getObject("buffers",e)}getObject(e,r){if(typeof r=="object")return r;const i=this.json[e]&&this.json[e][r];if(!i)throw new Error(`glTF file error: Could not find ${e}[${r}]`);return i}getTypedArrayForBufferView(e){e=this.getBufferView(e);const r=e.buffer,i=this.gltf.buffers[r];Yo(i);const n=(e.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,n,e.byteLength)}getTypedArrayForAccessor(e){const r=this.getAccessor(e);return bZ(this.gltf.json,this.gltf.buffers,r)}getTypedArrayForImageData(e){e=this.getAccessor(e);const r=this.getBufferView(e.bufferView),n=this.getBuffer(r.buffer).data,o=r.byteOffset||0;return new Uint8Array(n,o,r.byteLength)}addApplicationData(e,r){return this.json[e]=r,this}addExtraData(e,r){return this.json.extras=this.json.extras||{},this.json.extras[e]=r,this}addObjectExtension(e,r,i){return e.extensions=e.extensions||{},e.extensions[r]=i,this.registerUsedExtension(r),this}setObjectExtension(e,r,i){const n=e.extensions||{};n[r]=i}removeObjectExtension(e,r){const i=(e==null?void 0:e.extensions)||{};if(i[r]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const n=this.json.extensionsRemoved;n.includes(r)||n.push(r)}delete i[r]}addExtension(e,r={}){return Yo(r),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=r,this.registerUsedExtension(e),r}addRequiredExtension(e,r={}){return Yo(r),this.addExtension(e,r),this.registerRequiredExtension(e),r}registerUsedExtension(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(r=>r===e)||this.json.extensionsUsed.push(e)}registerRequiredExtension(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(r=>r===e)||this.json.extensionsRequired.push(e)}removeExtension(e){var r;if((r=this.json.extensions)!=null&&r[e]){this.json.extensionsRemoved=this.json.extensionsRemoved||[];const i=this.json.extensionsRemoved;i.includes(e)||i.push(e)}this.json.extensions&&delete this.json.extensions[e],this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e)}setDefaultScene(e){this.json.scene=e}addScene(e){const{nodeIndices:r}=e;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:r}),this.json.scenes.length-1}addNode(e){const{meshIndex:r,matrix:i}=e;this.json.nodes=this.json.nodes||[];const n={mesh:r};return i&&(n.matrix=i),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(e){const{attributes:r,indices:i,material:n,mode:o=4}=e,f={primitives:[{attributes:this._addAttributes(r),mode:o}]};if(i){const A=this._addIndices(i);f.primitives[0].indices=A}return Number.isFinite(n)&&(f.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(f),this.json.meshes.length-1}addPointCloud(e){const i={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(i),this.json.meshes.length-1}addImage(e,r){const i=v2(e),n=r||(i==null?void 0:i.mimeType),s={bufferView:this.addBufferView(e),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(s),this.json.images.length-1}addBufferView(e,r=0,i=this.byteLength){const n=e.byteLength;Yo(Number.isFinite(n)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);const o={buffer:r,byteOffset:i,byteLength:n};return this.byteLength+=i0(n,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(o),this.json.bufferViews.length-1}addAccessor(e,r){const i={bufferView:e,type:$4(r.size),componentType:r.componentType,count:r.count,max:r.max,min:r.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(i),this.json.accessors.length-1}addBinaryBuffer(e,r={size:3}){const i=this.addBufferView(e);let n={min:r.min,max:r.max};(!n.min||!n.max)&&(n=this._getAccessorMinMax(e,r.size));const o={size:r.size,componentType:fx(e),count:Math.round(e.length/r.size),min:n.min,max:n.max};return this.addAccessor(i,Object.assign(o,r))}addTexture(e){const{imageIndex:r}=e,i={source:r};return this.json.textures=this.json.textures||[],this.json.textures.push(i),this.json.textures.length-1}addMaterial(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}createBinaryChunk(){var o,s;this.gltf.buffers=[];const e=this.byteLength,r=new ArrayBuffer(e),i=new Uint8Array(r);let n=0;for(const f of this.sourceBuffers||[])n=Sk(f,i,n);(s=(o=this.json)==null?void 0:o.buffers)!=null&&s[0]?this.json.buffers[0].byteLength=e:this.json.buffers=[{byteLength:e}],this.gltf.binary=r,this.sourceBuffers=[r]}_removeStringFromArray(e,r){let i=!0;for(;i;){const n=e.indexOf(r);n>-1?e.splice(n,1):i=!1}}_addAttributes(e={}){const r={};for(const i in e){const n=e[i],o=this._getGltfAttributeName(i),s=this.addBinaryBuffer(n.value,n);r[o]=s}return r}_addIndices(e){return this.addBinaryBuffer(e,{size:1})}_getGltfAttributeName(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}_getAccessorMinMax(e,r){const i={min:null,max:null};if(e.length<r)return i;i.min=[],i.max=[];const n=e.subarray(0,r);for(const o of n)i.min.push(o),i.max.push(o);for(let o=r;o<e.length;o+=r)for(let s=0;s<r;s++)i.min[0+s]=Math.min(i.min[0+s],e[o+s]),i.max[0+s]=Math.max(i.max[0+s],e[o+s]);return i}}function s3(t){return(t%1+1)%1}const K4={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16,BOOLEAN:1,STRING:1,ENUM:1},wZ={INT8:Int8Array,UINT8:Uint8Array,INT16:Int16Array,UINT16:Uint16Array,INT32:Int32Array,UINT32:Uint32Array,INT64:BigInt64Array,UINT64:BigUint64Array,FLOAT32:Float32Array,FLOAT64:Float64Array},Y4={INT8:1,UINT8:1,INT16:2,UINT16:2,INT32:4,UINT32:4,INT64:8,UINT64:8,FLOAT32:4,FLOAT64:8};function Ax(t,e){return Y4[e]*K4[t]}function D_(t,e,r,i){if(r!=="UINT8"&&r!=="UINT16"&&r!=="UINT32"&&r!=="UINT64")return null;const n=t.getTypedArrayForBufferView(e),o=F_(n,"SCALAR",r,i+1);return o instanceof BigInt64Array||o instanceof BigUint64Array?null:o}function F_(t,e,r,i=1){const n=K4[e],o=wZ[r],s=Y4[r],f=i*n,A=f*s;let v=t.buffer,w=t.byteOffset;return w%s!==0&&(v=new Uint8Array(v).slice(w,w+A).buffer,w=0),new o(v,w,f)}function px(t,e,r){var v,w,C,I,B;const i=`TEXCOORD_${e.texCoord||0}`,n=r.attributes[i],o=t.getTypedArrayForAccessor(n),s=t.gltf.json,f=e.index,A=(w=(v=s.textures)==null?void 0:v[f])==null?void 0:w.source;if(typeof A<"u"){const F=(I=(C=s.images)==null?void 0:C[A])==null?void 0:I.mimeType,k=(B=t.gltf.images)==null?void 0:B[A];if(k&&typeof k.width<"u"){const V=[];for(let G=0;G<o.length;G+=2){const Y=TZ(k,F,o,G,e.channels);V.push(Y)}return V}}return[]}function J4(t,e,r,i,n){if(!(r!=null&&r.length))return;const o=[];for(const w of r){let C=i.findIndex(I=>I===w);C===-1&&(C=i.push(w)-1),o.push(C)}const s=new Uint32Array(o),f=t.gltf.buffers.push({arrayBuffer:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength})-1,A=t.addBufferView(s,f,0),v=t.addAccessor(A,{size:1,componentType:fx(s),count:s.length});n.attributes[e]=v}function TZ(t,e,r,i,n=[0]){const o={r:{offset:0,shift:0},g:{offset:1,shift:8},b:{offset:2,shift:16},a:{offset:3,shift:24}},s=r[i],f=r[i+1];let A=1;e&&(e.indexOf("image/jpeg")!==-1||e.indexOf("image/png")!==-1)&&(A=4);const v=EZ(s,f,t,A);let w=0;for(const C of n){const I=typeof C=="number"?Object.values(o)[C]:o[C],B=v+I.offset,F=yR(t);if(F.data.length<=B)throw new Error(`${F.data.length} <= ${B}`);const k=F.data[B];w|=k<<I.shift}return w}function EZ(t,e,r,i=1){const n=r.width,o=s3(t)*(n-1),s=Math.round(o),f=r.height,A=s3(e)*(f-1),v=Math.round(A),w=r.components?r.components:i;return(v*n+s)*w}function Q4(t,e,r,i,n){const o=[];for(let s=0;s<e;s++){const f=r[s],A=r[s+1]-r[s];if(A+f>i)break;const v=f/n,w=A/n;o.push(t.slice(v,v+w))}return o}function eO(t,e,r){const i=[];for(let n=0;n<e;n++){const o=n*r;i.push(t.slice(o,o+r))}return i}function tO(t,e,r,i){if(r)throw new Error("Not implemented - arrayOffsets for strings is specified");if(i){const n=[],o=new TextDecoder("utf8");let s=0;for(let f=0;f<t;f++){const A=i[f+1]-i[f];if(A+s<=e.length){const v=e.subarray(s,A+s),w=o.decode(v);n.push(w),s+=A}}return n}return[]}const rO="EXT_mesh_features",SZ=rO;async function CZ(t,e){const r=new qs(t);PZ(r,e)}function PZ(t,e){const r=t.gltf.json;if(r.meshes)for(const i of r.meshes)for(const n of i.primitives)IZ(t,n,e)}function IZ(t,e,r){var o,s,f;if(!((o=r==null?void 0:r.gltf)!=null&&o.loadBuffers))return;const i=(s=e.extensions)==null?void 0:s[rO],n=i==null?void 0:i.featureIds;if(n)for(const A of n){let v;if(typeof A.attribute<"u"){const w=`_FEATURE_ID_${A.attribute}`,C=e.attributes[w];v=t.getTypedArrayForAccessor(C)}else typeof A.texture<"u"&&((f=r==null?void 0:r.gltf)!=null&&f.loadImages)?v=px(t,A.texture,e):v=[];A.data=v}}const MZ=Object.freeze(Object.defineProperty({__proto__:null,decode:CZ,name:SZ},Symbol.toStringTag,{value:"Module"})),gx="EXT_structural_metadata",RZ=gx;async function BZ(t,e){const r=new qs(t);OZ(r,e)}function OZ(t,e){var i,n;if(!((i=e.gltf)!=null&&i.loadBuffers))return;const r=t.getExtension(gx);r&&((n=e.gltf)!=null&&n.loadImages&&DZ(t,r),FZ(t,r))}function DZ(t,e){const r=e.propertyTextures,i=t.gltf.json;if(r&&i.meshes)for(const n of i.meshes)for(const o of n.primitives)kZ(t,r,o,e)}function FZ(t,e){const r=e.schema;if(!r)return;const i=r.classes,n=e.propertyTables;if(i&&n)for(const o in i){const s=LZ(n,o);s&&UZ(t,r,s)}}function LZ(t,e){for(const r of t)if(r.class===e)return r;return null}function kZ(t,e,r,i){var s;if(!e)return;const n=(s=r.extensions)==null?void 0:s[gx],o=n==null?void 0:n.propertyTextures;if(o)for(const f of o){const A=e[f];NZ(t,A,r,i)}}function NZ(t,e,r,i){var o;if(!e.properties)return;i.dataAttributeNames||(i.dataAttributeNames=[]);const n=e.class;for(const s in e.properties){const f=`${n}_${s}`,A=(o=e.properties)==null?void 0:o[s];if(!A)continue;A.data||(A.data=[]);const v=A.data,w=px(t,A,r);w!==null&&(J4(t,f,w,v,r),A.data=v,i.dataAttributeNames.push(f))}}function UZ(t,e,r){var o,s;const i=(o=e.classes)==null?void 0:o[r.class];if(!i)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${r.class}`);const n=r.count;for(const f in i.properties){const A=i.properties[f],v=(s=r.properties)==null?void 0:s[f];if(v){const w=zZ(t,e,A,n,v);v.data=w}}}function zZ(t,e,r,i,n){let o=[];const s=n.values,f=t.getTypedArrayForBufferView(s),A=VZ(t,r,n,i),v=jZ(t,n,i);switch(r.type){case"SCALAR":case"VEC2":case"VEC3":case"VEC4":case"MAT2":case"MAT3":case"MAT4":{o=HZ(r,i,f,A);break}case"BOOLEAN":throw new Error(`Not implemented - classProperty.type=${r.type}`);case"STRING":{o=tO(i,f,A,v);break}case"ENUM":{o=GZ(e,r,i,f,A);break}default:throw new Error(`Unknown classProperty type ${r.type}`)}return o}function VZ(t,e,r,i){return e.array&&typeof e.count>"u"&&typeof r.arrayOffsets<"u"?D_(t,r.arrayOffsets,r.arrayOffsetType||"UINT32",i):null}function jZ(t,e,r){return typeof e.stringOffsets<"u"?D_(t,e.stringOffsets,e.stringOffsetType||"UINT32",r):null}function HZ(t,e,r,i){const n=t.array,o=t.count,s=Ax(t.type,t.componentType),f=r.byteLength/s;let A;return t.componentType?A=F_(r,t.type,t.componentType,f):A=r,n?i?Q4(A,e,i,r.length,s):o?eO(A,e,o):[]:A}function GZ(t,e,r,i,n){var C;const o=e.enumType;if(!o)throw new Error("Incorrect data in the EXT_structural_metadata extension: classProperty.enumType is not set for type ENUM");const s=(C=t.enums)==null?void 0:C[o];if(!s)throw new Error(`Incorrect data in the EXT_structural_metadata extension: schema.enums does't contain ${o}`);const f=s.valueType||"UINT16",A=Ax(e.type,f),v=i.byteLength/A;let w=F_(i,e.type,f,v);if(w||(w=i),e.array){if(n)return WZ({valuesData:w,numberOfElements:r,arrayOffsets:n,valuesDataBytesLength:i.length,elementSize:A,enumEntry:s});const I=e.count;return I?XZ(w,r,I,s):[]}return mx(w,0,r,s)}function WZ(t){const{valuesData:e,numberOfElements:r,arrayOffsets:i,valuesDataBytesLength:n,elementSize:o,enumEntry:s}=t,f=[];for(let A=0;A<r;A++){const v=i[A],w=i[A+1]-i[A];if(w+v>n)break;const C=v/o,I=w/o,B=mx(e,C,I,s);f.push(B)}return f}function XZ(t,e,r,i){const n=[];for(let o=0;o<e;o++){const s=r*o,f=mx(t,s,r,i);n.push(f)}return n}function mx(t,e,r,i){const n=[];for(let o=0;o<r;o++)if(t instanceof BigInt64Array||t instanceof BigUint64Array)n.push("");else{const s=t[e+o],f=qZ(i,s);f?n.push(f.name):n.push("")}return n}function qZ(t,e){for(const r of t.values)if(r.value===e)return r;return null}const $Z=Object.freeze(Object.defineProperty({__proto__:null,decode:BZ,name:RZ},Symbol.toStringTag,{value:"Module"})),iO="EXT_feature_metadata",ZZ=iO;async function KZ(t,e){const r=new qs(t);YZ(r,e)}function YZ(t,e){var i,n;if(!((i=e.gltf)!=null&&i.loadBuffers))return;const r=t.getExtension(iO);r&&((n=e.gltf)!=null&&n.loadImages&&JZ(t,r),QZ(t,r))}function JZ(t,e){const r=e.schema;if(!r)return;const i=r.classes,{featureTextures:n}=e;if(i&&n)for(const o in i){const s=i[o],f=tK(n,o);f&&iK(t,f,s)}}function QZ(t,e){const r=e.schema;if(!r)return;const i=r.classes,n=e.featureTables;if(i&&n)for(const o in i){const s=eK(n,o);s&&rK(t,r,s)}}function eK(t,e){for(const r in t){const i=t[r];if(i.class===e)return i}return null}function tK(t,e){for(const r in t){const i=t[r];if(i.class===e)return i}return null}function rK(t,e,r){var o,s;if(!r.class)return;const i=(o=e.classes)==null?void 0:o[r.class];if(!i)throw new Error(`Incorrect data in the EXT_structural_metadata extension: no schema class with name ${r.class}`);const n=r.count;for(const f in i.properties){const A=i.properties[f],v=(s=r.properties)==null?void 0:s[f];if(v){const w=nK(t,e,A,n,v);v.data=w}}}function iK(t,e,r){var n;const i=e.class;for(const o in r.properties){const s=(n=e==null?void 0:e.properties)==null?void 0:n[o];if(s){const f=cK(t,s,i);s.data=f}}}function nK(t,e,r,i,n){let o=[];const s=n.bufferView,f=t.getTypedArrayForBufferView(s),A=sK(t,r,n,i),v=oK(t,r,n,i);return r.type==="STRING"||r.componentType==="STRING"?o=tO(i,f,A,v):aK(r)&&(o=lK(r,i,f,A)),o}function sK(t,e,r,i){return e.type==="ARRAY"&&typeof e.componentCount>"u"&&typeof r.arrayOffsetBufferView<"u"?D_(t,r.arrayOffsetBufferView,r.offsetType||"UINT32",i):null}function oK(t,e,r,i){return typeof r.stringOffsetBufferView<"u"?D_(t,r.stringOffsetBufferView,r.offsetType||"UINT32",i):null}function aK(t){const e=["UINT8","INT16","UINT16","INT32","UINT32","INT64","UINT64","FLOAT32","FLOAT64"];return e.includes(t.type)||typeof t.componentType<"u"&&e.includes(t.componentType)}function lK(t,e,r,i){const n=t.type==="ARRAY",o=t.componentCount,s="SCALAR",f=t.componentType||t.type,A=Ax(s,f),v=r.byteLength/A,w=F_(r,s,f,v);return n?i?Q4(w,e,i,r.length,A):o?eO(w,e,o):[]:w}function cK(t,e,r){const i=t.gltf.json;if(!i.meshes)return[];const n=[];for(const o of i.meshes)for(const s of o.primitives)uK(t,r,e,n,s);return n}function uK(t,e,r,i,n){const o={channels:r.channels,...r.texture},s=px(t,o,n);s&&J4(t,e,s,i,n)}const hK=Object.freeze(Object.defineProperty({__proto__:null,decode:KZ,name:ZZ},Symbol.toStringTag,{value:"Module"})),fK="4.2.4",dK="4.2.4",Gm={TRANSCODER:"basis_transcoder.js",TRANSCODER_WASM:"basis_transcoder.wasm",ENCODER:"basis_encoder.js",ENCODER_WASM:"basis_encoder.wasm"};let o3;async function a3(t){ek(t.modules);const e=tk("basis");return e||(o3||(o3=AK(t)),await o3)}async function AK(t){let e=null,r=null;return[e,r]=await Promise.all([await Rh(Gm.TRANSCODER,"textures",t),await Rh(Gm.TRANSCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await pK(e,r)}function pK(t,e){const r={};return e&&(r.wasmBinary=e),new Promise(i=>{t(r).then(n=>{const{BasisFile:o,initializeBasis:s}=n;s(),i({BasisFile:o})})})}let Bv;async function l3(t){const e=t.modules||{};return e.basisEncoder?e.basisEncoder:(Bv=Bv||gK(t),await Bv)}async function gK(t){let e=null,r=null;return[e,r]=await Promise.all([await Rh(Gm.ENCODER,"textures",t),await Rh(Gm.ENCODER_WASM,"textures",t)]),e=e||globalThis.BASIS,await mK(e,r)}function mK(t,e){const r={};return e&&(r.wasmBinary=e),new Promise(i=>{t(r).then(n=>{const{BasisFile:o,KTX2File:s,initializeBasis:f,BasisEncoder:A}=n;f(),i({BasisFile:o,KTX2File:s,BasisEncoder:A})})})}const ed={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},_K=["","WEBKIT_","MOZ_"],c3={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let Tg=null;function yK(t){if(!Tg){t=t||vK()||void 0,Tg=new Set;for(const e of _K)for(const r in c3)if(t&&t.getExtension(`${e}${r}`)){const i=c3[r];Tg.add(i)}}return Tg}function vK(){try{return document.createElement("canvas").getContext("webgl")}catch{return null}}var u3,h3,f3,d3,A3,p3,g3,m3;(function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB"})(u3||(u3={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(h3||(h3={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(f3||(f3={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(d3||(d3={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(A3||(A3={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(p3||(p3={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(g3||(g3={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(m3||(m3={}));const qo=[171,75,84,88,32,50,48,187,13,10,26,10];function bK(t){const e=new Uint8Array(t);return!(e.byteLength<qo.length||e[0]!==qo[0]||e[1]!==qo[1]||e[2]!==qo[2]||e[3]!==qo[3]||e[4]!==qo[4]||e[5]!==qo[5]||e[6]!==qo[6]||e[7]!==qo[7]||e[8]!==qo[8]||e[9]!==qo[9]||e[10]!==qo[10]||e[11]!==qo[11])}const xK={etc1:{basisFormat:0,compressed:!0,format:ed.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:ed.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:ed.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:ed.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:ed.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:ed.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function wK(t,e){if(e.basis.containerFormat==="auto"){if(bK(t)){const i=await l3(e);return _3(i.KTX2File,t,e)}const{BasisFile:r}=await a3(e);return Ov(r,t,e)}switch(e.basis.module){case"encoder":const r=await l3(e);switch(e.basis.containerFormat){case"ktx2":return _3(r.KTX2File,t,e);case"basis":default:return Ov(r.BasisFile,t,e)}case"transcoder":default:const{BasisFile:i}=await a3(e);return Ov(i,t,e)}}function Ov(t,e,r){const i=new t(new Uint8Array(e));try{if(!i.startTranscoding())throw new Error("Failed to start basis transcoding");const n=i.getNumImages(),o=[];for(let s=0;s<n;s++){const f=i.getNumLevels(s),A=[];for(let v=0;v<f;v++)A.push(TK(i,s,v,r));o.push(A)}return o}finally{i.close(),i.delete()}}function TK(t,e,r,i){const n=t.getImageWidth(e,r),o=t.getImageHeight(e,r),s=t.getHasAlpha(),{compressed:f,format:A,basisFormat:v}=nO(i,s),w=t.getImageTranscodedSizeInBytes(e,r,v),C=new Uint8Array(w);if(!t.transcodeImage(C,e,r,v,0,0))throw new Error("failed to start Basis transcoding");return{width:n,height:o,data:C,compressed:f,format:A,hasAlpha:s}}function _3(t,e,r){const i=new t(new Uint8Array(e));try{if(!i.startTranscoding())throw new Error("failed to start KTX2 transcoding");const n=i.getLevels(),o=[];for(let s=0;s<n;s++){o.push(EK(i,s,r));break}return[o]}finally{i.close(),i.delete()}}function EK(t,e,r){const{alphaFlag:i,height:n,width:o}=t.getImageLevelInfo(e,0,0),{compressed:s,format:f,basisFormat:A}=nO(r,i),v=t.getImageTranscodedSizeInBytes(e,0,0,A),w=new Uint8Array(v);if(!t.transcodeImage(w,e,0,0,A,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:o,height:n,data:w,compressed:s,levelSize:v,hasAlpha:i,format:f}}function nO(t,e){let r=t&&t.basis&&t.basis.format;return r==="auto"&&(r=sO()),typeof r=="object"&&(r=e?r.alpha:r.noAlpha),r=r.toLowerCase(),xK[r]}function sO(){const t=yK();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}const SK={dataType:null,batchType:null,name:"Basis",id:"basis",module:"textures",version:dK,worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},CK={...SK,parse:wK},eA=!0,y3=1735152710,_x=12,Wm=8,PK=1313821514,IK=5130562,MK=0,RK=0,BK=1;function OK(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}function DK(t,e=0,r={}){const i=new DataView(t),{magic:n=y3}=r,o=i.getUint32(e,!1);return o===n||o===y3}function FK(t,e,r=0,i={}){const n=new DataView(e),o=OK(n,r+0),s=n.getUint32(r+4,eA),f=n.getUint32(r+8,eA);switch(Object.assign(t,{header:{byteOffset:r,byteLength:f,hasBinChunk:!1},type:o,version:s,json:{},binChunks:[]}),r+=_x,t.version){case 1:return LK(t,n,r);case 2:return kK(t,n,r,i={});default:throw new Error(`Invalid GLB version ${t.version}. Only supports version 1 and 2.`)}}function LK(t,e,r){Ni(t.header.byteLength>_x+Wm);const i=e.getUint32(r+0,eA),n=e.getUint32(r+4,eA);return r+=Wm,Ni(n===MK),Cb(t,e,r,i),r+=i,r+=Pb(t,e,r,t.header.byteLength),r}function kK(t,e,r,i){return Ni(t.header.byteLength>_x+Wm),NK(t,e,r,i),r+t.header.byteLength}function NK(t,e,r,i){for(;r+8<=t.header.byteLength;){const n=e.getUint32(r+0,eA),o=e.getUint32(r+4,eA);switch(r+=Wm,o){case PK:Cb(t,e,r,n);break;case IK:Pb(t,e,r,n);break;case RK:i.strict||Cb(t,e,r,n);break;case BK:i.strict||Pb(t,e,r,n);break}r+=i0(n,4)}return r}function Cb(t,e,r,i){const n=new Uint8Array(e.buffer,r,i),s=new TextDecoder("utf8").decode(n);return t.json=JSON.parse(s),i0(i,4)}function Pb(t,e,r,i){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:r,byteLength:i,arrayBuffer:e.buffer}),i0(i,4)}function oO(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const i=e.baseUri||e.uri;if(!i)throw new Error(`'baseUri' must be provided to resolve relative url ${t}`);return i.substr(0,i.lastIndexOf("/")+1)+t}const UK="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",zK="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",VK=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),jK=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),HK={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},GK={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};async function WK(t,e,r,i,n,o="NONE"){const s=await XK();ZK(s,s.exports[GK[n]],t,e,r,i,s.exports[HK[o||"NONE"]])}let Dv;async function XK(){return Dv||(Dv=qK()),Dv}async function qK(){let t=UK;WebAssembly.validate(VK)&&(t=zK,console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate($K(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}function $K(t){const e=new Uint8Array(t.length);for(let i=0;i<t.length;++i){const n=t.charCodeAt(i);e[i]=n>96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}let r=0;for(let i=0;i<t.length;++i)e[r++]=e[i]<60?jK[e[i]]:(e[i]-60)*64+e[++i];return e.buffer.slice(0,r)}function ZK(t,e,r,i,n,o,s){const f=t.exports.sbrk,A=i+3&-4,v=f(A*n),w=f(o.length),C=new Uint8Array(t.exports.memory.buffer);C.set(o,w);const I=e(v,i,n,w,o.length);if(I===0&&s&&s(v,A,n),r.set(C.subarray(v,v+i*n)),f(v-f(0)),I!==0)throw new Error(`Malformed buffer data: ${I}`)}const Xm="EXT_meshopt_compression",KK=Xm;async function YK(t,e){var n,o;const r=new qs(t);if(!((n=e==null?void 0:e.gltf)!=null&&n.decompressMeshes)||!((o=e.gltf)!=null&&o.loadBuffers))return;const i=[];for(const s of t.json.bufferViews||[])i.push(JK(r,s));await Promise.all(i),r.removeExtension(Xm)}async function JK(t,e){const r=t.getObjectExtension(e,Xm);if(r){const{byteOffset:i=0,byteLength:n=0,byteStride:o,count:s,mode:f,filter:A="NONE",buffer:v}=r,w=t.gltf.buffers[v],C=new Uint8Array(w.arrayBuffer,w.byteOffset+i,n),I=new Uint8Array(t.gltf.buffers[e.buffer].arrayBuffer,e.byteOffset,e.byteLength);await WK(I,s,o,C,f,A),t.removeObjectExtension(e,Xm)}}const QK=Object.freeze(Object.defineProperty({__proto__:null,decode:YK,name:KK},Symbol.toStringTag,{value:"Module"})),gd="EXT_texture_webp",eY=gd;function tY(t,e){const r=new qs(t);if(!R5("image/webp")){if(r.getRequiredExtensions().includes(gd))throw new Error(`gltf: Required extension ${gd} not supported by browser`);return}const{json:i}=r;for(const n of i.textures||[]){const o=r.getObjectExtension(n,gd);o&&(n.source=o.source),r.removeObjectExtension(n,gd)}r.removeExtension(gd)}const rY=Object.freeze(Object.defineProperty({__proto__:null,name:eY,preprocess:tY},Symbol.toStringTag,{value:"Module"})),lm="KHR_texture_basisu",iY=lm;function nY(t,e){const r=new qs(t),{json:i}=r;for(const n of i.textures||[]){const o=r.getObjectExtension(n,lm);o&&(n.source=o.source,r.removeObjectExtension(n,lm))}r.removeExtension(lm)}const sY=Object.freeze(Object.defineProperty({__proto__:null,name:iY,preprocess:nY},Symbol.toStringTag,{value:"Module"})),oY="4.2.4",aY={dataType:null,batchType:null,name:"Draco",id:"draco",module:"draco",version:oY,worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:typeof WebAssembly=="object"?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function lY(t,e,r){const i=aO(e.metadata),n=[],o=cY(e.attributes);for(const s in t){const f=t[s],A=v3(s,f,o[s]);n.push(A)}if(r){const s=v3("indices",r);n.push(s)}return{fields:n,metadata:i}}function cY(t){const e={};for(const r in t){const i=t[r];e[i.name||"undefined"]=i}return e}function v3(t,e,r){const i=r?aO(r.metadata):void 0;return K8(t,e,i)}function aO(t){Object.entries(t);const e={};for(const r in t)e[`${r}.string`]=JSON.stringify(t[r]);return e}const b3={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},uY={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},hY=4;class fY{constructor(e){U(this,"draco");U(this,"decoder");U(this,"metadataQuerier");this.draco=e,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(e,r={}){const i=new this.draco.DecoderBuffer;i.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(r);const n=this.decoder.GetEncodedGeometryType(i),o=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let s;switch(n){case this.draco.TRIANGULAR_MESH:s=this.decoder.DecodeBufferToMesh(i,o);break;case this.draco.POINT_CLOUD:s=this.decoder.DecodeBufferToPointCloud(i,o);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!s.ok()||!o.ptr){const I=`DRACO decompression failed: ${s.error_msg()}`;throw new Error(I)}const f=this._getDracoLoaderData(o,n,r),A=this._getMeshData(o,f,r),v=_2(A.attributes),w=lY(A.attributes,f,A.indices);return{loader:"draco",loaderData:f,header:{vertexCount:o.num_points(),boundingBox:v},...A,schema:w}}finally{this.draco.destroy(i),o&&this.draco.destroy(o)}}_getDracoLoaderData(e,r,i){const n=this._getTopLevelMetadata(e),o=this._getDracoAttributes(e,i);return{geometry_type:r,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:n,attributes:o}}_getDracoAttributes(e,r){const i={};for(let n=0;n<e.num_attributes();n++){const o=this.decoder.GetAttribute(e,n),s=this._getAttributeMetadata(e,n);i[o.unique_id()]={unique_id:o.unique_id(),attribute_type:o.attribute_type(),data_type:o.data_type(),num_components:o.num_components(),byte_offset:o.byte_offset(),byte_stride:o.byte_stride(),normalized:o.normalized(),attribute_index:n,metadata:s};const f=this._getQuantizationTransform(o,r);f&&(i[o.unique_id()].quantization_transform=f);const A=this._getOctahedronTransform(o,r);A&&(i[o.unique_id()].octahedron_transform=A)}return i}_getMeshData(e,r,i){const n=this._getMeshAttributes(r,e,i);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(e instanceof this.draco.Mesh)switch(i.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(e),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(e),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(e,r,i){const n={};for(const o of Object.values(e.attributes)){const s=this._deduceAttributeName(o,i);o.name=s;const f=this._getAttributeValues(r,o);if(f){const{value:A,size:v}=f;n[s]={value:A,size:v,byteOffset:o.byte_offset,byteStride:o.byte_stride,normalized:o.normalized}}}return n}_getTriangleListIndices(e){const i=e.num_faces()*3,n=i*hY,o=this.draco._malloc(n);try{return this.decoder.GetTrianglesUInt32Array(e,n,o),new Uint32Array(this.draco.HEAPF32.buffer,o,i).slice()}finally{this.draco._free(o)}}_getTriangleStripIndices(e){const r=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,r),pY(r)}finally{this.draco.destroy(r)}}_getAttributeValues(e,r){const i=uY[r.data_type];if(!i)return console.warn(`DRACO: Unsupported attribute type ${r.data_type}`),null;const n=r.num_components,s=e.num_points()*n,f=s*i.BYTES_PER_ELEMENT,A=dY(this.draco,i);let v;const w=this.draco._malloc(f);try{const C=this.decoder.GetAttribute(e,r.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,C,A,f,w),v=new i(this.draco.HEAPF32.buffer,w,s).slice()}finally{this.draco._free(w)}return{value:v,size:n}}_deduceAttributeName(e,r){const i=e.unique_id;for(const[s,f]of Object.entries(r.extraAttributes||{}))if(f===i)return s;const n=e.attribute_type;for(const s in b3)if(this.draco[s]===n)return b3[s];const o=r.attributeNameEntry||"name";return e.metadata[o]?e.metadata[o].string:`CUSTOM_ATTRIBUTE_${i}`}_getTopLevelMetadata(e){const r=this.decoder.GetMetadata(e);return this._getDracoMetadata(r)}_getAttributeMetadata(e,r){const i=this.decoder.GetAttributeMetadata(e,r);return this._getDracoMetadata(i)}_getDracoMetadata(e){if(!e||!e.ptr)return{};const r={},i=this.metadataQuerier.NumEntries(e);for(let n=0;n<i;n++){const o=this.metadataQuerier.GetEntryName(e,n);r[o]=this._getDracoMetadataField(e,o)}return r}_getDracoMetadataField(e,r){const i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,r,i);const n=AY(i);return{int:this.metadataQuerier.GetIntEntry(e,r),string:this.metadataQuerier.GetStringEntry(e,r),double:this.metadataQuerier.GetDoubleEntry(e,r),intArray:n}}finally{this.draco.destroy(i)}}_disableAttributeTransforms(e){const{quantizedAttributes:r=[],octahedronAttributes:i=[]}=e,n=[...r,...i];for(const o of n)this.decoder.SkipAttributeTransform(this.draco[o])}_getQuantizationTransform(e,r){const{quantizedAttributes:i=[]}=r,n=e.attribute_type();if(i.map(s=>this.decoder[s]).includes(n)){const s=new this.draco.AttributeQuantizationTransform;try{if(s.InitFromAttribute(e))return{quantization_bits:s.quantization_bits(),range:s.range(),min_values:new Float32Array([1,2,3]).map(f=>s.min_value(f))}}finally{this.draco.destroy(s)}}return null}_getOctahedronTransform(e,r){const{octahedronAttributes:i=[]}=r,n=e.attribute_type();if(i.map(s=>this.decoder[s]).includes(n)){const s=new this.draco.AttributeQuantizationTransform;try{if(s.InitFromAttribute(e))return{quantization_bits:s.quantization_bits()}}finally{this.draco.destroy(s)}}return null}}function dY(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}function AY(t){const e=t.size(),r=new Int32Array(e);for(let i=0;i<e;i++)r[i]=t.GetValue(i);return r}function pY(t){const e=t.size(),r=new Int32Array(e);for(let i=0;i<e;i++)r[i]=t.GetValue(i);return r}const gY="1.5.6",mY="1.4.1",Fv=`https://www.gstatic.com/draco/versioned/decoders/${gY}`,Co={DECODER:"draco_wasm_wrapper.js",DECODER_WASM:"draco_decoder.wasm",FALLBACK_DECODER:"draco_decoder.js",ENCODER:"draco_encoder.js"},Lv={[Co.DECODER]:`${Fv}/${Co.DECODER}`,[Co.DECODER_WASM]:`${Fv}/${Co.DECODER_WASM}`,[Co.FALLBACK_DECODER]:`${Fv}/${Co.FALLBACK_DECODER}`,[Co.ENCODER]:`https://raw.githubusercontent.com/google/draco/${mY}/javascript/${Co.ENCODER}`};let kv;async function _Y(t){const e=t.modules||{};return e.draco3d?kv||(kv=e.draco3d.createDecoderModule({}).then(r=>({draco:r}))):kv||(kv=yY(t)),await kv}async function yY(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await Rh(Lv[Co.FALLBACK_DECODER],"draco",t,Co.FALLBACK_DECODER);break;case"wasm":default:[e,r]=await Promise.all([await Rh(Lv[Co.DECODER],"draco",t,Co.DECODER),await Rh(Lv[Co.DECODER_WASM],"draco",t,Co.DECODER_WASM)])}return e=e||globalThis.DracoDecoderModule,await vY(e,r)}function vY(t,e){const r={};return e&&(r.wasmBinary=e),new Promise(i=>{t({...r,onModuleLoaded:n=>i({draco:n})})})}const lO={...aY,parse:bY};async function bY(t,e){const{draco:r}=await _Y(e),i=new fY(r);try{return i.parseSync(t,e==null?void 0:e.draco)}finally{i.destroy()}}function xY(t){const e={};for(const r in t){const i=t[r];if(r!=="indices"){const n=cO(i);e[r]=n}}return e}function cO(t){const{buffer:e,size:r,count:i}=wY(t);return{value:e,size:r,byteOffset:0,count:i,type:$4(r),componentType:fx(e)}}function wY(t){let e=t,r=1,i=0;return t&&t.value&&(e=t.value,r=t.size||1),e&&(ArrayBuffer.isView(e)||(e=TY(e,Float32Array)),i=e.length/r),{buffer:e,size:r,count:i}}function TY(t,e,r=!1){return t?Array.isArray(t)?new e(t):r&&!(t instanceof e)?new e(t):t:null}const Lh="KHR_draco_mesh_compression",EY=Lh;function SY(t,e,r){const i=new qs(t);for(const n of uO(i))i.getObjectExtension(n,Lh)}async function CY(t,e,r){var o;if(!((o=e==null?void 0:e.gltf)!=null&&o.decompressMeshes))return;const i=new qs(t),n=[];for(const s of uO(i))i.getObjectExtension(s,Lh)&&n.push(IY(i,s,e,r));await Promise.all(n),i.removeExtension(Lh)}function PY(t,e={}){const r=new qs(t);for(const i of r.json.meshes||[])MY(),r.addRequiredExtension(Lh)}async function IY(t,e,r,i){const n=t.getObjectExtension(e,Lh);if(!n)return;const o=t.getTypedArrayForBufferView(n.bufferView),s=f2(o.buffer,o.byteOffset),f={...r};delete f["3d-tiles"];const A=await aA(s,lO,f,i),v=xY(A.attributes);for(const[w,C]of Object.entries(v))if(w in e.attributes){const I=e.attributes[w],B=t.getAccessor(I);B!=null&&B.min&&(B!=null&&B.max)&&(C.min=B.min,C.max=B.max)}e.attributes=v,A.indices&&(e.indices=cO(A.indices)),t.removeObjectExtension(e,Lh),RY(e)}function MY(t,e,r=4,i,n){if(!i.DracoWriter)throw new Error("options.gltf.DracoWriter not provided")}function RY(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function*uO(t){for(const e of t.json.meshes||[])for(const r of e.primitives)yield r}const BY=Object.freeze(Object.defineProperty({__proto__:null,decode:CY,encode:PY,name:EY,preprocess:SY},Symbol.toStringTag,{value:"Module"})),L_="KHR_texture_transform",OY=L_,Eg=new Ke,DY=new Mn,FY=new Mn;async function LY(t,e){var o;if(!new qs(t).hasExtension(L_)||!((o=e.gltf)!=null&&o.loadBuffers))return;const n=t.json.materials||[];for(let s=0;s<n.length;s++)kY(s,t)}function kY(t,e){var o,s,f,A;const r=(o=e.json.materials)==null?void 0:o[t],i=[(s=r==null?void 0:r.pbrMetallicRoughness)==null?void 0:s.baseColorTexture,r==null?void 0:r.emissiveTexture,r==null?void 0:r.normalTexture,r==null?void 0:r.occlusionTexture,(f=r==null?void 0:r.pbrMetallicRoughness)==null?void 0:f.metallicRoughnessTexture],n=[];for(const v of i)v&&((A=v==null?void 0:v.extensions)!=null&&A[L_])&&NY(e,t,v,n)}function NY(t,e,r,i){const n=UY(r,i);if(!n)return;const o=t.json.meshes||[];for(const s of o)for(const f of s.primitives){const A=f.material;Number.isFinite(A)&&e===A&&zY(t,f,n)}}function UY(t,e){var s;const r=(s=t.extensions)==null?void 0:s[L_],{texCoord:i=0}=t,{texCoord:n=i}=r;if(!(e.findIndex(([f,A])=>f===i&&A===n)!==-1)){const f=HY(r);return i!==n&&(t.texCoord=n),e.push([i,n]),{originalTexCoord:i,texCoord:n,matrix:f}}return null}function zY(t,e,r){var f,A;const{originalTexCoord:i,texCoord:n,matrix:o}=r,s=e.attributes[`TEXCOORD_${i}`];if(Number.isFinite(s)){const v=(f=t.json.accessors)==null?void 0:f[s];if(v&&v.bufferView){const w=(A=t.json.bufferViews)==null?void 0:A[v.bufferView];if(w){const{arrayBuffer:C,byteOffset:I}=t.buffers[w.buffer],B=(I||0)+(v.byteOffset||0)+(w.byteOffset||0),{ArrayType:F,length:k}=dx(v,w),V=q4[v.componentType],G=X4[v.type],Y=w.byteStride||V*G,Z=new Float32Array(k);for(let se=0;se<v.count;se++){const ge=new F(C,B+se*Y,2);Eg.set(ge[0],ge[1],1),Eg.transformByMatrix3(o),Z.set([Eg[0],Eg[1]],se*G)}i===n?VY(v,w,t.buffers,Z):jY(n,v,e,t,Z)}}}}function VY(t,e,r,i){t.componentType=5126,r.push({arrayBuffer:i.buffer,byteOffset:0,byteLength:i.buffer.byteLength}),e.buffer=r.length-1,e.byteLength=i.buffer.byteLength,e.byteOffset=0,delete e.byteStride}function jY(t,e,r,i,n){i.buffers.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength});const o=i.json.bufferViews;if(!o)return;o.push({buffer:i.buffers.length-1,byteLength:n.buffer.byteLength,byteOffset:0});const s=i.json.accessors;s&&(s.push({bufferView:(o==null?void 0:o.length)-1,byteOffset:0,componentType:5126,count:e.count,type:"VEC2"}),r.attributes[`TEXCOORD_${t}`]=s.length-1)}function HY(t){const{offset:e=[0,0],rotation:r=0,scale:i=[1,1]}=t,n=new Mn().set(1,0,0,0,1,0,e[0],e[1],1),o=DY.set(Math.cos(r),Math.sin(r),0,-Math.sin(r),Math.cos(r),0,0,0,1),s=FY.set(i[0],0,0,0,i[1],0,0,0,1);return n.multiplyRight(o).multiplyRight(s)}const GY=Object.freeze(Object.defineProperty({__proto__:null,decode:LY,name:OY},Symbol.toStringTag,{value:"Module"})),Ih="KHR_lights_punctual",WY=Ih;async function XY(t){const e=new qs(t),{json:r}=e,i=e.getExtension(Ih);i&&(e.json.lights=i.lights,e.removeExtension(Ih));for(const n of r.nodes||[]){const o=e.getObjectExtension(n,Ih);o&&(n.light=o.light),e.removeObjectExtension(n,Ih)}}async function qY(t){const e=new qs(t),{json:r}=e;if(r.lights){const i=e.addExtension(Ih);Yo(!i.lights),i.lights=r.lights,delete r.lights}if(e.json.lights){for(const i of e.json.lights){const n=i.node;e.addObjectExtension(n,Ih,i)}delete e.json.lights}}const $Y=Object.freeze(Object.defineProperty({__proto__:null,decode:XY,encode:qY,name:WY},Symbol.toStringTag,{value:"Module"})),qp="KHR_materials_unlit",ZY=qp;async function KY(t){const e=new qs(t),{json:r}=e;for(const i of r.materials||[])i.extensions&&i.extensions.KHR_materials_unlit&&(i.unlit=!0),e.removeObjectExtension(i,qp);e.removeExtension(qp)}function YY(t){const e=new qs(t),{json:r}=e;if(e.materials)for(const i of r.materials||[])i.unlit&&(delete i.unlit,e.addObjectExtension(i,qp,{}),e.addExtension(qp))}const JY=Object.freeze(Object.defineProperty({__proto__:null,decode:KY,encode:YY,name:ZY},Symbol.toStringTag,{value:"Module"})),gp="KHR_techniques_webgl",QY=gp;async function eJ(t){const e=new qs(t),{json:r}=e,i=e.getExtension(gp);if(i){const n=rJ(i,e);for(const o of r.materials||[]){const s=e.getObjectExtension(o,gp);s&&(o.technique=Object.assign({},s,n[s.technique]),o.technique.values=iJ(o.technique,e)),e.removeObjectExtension(o,gp)}e.removeExtension(gp)}}async function tJ(t,e){}function rJ(t,e){const{programs:r=[],shaders:i=[],techniques:n=[]}=t,o=new TextDecoder;return i.forEach(s=>{if(Number.isFinite(s.bufferView))s.code=o.decode(e.getTypedArrayForBufferView(s.bufferView));else throw new Error("KHR_techniques_webgl: no shader code")}),r.forEach(s=>{s.fragmentShader=i[s.fragmentShader],s.vertexShader=i[s.vertexShader]}),n.forEach(s=>{s.program=r[s.program]}),n}function iJ(t,e){const r=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(i=>{t.uniforms[i].value&&!(i in r)&&(r[i]=t.uniforms[i].value)}),Object.keys(r).forEach(i=>{typeof r[i]=="object"&&r[i].index!==void 0&&(r[i].texture=e.getTexture(r[i].index))}),r}const nJ=Object.freeze(Object.defineProperty({__proto__:null,decode:eJ,encode:tJ,name:QY},Symbol.toStringTag,{value:"Module"})),hO=[$Z,MZ,QK,rY,sY,BY,$Y,JY,nJ,GY,hK];function sJ(t,e={},r){var n;const i=hO.filter(o=>fO(o.name,e));for(const o of i)(n=o.preprocess)==null||n.call(o,t,e,r)}async function oJ(t,e={},r){var n;const i=hO.filter(o=>fO(o.name,e));for(const o of i)await((n=o.decode)==null?void 0:n.call(o,t,e,r))}function fO(t,e){var n;const r=((n=e==null?void 0:e.gltf)==null?void 0:n.excludeExtensions)||{};return!(t in r&&!r[t])}const Nv="KHR_binary_glTF";function aJ(t){const e=new qs(t),{json:r}=e;for(const i of r.images||[]){const n=e.getObjectExtension(i,Nv);n&&Object.assign(i,n),e.removeObjectExtension(i,Nv)}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,e.removeExtension(Nv)}const x3={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},lJ={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class cJ{constructor(){U(this,"idToIndexMap",{animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}});U(this,"json")}normalize(e,r){this.json=e.json;const i=e.json;switch(i.asset&&i.asset.version){case"2.0":return;case void 0:case"1.0":break;default:console.warn(`glTF: Unknown version ${i.asset.version}`);return}if(!r.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(i),this._convertTopLevelObjectsToArrays(i),aJ(e),this._convertObjectIdsToArrayIndices(i),this._updateObjects(i),this._updateMaterial(i)}_addAsset(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(e){for(const r in x3)this._convertTopLevelObjectToArray(e,r)}_convertTopLevelObjectToArray(e,r){const i=e[r];if(!(!i||Array.isArray(i))){e[r]=[];for(const n in i){const o=i[n];o.id=o.id||n;const s=e[r].length;e[r].push(o),this.idToIndexMap[r][n]=s}}}_convertObjectIdsToArrayIndices(e){for(const r in x3)this._convertIdsToIndices(e,r);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));for(const r of e.textures)this._convertTextureIds(r);for(const r of e.meshes)this._convertMeshIds(r);for(const r of e.nodes)this._convertNodeIds(r);for(const r of e.scenes)this._convertSceneIds(r)}_convertTextureIds(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}_convertMeshIds(e){for(const r of e.primitives){const{attributes:i,indices:n,material:o}=r;for(const s in i)i[s]=this._convertIdToIndex(i[s],"accessor");n&&(r.indices=this._convertIdToIndex(n,"accessor")),o&&(r.material=this._convertIdToIndex(o,"material"))}}_convertNodeIds(e){e.children&&(e.children=e.children.map(r=>this._convertIdToIndex(r,"node"))),e.meshes&&(e.meshes=e.meshes.map(r=>this._convertIdToIndex(r,"mesh")))}_convertSceneIds(e){e.nodes&&(e.nodes=e.nodes.map(r=>this._convertIdToIndex(r,"node")))}_convertIdsToIndices(e,r){e[r]||(console.warn(`gltf v1: json doesn't contain attribute ${r}`),e[r]=[]);for(const i of e[r])for(const n in i){const o=i[n],s=this._convertIdToIndex(o,n);i[n]=s}}_convertIdToIndex(e,r){const i=lJ[r];if(i in this.idToIndexMap){const n=this.idToIndexMap[i][e];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${r} with id ${e}`);return n}return e}_updateObjects(e){for(const r of this.json.buffers)delete r.type}_updateMaterial(e){var r,i,n;for(const o of e.materials){o.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const s=((r=o.values)==null?void 0:r.tex)||((i=o.values)==null?void 0:i.texture2d_0)||((n=o.values)==null?void 0:n.diffuseTex),f=e.textures.findIndex(A=>A.id===s);f!==-1&&(o.pbrMetallicRoughness.baseColorTexture={index:f})}}}function uJ(t,e={}){return new cJ().normalize(t,e)}async function hJ(t,e,r=0,i,n){var o,s,f;return fJ(t,e,r,i),uJ(t,{normalize:(o=i==null?void 0:i.gltf)==null?void 0:o.normalize}),sJ(t,i,n),(s=i==null?void 0:i.gltf)!=null&&s.loadBuffers&&t.json.buffers&&await dJ(t,i,n),(f=i==null?void 0:i.gltf)!=null&&f.loadImages&&await AJ(t,i,n),await oJ(t,i,n),t}function fJ(t,e,r,i){if(i.uri&&(t.baseUri=i.uri),e instanceof ArrayBuffer&&!DK(e,r,i)&&(e=new TextDecoder().decode(e)),typeof e=="string")t.json=xk(e);else if(e instanceof ArrayBuffer){const s={};r=FK(s,e,r,i.glb),Yo(s.type==="glTF",`Invalid GLB magic string ${s.type}`),t._glb=s,t.json=s.json}else Yo(!1,"GLTF: must be ArrayBuffer or string");const n=t.json.buffers||[];if(t.buffers=new Array(n.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:s}=t._glb;t.buffers[0]={arrayBuffer:s[0].arrayBuffer,byteOffset:s[0].byteOffset,byteLength:s[0].byteLength}}const o=t.json.images||[];t.images=new Array(o.length).fill({})}async function dJ(t,e,r){var n,o;const i=t.json.buffers||[];for(let s=0;s<i.length;++s){const f=i[s];if(f.uri){const{fetch:A}=r;Yo(A);const v=oO(f.uri,e),w=await((n=r==null?void 0:r.fetch)==null?void 0:n.call(r,v)),C=await((o=w==null?void 0:w.arrayBuffer)==null?void 0:o.call(w));t.buffers[s]={arrayBuffer:C,byteOffset:0,byteLength:C.byteLength},delete f.uri}else t.buffers[s]===null&&(t.buffers[s]={arrayBuffer:new ArrayBuffer(f.byteLength),byteOffset:0,byteLength:f.byteLength})}}async function AJ(t,e,r){const i=pJ(t),n=t.json.images||[],o=[];for(const s of i)o.push(gJ(t,n[s],s,e,r));return await Promise.all(o)}function pJ(t){const e=new Set,r=t.json.textures||[];for(const i of r)i.source!==void 0&&e.add(i.source);return Array.from(e).sort()}async function gJ(t,e,r,i,n){let o;if(e.uri&&!e.hasOwnProperty("bufferView")){const f=oO(e.uri,i),{fetch:A}=n;o=await(await A(f)).arrayBuffer(),e.bufferView={data:o}}if(Number.isFinite(e.bufferView)){const f=vZ(t.json,t.buffers,e.bufferView);o=f2(f.buffer,f.byteOffset,f.byteLength)}Yo(o,"glTF image has no data");let s=await aA(o,[Lp,CK],{...i,mimeType:e.mimeType,basis:i.basis||{format:sO()}},n);s&&s[0]&&(s={compressed:!0,mipmaps:!1,width:s[0].width,height:s[0].height,data:s[0]}),t.images=t.images||[],t.images[r]=s}const tA={dataType:null,batchType:null,name:"glTF",id:"gltf",module:"gltf",version:fK,extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:mJ,options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0},log:console}};async function mJ(t,e={},r){e={...tA.options,...e},e.gltf={...tA.options.gltf,...e.gltf};const{byteOffset:i=0}=e;return await hJ({},t,i,e,r)}const _J={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},yJ={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},xa={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},vJ={magFilter:xa.TEXTURE_MAG_FILTER,minFilter:xa.TEXTURE_MIN_FILTER,wrapS:xa.TEXTURE_WRAP_S,wrapT:xa.TEXTURE_WRAP_T},bJ={[xa.TEXTURE_MAG_FILTER]:xa.LINEAR,[xa.TEXTURE_MIN_FILTER]:xa.NEAREST_MIPMAP_LINEAR,[xa.TEXTURE_WRAP_S]:xa.REPEAT,[xa.TEXTURE_WRAP_T]:xa.REPEAT};function xJ(){return{id:"default-sampler",parameters:bJ}}function wJ(t){return yJ[t]}function TJ(t){return _J[t]}class EJ{constructor(){U(this,"baseUri","");U(this,"jsonUnprocessed");U(this,"json");U(this,"buffers",[]);U(this,"images",[])}postProcess(e,r={}){const{json:i,buffers:n=[],images:o=[]}=e,{baseUri:s=""}=e;return Yo(i),this.baseUri=s,this.buffers=n,this.images=o,this.jsonUnprocessed=i,this.json=this._resolveTree(e.json,r),this.json}_resolveTree(e,r={}){const i={...e};return this.json=i,e.bufferViews&&(i.bufferViews=e.bufferViews.map((n,o)=>this._resolveBufferView(n,o))),e.images&&(i.images=e.images.map((n,o)=>this._resolveImage(n,o))),e.samplers&&(i.samplers=e.samplers.map((n,o)=>this._resolveSampler(n,o))),e.textures&&(i.textures=e.textures.map((n,o)=>this._resolveTexture(n,o))),e.accessors&&(i.accessors=e.accessors.map((n,o)=>this._resolveAccessor(n,o))),e.materials&&(i.materials=e.materials.map((n,o)=>this._resolveMaterial(n,o))),e.meshes&&(i.meshes=e.meshes.map((n,o)=>this._resolveMesh(n,o))),e.nodes&&(i.nodes=e.nodes.map((n,o)=>this._resolveNode(n,o)),i.nodes=i.nodes.map((n,o)=>this._resolveNodeChildren(n))),e.skins&&(i.skins=e.skins.map((n,o)=>this._resolveSkin(n,o))),e.scenes&&(i.scenes=e.scenes.map((n,o)=>this._resolveScene(n,o))),typeof this.json.scene=="number"&&i.scenes&&(i.scene=i.scenes[this.json.scene]),i}getScene(e){return this._get(this.json.scenes,e)}getNode(e){return this._get(this.json.nodes,e)}getSkin(e){return this._get(this.json.skins,e)}getMesh(e){return this._get(this.json.meshes,e)}getMaterial(e){return this._get(this.json.materials,e)}getAccessor(e){return this._get(this.json.accessors,e)}getCamera(e){return this._get(this.json.cameras,e)}getTexture(e){return this._get(this.json.textures,e)}getSampler(e){return this._get(this.json.samplers,e)}getImage(e){return this._get(this.json.images,e)}getBufferView(e){return this._get(this.json.bufferViews,e)}getBuffer(e){return this._get(this.json.buffers,e)}_get(e,r){if(typeof r=="object")return r;const i=e&&e[r];return i||console.warn(`glTF file error: Could not find ${e}[${r}]`),i}_resolveScene(e,r){return{...e,id:e.id||`scene-${r}`,nodes:(e.nodes||[]).map(i=>this.getNode(i))}}_resolveNode(e,r){const i={...e,id:(e==null?void 0:e.id)||`node-${r}`};return e.mesh!==void 0&&(i.mesh=this.getMesh(e.mesh)),e.camera!==void 0&&(i.camera=this.getCamera(e.camera)),e.skin!==void 0&&(i.skin=this.getSkin(e.skin)),e.meshes!==void 0&&e.meshes.length&&(i.mesh=e.meshes.reduce((n,o)=>{const s=this.getMesh(o);return n.id=s.id,n.primitives=n.primitives.concat(s.primitives),n},{primitives:[]})),i}_resolveNodeChildren(e){return e.children&&(e.children=e.children.map(r=>this.getNode(r))),e}_resolveSkin(e,r){const i=typeof e.inverseBindMatrices=="number"?this.getAccessor(e.inverseBindMatrices):void 0;return{...e,id:e.id||`skin-${r}`,inverseBindMatrices:i}}_resolveMesh(e,r){const i={...e,id:e.id||`mesh-${r}`,primitives:[]};return e.primitives&&(i.primitives=e.primitives.map(n=>{const o={...n,attributes:{},indices:void 0,material:void 0},s=n.attributes;for(const f in s)o.attributes[f]=this.getAccessor(s[f]);return n.indices!==void 0&&(o.indices=this.getAccessor(n.indices)),n.material!==void 0&&(o.material=this.getMaterial(n.material)),o})),i}_resolveMaterial(e,r){const i={...e,id:e.id||`material-${r}`};if(i.normalTexture&&(i.normalTexture={...i.normalTexture},i.normalTexture.texture=this.getTexture(i.normalTexture.index)),i.occlusionTexture&&(i.occlusionTexture={...i.occlusionTexture},i.occlusionTexture.texture=this.getTexture(i.occlusionTexture.index)),i.emissiveTexture&&(i.emissiveTexture={...i.emissiveTexture},i.emissiveTexture.texture=this.getTexture(i.emissiveTexture.index)),i.emissiveFactor||(i.emissiveFactor=i.emissiveTexture?[1,1,1]:[0,0,0]),i.pbrMetallicRoughness){i.pbrMetallicRoughness={...i.pbrMetallicRoughness};const n=i.pbrMetallicRoughness;n.baseColorTexture&&(n.baseColorTexture={...n.baseColorTexture},n.baseColorTexture.texture=this.getTexture(n.baseColorTexture.index)),n.metallicRoughnessTexture&&(n.metallicRoughnessTexture={...n.metallicRoughnessTexture},n.metallicRoughnessTexture.texture=this.getTexture(n.metallicRoughnessTexture.index))}return i}_resolveAccessor(e,r){const i=wJ(e.componentType),n=TJ(e.type),o=i*n,s={...e,id:e.id||`accessor-${r}`,bytesPerComponent:i,components:n,bytesPerElement:o,value:void 0,bufferView:void 0,sparse:void 0};if(e.bufferView!==void 0&&(s.bufferView=this.getBufferView(e.bufferView)),s.bufferView){const f=s.bufferView.buffer,{ArrayType:A,byteLength:v}=dx(s,s.bufferView),w=(s.bufferView.byteOffset||0)+(s.byteOffset||0)+f.byteOffset;let C=f.arrayBuffer.slice(w,w+v);s.bufferView.byteStride&&(C=this._getValueFromInterleavedBuffer(f,w,s.bufferView.byteStride,s.bytesPerElement,s.count)),s.value=new A(C)}return s}_getValueFromInterleavedBuffer(e,r,i,n,o){const s=new Uint8Array(o*n);for(let f=0;f<o;f++){const A=r+f*i;s.set(new Uint8Array(e.arrayBuffer.slice(A,A+n)),f*n)}return s.buffer}_resolveTexture(e,r){return{...e,id:e.id||`texture-${r}`,sampler:typeof e.sampler=="number"?this.getSampler(e.sampler):xJ(),source:typeof e.source=="number"?this.getImage(e.source):void 0}}_resolveSampler(e,r){const i={id:e.id||`sampler-${r}`,...e,parameters:{}};for(const n in i){const o=this._enumSamplerParameter(n);o!==void 0&&(i.parameters[o]=i[n])}return i}_enumSamplerParameter(e){return vJ[e]}_resolveImage(e,r){const i={...e,id:e.id||`image-${r}`,image:null,bufferView:e.bufferView!==void 0?this.getBufferView(e.bufferView):void 0},n=this.images[r];return n&&(i.image=n),i}_resolveBufferView(e,r){const i=e.buffer,n=this.buffers[i].arrayBuffer;let o=this.buffers[i].byteOffset||0;return e.byteOffset&&(o+=e.byteOffset),{id:`bufferView-${r}`,...e,buffer:this.buffers[i],data:new Uint8Array(n,o,e.byteLength)}}_resolveCamera(e,r){const i={...e,id:e.id||`camera-${r}`};return i.perspective,i.orthographic,i}}function yx(t,e){return new EJ().postProcess(t,e)}const SJ=({error:t,width:e,deltaType:r})=>t instanceof CJ?ms(Wy,{width:e,name:"No Mapbox token provided",message:Ll(aE,{children:[Ll("p",{children:["To use ",Ll(Gy,{children:["st.",r]})," or"," ",ms(Gy,{children:"st.map"})," you need to set up a Mapbox access token."]}),Ll("p",{children:["To get a token, create an account at"," ",ms("a",{href:"https://mapbox.com",children:"https://mapbox.com"}),". It's free for moderate usage levels!"]}),Ll("p",{children:["Once you have a token, just set it using the Streamlit config option ",ms(Gy,{children:"mapbox.token"})," and don't forget to restart your Streamlit server at this point if it's still running, then reload this tab."]}),Ll("p",{children:["See"," ",ms("a",{href:"https://docs.streamlit.io/develop/api-reference/configuration/config.toml",children:"our documentation"})," ","for more info on how to set config options."]})]})}):t instanceof dO?ms(Wy,{width:e,name:"Error fetching Streamlit Mapbox token",message:Ll(aE,{children:[ms("p",{children:"This app requires an internet connection."}),ms("p",{children:"Please check your connection and try again."}),Ll("p",{children:["If you think this is a bug, please file bug report"," ",ms("a",{href:"https://github.com/streamlit/streamlit/issues/new/choose",children:"here"}),"."]})]})}):ms(Wy,{width:e,name:"Error fetching Streamlit Mapbox token",message:t.message});class CJ extends Error{}class dO extends Error{}const w3="https://data.streamlit.io/tokens.json",T3="mapbox",PJ=t=>e=>{const i=class i extends it.PureComponent{constructor(o){super(o),this.initMapboxToken=async()=>{try{const s=await UL.get(w3),{[T3]:f}=s.data;if(!f)throw new Error(`Missing token ${T3}`);this.setState({mapboxToken:f,isFetching:!1})}catch(s){const f=CL(s);throw this.setState({mapboxTokenError:f,isFetching:!1}),new dO(`${f.message} (${w3})`)}},this.render=()=>{const{mapboxToken:s,mapboxTokenError:f,isFetching:A}=this.state,{width:v}=this.props;return f?ms(SJ,{width:v,error:f,deltaType:t}):A?ms(TL,{element:lE.create({style:lE.SkeletonStyle.ELEMENT})}):ms(e,{...this.props,mapboxToken:s,width:v})},this.state={isFetching:!0,mapboxToken:void 0,mapboxTokenError:void 0}}componentDidMount(){const o=this.props.element.mapboxToken||this.context.libConfig.mapboxToken;o?this.setState({mapboxToken:o,isFetching:!1}):this.initMapboxToken()}};i.displayName=`withMapboxToken(${e.displayName||e.name})`,i.contextType=EL;let r=i;return SL(r,e)},E3=HM("div",{target:"eb2pg7u0"})(({width:t,height:e})=>({position:"relative",height:e,width:t})),IJ=HM("div",{target:"eb2pg7u1"})(({theme:t})=>({position:"absolute",right:"2.625rem",top:t.spacing.md,zIndex:t.zIndices.priority,".mapboxgl-ctrl.mapboxgl-ctrl-group":{overflow:"hidden",background:t.colors.bgColor},"button:not(:disabled)":{background:t.colors.bgColor,width:t.iconSizes.twoXL,height:t.iconSizes.twoXL,"& + button":{borderTopColor:t.colors.borderColor},".mapboxgl-ctrl-icon":{backgroundSize:t.iconSizes.twoXL,"&:hover":{backgroundColor:t.colors.darkenedBgMix25}},"& span":{filter:GM(t)?"":"invert(100%)"}}})),MJ=({container:t,element:e,heightFallback:r="auto",isFullScreen:i,shouldUseContainerWidth:n,widthFallback:o="auto"})=>{const s=it.useMemo(()=>n||i?"100%":e.width||t.width||o,[t.width,e.width,i,n,o]),f=it.useMemo(()=>i&&t.height?t.height:e.height||t.height||r,[i,e.height,t.height,r]);return{width:s,height:f}},RJ=`#version 300 es
|
1782
1782
|
#define SHADER_NAME arc-layer-vertex-shader
|
1783
1783
|
in vec3 positions;
|
1784
1784
|
in vec4 instanceSourceColors;
|
@@ -3470,7 +3470,7 @@ vColor = vec4(color.rgb, color.a * opacity);
|
|
3470
3470
|
}
|
3471
3471
|
DECKGL_FILTER_COLOR(vColor, geometry);
|
3472
3472
|
}
|
3473
|
-
`,Pue={...Lc.defaultProps,extruded:!1,diskResolution:4,vertices:[[-.5,-.5],[.5,-.5],[.5,.5],[-.5,.5]]};class wF extends Lc{getShaders(){const e=super.getShaders(),r=this.props.data,i=r.data.blockSize??Math.sqrt(r.length);return{...e,defines:{...e.defines,BLOCK_WIDTH:i},vs:Cue}}initializeState(){this.getAttributeManager().addInstanced({instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getLineColor",defaultValue:[255,255,255,255]}})}}wF.layerName="RasterColumnLayer";function Iue(t,e){return t.data===e.data&&t.length===e.length}class vw extends rs{renderLayers(){const{data:e,getElevation:r,getFillColor:i,getLineColor:n,getLineWidth:o,tileIndex:s,updateTriggers:f}=this.props;if(!e||!s)return null;const A=e.blockSize??0,[v,w,C]=oF(s),I=[v,w,C/A],B=this.getSubLayerClass("column",wF),{highlightedObjectIndex:F,highlightColor:k}=this.state;return new B(this.props,this.getSubLayerProps({id:"cell",updateTriggers:f,getElevation:this.getSubLayerAccessor(r),getFillColor:this.getSubLayerAccessor(i),getLineColor:this.getSubLayerAccessor(n),getLineWidth:this.getSubLayerAccessor(o)}),{data:{data:e,length:A*A},dataComparator:Iue,offset:I,highlightedObjectIndex:F,highlightColor:k})}getSubLayerAccessor(e){return typeof e!="function"?super.getSubLayerAccessor(e):(r,i)=>{const{data:n,index:o}=i,s=n.data,f=Yce(s.cells,o);return e({properties:f},i)}}getPickingInfo(e){const r=super.getPickingInfo(e);return r.index!==-1&&(r.object=this.getSubLayerAccessor(i=>i)(void 0,{data:this.props,index:r.index})),r}_updateAutoHighlight(e){const{highlightedObjectIndex:r}=this.state;let i=-1;if(e.index!==-1&&(i=e.index),r!==i){let{highlightColor:n}=this.props;typeof n=="function"&&(n=n(e)),this.setState({highlightColor:n,highlightedObjectIndex:i})}}}vw.layerName="RasterLayer";vw.defaultProps=Pue;const Mue=t=>{var r,i;const e=(i=(r=t.tile)==null?void 0:r.index)==null?void 0:i.q;return e?new vw(t,{tileIndex:e}):null},Rue={data:jh,tileSize:pA};class bw extends rs{getLoadOptions(){const e=super.getLoadOptions()||{},r=this.props.data;return y0(e,r.accessToken),e}renderLayers(){const e=this.props.data;if(!e)return null;const{tiles:r,minzoom:i,maxzoom:n}=e,o=this.getSubLayerClass("tile",Nc);return new o(this.props,{id:`raster-tile-layer-${this.props.id}`,data:r,TilesetClass:nw,renderSubLayers:Mue,minZoom:i,maxZoom:n,loadOptions:this.getLoadOptions()})}}bw.layerName="RasterTileLayer";bw.defaultProps=Rue;class xw{static read(e,r){return e.readFields(xw._readField,{properties:[],numericProps:{}},r)}static _readField(e,r,i){if(e===1)r.properties.push(Yh.read(i,i.readVarint()+i.pos));else if(e===2){const n=Jh.read(i,i.readVarint()+i.pos);r.numericProps[n.key]=n.value}}}const Bue={name:"CARTO Properties Tile",version:"1",id:"cartoPropertiesTile",module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-properties-tile"],category:"geometry",worker:!1,parse:async(t,e)=>VI(t),parseSync:VI,options:{}};function VI(t,e){return t?sy(t,xw):null}const TF="9.0.37",EF="cartoVectorTile",Oue={cartoVectorTile:{workerUrl:fw(EF,TF)}},Due={name:"CARTO Vector Tile",version:TF,id:EF,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-vector-tile"],category:"geometry",parse:async(t,e)=>jI(t),parseSync:jI,worker:!0,options:Oue};function Fue(t,e,{startPosition:r,endPosition:i,indices:n}){const o=t.positions.size,s=r*o,f=i*o,A=t.positions.value.subarray(s,f),v=n.slice(1).map(C=>C-r),w=IO(A,v,o);for(let C=0,I=w.length;C<I;++C)e.push(r+w[C])}function Lue(t){const{polygonIndices:e,primitivePolygonIndices:r}=t,i=[];let n=0;for(let o=0;o<e.value.length-1;o++){const s=e.value[o],f=e.value[o+1],A=r.value.indexOf(f),v=r.value.subarray(n,A);n=A,Fue(t,i,{startPosition:s,endPosition:f,indices:v})}t.triangles={value:new Uint32Array(i),size:1}}function jI(t,e){if(!t)return null;const r=sy(t,Zce);return r.polygons&&!r.polygons.triangles&&Lue(r.polygons),r}s0([Bue,Due]);const kue={...AA.defaultProps,data:jh,dataComparator:jh.equal,tileSize:pA};class ww extends AA{constructor(...e){super(...e)}initializeState(){super.initializeState(),this.setState({binary:!0})}updateState(e){const{props:r}=e;if(r.data){super.updateState(e);const n=new URL(r.data.tiles[0]).searchParams.get("formatTiles")==="mvt";this.setState({mvt:n})}}getLoadOptions(){const e=super.getLoadOptions()||{},r=this.props.data;return y0(e,r.accessToken),e.gis={format:"binary"},e}async getTileData(e){const r=this.props.data,{tiles:i,properties_tiles:n}=r,o=Uh(i,e);if(!o)return Promise.reject("Invalid URL");const s=this.getLoadOptions(),{fetch:f}=this.props,{signal:A}=e,v=f(o,{propName:"data",layer:this,loadOptions:s,signal:A});if(!n)return await v;const w=Uh(n,e);if(!w)return Promise.reject("Invalid properties URL");const C=f(w,{propName:"data",layer:this,loadOptions:s,signal:A}),[I,B]=await Promise.all([v,C]);return I?B?eue(I,B):I:null}renderSubLayers(e){if(e.data===null)return null;if(this.state.mvt)return super.renderSubLayers(e);const r=e.tile.bbox,{west:i,south:n,east:o,north:s}=r,f=[new ry,...e.extensions||[]],A={clipBounds:[i,n,o,s]},v=I=>{var B,F,k;return{[I]:{...A,...(B=e==null?void 0:e._subLayerProps)==null?void 0:B[I],extensions:[...f,...((k=(F=e==null?void 0:e._subLayerProps)==null?void 0:F[I])==null?void 0:k.extensions)||[]]}}},w={...e,autoHighlight:!1,_subLayerProps:{...e._subLayerProps,...v("polygons-fill"),...v("polygons-stroke"),...v("linestrings")}};return new kc(w)}_isWGS84(){return this.state.mvt?super._isWGS84():!0}}ww.layerName="VectorTileLayer";ww.defaultProps=kue;var ii={schemeGroups:{sequential:["BuGn","BuPu","GnBu","OrRd","PuBu","PuBuGn","PuRd","RdPu","YlGn","YlGnBu","YlOrBr","YlOrRd"],singlehue:["Blues","Greens","Greys","Oranges","Purples","Reds"],diverging:["BrBG","PiYG","PRGn","PuOr","RdBu","RdGy","RdYlBu","RdYlGn","Spectral"],qualitative:["Accent","Dark2","Paired","Pastel1","Pastel2","Set1","Set2","Set3"]},YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},Nue={2:["#ffc6c4","#672044"],3:["#ffc6c4","#cc607d","#672044"],4:["#ffc6c4","#e38191","#ad466c","#672044"],5:["#ffc6c4","#ee919b","#cc607d","#9e3963","#672044"],6:["#ffc6c4","#f29ca3","#da7489","#b95073","#93345d","#672044"],7:["#ffc6c4","#f4a3a8","#e38191","#cc607d","#ad466c","#8b3058","#672044"],tags:["quantitative"]},Uue={2:["#fbe6c5","#70284a"],3:["#fbe6c5","#dc7176","#70284a"],4:["#fbe6c5","#ee8a82","#c8586c","#70284a"],5:["#fbe6c5","#f2a28a","#dc7176","#b24b65","#70284a"],6:["#fbe6c5","#f4b191","#e7807d","#d06270","#a44360","#70284a"],7:["#fbe6c5","#f5ba98","#ee8a82","#dc7176","#c8586c","#9c3f5d","#70284a"],tags:["quantitative"]},zue={2:["#f6d2a9","#b13f64"],3:["#f6d2a9","#ea8171","#b13f64"],4:["#f6d2a9","#f19c7c","#dd686c","#b13f64"],5:["#f6d2a9","#f3aa84","#ea8171","#d55d6a","#b13f64"],6:["#f6d2a9","#f4b28a","#ef9177","#e3726d","#cf5669","#b13f64"],7:["#f6d2a9","#f5b78e","#f19c7c","#ea8171","#dd686c","#ca5268","#b13f64"],tags:["quantitative"]},Vue={2:["#ecda9a","#ee4d5a"],3:["#ecda9a","#f7945d","#ee4d5a"],4:["#ecda9a","#f3ad6a","#f97b57","#ee4d5a"],5:["#ecda9a","#f1b973","#f7945d","#f86f56","#ee4d5a"],6:["#ecda9a","#f0c079","#f5a363","#f98558","#f76856","#ee4d5a"],7:["#ecda9a","#efc47e","#f3ad6a","#f7945d","#f97b57","#f66356","#ee4d5a"],tags:["quantitative"]},jue={2:["#fde0c5","#eb4a40"],3:["#fde0c5","#f59e72","#eb4a40"],4:["#fde0c5","#f8b58b","#f2855d","#eb4a40"],5:["#fde0c5","#f9c098","#f59e72","#f17854","#eb4a40"],6:["#fde0c5","#fac7a1","#f7ac80","#f38f65","#f0704f","#eb4a40"],7:["#fde0c5","#facba6","#f8b58b","#f59e72","#f2855d","#ef6a4c","#eb4a40"],tags:["quantitative"]},Hue={2:["#fef6b5","#e15383"],3:["#fef6b5","#ffa679","#e15383"],4:["#fef6b5","#ffc285","#fa8a76","#e15383"],5:["#fef6b5","#ffd08e","#ffa679","#f67b77","#e15383"],6:["#fef6b5","#ffd795","#ffb77f","#fd9576","#f37378","#e15383"],7:["#fef6b5","#ffdd9a","#ffc285","#ffa679","#fa8a76","#f16d7a","#e15383"],tags:["quantitative"]},Gue={2:["#e4f1e1","#0d585f"],3:["#e4f1e1","#63a6a0","#0d585f"],4:["#e4f1e1","#89c0b6","#448c8a","#0d585f"],5:["#E4F1E1","#9CCDC1","#63A6A0","#337F7F","#0D585F"],6:["#e4f1e1","#abd4c7","#7ab5ad","#509693","#2c7778","#0d585f"],7:["#e4f1e1","#b4d9cc","#89c0b6","#63a6a0","#448c8a","#287274","#0d585f"],tags:["quantitative"]},Wue={2:["#c4e6c3","#1d4f60"],3:["#c4e6c3","#4da284","#1d4f60"],4:["#c4e6c3","#6dbc90","#36877a","#1d4f60"],5:["#c4e6c3","#80c799","#4da284","#2d7974","#1d4f60"],6:["#c4e6c3","#8dce9f","#5fb28b","#3e927e","#297071","#1d4f60"],7:["#c4e6c3","#96d2a4","#6dbc90","#4da284","#36877a","#266b6e","#1d4f60"],tags:["quantitative"]},Xue={2:["#d2fbd4","#123f5a"],3:["#d2fbd4","#559c9e","#123f5a"],4:["#d2fbd4","#7bbcb0","#3a7c89","#123f5a"],5:["#d2fbd4","#8eccb9","#559c9e","#2b6c7f","#123f5a"],6:["#d2fbd4","#9cd5be","#6cafa9","#458892","#266377","#123f5a"],7:["#d2fbd4","#a5dbc2","#7bbcb0","#559c9e","#3a7c89","#235d72","#123f5a"],tags:["quantitative"]},que={2:["#d3f2a3","#074050"],3:["#d3f2a3","#4c9b82","#074050"],4:["#d3f2a3","#6cc08b","#217a79","#074050"],5:["#d3f2a3","#82d091","#4c9b82","#19696f","#074050"],6:["#d3f2a3","#8fda94","#60b187","#35877d","#145f69","#074050"],7:["#d3f2a3","#97e196","#6cc08b","#4c9b82","#217a79","#105965","#074050"],tags:["quantitative"]},$ue={2:["#245668","#EDEF5D"],3:["#245668","#39AB7E","#EDEF5D"],4:["#245668","#0D8F81","#6EC574","#EDEF5D"],5:["#245668","#04817E","#39AB7E","#8BD16D","#EDEF5D"],6:["#245668","#09787C","#1D9A81","#58BB79","#9DD869","#EDEF5D"],7:["#245668","#0F7279","#0D8F81","#39AB7E","#6EC574","#A9DC67","#EDEF5D"],tags:["aggregation"]},Zue={2:["#f7feae","#045275"],3:["#f7feae","#46aea0","#045275"],4:["#f7feae","#7ccba2","#089099","#045275"],5:["#f7feae","#9bd8a4","#46aea0","#058092","#045275"],6:["#f7feae","#ace1a4","#68bfa1","#2a9c9c","#02778e","#045275"],7:["#f7feae","#b7e6a5","#7ccba2","#46aea0","#089099","#00718b","#045275"],tags:["quantitative"]},Kue={2:["#d1eeea","#2a5674"],3:["#d1eeea","#68abb8","#2a5674"],4:["#d1eeea","#85c4c9","#4f90a6","#2a5674"],5:["#d1eeea","#96d0d1","#68abb8","#45829b","#2a5674"],6:["#d1eeea","#a1d7d6","#79bbc3","#599bae","#3f7994","#2a5674"],7:["#d1eeea","#a8dbd9","#85c4c9","#68abb8","#4f90a6","#3b738f","#2a5674"],tags:["quantitative"]},Yue={2:["#b0f2bc","#257d98"],3:["#b0f2bc","#4cc8a3","#257d98"],4:["#b0f2bc","#67dba5","#38b2a3","#257d98"],5:["#b0f2bc","#77e2a8","#4cc8a3","#31a6a2","#257d98"],6:["#b0f2bc","#82e6aa","#5bd4a4","#3fbba3","#2e9ea1","#257d98"],7:["#b0f2bc","#89e8ac","#67dba5","#4cc8a3","#38b2a3","#2c98a0","#257d98"],tags:["quantitative"]},Jue={2:["#f3e0f7","#63589f"],3:["#f3e0f7","#b998dd","#63589f"],4:["#f3e0f7","#d1afe8","#9f82ce","#63589f"],5:["#f3e0f7","#dbbaed","#b998dd","#9178c4","#63589f"],6:["#f3e0f7","#e0c2ef","#c8a5e4","#aa8bd4","#8871be","#63589f"],7:["#f3e0f7","#e4c7f1","#d1afe8","#b998dd","#9f82ce","#826dba","#63589f"],tags:["quantitative"]},Que={2:["#f9ddda","#573b88"],3:["#f9ddda","#ce78b3","#573b88"],4:["#f9ddda","#e597b9","#ad5fad","#573b88"],5:["#f9ddda","#eda8bd","#ce78b3","#9955a8","#573b88"],6:["#f9ddda","#f0b2c1","#dd8ab6","#bb69b0","#8c4fa4","#573b88"],7:["#f9ddda","#f2b9c4","#e597b9","#ce78b3","#ad5fad","#834ba0","#573b88"],tags:["quantitative"]},ehe={2:["#f3e79b","#5c53a5"],3:["#f3e79b","#eb7f86","#5c53a5"],4:["#f3e79b","#f8a07e","#ce6693","#5c53a5"],5:["#f3e79b","#fab27f","#eb7f86","#b95e9a","#5c53a5"],6:["#f3e79b","#fabc82","#f59280","#dc6f8e","#ab5b9e","#5c53a5"],7:["#f3e79b","#fac484","#f8a07e","#eb7f86","#ce6693","#a059a0","#5c53a5"],tags:["quantitative"]},the={2:["#f3cbd3","#6c2167"],3:["#f3cbd3","#ca699d","#6c2167"],4:["#f3cbd3","#dd88ac","#b14d8e","#6c2167"],5:["#f3cbd3","#e498b4","#ca699d","#a24186","#6c2167"],6:["#f3cbd3","#e7a2b9","#d67ba5","#bc5894","#983a81","#6c2167"],7:["#f3cbd3","#eaa9bd","#dd88ac","#ca699d","#b14d8e","#91357d","#6c2167"],tags:["quantitative"]},rhe={2:["#fcde9c","#7c1d6f"],3:["#fcde9c","#e34f6f","#7c1d6f"],4:["#fcde9c","#f0746e","#dc3977","#7c1d6f"],5:["#fcde9c","#f58670","#e34f6f","#d72d7c","#7c1d6f"],6:["#fcde9c","#f89872","#ec666d","#df4273","#c5287b","#7c1d6f"],7:["#fcde9c","#faa476","#f0746e","#e34f6f","#dc3977","#b9257a","#7c1d6f"],tags:["quantitative"]},ihe={2:["#4b2991","#edd9a3"],3:["#4b2991","#ea4f88","#edd9a3"],4:["#4b2991","#c0369d","#fa7876","#edd9a3"],5:["#4b2991","#a52fa2","#ea4f88","#fa9074","#edd9a3"],6:["#4b2991","#932da3","#d43f96","#f7667c","#f89f77","#edd9a3"],7:["#4b2991","#872ca2","#c0369d","#ea4f88","#fa7876","#f6a97a","#edd9a3"],tags:["aggregation"]},nhe={2:["#ede5cf","#541f3f"],3:["#ede5cf","#c1766f","#541f3f"],4:["#ede5cf","#d39c83","#a65461","#541f3f"],5:["#ede5cf","#daaf91","#c1766f","#95455a","#541f3f"],6:["#ede5cf","#ddba9b","#cd8c7a","#b26166","#8a3c56","#541f3f"],7:["#ede5cf","#e0c2a2","#d39c83","#c1766f","#a65461","#813753","#541f3f"],tags:["quantitative"]},she={2:["#929b4f","#db8195"],3:["#a3ad62","#fdfbe4","#df91a3"],4:["#929b4f","#d9dbaf","#f3d1ca","#db8195"],5:["#879043","#c1c68c","#fdfbe4","#ebb4b8","#d8758b"],6:["#7f883b","#b0b874","#e3e4be","#f6ddd1","#e4a0ac","#d66d85"],7:["#798234","#a3ad62","#d0d3a2","#fdfbe4","#f0c6c3","#df91a3","#d46780"],tags:["diverging"]},ohe={2:["#3d5941","#ca562c"],3:["#3d5941","#f6edbd","#ca562c"],4:["#3d5941","#b5b991","#edbb8a","#ca562c"],5:["#3d5941","#96a07c","#f6edbd","#e6a272","#ca562c"],6:["#3d5941","#839170","#cecea2","#f1cf9e","#e19464","#ca562c"],7:["#3d5941","#778868","#b5b991","#f6edbd","#edbb8a","#de8a5a","#ca562c"],tags:["diverging"]},ahe={2:["#008080","#ca562c"],3:["#008080","#f6edbd","#ca562c"],4:["#008080","#b4c8a8","#edbb8a","#ca562c"],5:["#008080","#92b69e","#f6edbd","#e6a272","#ca562c"],6:["#008080","#7eab98","#ced7b1","#f1cf9e","#e19464","#ca562c"],7:["#008080","#70a494","#b4c8a8","#f6edbd","#edbb8a","#de8a5a","#ca562c"],tags:["diverging"]},lhe={2:["#009392","#cf597e"],3:["#009392","#e9e29c","#cf597e"],4:["#009392","#9ccb86","#eeb479","#cf597e"],5:["#009392","#71be83","#e9e29c","#ed9c72","#cf597e"],6:["#009392","#52b684","#bcd48c","#edc783","#eb8d71","#cf597e"],7:["#009392","#39b185","#9ccb86","#e9e29c","#eeb479","#e88471","#cf597e"],tags:["diverging"]},che={2:["#009392","#d0587e"],3:["#009392","#f1eac8","#d0587e"],4:["#009392","#91b8aa","#f1eac8","#dfa0a0","#d0587e"],5:["#009392","#91b8aa","#f1eac8","#dfa0a0","#d0587e"],6:["#009392","#72aaa1","#b1c7b3","#e5b9ad","#d98994","#d0587e"],7:["#009392","#72aaa1","#b1c7b3","#f1eac8","#e5b9ad","#d98994","#d0587e"],tags:["diverging"]},uhe={2:["#009B9E","#C75DAB"],3:["#009B9E","#F1F1F1","#C75DAB"],4:["#009B9E","#A7D3D4","#E4C1D9","#C75DAB"],5:["#009B9E","#7CC5C6","#F1F1F1","#DDA9CD","#C75DAB"],6:["#009B9E","#5DBCBE","#C6DFDF","#E9D4E2","#D99BC6","#C75DAB"],7:["#009B9E","#42B7B9","#A7D3D4","#F1F1F1","#E4C1D9","#D691C1","#C75DAB"],tags:["diverging"]},hhe={2:["#A16928","#2887a1"],3:["#A16928","#edeac2","#2887a1"],4:["#A16928","#d6bd8d","#b5c8b8","#2887a1"],5:["#A16928","#caa873","#edeac2","#98b7b2","#2887a1"],6:["#A16928","#c29b64","#e0cfa2","#cbd5bc","#85adaf","#2887a1"],7:["#A16928","#bd925a","#d6bd8d","#edeac2","#b5c8b8","#79a7ac","#2887a1"],tags:["diverging"]},fhe={2:["#855C75","#D9AF6B","#7C7C7C"],3:["#855C75","#D9AF6B","#AF6458","#7C7C7C"],4:["#855C75","#D9AF6B","#AF6458","#736F4C","#7C7C7C"],5:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#7C7C7C"],6:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#7C7C7C"],7:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#7C7C7C"],8:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#9C9C5E","#7C7C7C"],9:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#9C9C5E","#A06177","#7C7C7C"],10:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#9C9C5E","#A06177","#8C785D","#7C7C7C"],11:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#9C9C5E","#A06177","#8C785D","#467378","#7C7C7C"],tags:["qualitative"]},dhe={2:["#7F3C8D","#11A579","#A5AA99"],3:["#7F3C8D","#11A579","#3969AC","#A5AA99"],4:["#7F3C8D","#11A579","#3969AC","#F2B701","#A5AA99"],5:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#A5AA99"],6:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#A5AA99"],7:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#A5AA99"],8:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#008695","#A5AA99"],9:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#008695","#CF1C90","#A5AA99"],10:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#008695","#CF1C90","#f97b72","#A5AA99"],11:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#008695","#CF1C90","#f97b72","#4b4b8f","#A5AA99"],tags:["qualitative"]},Ahe={2:["#66C5CC","#F6CF71","#B3B3B3"],3:["#66C5CC","#F6CF71","#F89C74","#B3B3B3"],4:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#B3B3B3"],5:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#B3B3B3"],6:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#B3B3B3"],7:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#B3B3B3"],8:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#C9DB74","#B3B3B3"],9:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#C9DB74","#8BE0A4","#B3B3B3"],10:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#C9DB74","#8BE0A4","#B497E7","#B3B3B3"],11:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#C9DB74","#8BE0A4","#B497E7","#D3B484","#B3B3B3"],tags:["qualitative"]},phe={2:["#5F4690","#1D6996","#666666"],3:["#5F4690","#1D6996","#38A6A5","#666666"],4:["#5F4690","#1D6996","#38A6A5","#0F8554","#666666"],5:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#666666"],6:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#666666"],7:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#666666"],8:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#CC503E","#666666"],9:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#CC503E","#94346E","#666666"],10:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#CC503E","#94346E","#6F4070","#666666"],11:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#CC503E","#94346E","#6F4070","#994E95","#666666"],tags:["qualitative"]},ghe={2:["#88CCEE","#CC6677","#888888"],3:["#88CCEE","#CC6677","#DDCC77","#888888"],4:["#88CCEE","#CC6677","#DDCC77","#117733","#888888"],5:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#888888"],6:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#888888"],7:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#888888"],8:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#999933","#888888"],9:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#999933","#882255","#888888"],10:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#999933","#882255","#661100","#888888"],11:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#999933","#882255","#661100","#6699CC","#888888"],tags:["qualitative","colorblind"]},mhe={2:["#E58606","#5D69B1","#A5AA99"],3:["#E58606","#5D69B1","#52BCA3","#A5AA99"],4:["#E58606","#5D69B1","#52BCA3","#99C945","#A5AA99"],5:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#A5AA99"],6:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#A5AA99"],7:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#A5AA99"],8:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#2F8AC4","#A5AA99"],9:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#2F8AC4","#764E9F","#A5AA99"],10:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#2F8AC4","#764E9F","#ED645A","#A5AA99"],11:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#2F8AC4","#764E9F","#ED645A","#CC3A8E","#A5AA99"],tags:["qualitative"]},_he={...ii.BuGn,tags:["quantitative"]},yhe={...ii.BuPu,tags:["quantitative"]},vhe={...ii.GnBu,tags:["quantitative"]},bhe={...ii.OrRd,tags:["quantitative"]},xhe={...ii.PuBu,tags:["quantitative"]},whe={...ii.PuBuGn,tags:["quantitative"]},The={...ii.PuRd,tags:["quantitative"]},Ehe={...ii.RdPu,tags:["quantitative"]},She={...ii.YlGn,tags:["quantitative"]},Che={...ii.YlGnBu,tags:["quantitative"]},Phe={...ii.YlOrBr,tags:["quantitative"]},Ihe={...ii.YlOrRd,tags:["quantitative"]},Mhe={...ii.Accent,tags:["qualitative"]},Rhe={...ii.Dark2,tags:["qualitative"]},Bhe={...ii.Paired,tags:["qualitative"]},Ohe={...ii.Pastel1,tags:["qualitative"]},Dhe={...ii.Pastel2,tags:["qualitative"]},Fhe={...ii.Set1,tags:["qualitative"]},Lhe={...ii.Set2,tags:["qualitative"]},khe={...ii.Set3,tags:["qualitative"]},Nhe={...ii.Blues,tags:["quantitative"]},Uhe={...ii.Greens,tags:["quantitative"]},zhe={...ii.Greys,tags:["quantitative"]},Vhe={...ii.Oranges,tags:["quantitative"]},jhe={...ii.Purples,tags:["quantitative"]},Hhe={...ii.Reds,tags:["quantitative"]},Ghe={...ii.BrBG,tags:["diverging"]},Whe={...ii.PiYG,tags:["diverging"]},Xhe={...ii.PRGn,tags:["diverging"]},qhe={...ii.PuOr,tags:["diverging"]},$he={...ii.RdBu,tags:["diverging"]},Zhe={...ii.RdGy,tags:["diverging"]},Khe={...ii.RdYlBu,tags:["diverging"]},Yhe={...ii.RdYlGn,tags:["diverging"]},Jhe={...ii.Spectral,tags:["diverging"]};const Qhe=Object.freeze(Object.defineProperty({__proto__:null,Antique:fhe,ArmyRose:she,BluGrn:Wue,BluYl:Zue,Bold:dhe,BrwnYl:nhe,Burg:Nue,BurgYl:Uue,DarkMint:Xue,Earth:hhe,Emrld:que,Fall:ohe,Geyser:ahe,Magenta:the,Mint:Gue,OrYel:Vue,Pastel:Ahe,Peach:jue,PinkYl:Hue,Prism:phe,Purp:Jue,PurpOr:Que,RedOr:zue,Safe:ghe,Sunset:ehe,SunsetDark:rhe,Teal:Kue,TealGrn:Yue,TealRose:che,Temps:lhe,Tropic:uhe,Vivid:mhe,ag_GrnYl:$ue,ag_Sunset:ihe,cb_Accent:Mhe,cb_Blues:Nhe,cb_BrBG:Ghe,cb_BuGn:_he,cb_BuPu:yhe,cb_Dark2:Rhe,cb_GnBu:vhe,cb_Greens:Uhe,cb_Greys:zhe,cb_OrRd:bhe,cb_Oranges:Vhe,cb_PRGn:Xhe,cb_Paired:Bhe,cb_Pastel1:Ohe,cb_Pastel2:Dhe,cb_PiYG:Whe,cb_PuBu:xhe,cb_PuBuGn:whe,cb_PuOr:qhe,cb_PuRd:The,cb_Purples:jhe,cb_RdBu:$he,cb_RdGy:Zhe,cb_RdPu:Ehe,cb_RdYlBu:Khe,cb_RdYlGn:Yhe,cb_Reds:Hhe,cb_Set1:Fhe,cb_Set2:Lhe,cb_Set3:khe,cb_Spectral:Jhe,cb_YlGn:She,cb_YlGnBu:Che,cb_YlOrBr:Phe,cb_YlOrRd:Ihe},Symbol.toStringTag,{value:"Module"})),Tw="PurpOr",Ew=[204,204,204],efe=[119,119,119];function Sw(t,e){const r=Qhe[t];let i=e;Vh(r,`Palette "${t}" not found. Expected a CARTOColors string`);const n=Object.keys(r).filter(A=>A!=="tags").map(Number),o=Math.max(...n),s=Math.min(...n);!Number.isInteger(e)||e>o?i=o:e<s&&(i=s);let f=r[i];return r.tags&&r.tags.includes("qualitative")&&(f=f.slice(0,-1)),f.map(A=>tfe(A))}function tfe(t){let e=/^#?([a-f\d]{1})([a-f\d]{1})([a-f\d]{1})$/i.exec(t);return e?[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),255]:(e=/^#?([a-f\d]{1})([a-f\d]{1})([a-f\d]{1})([a-f\d]{1})$/i.exec(t),e?[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),parseInt(e[4]+e[4],16)]:(e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t),e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),255]:(e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t),Vh(e,`Hexadecimal color "${t}" was not parsed correctly`),[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),parseInt(e[4],16)])))}const rfe=Object.freeze(["function","string"]);function Cw(t,e,r){var i;return Vh(typeof e=="object",'Expected "data" to be an object'),Vh(rfe.includes(typeof t),'Expected "attr" to be a function or string'),typeof t=="function"?t(e,r):(i=e==null?void 0:e.properties)==null?void 0:i[t]}function ife({attr:t,domain:e,colors:r=Tw,nullColor:i=Ew}){Vh(Array.isArray(e),'Expected "domain" to be an array of numbers');const n=typeof r=="string"?Sw(r,e.length+1):r,o=NL().domain(e).range(n);return(s,f)=>{const A=Cw(t,s,f);return typeof A=="number"&&Number.isFinite(A)?o(A):i}}function nfe({attr:t,domain:e,colors:r=Tw,nullColor:i=Ew,othersColor:n=efe}){Vh(Array.isArray(e),'Expected "domain" to be an array of numbers or strings');const o={},s=typeof r=="string"?Sw(r,e.length):r;for(const[f,A]of e.entries())o[A]=s[f];return(f,A)=>{const v=Cw(t,f,A);return typeof v=="number"&&Number.isFinite(v)||typeof v=="string"?o[v]||n:i}}function sfe({attr:t,domain:e,colors:r=Tw,nullColor:i=Ew}){Vh(Array.isArray(e),'Expected "domain" to be an array of numbers');const n=typeof r=="string"?Sw(r,e.length):r,o=UL().domain(e).range(n);return(s,f)=>{const A=Cw(t,s,f);return typeof A=="number"&&Number.isFinite(A)?o(A):i}}const Pn={SUM:1,MEAN:2,MIN:3,MAX:4};function SF(t,e){return t+e}function ofe(t,e){return e>t?e:t}function afe(t,e){return e<t?e:t}function lfe(t,e){if(Number.isFinite(e))return t.length?e:null;const r=t.map(e).filter(Number.isFinite);return r.length?r.reduce(SF,0)/r.length:null}function cfe(t,e){if(Number.isFinite(e))return t.length?t.length*e:null;const r=t.map(e).filter(Number.isFinite);return r.length?r.reduce(SF,0):null}function ufe(t,e){if(Number.isFinite(e))return t.length?e:null;const r=t.map(e).filter(Number.isFinite);return r.length?r.reduce(ofe,-1/0):null}function hfe(t,e){if(Number.isFinite(e))return t.length?e:null;const r=t.map(e).filter(Number.isFinite);return r.length?r.reduce(afe,1/0):null}function Pw(t,e,r){const i=Pn[t]||Pn.SUM;switch(e=ffe(e,r),i){case Pn.MIN:return n=>hfe(n,e);case Pn.SUM:return n=>cfe(n,e);case Pn.MEAN:return n=>lfe(n,e);case Pn.MAX:return n=>ufe(n,e);default:return null}}function ffe(t,e={}){return Number.isFinite(t)?t:r=>(e.index=r.index,t(r.source,e))}function dfe(t,e={}){return r=>(e.indices=r.map(i=>i.index),t(r.map(i=>i.source),e))}const Afe={projectPoints:!1,viewport:null,createBufferObjects:!0,moduleSettings:{}},bh=3402823466e29,CF=[32775,32774],PF=[32776,32774],pfe=[32776,32775],HI={[Pn.SUM]:32774,[Pn.MEAN]:32774,[Pn.MIN]:CF,[Pn.MAX]:PF},gfe={size:1,operation:Pn.SUM,needMin:!1,needMax:!1,combineMaxMin:!1},mfe=4,_fe=`#version 300 es
|
3473
|
+
`,Pue={...Lc.defaultProps,extruded:!1,diskResolution:4,vertices:[[-.5,-.5],[.5,-.5],[.5,.5],[-.5,.5]]};class wF extends Lc{getShaders(){const e=super.getShaders(),r=this.props.data,i=r.data.blockSize??Math.sqrt(r.length);return{...e,defines:{...e.defines,BLOCK_WIDTH:i},vs:Cue}}initializeState(){this.getAttributeManager().addInstanced({instanceElevations:{size:1,transition:!0,accessor:"getElevation"},instanceFillColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getFillColor",defaultValue:[0,0,0,255]},instanceLineColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getLineColor",defaultValue:[255,255,255,255]}})}}wF.layerName="RasterColumnLayer";function Iue(t,e){return t.data===e.data&&t.length===e.length}class vw extends rs{renderLayers(){const{data:e,getElevation:r,getFillColor:i,getLineColor:n,getLineWidth:o,tileIndex:s,updateTriggers:f}=this.props;if(!e||!s)return null;const A=e.blockSize??0,[v,w,C]=oF(s),I=[v,w,C/A],B=this.getSubLayerClass("column",wF),{highlightedObjectIndex:F,highlightColor:k}=this.state;return new B(this.props,this.getSubLayerProps({id:"cell",updateTriggers:f,getElevation:this.getSubLayerAccessor(r),getFillColor:this.getSubLayerAccessor(i),getLineColor:this.getSubLayerAccessor(n),getLineWidth:this.getSubLayerAccessor(o)}),{data:{data:e,length:A*A},dataComparator:Iue,offset:I,highlightedObjectIndex:F,highlightColor:k})}getSubLayerAccessor(e){return typeof e!="function"?super.getSubLayerAccessor(e):(r,i)=>{const{data:n,index:o}=i,s=n.data,f=Yce(s.cells,o);return e({properties:f},i)}}getPickingInfo(e){const r=super.getPickingInfo(e);return r.index!==-1&&(r.object=this.getSubLayerAccessor(i=>i)(void 0,{data:this.props,index:r.index})),r}_updateAutoHighlight(e){const{highlightedObjectIndex:r}=this.state;let i=-1;if(e.index!==-1&&(i=e.index),r!==i){let{highlightColor:n}=this.props;typeof n=="function"&&(n=n(e)),this.setState({highlightColor:n,highlightedObjectIndex:i})}}}vw.layerName="RasterLayer";vw.defaultProps=Pue;const Mue=t=>{var r,i;const e=(i=(r=t.tile)==null?void 0:r.index)==null?void 0:i.q;return e?new vw(t,{tileIndex:e}):null},Rue={data:jh,tileSize:pA};class bw extends rs{getLoadOptions(){const e=super.getLoadOptions()||{},r=this.props.data;return y0(e,r.accessToken),e}renderLayers(){const e=this.props.data;if(!e)return null;const{tiles:r,minzoom:i,maxzoom:n}=e,o=this.getSubLayerClass("tile",Nc);return new o(this.props,{id:`raster-tile-layer-${this.props.id}`,data:r,TilesetClass:nw,renderSubLayers:Mue,minZoom:i,maxZoom:n,loadOptions:this.getLoadOptions()})}}bw.layerName="RasterTileLayer";bw.defaultProps=Rue;class xw{static read(e,r){return e.readFields(xw._readField,{properties:[],numericProps:{}},r)}static _readField(e,r,i){if(e===1)r.properties.push(Yh.read(i,i.readVarint()+i.pos));else if(e===2){const n=Jh.read(i,i.readVarint()+i.pos);r.numericProps[n.key]=n.value}}}const Bue={name:"CARTO Properties Tile",version:"1",id:"cartoPropertiesTile",module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-properties-tile"],category:"geometry",worker:!1,parse:async(t,e)=>VI(t),parseSync:VI,options:{}};function VI(t,e){return t?sy(t,xw):null}const TF="9.0.37",EF="cartoVectorTile",Oue={cartoVectorTile:{workerUrl:fw(EF,TF)}},Due={name:"CARTO Vector Tile",version:TF,id:EF,module:"carto",extensions:["pbf"],mimeTypes:["application/vnd.carto-vector-tile"],category:"geometry",parse:async(t,e)=>jI(t),parseSync:jI,worker:!0,options:Oue};function Fue(t,e,{startPosition:r,endPosition:i,indices:n}){const o=t.positions.size,s=r*o,f=i*o,A=t.positions.value.subarray(s,f),v=n.slice(1).map(C=>C-r),w=IO(A,v,o);for(let C=0,I=w.length;C<I;++C)e.push(r+w[C])}function Lue(t){const{polygonIndices:e,primitivePolygonIndices:r}=t,i=[];let n=0;for(let o=0;o<e.value.length-1;o++){const s=e.value[o],f=e.value[o+1],A=r.value.indexOf(f),v=r.value.subarray(n,A);n=A,Fue(t,i,{startPosition:s,endPosition:f,indices:v})}t.triangles={value:new Uint32Array(i),size:1}}function jI(t,e){if(!t)return null;const r=sy(t,Zce);return r.polygons&&!r.polygons.triangles&&Lue(r.polygons),r}s0([Bue,Due]);const kue={...AA.defaultProps,data:jh,dataComparator:jh.equal,tileSize:pA};class ww extends AA{constructor(...e){super(...e)}initializeState(){super.initializeState(),this.setState({binary:!0})}updateState(e){const{props:r}=e;if(r.data){super.updateState(e);const n=new URL(r.data.tiles[0]).searchParams.get("formatTiles")==="mvt";this.setState({mvt:n})}}getLoadOptions(){const e=super.getLoadOptions()||{},r=this.props.data;return y0(e,r.accessToken),e.gis={format:"binary"},e}async getTileData(e){const r=this.props.data,{tiles:i,properties_tiles:n}=r,o=Uh(i,e);if(!o)return Promise.reject("Invalid URL");const s=this.getLoadOptions(),{fetch:f}=this.props,{signal:A}=e,v=f(o,{propName:"data",layer:this,loadOptions:s,signal:A});if(!n)return await v;const w=Uh(n,e);if(!w)return Promise.reject("Invalid properties URL");const C=f(w,{propName:"data",layer:this,loadOptions:s,signal:A}),[I,B]=await Promise.all([v,C]);return I?B?eue(I,B):I:null}renderSubLayers(e){if(e.data===null)return null;if(this.state.mvt)return super.renderSubLayers(e);const r=e.tile.bbox,{west:i,south:n,east:o,north:s}=r,f=[new ry,...e.extensions||[]],A={clipBounds:[i,n,o,s]},v=I=>{var B,F,k;return{[I]:{...A,...(B=e==null?void 0:e._subLayerProps)==null?void 0:B[I],extensions:[...f,...((k=(F=e==null?void 0:e._subLayerProps)==null?void 0:F[I])==null?void 0:k.extensions)||[]]}}},w={...e,autoHighlight:!1,_subLayerProps:{...e._subLayerProps,...v("polygons-fill"),...v("polygons-stroke"),...v("linestrings")}};return new kc(w)}_isWGS84(){return this.state.mvt?super._isWGS84():!0}}ww.layerName="VectorTileLayer";ww.defaultProps=kue;var ii={schemeGroups:{sequential:["BuGn","BuPu","GnBu","OrRd","PuBu","PuBuGn","PuRd","RdPu","YlGn","YlGnBu","YlOrBr","YlOrRd"],singlehue:["Blues","Greens","Greys","Oranges","Purples","Reds"],diverging:["BrBG","PiYG","PRGn","PuOr","RdBu","RdGy","RdYlBu","RdYlGn","Spectral"],qualitative:["Accent","Dark2","Paired","Pastel1","Pastel2","Set1","Set2","Set3"]},YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},Nue={2:["#ffc6c4","#672044"],3:["#ffc6c4","#cc607d","#672044"],4:["#ffc6c4","#e38191","#ad466c","#672044"],5:["#ffc6c4","#ee919b","#cc607d","#9e3963","#672044"],6:["#ffc6c4","#f29ca3","#da7489","#b95073","#93345d","#672044"],7:["#ffc6c4","#f4a3a8","#e38191","#cc607d","#ad466c","#8b3058","#672044"],tags:["quantitative"]},Uue={2:["#fbe6c5","#70284a"],3:["#fbe6c5","#dc7176","#70284a"],4:["#fbe6c5","#ee8a82","#c8586c","#70284a"],5:["#fbe6c5","#f2a28a","#dc7176","#b24b65","#70284a"],6:["#fbe6c5","#f4b191","#e7807d","#d06270","#a44360","#70284a"],7:["#fbe6c5","#f5ba98","#ee8a82","#dc7176","#c8586c","#9c3f5d","#70284a"],tags:["quantitative"]},zue={2:["#f6d2a9","#b13f64"],3:["#f6d2a9","#ea8171","#b13f64"],4:["#f6d2a9","#f19c7c","#dd686c","#b13f64"],5:["#f6d2a9","#f3aa84","#ea8171","#d55d6a","#b13f64"],6:["#f6d2a9","#f4b28a","#ef9177","#e3726d","#cf5669","#b13f64"],7:["#f6d2a9","#f5b78e","#f19c7c","#ea8171","#dd686c","#ca5268","#b13f64"],tags:["quantitative"]},Vue={2:["#ecda9a","#ee4d5a"],3:["#ecda9a","#f7945d","#ee4d5a"],4:["#ecda9a","#f3ad6a","#f97b57","#ee4d5a"],5:["#ecda9a","#f1b973","#f7945d","#f86f56","#ee4d5a"],6:["#ecda9a","#f0c079","#f5a363","#f98558","#f76856","#ee4d5a"],7:["#ecda9a","#efc47e","#f3ad6a","#f7945d","#f97b57","#f66356","#ee4d5a"],tags:["quantitative"]},jue={2:["#fde0c5","#eb4a40"],3:["#fde0c5","#f59e72","#eb4a40"],4:["#fde0c5","#f8b58b","#f2855d","#eb4a40"],5:["#fde0c5","#f9c098","#f59e72","#f17854","#eb4a40"],6:["#fde0c5","#fac7a1","#f7ac80","#f38f65","#f0704f","#eb4a40"],7:["#fde0c5","#facba6","#f8b58b","#f59e72","#f2855d","#ef6a4c","#eb4a40"],tags:["quantitative"]},Hue={2:["#fef6b5","#e15383"],3:["#fef6b5","#ffa679","#e15383"],4:["#fef6b5","#ffc285","#fa8a76","#e15383"],5:["#fef6b5","#ffd08e","#ffa679","#f67b77","#e15383"],6:["#fef6b5","#ffd795","#ffb77f","#fd9576","#f37378","#e15383"],7:["#fef6b5","#ffdd9a","#ffc285","#ffa679","#fa8a76","#f16d7a","#e15383"],tags:["quantitative"]},Gue={2:["#e4f1e1","#0d585f"],3:["#e4f1e1","#63a6a0","#0d585f"],4:["#e4f1e1","#89c0b6","#448c8a","#0d585f"],5:["#E4F1E1","#9CCDC1","#63A6A0","#337F7F","#0D585F"],6:["#e4f1e1","#abd4c7","#7ab5ad","#509693","#2c7778","#0d585f"],7:["#e4f1e1","#b4d9cc","#89c0b6","#63a6a0","#448c8a","#287274","#0d585f"],tags:["quantitative"]},Wue={2:["#c4e6c3","#1d4f60"],3:["#c4e6c3","#4da284","#1d4f60"],4:["#c4e6c3","#6dbc90","#36877a","#1d4f60"],5:["#c4e6c3","#80c799","#4da284","#2d7974","#1d4f60"],6:["#c4e6c3","#8dce9f","#5fb28b","#3e927e","#297071","#1d4f60"],7:["#c4e6c3","#96d2a4","#6dbc90","#4da284","#36877a","#266b6e","#1d4f60"],tags:["quantitative"]},Xue={2:["#d2fbd4","#123f5a"],3:["#d2fbd4","#559c9e","#123f5a"],4:["#d2fbd4","#7bbcb0","#3a7c89","#123f5a"],5:["#d2fbd4","#8eccb9","#559c9e","#2b6c7f","#123f5a"],6:["#d2fbd4","#9cd5be","#6cafa9","#458892","#266377","#123f5a"],7:["#d2fbd4","#a5dbc2","#7bbcb0","#559c9e","#3a7c89","#235d72","#123f5a"],tags:["quantitative"]},que={2:["#d3f2a3","#074050"],3:["#d3f2a3","#4c9b82","#074050"],4:["#d3f2a3","#6cc08b","#217a79","#074050"],5:["#d3f2a3","#82d091","#4c9b82","#19696f","#074050"],6:["#d3f2a3","#8fda94","#60b187","#35877d","#145f69","#074050"],7:["#d3f2a3","#97e196","#6cc08b","#4c9b82","#217a79","#105965","#074050"],tags:["quantitative"]},$ue={2:["#245668","#EDEF5D"],3:["#245668","#39AB7E","#EDEF5D"],4:["#245668","#0D8F81","#6EC574","#EDEF5D"],5:["#245668","#04817E","#39AB7E","#8BD16D","#EDEF5D"],6:["#245668","#09787C","#1D9A81","#58BB79","#9DD869","#EDEF5D"],7:["#245668","#0F7279","#0D8F81","#39AB7E","#6EC574","#A9DC67","#EDEF5D"],tags:["aggregation"]},Zue={2:["#f7feae","#045275"],3:["#f7feae","#46aea0","#045275"],4:["#f7feae","#7ccba2","#089099","#045275"],5:["#f7feae","#9bd8a4","#46aea0","#058092","#045275"],6:["#f7feae","#ace1a4","#68bfa1","#2a9c9c","#02778e","#045275"],7:["#f7feae","#b7e6a5","#7ccba2","#46aea0","#089099","#00718b","#045275"],tags:["quantitative"]},Kue={2:["#d1eeea","#2a5674"],3:["#d1eeea","#68abb8","#2a5674"],4:["#d1eeea","#85c4c9","#4f90a6","#2a5674"],5:["#d1eeea","#96d0d1","#68abb8","#45829b","#2a5674"],6:["#d1eeea","#a1d7d6","#79bbc3","#599bae","#3f7994","#2a5674"],7:["#d1eeea","#a8dbd9","#85c4c9","#68abb8","#4f90a6","#3b738f","#2a5674"],tags:["quantitative"]},Yue={2:["#b0f2bc","#257d98"],3:["#b0f2bc","#4cc8a3","#257d98"],4:["#b0f2bc","#67dba5","#38b2a3","#257d98"],5:["#b0f2bc","#77e2a8","#4cc8a3","#31a6a2","#257d98"],6:["#b0f2bc","#82e6aa","#5bd4a4","#3fbba3","#2e9ea1","#257d98"],7:["#b0f2bc","#89e8ac","#67dba5","#4cc8a3","#38b2a3","#2c98a0","#257d98"],tags:["quantitative"]},Jue={2:["#f3e0f7","#63589f"],3:["#f3e0f7","#b998dd","#63589f"],4:["#f3e0f7","#d1afe8","#9f82ce","#63589f"],5:["#f3e0f7","#dbbaed","#b998dd","#9178c4","#63589f"],6:["#f3e0f7","#e0c2ef","#c8a5e4","#aa8bd4","#8871be","#63589f"],7:["#f3e0f7","#e4c7f1","#d1afe8","#b998dd","#9f82ce","#826dba","#63589f"],tags:["quantitative"]},Que={2:["#f9ddda","#573b88"],3:["#f9ddda","#ce78b3","#573b88"],4:["#f9ddda","#e597b9","#ad5fad","#573b88"],5:["#f9ddda","#eda8bd","#ce78b3","#9955a8","#573b88"],6:["#f9ddda","#f0b2c1","#dd8ab6","#bb69b0","#8c4fa4","#573b88"],7:["#f9ddda","#f2b9c4","#e597b9","#ce78b3","#ad5fad","#834ba0","#573b88"],tags:["quantitative"]},ehe={2:["#f3e79b","#5c53a5"],3:["#f3e79b","#eb7f86","#5c53a5"],4:["#f3e79b","#f8a07e","#ce6693","#5c53a5"],5:["#f3e79b","#fab27f","#eb7f86","#b95e9a","#5c53a5"],6:["#f3e79b","#fabc82","#f59280","#dc6f8e","#ab5b9e","#5c53a5"],7:["#f3e79b","#fac484","#f8a07e","#eb7f86","#ce6693","#a059a0","#5c53a5"],tags:["quantitative"]},the={2:["#f3cbd3","#6c2167"],3:["#f3cbd3","#ca699d","#6c2167"],4:["#f3cbd3","#dd88ac","#b14d8e","#6c2167"],5:["#f3cbd3","#e498b4","#ca699d","#a24186","#6c2167"],6:["#f3cbd3","#e7a2b9","#d67ba5","#bc5894","#983a81","#6c2167"],7:["#f3cbd3","#eaa9bd","#dd88ac","#ca699d","#b14d8e","#91357d","#6c2167"],tags:["quantitative"]},rhe={2:["#fcde9c","#7c1d6f"],3:["#fcde9c","#e34f6f","#7c1d6f"],4:["#fcde9c","#f0746e","#dc3977","#7c1d6f"],5:["#fcde9c","#f58670","#e34f6f","#d72d7c","#7c1d6f"],6:["#fcde9c","#f89872","#ec666d","#df4273","#c5287b","#7c1d6f"],7:["#fcde9c","#faa476","#f0746e","#e34f6f","#dc3977","#b9257a","#7c1d6f"],tags:["quantitative"]},ihe={2:["#4b2991","#edd9a3"],3:["#4b2991","#ea4f88","#edd9a3"],4:["#4b2991","#c0369d","#fa7876","#edd9a3"],5:["#4b2991","#a52fa2","#ea4f88","#fa9074","#edd9a3"],6:["#4b2991","#932da3","#d43f96","#f7667c","#f89f77","#edd9a3"],7:["#4b2991","#872ca2","#c0369d","#ea4f88","#fa7876","#f6a97a","#edd9a3"],tags:["aggregation"]},nhe={2:["#ede5cf","#541f3f"],3:["#ede5cf","#c1766f","#541f3f"],4:["#ede5cf","#d39c83","#a65461","#541f3f"],5:["#ede5cf","#daaf91","#c1766f","#95455a","#541f3f"],6:["#ede5cf","#ddba9b","#cd8c7a","#b26166","#8a3c56","#541f3f"],7:["#ede5cf","#e0c2a2","#d39c83","#c1766f","#a65461","#813753","#541f3f"],tags:["quantitative"]},she={2:["#929b4f","#db8195"],3:["#a3ad62","#fdfbe4","#df91a3"],4:["#929b4f","#d9dbaf","#f3d1ca","#db8195"],5:["#879043","#c1c68c","#fdfbe4","#ebb4b8","#d8758b"],6:["#7f883b","#b0b874","#e3e4be","#f6ddd1","#e4a0ac","#d66d85"],7:["#798234","#a3ad62","#d0d3a2","#fdfbe4","#f0c6c3","#df91a3","#d46780"],tags:["diverging"]},ohe={2:["#3d5941","#ca562c"],3:["#3d5941","#f6edbd","#ca562c"],4:["#3d5941","#b5b991","#edbb8a","#ca562c"],5:["#3d5941","#96a07c","#f6edbd","#e6a272","#ca562c"],6:["#3d5941","#839170","#cecea2","#f1cf9e","#e19464","#ca562c"],7:["#3d5941","#778868","#b5b991","#f6edbd","#edbb8a","#de8a5a","#ca562c"],tags:["diverging"]},ahe={2:["#008080","#ca562c"],3:["#008080","#f6edbd","#ca562c"],4:["#008080","#b4c8a8","#edbb8a","#ca562c"],5:["#008080","#92b69e","#f6edbd","#e6a272","#ca562c"],6:["#008080","#7eab98","#ced7b1","#f1cf9e","#e19464","#ca562c"],7:["#008080","#70a494","#b4c8a8","#f6edbd","#edbb8a","#de8a5a","#ca562c"],tags:["diverging"]},lhe={2:["#009392","#cf597e"],3:["#009392","#e9e29c","#cf597e"],4:["#009392","#9ccb86","#eeb479","#cf597e"],5:["#009392","#71be83","#e9e29c","#ed9c72","#cf597e"],6:["#009392","#52b684","#bcd48c","#edc783","#eb8d71","#cf597e"],7:["#009392","#39b185","#9ccb86","#e9e29c","#eeb479","#e88471","#cf597e"],tags:["diverging"]},che={2:["#009392","#d0587e"],3:["#009392","#f1eac8","#d0587e"],4:["#009392","#91b8aa","#f1eac8","#dfa0a0","#d0587e"],5:["#009392","#91b8aa","#f1eac8","#dfa0a0","#d0587e"],6:["#009392","#72aaa1","#b1c7b3","#e5b9ad","#d98994","#d0587e"],7:["#009392","#72aaa1","#b1c7b3","#f1eac8","#e5b9ad","#d98994","#d0587e"],tags:["diverging"]},uhe={2:["#009B9E","#C75DAB"],3:["#009B9E","#F1F1F1","#C75DAB"],4:["#009B9E","#A7D3D4","#E4C1D9","#C75DAB"],5:["#009B9E","#7CC5C6","#F1F1F1","#DDA9CD","#C75DAB"],6:["#009B9E","#5DBCBE","#C6DFDF","#E9D4E2","#D99BC6","#C75DAB"],7:["#009B9E","#42B7B9","#A7D3D4","#F1F1F1","#E4C1D9","#D691C1","#C75DAB"],tags:["diverging"]},hhe={2:["#A16928","#2887a1"],3:["#A16928","#edeac2","#2887a1"],4:["#A16928","#d6bd8d","#b5c8b8","#2887a1"],5:["#A16928","#caa873","#edeac2","#98b7b2","#2887a1"],6:["#A16928","#c29b64","#e0cfa2","#cbd5bc","#85adaf","#2887a1"],7:["#A16928","#bd925a","#d6bd8d","#edeac2","#b5c8b8","#79a7ac","#2887a1"],tags:["diverging"]},fhe={2:["#855C75","#D9AF6B","#7C7C7C"],3:["#855C75","#D9AF6B","#AF6458","#7C7C7C"],4:["#855C75","#D9AF6B","#AF6458","#736F4C","#7C7C7C"],5:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#7C7C7C"],6:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#7C7C7C"],7:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#7C7C7C"],8:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#9C9C5E","#7C7C7C"],9:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#9C9C5E","#A06177","#7C7C7C"],10:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#9C9C5E","#A06177","#8C785D","#7C7C7C"],11:["#855C75","#D9AF6B","#AF6458","#736F4C","#526A83","#625377","#68855C","#9C9C5E","#A06177","#8C785D","#467378","#7C7C7C"],tags:["qualitative"]},dhe={2:["#7F3C8D","#11A579","#A5AA99"],3:["#7F3C8D","#11A579","#3969AC","#A5AA99"],4:["#7F3C8D","#11A579","#3969AC","#F2B701","#A5AA99"],5:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#A5AA99"],6:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#A5AA99"],7:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#A5AA99"],8:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#008695","#A5AA99"],9:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#008695","#CF1C90","#A5AA99"],10:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#008695","#CF1C90","#f97b72","#A5AA99"],11:["#7F3C8D","#11A579","#3969AC","#F2B701","#E73F74","#80BA5A","#E68310","#008695","#CF1C90","#f97b72","#4b4b8f","#A5AA99"],tags:["qualitative"]},Ahe={2:["#66C5CC","#F6CF71","#B3B3B3"],3:["#66C5CC","#F6CF71","#F89C74","#B3B3B3"],4:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#B3B3B3"],5:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#B3B3B3"],6:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#B3B3B3"],7:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#B3B3B3"],8:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#C9DB74","#B3B3B3"],9:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#C9DB74","#8BE0A4","#B3B3B3"],10:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#C9DB74","#8BE0A4","#B497E7","#B3B3B3"],11:["#66C5CC","#F6CF71","#F89C74","#DCB0F2","#87C55F","#9EB9F3","#FE88B1","#C9DB74","#8BE0A4","#B497E7","#D3B484","#B3B3B3"],tags:["qualitative"]},phe={2:["#5F4690","#1D6996","#666666"],3:["#5F4690","#1D6996","#38A6A5","#666666"],4:["#5F4690","#1D6996","#38A6A5","#0F8554","#666666"],5:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#666666"],6:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#666666"],7:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#666666"],8:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#CC503E","#666666"],9:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#CC503E","#94346E","#666666"],10:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#CC503E","#94346E","#6F4070","#666666"],11:["#5F4690","#1D6996","#38A6A5","#0F8554","#73AF48","#EDAD08","#E17C05","#CC503E","#94346E","#6F4070","#994E95","#666666"],tags:["qualitative"]},ghe={2:["#88CCEE","#CC6677","#888888"],3:["#88CCEE","#CC6677","#DDCC77","#888888"],4:["#88CCEE","#CC6677","#DDCC77","#117733","#888888"],5:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#888888"],6:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#888888"],7:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#888888"],8:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#999933","#888888"],9:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#999933","#882255","#888888"],10:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#999933","#882255","#661100","#888888"],11:["#88CCEE","#CC6677","#DDCC77","#117733","#332288","#AA4499","#44AA99","#999933","#882255","#661100","#6699CC","#888888"],tags:["qualitative","colorblind"]},mhe={2:["#E58606","#5D69B1","#A5AA99"],3:["#E58606","#5D69B1","#52BCA3","#A5AA99"],4:["#E58606","#5D69B1","#52BCA3","#99C945","#A5AA99"],5:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#A5AA99"],6:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#A5AA99"],7:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#A5AA99"],8:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#2F8AC4","#A5AA99"],9:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#2F8AC4","#764E9F","#A5AA99"],10:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#2F8AC4","#764E9F","#ED645A","#A5AA99"],11:["#E58606","#5D69B1","#52BCA3","#99C945","#CC61B0","#24796C","#DAA51B","#2F8AC4","#764E9F","#ED645A","#CC3A8E","#A5AA99"],tags:["qualitative"]},_he={...ii.BuGn,tags:["quantitative"]},yhe={...ii.BuPu,tags:["quantitative"]},vhe={...ii.GnBu,tags:["quantitative"]},bhe={...ii.OrRd,tags:["quantitative"]},xhe={...ii.PuBu,tags:["quantitative"]},whe={...ii.PuBuGn,tags:["quantitative"]},The={...ii.PuRd,tags:["quantitative"]},Ehe={...ii.RdPu,tags:["quantitative"]},She={...ii.YlGn,tags:["quantitative"]},Che={...ii.YlGnBu,tags:["quantitative"]},Phe={...ii.YlOrBr,tags:["quantitative"]},Ihe={...ii.YlOrRd,tags:["quantitative"]},Mhe={...ii.Accent,tags:["qualitative"]},Rhe={...ii.Dark2,tags:["qualitative"]},Bhe={...ii.Paired,tags:["qualitative"]},Ohe={...ii.Pastel1,tags:["qualitative"]},Dhe={...ii.Pastel2,tags:["qualitative"]},Fhe={...ii.Set1,tags:["qualitative"]},Lhe={...ii.Set2,tags:["qualitative"]},khe={...ii.Set3,tags:["qualitative"]},Nhe={...ii.Blues,tags:["quantitative"]},Uhe={...ii.Greens,tags:["quantitative"]},zhe={...ii.Greys,tags:["quantitative"]},Vhe={...ii.Oranges,tags:["quantitative"]},jhe={...ii.Purples,tags:["quantitative"]},Hhe={...ii.Reds,tags:["quantitative"]},Ghe={...ii.BrBG,tags:["diverging"]},Whe={...ii.PiYG,tags:["diverging"]},Xhe={...ii.PRGn,tags:["diverging"]},qhe={...ii.PuOr,tags:["diverging"]},$he={...ii.RdBu,tags:["diverging"]},Zhe={...ii.RdGy,tags:["diverging"]},Khe={...ii.RdYlBu,tags:["diverging"]},Yhe={...ii.RdYlGn,tags:["diverging"]},Jhe={...ii.Spectral,tags:["diverging"]};const Qhe=Object.freeze(Object.defineProperty({__proto__:null,Antique:fhe,ArmyRose:she,BluGrn:Wue,BluYl:Zue,Bold:dhe,BrwnYl:nhe,Burg:Nue,BurgYl:Uue,DarkMint:Xue,Earth:hhe,Emrld:que,Fall:ohe,Geyser:ahe,Magenta:the,Mint:Gue,OrYel:Vue,Pastel:Ahe,Peach:jue,PinkYl:Hue,Prism:phe,Purp:Jue,PurpOr:Que,RedOr:zue,Safe:ghe,Sunset:ehe,SunsetDark:rhe,Teal:Kue,TealGrn:Yue,TealRose:che,Temps:lhe,Tropic:uhe,Vivid:mhe,ag_GrnYl:$ue,ag_Sunset:ihe,cb_Accent:Mhe,cb_Blues:Nhe,cb_BrBG:Ghe,cb_BuGn:_he,cb_BuPu:yhe,cb_Dark2:Rhe,cb_GnBu:vhe,cb_Greens:Uhe,cb_Greys:zhe,cb_OrRd:bhe,cb_Oranges:Vhe,cb_PRGn:Xhe,cb_Paired:Bhe,cb_Pastel1:Ohe,cb_Pastel2:Dhe,cb_PiYG:Whe,cb_PuBu:xhe,cb_PuBuGn:whe,cb_PuOr:qhe,cb_PuRd:The,cb_Purples:jhe,cb_RdBu:$he,cb_RdGy:Zhe,cb_RdPu:Ehe,cb_RdYlBu:Khe,cb_RdYlGn:Yhe,cb_Reds:Hhe,cb_Set1:Fhe,cb_Set2:Lhe,cb_Set3:khe,cb_Spectral:Jhe,cb_YlGn:She,cb_YlGnBu:Che,cb_YlOrBr:Phe,cb_YlOrRd:Ihe},Symbol.toStringTag,{value:"Module"})),Tw="PurpOr",Ew=[204,204,204],efe=[119,119,119];function Sw(t,e){const r=Qhe[t];let i=e;Vh(r,`Palette "${t}" not found. Expected a CARTOColors string`);const n=Object.keys(r).filter(A=>A!=="tags").map(Number),o=Math.max(...n),s=Math.min(...n);!Number.isInteger(e)||e>o?i=o:e<s&&(i=s);let f=r[i];return r.tags&&r.tags.includes("qualitative")&&(f=f.slice(0,-1)),f.map(A=>tfe(A))}function tfe(t){let e=/^#?([a-f\d]{1})([a-f\d]{1})([a-f\d]{1})$/i.exec(t);return e?[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),255]:(e=/^#?([a-f\d]{1})([a-f\d]{1})([a-f\d]{1})([a-f\d]{1})$/i.exec(t),e?[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16),parseInt(e[4]+e[4],16)]:(e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t),e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),255]:(e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t),Vh(e,`Hexadecimal color "${t}" was not parsed correctly`),[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16),parseInt(e[4],16)])))}const rfe=Object.freeze(["function","string"]);function Cw(t,e,r){var i;return Vh(typeof e=="object",'Expected "data" to be an object'),Vh(rfe.includes(typeof t),'Expected "attr" to be a function or string'),typeof t=="function"?t(e,r):(i=e==null?void 0:e.properties)==null?void 0:i[t]}function ife({attr:t,domain:e,colors:r=Tw,nullColor:i=Ew}){Vh(Array.isArray(e),'Expected "domain" to be an array of numbers');const n=typeof r=="string"?Sw(r,e.length+1):r,o=kL().domain(e).range(n);return(s,f)=>{const A=Cw(t,s,f);return typeof A=="number"&&Number.isFinite(A)?o(A):i}}function nfe({attr:t,domain:e,colors:r=Tw,nullColor:i=Ew,othersColor:n=efe}){Vh(Array.isArray(e),'Expected "domain" to be an array of numbers or strings');const o={},s=typeof r=="string"?Sw(r,e.length):r;for(const[f,A]of e.entries())o[A]=s[f];return(f,A)=>{const v=Cw(t,f,A);return typeof v=="number"&&Number.isFinite(v)||typeof v=="string"?o[v]||n:i}}function sfe({attr:t,domain:e,colors:r=Tw,nullColor:i=Ew}){Vh(Array.isArray(e),'Expected "domain" to be an array of numbers');const n=typeof r=="string"?Sw(r,e.length):r,o=NL().domain(e).range(n);return(s,f)=>{const A=Cw(t,s,f);return typeof A=="number"&&Number.isFinite(A)?o(A):i}}const Pn={SUM:1,MEAN:2,MIN:3,MAX:4};function SF(t,e){return t+e}function ofe(t,e){return e>t?e:t}function afe(t,e){return e<t?e:t}function lfe(t,e){if(Number.isFinite(e))return t.length?e:null;const r=t.map(e).filter(Number.isFinite);return r.length?r.reduce(SF,0)/r.length:null}function cfe(t,e){if(Number.isFinite(e))return t.length?t.length*e:null;const r=t.map(e).filter(Number.isFinite);return r.length?r.reduce(SF,0):null}function ufe(t,e){if(Number.isFinite(e))return t.length?e:null;const r=t.map(e).filter(Number.isFinite);return r.length?r.reduce(ofe,-1/0):null}function hfe(t,e){if(Number.isFinite(e))return t.length?e:null;const r=t.map(e).filter(Number.isFinite);return r.length?r.reduce(afe,1/0):null}function Pw(t,e,r){const i=Pn[t]||Pn.SUM;switch(e=ffe(e,r),i){case Pn.MIN:return n=>hfe(n,e);case Pn.SUM:return n=>cfe(n,e);case Pn.MEAN:return n=>lfe(n,e);case Pn.MAX:return n=>ufe(n,e);default:return null}}function ffe(t,e={}){return Number.isFinite(t)?t:r=>(e.index=r.index,t(r.source,e))}function dfe(t,e={}){return r=>(e.indices=r.map(i=>i.index),t(r.map(i=>i.source),e))}const Afe={projectPoints:!1,viewport:null,createBufferObjects:!0,moduleSettings:{}},bh=3402823466e29,CF=[32775,32774],PF=[32776,32774],pfe=[32776,32775],HI={[Pn.SUM]:32774,[Pn.MEAN]:32774,[Pn.MIN]:CF,[Pn.MAX]:PF},gfe={size:1,operation:Pn.SUM,needMin:!1,needMax:!1,combineMaxMin:!1},mfe=4,_fe=`#version 300 es
|
3474
3474
|
#define SHADER_NAME gpu-aggregation-to-grid-vs
|
3475
3475
|
in vec3 positions;
|
3476
3476
|
in vec3 positions64Low;
|
@@ -3839,4 +3839,4 @@ fragColor = outTexture;
|
|
3839
3839
|
fragColor.g = outTexture.r / max(1.0, outTexture.a);
|
3840
3840
|
}
|
3841
3841
|
`,Gde=2,v1={format:"rgba8unorm",mipmaps:!1,sampler:{minFilter:"linear",magFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}},RM=[0,0],Wde={SUM:0,MEAN:1},Xde={getPosition:{type:"accessor",value:t=>t.position},getWeight:{type:"accessor",value:1},intensity:{type:"number",min:0,value:1},radiusPixels:{type:"number",min:1,max:100,value:50},colorRange:gA,threshold:{type:"number",min:0,max:1,value:.05},colorDomain:{type:"array",value:null,optional:!0},aggregation:"SUM",weightsTextureSize:{type:"number",min:128,max:2048,value:2048},debounceTimeout:{type:"number",min:0,max:1e3,value:500}},qde=["float32-renderable-webgl","texture-blend-float-webgl"],$de={data:{props:["radiusPixels"]}};class kw extends mA{initializeState(){super.initializeAggregationLayer($de),this.setState({colorDomain:RM}),this._setupTextureParams(),this._setupAttributes(),this._setupResources()}shouldUpdateState({changeFlags:e}){return e.somethingChanged}updateState(e){super.updateState(e),this._updateHeatmapState(e)}_updateHeatmapState(e){const{props:r,oldProps:i}=e,n=this._getChangeFlags(e);(n.dataChanged||n.viewportChanged)&&(n.boundsChanged=this._updateBounds(n.dataChanged),this._updateTextureRenderingBounds()),n.dataChanged||n.boundsChanged?(clearTimeout(this.state.updateTimer),this.setState({isWeightMapDirty:!0})):n.viewportZoomChanged&&this._debouncedUpdateWeightmap(),r.colorRange!==i.colorRange&&this._updateColorTexture(e),this.state.isWeightMapDirty&&this._updateWeightmap(),this.setState({zoom:e.context.viewport.zoom})}renderLayers(){const{weightsTexture:e,triPositionBuffer:r,triTexCoordBuffer:i,maxWeightsTexture:n,colorTexture:o,colorDomain:s}=this.state,{updateTriggers:f,intensity:A,threshold:v,aggregation:w}=this.props,C=this.getSubLayerClass("triangle",UF);return new C(this.getSubLayerProps({id:"triangle-layer",updateTriggers:f}),{coordinateSystem:br.DEFAULT,data:{attributes:{positions:r,texCoords:i}},vertexCount:4,maxTexture:n,colorTexture:o,aggregationMode:Wde[w]||0,weightsTexture:e,intensity:A,threshold:v,colorDomain:s})}finalizeState(e){super.finalizeState(e);const{weightsTransform:r,weightsTexture:i,maxWeightTransform:n,maxWeightsTexture:o,triPositionBuffer:s,triTexCoordBuffer:f,colorTexture:A,updateTimer:v}=this.state;r==null||r.destroy(),i==null||i.destroy(),n==null||n.destroy(),o==null||o.destroy(),s==null||s.destroy(),f==null||f.destroy(),A==null||A.destroy(),v&&clearTimeout(v)}_getAttributeManager(){return new X2(this.context.device,{id:this.props.id,stats:this.context.stats})}_getChangeFlags(e){const r={},{dimensions:i}=this.state;r.dataChanged=this.isAttributeChanged()&&"attribute changed"||this.isAggregationDirty(e,{compareAll:!0,dimension:i.data})&&"aggregation is dirty",r.viewportChanged=e.changeFlags.viewportChanged;const{zoom:n}=this.state;return(!e.context.viewport||e.context.viewport.zoom!==n)&&(r.viewportZoomChanged=!0),r}_createTextures(){const{textureSize:e,format:r}=this.state;this.setState({weightsTexture:this.context.device.createTexture({...v1,width:e,height:e,format:r}),maxWeightsTexture:this.context.device.createTexture({...v1,width:1,height:1,format:r})})}_setupAttributes(){this.getAttributeManager().add({positions:{size:3,type:"float64",accessor:"getPosition"},weights:{size:1,accessor:"getWeight"}}),this.setState({positionAttributeName:"positions"})}_setupTextureParams(){const{device:e}=this.context,{weightsTextureSize:r}=this.props,i=Math.min(r,e.limits.maxTextureDimension2D),n=qde.every(f=>e.features.has(f)),o=n?"rgba32float":"rgba8unorm",s=n?1:1/255;this.setState({textureSize:i,format:o,weightsScale:s}),n||fr.warn(`HeatmapLayer: ${this.id} rendering to float texture not supported, falling back to low precision format`)()}_createWeightsTransform(e){let{weightsTransform:r}=this.state;const{weightsTexture:i}=this.state,n=this.getAttributeManager();r==null||r.destroy(),r=new eb(this.context.device,{id:`${this.id}-weights-transform`,bufferLayout:n.getBufferLayouts(),vertexCount:1,targetTexture:i,parameters:{depthWriteEnabled:!1,blendColorOperation:"add",blendColorSrcFactor:"one",blendColorDstFactor:"one",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one"},topology:"point-list",...e}),this.setState({weightsTransform:r})}_setupResources(){this._createTextures();const{device:e}=this.context,{textureSize:r,weightsTexture:i,maxWeightsTexture:n}=this.state,o=this.getShaders({vs:IM,fs:MM});this._createWeightsTransform(o);const s=this.getShaders({vs:jde,fs:Hde}),f=new eb(e,{id:`${this.id}-max-weights-transform`,bindings:{inTexture:i},uniforms:{textureSize:r},targetTexture:n,...s,vertexCount:r*r,topology:"point-list",parameters:{depthWriteEnabled:!1,blendColorOperation:"max",blendAlphaOperation:"max",blendColorSrcFactor:"one",blendColorDstFactor:"one",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one"}});this.setState({weightsTexture:i,maxWeightsTexture:n,maxWeightTransform:f,zoom:null,triPositionBuffer:e.createBuffer({byteLength:48}),triTexCoordBuffer:e.createBuffer({byteLength:48})})}updateShaders(e){this._createWeightsTransform({vs:IM,fs:MM,...e})}_updateMaxWeightValue(){const{maxWeightTransform:e}=this.state;e.run({parameters:{viewport:[0,0,1,1]},clearColor:[0,0,0,0]})}_updateBounds(e=!1){const{viewport:r}=this.context,i=[r.unproject([0,0]),r.unproject([r.width,0]),r.unproject([r.width,r.height]),r.unproject([0,r.height])].map(f=>f.map(Math.fround)),n=Lde(i),o={visibleWorldBounds:n,viewportCorners:i};let s=!1;if(e||!this.state.worldBounds||!kde(this.state.worldBounds,n)){const f=this._worldToCommonBounds(n),A=this._commonToWorldBounds(f);this.props.coordinateSystem===br.LNGLAT&&(A[1]=Math.max(A[1],-85.051129),A[3]=Math.min(A[3],85.051129),A[0]=Math.max(A[0],-360),A[2]=Math.min(A[2],360));const v=this._worldToCommonBounds(A);o.worldBounds=A,o.normalizedCommonBounds=v,s=!0}return this.setState(o),s}_updateTextureRenderingBounds(){const{triPositionBuffer:e,triTexCoordBuffer:r,normalizedCommonBounds:i,viewportCorners:n}=this.state,{viewport:o}=this.context;e.write(PM(n,3));const s=n.map(f=>Ude(o.projectPosition(f),i));r.write(PM(s,2))}_updateColorTexture(e){const{colorRange:r}=e.props;let{colorTexture:i}=this.state;const n=ly(r,!1,Uint8Array);i&&(i==null?void 0:i.width)===r.length?i.setSubImageData({data:n}):(i==null||i.destroy(),i=this.context.device.createTexture({...v1,data:n,width:r.length,height:1})),this.setState({colorTexture:i})}_updateWeightmap(){const{radiusPixels:e,colorDomain:r,aggregation:i}=this.props,{worldBounds:n,textureSize:o,weightsScale:s}=this.state,f=this.state.weightsTransform;this.state.isWeightMapDirty=!1;const A=this._worldToCommonBounds(n,{useLayerCoordinateSystem:!0});if(r&&i==="SUM"){const{viewport:B}=this.context,F=B.distanceScales.metersPerUnit[2]*(A[2]-A[0])/o;this.state.colorDomain=r.map(k=>k*F*s)}else this.state.colorDomain=r||RM;const w=this.getAttributeManager().getAttributes(),C=this.getModuleSettings(),I={radiusPixels:e,commonBounds:A,textureWidth:o,weightsScale:s};this._setModelAttributes(f.model,w),f.model.setVertexCount(this.getNumInstances()),f.model.setUniforms(I),f.model.updateModuleSettings(C),f.run({parameters:{viewport:[0,0,o,o]},clearColor:[0,0,0,0]}),this._updateMaxWeightValue()}_debouncedUpdateWeightmap(e=!1){let{updateTimer:r}=this.state;const{debounceTimeout:i}=this.props;e?(r=null,this._updateBounds(!0),this._updateTextureRenderingBounds(),this.setState({isWeightMapDirty:!0})):(this.setState({isWeightMapDirty:!1}),clearTimeout(r),r=setTimeout(this._debouncedUpdateWeightmap.bind(this,!0),i)),this.setState({updateTimer:r})}_worldToCommonBounds(e,r={}){const{useLayerCoordinateSystem:i=!1}=r,[n,o,s,f]=e,{viewport:A}=this.context,{textureSize:v}=this.state,{coordinateSystem:w}=this.props,C=i&&(w===br.LNGLAT_OFFSETS||w===br.METER_OFFSETS),I=C?A.projectPosition(this.props.coordinateOrigin):[0,0],B=v*Gde/A.scale;let F,k;return i&&!C?(F=this.projectPosition([n,o,0]),k=this.projectPosition([s,f,0])):(F=A.projectPosition([n,o,0]),k=A.projectPosition([s,f,0])),Nde([F[0]-I[0],F[1]-I[1],k[0]-I[0],k[1]-I[1]],B,B)}_commonToWorldBounds(e){const[r,i,n,o]=e,{viewport:s}=this.context,f=s.unprojectPosition([r,i]),A=s.unprojectPosition([n,o]);return f.slice(0,2).concat(A.slice(0,2))}}kw.layerName="HeatmapLayer";kw.defaultProps=Xde;const Zde=Object.freeze(Object.defineProperty({__proto__:null,AGGREGATION_OPERATION:Pn,CPUGridLayer:v0,ContourLayer:Dw,GPUGridLayer:b0,GridLayer:Lw,HeatmapLayer:kw,HexagonLayer:Ow,ScreenGridLayer:Rw,_AggregationLayer:mA,_BinSorter:Iw,_CPUAggregator:Bw,_GPUGridAggregator:Hl},Symbol.toStringTag,{value:"Module"})),Kde={ClusterTileLayer:Aw,H3TileLayer:gw,HeatmapTileLayer:_w,_PointLabelLayer:yw,QuadbinTileLayer:ay,RasterTileLayer:bw,VectorTileLayer:ww};function n2(t,e=""){if(!t)throw new Error(`JSON conversion error ${e}`)}function Yde(t,e){const r=Qde(e);let i=t;for(const n of r)i=Jde(i)?i[n]:void 0;return i}function Jde(t){return t!==null&&typeof t=="object"}const BM={};function Qde(t){if(typeof t=="string"){let e=BM[t];return e||(e=t.split("."),BM[t]=e),e}return Array.isArray(t)?t:[t]}var s2={exports:{}};(function(t,e){(function(r){var i="Compound",n="Identifier",o="MemberExpression",s="Literal",f="ThisExpression",A="CallExpression",v="UnaryExpression",w="BinaryExpression",C="LogicalExpression",I="ConditionalExpression",B="ArrayExpression",F=46,k=44,V=39,G=34,Y=40,Z=41,se=91,ge=93,Ee=63,Ve=59,Fe=58,pe=function(Rt,ut){var Vi=new Error(Rt+" at character "+ut);throw Vi.index=ut,Vi.description=Rt,Vi},Te=!0,Ae={"-":Te,"!":Te,"~":Te,"+":Te},Le={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},ze=function(Rt){var ut=0,Vi;for(var Sr in Rt)(Vi=Sr.length)>ut&&Rt.hasOwnProperty(Sr)&&(ut=Vi);return ut},Xe=ze(Ae),dt=ze(Le),Nt={true:!0,false:!1,null:null},gr="this",mr=function(Rt){return Le[Rt]||0},_r=function(Rt,ut,Vi){var Sr=Rt==="||"||Rt==="&&"?C:w;return{type:Sr,operator:Rt,left:ut,right:Vi}},rr=function(Rt){return Rt>=48&&Rt<=57},Ot=function(Rt){return Rt===36||Rt===95||Rt>=65&&Rt<=90||Rt>=97&&Rt<=122||Rt>=128&&!Le[String.fromCharCode(Rt)]},Qt=function(Rt){return Rt===36||Rt===95||Rt>=65&&Rt<=90||Rt>=97&&Rt<=122||Rt>=48&&Rt<=57||Rt>=128&&!Le[String.fromCharCode(Rt)]},qt=function(Rt){for(var ut=0,Vi=Rt.charAt,Sr=Rt.charCodeAt,Ur=function(vt){return Vi.call(Rt,vt)},Dt=function(vt){return Sr.call(Rt,vt)},$r=Rt.length,Pi=function(){for(var vt=Dt(ut);vt===32||vt===9||vt===10||vt===13;)vt=Dt(++ut)},yi=function(){var vt=gn(),Yt,Mr;if(Pi(),Dt(ut)===Ee){if(ut++,Yt=yi(),Yt||pe("Expected expression",ut),Pi(),Dt(ut)===Fe)return ut++,Mr=yi(),Mr||pe("Expected expression",ut),{type:I,test:vt,consequent:Yt,alternate:Mr};pe("Expected :",ut)}else return vt},dr=function(){Pi();for(var vt=Rt.substr(ut,dt),Yt=vt.length;Yt>0;){if(Le.hasOwnProperty(vt)&&(!Ot(Dt(ut))||ut+vt.length<Rt.length&&!Qt(Dt(ut+vt.length))))return ut+=Yt,vt;vt=vt.substr(0,--Yt)}return!1},gn=function(){var vt,Yt,Mr,qr,kn,Di,mn,Xn,ho;if(Di=oi(),Yt=dr(),!Yt)return Di;for(kn={value:Yt,prec:mr(Yt)},mn=oi(),mn||pe("Expected expression after "+Yt,ut),qr=[Di,kn,mn];(Yt=dr())&&(Mr=mr(Yt),Mr!==0);){for(kn={value:Yt,prec:Mr},ho=Yt;qr.length>2&&Mr<=qr[qr.length-2].prec;)mn=qr.pop(),Yt=qr.pop().value,Di=qr.pop(),vt=_r(Yt,Di,mn),qr.push(vt);vt=oi(),vt||pe("Expected expression after "+ho,ut),qr.push(kn,vt)}for(Xn=qr.length-1,vt=qr[Xn];Xn>1;)vt=_r(qr[Xn-1].value,qr[Xn-2],vt),Xn-=2;return vt},oi=function(){var vt,Yt,Mr;if(Pi(),vt=Dt(ut),rr(vt)||vt===F)return xi();if(vt===V||vt===G)return an();if(vt===se)return Is();for(Yt=Rt.substr(ut,Xe),Mr=Yt.length;Mr>0;){if(Ae.hasOwnProperty(Yt)&&(!Ot(Dt(ut))||ut+Yt.length<Rt.length&&!Qt(Dt(ut+Yt.length))))return ut+=Mr,{type:v,operator:Yt,argument:oi(),prefix:!0};Yt=Yt.substr(0,--Mr)}return Ot(vt)||vt===Y?ln():!1},xi=function(){for(var vt="",Yt,Mr;rr(Dt(ut));)vt+=Ur(ut++);if(Dt(ut)===F)for(vt+=Ur(ut++);rr(Dt(ut));)vt+=Ur(ut++);if(Yt=Ur(ut),Yt==="e"||Yt==="E"){for(vt+=Ur(ut++),Yt=Ur(ut),(Yt==="+"||Yt==="-")&&(vt+=Ur(ut++));rr(Dt(ut));)vt+=Ur(ut++);rr(Dt(ut-1))||pe("Expected exponent ("+vt+Ur(ut)+")",ut)}return Mr=Dt(ut),Ot(Mr)?pe("Variable names cannot start with a number ("+vt+Ur(ut)+")",ut):Mr===F&&pe("Unexpected period",ut),{type:s,value:parseFloat(vt),raw:vt}},an=function(){for(var vt="",Yt=Ur(ut++),Mr=!1,qr;ut<$r;)if(qr=Ur(ut++),qr===Yt){Mr=!0;break}else if(qr==="\\")switch(qr=Ur(ut++),qr){case"n":vt+=`
|
3842
|
-
`;break;case"r":vt+="\r";break;case"t":vt+=" ";break;case"b":vt+="\b";break;case"f":vt+="\f";break;case"v":vt+="\v";break;default:vt+=qr}else vt+=qr;return Mr||pe('Unclosed quote after "'+vt+'"',ut),{type:s,value:vt,raw:Yt+vt+Yt}},$i=function(){var vt=Dt(ut),Yt=ut,Mr;for(Ot(vt)?ut++:pe("Unexpected "+Ur(ut),ut);ut<$r&&(vt=Dt(ut),Qt(vt));)ut++;return Mr=Rt.slice(Yt,ut),Nt.hasOwnProperty(Mr)?{type:s,value:Nt[Mr],raw:Mr}:Mr===gr?{type:f}:{type:n,name:Mr}},Zs=function(vt){for(var Yt,Mr=[],qr,kn=!1,Di=0;ut<$r;)if(Pi(),Yt=Dt(ut),Yt===vt){kn=!0,ut++,vt===Z&&Di&&Di>=Mr.length&&pe("Unexpected token "+String.fromCharCode(vt),ut);break}else if(Yt===k){if(ut++,Di++,Di!==Mr.length){if(vt===Z)pe("Unexpected token ,",ut);else if(vt===ge)for(var mn=Mr.length;mn<Di;mn++)Mr.push(null)}}else qr=yi(),(!qr||qr.type===i)&&pe("Expected comma",ut),Mr.push(qr);return kn||pe("Expected "+String.fromCharCode(vt),ut),Mr},ln=function(){var vt,Yt;for(vt=Dt(ut),vt===Y?Yt=ni():Yt=$i(),Pi(),vt=Dt(ut);vt===F||vt===se||vt===Y;)ut++,vt===F?(Pi(),Yt={type:o,computed:!1,object:Yt,property:$i()}):vt===se?(Yt={type:o,computed:!0,object:Yt,property:yi()},Pi(),vt=Dt(ut),vt!==ge&&pe("Unclosed [",ut),ut++):vt===Y&&(Yt={type:A,arguments:Zs(Z),callee:Yt}),Pi(),vt=Dt(ut);return Yt},ni=function(){ut++;var vt=yi();if(Pi(),Dt(ut)===Z)return ut++,vt;pe("Unclosed (",ut)},Is=function(){return ut++,{type:B,elements:Zs(ge)}},nn=[],Oi,is;ut<$r;)Oi=Dt(ut),Oi===Ve||Oi===k?ut++:(is=yi())?nn.push(is):ut<$r&&pe('Unexpected "'+Ur(ut)+'"',ut);return nn.length===1?nn[0]:{type:i,body:nn}};qt.version="0.3.5",qt.toString=function(){return"JavaScript Expression Parser (JSEP) v"+qt.version},qt.addUnaryOp=function(Rt){return Xe=Math.max(Rt.length,Xe),Ae[Rt]=Te,this},qt.addBinaryOp=function(Rt,ut){return dt=Math.max(Rt.length,dt),Le[Rt]=ut,this},qt.addLiteral=function(Rt,ut){return Nt[Rt]=ut,this},qt.removeUnaryOp=function(Rt){return delete Ae[Rt],Rt.length===Xe&&(Xe=ze(Ae)),this},qt.removeAllUnaryOps=function(){return Ae={},Xe=0,this},qt.removeBinaryOp=function(Rt){return delete Le[Rt],Rt.length===dt&&(dt=ze(Le)),this},qt.removeAllBinaryOps=function(){return Le={},dt=0,this},qt.removeLiteral=function(Rt){return delete Nt[Rt],this},qt.removeAllLiterals=function(){return Nt={},this},t.exports?e=t.exports=qt:e.parse=qt})()})(s2,s2.exports);var eAe=s2.exports;const tAe=oA(eAe),OM={"||":(t,e)=>t||e,"&&":(t,e)=>t&&e,"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e},rAe={"-":t=>-t,"+":t=>+t,"~":t=>~t,"!":t=>!t};function DM(t,e){return t.map(function(r){return Ss(r,e)})}function FM(t,e){const r=Ss(t.object,e);let i;if(t.computed?i=Ss(t.property,e):i=t.property.name,/^__proto__|prototype|constructor$/.test(i))throw Error(`Access to member "${i}" disallowed.`);return[r,r[i]]}function Ss(t,e){const r=t;switch(r.type){case"ArrayExpression":return DM(r.elements,e);case"BinaryExpression":return OM[r.operator](Ss(r.left,e),Ss(r.right,e));case"CallExpression":let i,n,o;return r.callee.type==="MemberExpression"?(o=FM(r.callee,e),i=o[0],n=o[1]):n=Ss(r.callee,e),typeof n!="function"?void 0:n.apply(i,DM(r.arguments,e));case"ConditionalExpression":return Ss(r.test,e)?Ss(r.consequent,e):Ss(r.alternate,e);case"Identifier":return e[r.name];case"Literal":return r.value;case"LogicalExpression":return r.operator==="||"?Ss(r.left,e)||Ss(r.right,e):r.operator==="&&"?Ss(r.left,e)&&Ss(r.right,e):OM[r.operator](Ss(r.left,e),Ss(r.right,e));case"MemberExpression":return FM(r,e)[1];case"ThisExpression":return e;case"UnaryExpression":return rAe[r.operator](Ss(r.argument,e));default:return}}const b1={"-":t=>t};function zF(t,e){if(t in b1)return b1[t];let r;const i=tAe(t);return i.type==="Identifier"?r=n=>Yde(n,t):(o2(i,n=>{if(n.type==="CallExpression")throw new Error("Function calls not allowed in JSON expressions")}),r=n=>Ss(i,n)),b1[t]=r,r}function o2(t,e){if(Array.isArray(t))t.forEach(r=>o2(r,e));else if(t&&typeof t=="object"){t.type&&e(t);for(const r in t)o2(t[r],e)}}const n_="@@=",LM="@@#",iAe="@@type",VF="@@function",kM=t=>t&&typeof t=="object";class a2{constructor(...e){this.typeKey=iAe,this.functionKey=VF,this.log=console,this.classes={},this.reactComponents={},this.enumerations={},this.constants={},this.functions={},this.React=null,this.convertFunction=zF,this.preProcessClassProps=(r,i)=>i,this.postProcessConvertedJson=r=>r;for(const r of e)this.merge(r)}merge(e){for(const r in e)switch(r){case"layers":case"views":Object.assign(this.classes,e[r]);break;default:if(r in this){const i=e[r];this[r]=kM(this[r])?Object.assign(this[r],i):i}}}validate(e){return n2(!this.typeKey||typeof this.typeKey=="string"),n2(kM(this.classes)),!0}}function nAe(t){return typeof t=="string"&&t.startsWith(n_)}function sAe(t){return t.replace(n_,"")}function jF(t,e){const r={};for(const i in t){let n=t[i];nAe(n)&&(n=sAe(n),n=zF(n)),r[i]=n}return r}function oAe(t,e,r){const i=r.classes[t],n=r.reactComponents[t];if(!i&&!n){const{log:o}=r;if(o){const s=JSON.stringify(e,null,0).slice(0,40);o.warn(`JSON converter: No registered class of type ${t}(${s}...) `)}return null}return i?aAe(i,e,r):lAe(n,e,r)}function aAe(t,e,r){return r.preProcessClassProps&&(e=r.preProcessClassProps(t,e,r)),e=jF(e),new t(e)}function lAe(t,e,r){const{React:i}=r,{children:n=[]}=e;return delete e.children,r.preProcessClassProps&&(e=r.preProcessClassProps(t,e,r)),e=jF(e),i.createElement(t,e,n)}function cAe(t,e,r){const i=r.functions[t];if(!i){const{log:n}=r;if(n){const o=JSON.stringify(e,null,0).slice(0,40);n.warn(`JSON converter: No registered function ${t}(${o}...) `)}return null}return i(e)}function uAe(t){return typeof t=="string"?JSON.parse(t):t}const Nw=t=>t&&typeof t=="object";class hAe{constructor(e){this.log=console,this.onJSONChange=()=>{},this.json=null,this.convertedJson=null,this.setProps(e)}finalize(){}setProps(e){"configuration"in e&&(this.configuration=e.configuration instanceof a2?e.configuration:new a2(e.configuration)),"onJSONChange"in e&&(this.onJSONChange=e.onJSONChange)}mergeConfiguration(e){this.configuration.merge(e)}convert(e){if(!e||e===this.json)return this.convertedJson;this.json=e;const r=uAe(e);let i=fAe(r,this.configuration);return i=this.configuration.postProcessConvertedJson(i),this.convertedJson=i,i}convertJson(e){return this.convert(e)}}function fAe(t,e){return e=new a2(e),Uw(t,"",e)}function Uw(t,e,r){return Array.isArray(t)?t.map((i,n)=>Uw(i,String(n),r)):dAe(t,r)?AAe(t,r):Nw(t)?VF in t?pAe(t,r):zw(t,r):typeof t=="string"?gAe(t,e,r):t}function dAe(t,e){const{typeKey:r}=e;return Nw(t)&&!!t[r]}function AAe(t,e){const{typeKey:r}=e,i=t[r];let n={...t};return delete n[r],n=zw(n,e),oAe(i,n,e)}function pAe(t,e){const{functionKey:r}=e,i=t[r];let n={...t};return delete n[r],n=zw(n,e),cAe(i,n,e)}function zw(t,e){n2(Nw(t));const r={};for(const i in t){const n=t[i];r[i]=Uw(n,i,e)}return r}function gAe(t,e,r){if(t.startsWith(n_)&&r.convertFunction)return t=t.replace(n_,""),r.convertFunction(t,r);if(t.startsWith(LM)){if(t=t.replace(LM,""),r.constants[t])return r.constants[t];const[i,n]=t.split(".");return r.enumerations[i][n]}return t}const mAe={classes:{...ste,...Zde,...Vce,...Mse,...Kde},functions:{colorBins:ife,colorCategories:nfe,colorContinuous:sfe}},HF=new hAe({configuration:mAe}),_Ae={[iy.layerName]:["getFillColor"],[J_.layerName]:["getFillColor"],[$l.layerName]:["getFillColor"],[AA.layerName]:["getFillColor"],[X_.layerName]:["getFillColor"],[W_.layerName]:["getFillColor"],[Z_.layerName]:["getColor"],[c0.layerName]:["getTargetColor","getSourceColor"],[Lc.layerName]:["getFillColor"],[kc.layerName]:["getFillColor"],[dA.layerName]:["getColor"],[u0.layerName]:["getColor"],[$h.layerName]:["getColor"],[h0.layerName]:["getColor"],[Vu.layerName]:["getFillColor"],[f0.layerName]:["getFillColor","getColor","getLineColor"],[zu.layerName]:["getFillColor"],[Zh.layerName]:["getColor"],[g0.layerName]:["getColor"],[zh.layerName]:["getColor"]},yAe=({object:t,objectInfo:e,originalFillFunction:r})=>{const i=typeof r=="function"?r(t,e):r;if(Array.isArray(i))return[i[0]||0,i[1]||0,i[2]||0,i[3]||255];if(typeof i=="string"&&i.startsWith("@@=")){const n=HF.convert({originalColor:i}).originalColor(t);return[n[0]||0,n[1]||0,n[2]||0,n[3]||255]}return null},NM=({isSelected:t,object:e,objectInfo:r,opacity:i,originalFillFunction:n})=>{const o=yAe({object:e,objectInfo:r,originalFillFunction:n});if(!o)return null;let s=0;return t?s=Math.max(typeof o[3]=="number"?o[3]:i,i):s=Math.min(typeof o[3]=="number"?o[3]:i,i),[o[0]||0,o[1]||0,o[2]||0,s]},vAe=({isSelected:t,object:e,objectInfo:r,originalFillFunction:i,selectedColor:n,selectedOpacity:o=255,unselectedColor:s,unselectedOpacity:f=Math.floor(255*.4)})=>t?NM({opacity:o,isSelected:!0,object:e,objectInfo:r,originalFillFunction:i})||n:NM({opacity:f,isSelected:!1,object:e,objectInfo:r,originalFillFunction:i})||s,r0={selection:{indices:{},objects:{}}},UM=(t,e)=>{const r=e.match(/{(.*?)}/g);return r&&r.forEach(i=>{const n=i.substring(1,i.length-1);t.object.hasOwnProperty(n)?e=e.replace(i,t.object[n]):t.object.hasOwnProperty("properties")&&t.object.properties.hasOwnProperty(n)&&(e=e.replace(i,t.object.properties[n]))}),e};function bAe(t,e){return e.id?t.getElementState(e.id,"selection")??r0:r0}function xAe(t,e){if(!e.id)return r0;const r=t.getStringValue(e);return(r?T1.parse(r):null)??r0}function wAe(t,e,r,i){t.id&&e.setStringValue(t,JSON.stringify(r.value),{fromUi:r.fromUi},i)}const TAe=t=>{var Le;const{height:e,width:r,expanded:i}=WM(XM),{element:n,fragmentId:o,isLightTheme:s,theme:f,widgetMgr:A}=t,{selectionMode:v,tooltip:w,useContainerWidth:C}=n,I=i??!1,[B,F]=kL({element:n,getDefaultState:bAe,getStateFromWidgetMgr:xAe,updateWidgetMgrState:wAe,widgetMgr:A,fragmentId:o}),[k,V]=it.useState({bearing:0,pitch:0,zoom:11}),{height:G,width:Y}=MJ({element:n,isFullScreen:I,shouldUseContainerWidth:C,container:{height:e,width:r},heightFallback:((Le=k.initialViewState)==null?void 0:Le.height)||f.sizes.defaultMapHeight}),[Z,se]=it.useState({}),ge=v[0],Ee=ge!==void 0,Ve=Ee&&Object.keys(B.selection.indices).length>0,Fe=it.useMemo(()=>Object.freeze(T1.parse(n.json)),[I,s,n.json]),pe=it.useMemo(()=>{const ze={...Fe};if(ze.mapStyle||(ze.mapStyle=`mapbox://styles/mapbox/${s?"light":"dark"}-v9`),ze.layers){const Xe=Object.values(B.selection.indices).some(Nt=>Nt==null?void 0:Nt.length),dt=ze.layers.some(Nt=>Object.hasOwn(Nt,"pickable"));ze.layers=ze.layers.map(Nt=>{var Ot,Qt;if(!Nt||Array.isArray(Nt)||!Ee)return Nt;dt||(Nt.pickable=!0);const gr=`${Nt.id||null}`,mr=((Qt=(Ot=B==null?void 0:B.selection)==null?void 0:Ot.indices)==null?void 0:Qt[gr])||[],_r=_Ae[Nt["@@type"]];if(!_r)return Nt;const rr={...Nt};return _r.forEach(qt=>{var dr;rr.updateTriggers={[qt]:[...((dr=rr.updateTriggers)==null?void 0:dr[qt])||[],mr,Xe]};const Rt=!Xe,ut=Nt[qt];if(Rt||!ut)return rr;const Vi=255,Sr=Math.floor(255*.4),Ur=cE(f.colors.primary),Dt=[Ur[0],Ur[1],Ur[2],Vi],$r=cE(f.colors.gray20),Pi=[$r[0],$r[1],$r[2],Sr],yi=(gn,oi)=>vAe({isSelected:mr.includes(oi.index),object:gn,objectInfo:oi,originalFillFunction:ut,selectedColor:Dt,unselectedColor:Pi,selectedOpacity:Vi,unselectedOpacity:Sr});rr[qt]=yi}),rr})}return ze==null||delete ze.views,HF.convert(ze)},[B.selection.indices,s,Ee,Fe,f.colors.gray20,f.colors.primary]);it.useEffect(()=>{if(!IL(pe.initialViewState,Z)){const ze=Object.keys(pe.initialViewState).reduce((Xe,dt)=>pe.initialViewState[dt]===Z[dt]?Xe:{...Xe,[dt]:pe.initialViewState[dt]},{});V({...k,...ze}),se(pe.initialViewState)}},[pe.initialViewState,Z,k]);const Te=it.useCallback(ze=>{if(!ze||!ze.object||!w)return null;const Xe=T1.parse(w);return Xe.html?Xe.html=UM(ze,Xe.html):Xe.text=UM(ze,Xe.text),Xe},[w]),Ae=it.useCallback(({viewState:ze})=>{V(ze)},[V]);return{createTooltip:Te,data:B,deck:pe,hasActiveSelection:Ve,height:G,isSelectionModeActivated:Ee,onViewStateChange:Ae,selectionMode:ge,setSelection:F,viewState:k,width:Y}};s0([hx,tA]);const x1=r0.selection,EAe=[],SAe=t=>{const{disabled:e,disableFullscreenMode:r,element:i,fragmentId:n,mapboxToken:o,widgetMgr:s}=t,{mapboxToken:f}=i,A=ML(),{expanded:v,expand:w,collapse:C}=WM(XM),{createTooltip:I,data:B,deck:F,hasActiveSelection:k,height:V,isSelectionModeActivated:G,onViewStateChange:Y,selectionMode:Z,setSelection:se,viewState:ge,width:Ee}=TAe({element:i,fragmentId:n,isLightTheme:GM(A),theme:A,widgetMgr:s}),[Ve,Fe]=it.useState(!1);it.useEffect(()=>{Fe(!0)},[]);const pe=it.useCallback(Ae=>{var _r;if(Z===void 0)return;const{index:Le,object:ze}=Ae,Xe=`${((_r=Ae.layer)==null?void 0:_r.id)||null}`,dt=B,Nt=Le===-1,mr=(()=>{var rr;if(Nt)return x1;switch(Z){case uE.SelectionMode.SINGLE_OBJECT:return((rr=dt.selection.indices[Xe])==null?void 0:rr[0])===Le?x1:{indices:{[`${Xe}`]:[Le]},objects:{[`${Xe}`]:[ze]}};case uE.SelectionMode.MULTI_OBJECT:{const Ot=new Map((()=>{var qt,Rt;return(((Rt=(qt=dt==null?void 0:dt.selection)==null?void 0:qt.indices)==null?void 0:Rt[Xe])||[]).map((ut,Vi)=>{var Sr,Ur,Dt;return[ut,(Dt=(Ur=(Sr=dt.selection)==null?void 0:Sr.objects)==null?void 0:Ur[Xe])==null?void 0:Dt[Vi]]})})());if(Ot.has(Le)?Ot.delete(Le):Ot.set(Le,ze),Ot.size===0){const{[Xe]:Qt,...qt}=dt.selection.indices,{[Xe]:Rt,...ut}=dt.selection.objects;return{indices:qt,objects:ut}}return{indices:{...dt.selection.indices,[`${Xe}`]:Array.from(Ot.keys())},objects:{...dt.selection.objects,[`${Xe}`]:Array.from(Ot.values())}}}default:throw RL(Z),new Error("Invalid selection mode")}})();JSON.stringify(mr)!==JSON.stringify(dt.selection)&&se({fromUi:!0,value:{selection:mr}})},[Z,B,se]),Te=it.useCallback(()=>{se({value:{selection:x1},fromUi:!0})},[se]);return Ll(E3,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",width:Ee,height:V,children:[ms(FL,{isFullScreen:v,disableFullscreenMode:r,onExpand:w,onCollapse:C,target:E3,locked:k&&!e?!0:void 0,children:k&&!e&&ms(DL,{label:"Clear selection",onClick:Te,icon:OL})}),Ll(SX,{viewState:ge,onViewStateChange:Y,height:V,width:Ee,layers:Ve?F.layers:EAe,getTooltip:I,ContextProvider:qh.Provider,controller:!0,onClick:G&&!e?pe:void 0,children:[ms(Fc,{height:V,width:Ee,mapStyle:F.mapStyle&&(typeof F.mapStyle=="string"?F.mapStyle:F.mapStyle[0]),mapboxApiAccessToken:f||o}),ms(IJ,{children:ms(nZ,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})]})},YAe=LL(PJ("st.pydeck_chart")(SAe));export{YAe as default};
|
3842
|
+
`;break;case"r":vt+="\r";break;case"t":vt+=" ";break;case"b":vt+="\b";break;case"f":vt+="\f";break;case"v":vt+="\v";break;default:vt+=qr}else vt+=qr;return Mr||pe('Unclosed quote after "'+vt+'"',ut),{type:s,value:vt,raw:Yt+vt+Yt}},$i=function(){var vt=Dt(ut),Yt=ut,Mr;for(Ot(vt)?ut++:pe("Unexpected "+Ur(ut),ut);ut<$r&&(vt=Dt(ut),Qt(vt));)ut++;return Mr=Rt.slice(Yt,ut),Nt.hasOwnProperty(Mr)?{type:s,value:Nt[Mr],raw:Mr}:Mr===gr?{type:f}:{type:n,name:Mr}},Zs=function(vt){for(var Yt,Mr=[],qr,kn=!1,Di=0;ut<$r;)if(Pi(),Yt=Dt(ut),Yt===vt){kn=!0,ut++,vt===Z&&Di&&Di>=Mr.length&&pe("Unexpected token "+String.fromCharCode(vt),ut);break}else if(Yt===k){if(ut++,Di++,Di!==Mr.length){if(vt===Z)pe("Unexpected token ,",ut);else if(vt===ge)for(var mn=Mr.length;mn<Di;mn++)Mr.push(null)}}else qr=yi(),(!qr||qr.type===i)&&pe("Expected comma",ut),Mr.push(qr);return kn||pe("Expected "+String.fromCharCode(vt),ut),Mr},ln=function(){var vt,Yt;for(vt=Dt(ut),vt===Y?Yt=ni():Yt=$i(),Pi(),vt=Dt(ut);vt===F||vt===se||vt===Y;)ut++,vt===F?(Pi(),Yt={type:o,computed:!1,object:Yt,property:$i()}):vt===se?(Yt={type:o,computed:!0,object:Yt,property:yi()},Pi(),vt=Dt(ut),vt!==ge&&pe("Unclosed [",ut),ut++):vt===Y&&(Yt={type:A,arguments:Zs(Z),callee:Yt}),Pi(),vt=Dt(ut);return Yt},ni=function(){ut++;var vt=yi();if(Pi(),Dt(ut)===Z)return ut++,vt;pe("Unclosed (",ut)},Is=function(){return ut++,{type:B,elements:Zs(ge)}},nn=[],Oi,is;ut<$r;)Oi=Dt(ut),Oi===Ve||Oi===k?ut++:(is=yi())?nn.push(is):ut<$r&&pe('Unexpected "'+Ur(ut)+'"',ut);return nn.length===1?nn[0]:{type:i,body:nn}};qt.version="0.3.5",qt.toString=function(){return"JavaScript Expression Parser (JSEP) v"+qt.version},qt.addUnaryOp=function(Rt){return Xe=Math.max(Rt.length,Xe),Ae[Rt]=Te,this},qt.addBinaryOp=function(Rt,ut){return dt=Math.max(Rt.length,dt),Le[Rt]=ut,this},qt.addLiteral=function(Rt,ut){return Nt[Rt]=ut,this},qt.removeUnaryOp=function(Rt){return delete Ae[Rt],Rt.length===Xe&&(Xe=ze(Ae)),this},qt.removeAllUnaryOps=function(){return Ae={},Xe=0,this},qt.removeBinaryOp=function(Rt){return delete Le[Rt],Rt.length===dt&&(dt=ze(Le)),this},qt.removeAllBinaryOps=function(){return Le={},dt=0,this},qt.removeLiteral=function(Rt){return delete Nt[Rt],this},qt.removeAllLiterals=function(){return Nt={},this},t.exports?e=t.exports=qt:e.parse=qt})()})(s2,s2.exports);var eAe=s2.exports;const tAe=oA(eAe),OM={"||":(t,e)=>t||e,"&&":(t,e)=>t&&e,"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e},rAe={"-":t=>-t,"+":t=>+t,"~":t=>~t,"!":t=>!t};function DM(t,e){return t.map(function(r){return Ss(r,e)})}function FM(t,e){const r=Ss(t.object,e);let i;if(t.computed?i=Ss(t.property,e):i=t.property.name,/^__proto__|prototype|constructor$/.test(i))throw Error(`Access to member "${i}" disallowed.`);return[r,r[i]]}function Ss(t,e){const r=t;switch(r.type){case"ArrayExpression":return DM(r.elements,e);case"BinaryExpression":return OM[r.operator](Ss(r.left,e),Ss(r.right,e));case"CallExpression":let i,n,o;return r.callee.type==="MemberExpression"?(o=FM(r.callee,e),i=o[0],n=o[1]):n=Ss(r.callee,e),typeof n!="function"?void 0:n.apply(i,DM(r.arguments,e));case"ConditionalExpression":return Ss(r.test,e)?Ss(r.consequent,e):Ss(r.alternate,e);case"Identifier":return e[r.name];case"Literal":return r.value;case"LogicalExpression":return r.operator==="||"?Ss(r.left,e)||Ss(r.right,e):r.operator==="&&"?Ss(r.left,e)&&Ss(r.right,e):OM[r.operator](Ss(r.left,e),Ss(r.right,e));case"MemberExpression":return FM(r,e)[1];case"ThisExpression":return e;case"UnaryExpression":return rAe[r.operator](Ss(r.argument,e));default:return}}const b1={"-":t=>t};function zF(t,e){if(t in b1)return b1[t];let r;const i=tAe(t);return i.type==="Identifier"?r=n=>Yde(n,t):(o2(i,n=>{if(n.type==="CallExpression")throw new Error("Function calls not allowed in JSON expressions")}),r=n=>Ss(i,n)),b1[t]=r,r}function o2(t,e){if(Array.isArray(t))t.forEach(r=>o2(r,e));else if(t&&typeof t=="object"){t.type&&e(t);for(const r in t)o2(t[r],e)}}const n_="@@=",LM="@@#",iAe="@@type",VF="@@function",kM=t=>t&&typeof t=="object";class a2{constructor(...e){this.typeKey=iAe,this.functionKey=VF,this.log=console,this.classes={},this.reactComponents={},this.enumerations={},this.constants={},this.functions={},this.React=null,this.convertFunction=zF,this.preProcessClassProps=(r,i)=>i,this.postProcessConvertedJson=r=>r;for(const r of e)this.merge(r)}merge(e){for(const r in e)switch(r){case"layers":case"views":Object.assign(this.classes,e[r]);break;default:if(r in this){const i=e[r];this[r]=kM(this[r])?Object.assign(this[r],i):i}}}validate(e){return n2(!this.typeKey||typeof this.typeKey=="string"),n2(kM(this.classes)),!0}}function nAe(t){return typeof t=="string"&&t.startsWith(n_)}function sAe(t){return t.replace(n_,"")}function jF(t,e){const r={};for(const i in t){let n=t[i];nAe(n)&&(n=sAe(n),n=zF(n)),r[i]=n}return r}function oAe(t,e,r){const i=r.classes[t],n=r.reactComponents[t];if(!i&&!n){const{log:o}=r;if(o){const s=JSON.stringify(e,null,0).slice(0,40);o.warn(`JSON converter: No registered class of type ${t}(${s}...) `)}return null}return i?aAe(i,e,r):lAe(n,e,r)}function aAe(t,e,r){return r.preProcessClassProps&&(e=r.preProcessClassProps(t,e,r)),e=jF(e),new t(e)}function lAe(t,e,r){const{React:i}=r,{children:n=[]}=e;return delete e.children,r.preProcessClassProps&&(e=r.preProcessClassProps(t,e,r)),e=jF(e),i.createElement(t,e,n)}function cAe(t,e,r){const i=r.functions[t];if(!i){const{log:n}=r;if(n){const o=JSON.stringify(e,null,0).slice(0,40);n.warn(`JSON converter: No registered function ${t}(${o}...) `)}return null}return i(e)}function uAe(t){return typeof t=="string"?JSON.parse(t):t}const Nw=t=>t&&typeof t=="object";class hAe{constructor(e){this.log=console,this.onJSONChange=()=>{},this.json=null,this.convertedJson=null,this.setProps(e)}finalize(){}setProps(e){"configuration"in e&&(this.configuration=e.configuration instanceof a2?e.configuration:new a2(e.configuration)),"onJSONChange"in e&&(this.onJSONChange=e.onJSONChange)}mergeConfiguration(e){this.configuration.merge(e)}convert(e){if(!e||e===this.json)return this.convertedJson;this.json=e;const r=uAe(e);let i=fAe(r,this.configuration);return i=this.configuration.postProcessConvertedJson(i),this.convertedJson=i,i}convertJson(e){return this.convert(e)}}function fAe(t,e){return e=new a2(e),Uw(t,"",e)}function Uw(t,e,r){return Array.isArray(t)?t.map((i,n)=>Uw(i,String(n),r)):dAe(t,r)?AAe(t,r):Nw(t)?VF in t?pAe(t,r):zw(t,r):typeof t=="string"?gAe(t,e,r):t}function dAe(t,e){const{typeKey:r}=e;return Nw(t)&&!!t[r]}function AAe(t,e){const{typeKey:r}=e,i=t[r];let n={...t};return delete n[r],n=zw(n,e),oAe(i,n,e)}function pAe(t,e){const{functionKey:r}=e,i=t[r];let n={...t};return delete n[r],n=zw(n,e),cAe(i,n,e)}function zw(t,e){n2(Nw(t));const r={};for(const i in t){const n=t[i];r[i]=Uw(n,i,e)}return r}function gAe(t,e,r){if(t.startsWith(n_)&&r.convertFunction)return t=t.replace(n_,""),r.convertFunction(t,r);if(t.startsWith(LM)){if(t=t.replace(LM,""),r.constants[t])return r.constants[t];const[i,n]=t.split(".");return r.enumerations[i][n]}return t}const mAe={classes:{...ste,...Zde,...Vce,...Mse,...Kde},functions:{colorBins:ife,colorCategories:nfe,colorContinuous:sfe}},HF=new hAe({configuration:mAe}),_Ae={[iy.layerName]:["getFillColor"],[J_.layerName]:["getFillColor"],[$l.layerName]:["getFillColor"],[AA.layerName]:["getFillColor"],[X_.layerName]:["getFillColor"],[W_.layerName]:["getFillColor"],[Z_.layerName]:["getColor"],[c0.layerName]:["getTargetColor","getSourceColor"],[Lc.layerName]:["getFillColor"],[kc.layerName]:["getFillColor"],[dA.layerName]:["getColor"],[u0.layerName]:["getColor"],[$h.layerName]:["getColor"],[h0.layerName]:["getColor"],[Vu.layerName]:["getFillColor"],[f0.layerName]:["getFillColor","getColor","getLineColor"],[zu.layerName]:["getFillColor"],[Zh.layerName]:["getColor"],[g0.layerName]:["getColor"],[zh.layerName]:["getColor"]},yAe=({object:t,objectInfo:e,originalFillFunction:r})=>{const i=typeof r=="function"?r(t,e):r;if(Array.isArray(i))return[i[0]||0,i[1]||0,i[2]||0,i[3]||255];if(typeof i=="string"&&i.startsWith("@@=")){const n=HF.convert({originalColor:i}).originalColor(t);return[n[0]||0,n[1]||0,n[2]||0,n[3]||255]}return null},NM=({isSelected:t,object:e,objectInfo:r,opacity:i,originalFillFunction:n})=>{const o=yAe({object:e,objectInfo:r,originalFillFunction:n});if(!o)return null;let s=0;return t?s=Math.max(typeof o[3]=="number"?o[3]:i,i):s=Math.min(typeof o[3]=="number"?o[3]:i,i),[o[0]||0,o[1]||0,o[2]||0,s]},vAe=({isSelected:t,object:e,objectInfo:r,originalFillFunction:i,selectedColor:n,selectedOpacity:o=255,unselectedColor:s,unselectedOpacity:f=Math.floor(255*.4)})=>t?NM({opacity:o,isSelected:!0,object:e,objectInfo:r,originalFillFunction:i})||n:NM({opacity:f,isSelected:!1,object:e,objectInfo:r,originalFillFunction:i})||s,r0={selection:{indices:{},objects:{}}},UM=(t,e)=>{const r=e.match(/{(.*?)}/g);return r&&r.forEach(i=>{const n=i.substring(1,i.length-1);t.object.hasOwnProperty(n)?e=e.replace(i,t.object[n]):t.object.hasOwnProperty("properties")&&t.object.properties.hasOwnProperty(n)&&(e=e.replace(i,t.object.properties[n]))}),e};function bAe(t,e){return e.id?t.getElementState(e.id,"selection")??r0:r0}function xAe(t,e){if(!e.id)return r0;const r=t.getStringValue(e);return(r?T1.parse(r):null)??r0}function wAe(t,e,r,i){t.id&&e.setStringValue(t,JSON.stringify(r.value),{fromUi:r.fromUi},i)}const TAe=t=>{var Le;const{height:e,width:r,expanded:i}=WM(XM),{element:n,fragmentId:o,isLightTheme:s,theme:f,widgetMgr:A}=t,{selectionMode:v,tooltip:w,useContainerWidth:C}=n,I=i??!1,[B,F]=LL({element:n,getDefaultState:bAe,getStateFromWidgetMgr:xAe,updateWidgetMgrState:wAe,widgetMgr:A,fragmentId:o}),[k,V]=it.useState({bearing:0,pitch:0,zoom:11}),{height:G,width:Y}=MJ({element:n,isFullScreen:I,shouldUseContainerWidth:C,container:{height:e,width:r},heightFallback:((Le=k.initialViewState)==null?void 0:Le.height)||f.sizes.defaultMapHeight}),[Z,se]=it.useState({}),ge=v[0],Ee=ge!==void 0,Ve=Ee&&Object.keys(B.selection.indices).length>0,Fe=it.useMemo(()=>Object.freeze(T1.parse(n.json)),[I,s,n.json]),pe=it.useMemo(()=>{const ze={...Fe};if(ze.mapStyle||(ze.mapStyle=`mapbox://styles/mapbox/${s?"light":"dark"}-v9`),ze.layers){const Xe=Object.values(B.selection.indices).some(Nt=>Nt==null?void 0:Nt.length),dt=ze.layers.some(Nt=>Object.hasOwn(Nt,"pickable"));ze.layers=ze.layers.map(Nt=>{var Ot,Qt;if(!Nt||Array.isArray(Nt)||!Ee)return Nt;dt||(Nt.pickable=!0);const gr=`${Nt.id||null}`,mr=((Qt=(Ot=B==null?void 0:B.selection)==null?void 0:Ot.indices)==null?void 0:Qt[gr])||[],_r=_Ae[Nt["@@type"]];if(!_r)return Nt;const rr={...Nt};return _r.forEach(qt=>{var dr;rr.updateTriggers={[qt]:[...((dr=rr.updateTriggers)==null?void 0:dr[qt])||[],mr,Xe]};const Rt=!Xe,ut=Nt[qt];if(Rt||!ut)return rr;const Vi=255,Sr=Math.floor(255*.4),Ur=cE(f.colors.primary),Dt=[Ur[0],Ur[1],Ur[2],Vi],$r=cE(f.colors.gray20),Pi=[$r[0],$r[1],$r[2],Sr],yi=(gn,oi)=>vAe({isSelected:mr.includes(oi.index),object:gn,objectInfo:oi,originalFillFunction:ut,selectedColor:Dt,unselectedColor:Pi,selectedOpacity:Vi,unselectedOpacity:Sr});rr[qt]=yi}),rr})}return ze==null||delete ze.views,HF.convert(ze)},[B.selection.indices,s,Ee,Fe,f.colors.gray20,f.colors.primary]);it.useEffect(()=>{if(!PL(pe.initialViewState,Z)){const ze=Object.keys(pe.initialViewState).reduce((Xe,dt)=>pe.initialViewState[dt]===Z[dt]?Xe:{...Xe,[dt]:pe.initialViewState[dt]},{});V({...k,...ze}),se(pe.initialViewState)}},[pe.initialViewState,Z,k]);const Te=it.useCallback(ze=>{if(!ze||!ze.object||!w)return null;const Xe=T1.parse(w);return Xe.html?Xe.html=UM(ze,Xe.html):Xe.text=UM(ze,Xe.text),Xe},[w]),Ae=it.useCallback(({viewState:ze})=>{V(ze)},[V]);return{createTooltip:Te,data:B,deck:pe,hasActiveSelection:Ve,height:G,isSelectionModeActivated:Ee,onViewStateChange:Ae,selectionMode:ge,setSelection:F,viewState:k,width:Y}};s0([hx,tA]);const x1=r0.selection,EAe=[],SAe=t=>{const{disabled:e,disableFullscreenMode:r,element:i,fragmentId:n,mapboxToken:o,widgetMgr:s}=t,{mapboxToken:f}=i,A=IL(),{expanded:v,expand:w,collapse:C}=WM(XM),{createTooltip:I,data:B,deck:F,hasActiveSelection:k,height:V,isSelectionModeActivated:G,onViewStateChange:Y,selectionMode:Z,setSelection:se,viewState:ge,width:Ee}=TAe({element:i,fragmentId:n,isLightTheme:GM(A),theme:A,widgetMgr:s}),[Ve,Fe]=it.useState(!1);it.useEffect(()=>{Fe(!0)},[]);const pe=it.useCallback(Ae=>{var _r;if(Z===void 0)return;const{index:Le,object:ze}=Ae,Xe=`${((_r=Ae.layer)==null?void 0:_r.id)||null}`,dt=B,Nt=Le===-1,mr=(()=>{var rr;if(Nt)return x1;switch(Z){case uE.SelectionMode.SINGLE_OBJECT:return((rr=dt.selection.indices[Xe])==null?void 0:rr[0])===Le?x1:{indices:{[`${Xe}`]:[Le]},objects:{[`${Xe}`]:[ze]}};case uE.SelectionMode.MULTI_OBJECT:{const Ot=new Map((()=>{var qt,Rt;return(((Rt=(qt=dt==null?void 0:dt.selection)==null?void 0:qt.indices)==null?void 0:Rt[Xe])||[]).map((ut,Vi)=>{var Sr,Ur,Dt;return[ut,(Dt=(Ur=(Sr=dt.selection)==null?void 0:Sr.objects)==null?void 0:Ur[Xe])==null?void 0:Dt[Vi]]})})());if(Ot.has(Le)?Ot.delete(Le):Ot.set(Le,ze),Ot.size===0){const{[Xe]:Qt,...qt}=dt.selection.indices,{[Xe]:Rt,...ut}=dt.selection.objects;return{indices:qt,objects:ut}}return{indices:{...dt.selection.indices,[`${Xe}`]:Array.from(Ot.keys())},objects:{...dt.selection.objects,[`${Xe}`]:Array.from(Ot.values())}}}default:throw ML(Z),new Error("Invalid selection mode")}})();JSON.stringify(mr)!==JSON.stringify(dt.selection)&&se({fromUi:!0,value:{selection:mr}})},[Z,B,se]),Te=it.useCallback(()=>{se({value:{selection:x1},fromUi:!0})},[se]);return Ll(E3,{className:"stDeckGlJsonChart","data-testid":"stDeckGlJsonChart",width:Ee,height:V,children:[ms(DL,{isFullScreen:v,disableFullscreenMode:r,onExpand:w,onCollapse:C,target:E3,locked:k&&!e?!0:void 0,children:k&&!e&&ms(OL,{label:"Clear selection",onClick:Te,icon:BL})}),Ll(SX,{viewState:ge,onViewStateChange:Y,height:V,width:Ee,layers:Ve?F.layers:EAe,getTooltip:I,ContextProvider:qh.Provider,controller:!0,onClick:G&&!e?pe:void 0,children:[ms(Fc,{height:V,width:Ee,mapStyle:F.mapStyle&&(typeof F.mapStyle=="string"?F.mapStyle:F.mapStyle[0]),mapboxApiAccessToken:f||o}),ms(IJ,{children:ms(nZ,{"data-testid":"stDeckGlJsonChartZoomButton",showCompass:!1})})]})]})},JAe=FL(PJ("st.pydeck_chart")(SAe));export{JAe as default};
|