UNPKG

@finos/perspective-viewer

Version:

The `<perspective-viewer>` Custom Element, frontend for Perspective.js

10 lines 65.4 kB
var M=(r=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(r,{get:(t,i)=>(typeof require!="undefined"?require:t)[i]}):r)(function(r){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Wn=(r=>typeof M!="undefined"?M:typeof Proxy!="undefined"?new Proxy(r,{get:(t,i)=>(typeof M!="undefined"?M:t)[i]}):r)(function(r){if(typeof M!="undefined")return M.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Ye=class extends HTMLElement{constructor(){super()}get name(){return"Debug"}get select_mode(){return"select"}get min_config_columns(){}get config_column_names(){}async update(r){return this.draw(r)}async draw(r){this.style.backgroundColor="#fff";let t=await r.to_csv(),i="margin:0;overflow:scroll;position:absolute;width:100%;height:100%";this.innerHTML=`<pre style='${i}'>${t}</pre>`}async clear(){this.innerHTML=""}async resize(){}async restyle(){}async save(){}async restore(){}async delete(){}};document.createElement("perspective-viewer-plugin").constructor===HTMLElement&&window.customElements.define("perspective-viewer-plugin",Ye);var bt=window.ClipboardItem,wt="./editor.worker.js";async function pt(){let r=new URL(wt,import.meta.url);return await(await fetch(r)).text()}function ze(r,t){function i(e,n){r.push(n)}function _(e){if(Object.keys(e).length>0)for(let n of t)n({data:e})}return{addEventListener:i,postMessage:_,location:{href:""}}}function Fe(r,t){console.error("Running perspective in single-threaded mode due to error initializing Web Worker:",t);let i=Function("const self = arguments[0];"+r),_=[],e=[];return i(ze(_,e)),ze(e,_)}var ht=pt(),vt=async function(){let r=await ht;if(window.location.protocol.startsWith("file"))return Fe(r,"file:// protocol does not support Web Workers");try{let t=new Blob([r],{type:"application/javascript"}),i=URL.createObjectURL(t);return new Worker(i,{type:"module"})}catch(t){return Fe(r,t)}};async function mt(){return await vt()}async function yt(){return await import("./edcore.main.js")}var Tt=window.ResizeObserver,d,We=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});We.decode();var Z=null;function G(){return(Z===null||Z.buffer!==d.memory.buffer)&&(Z=new Uint8Array(d.memory.buffer)),Z}function l(r,t){return We.decode(G().subarray(r,r+t))}var S=new Array(32).fill(void 0);S.push(void 0,null,!0,!1);var X=S.length;function c(r){X===S.length&&S.push(S.length+1);let t=X;return X=S[t],S[t]=r,t}function o(r){return S[r]}var y=0,Q=new TextEncoder("utf-8"),xt=typeof Q.encodeInto=="function"?function(r,t){return Q.encodeInto(r,t)}:function(r,t){let i=Q.encode(r);return t.set(i),{read:r.length,written:i.length}};function T(r,t,i){if(i===void 0){let s=Q.encode(r),u=t(s.length);return G().subarray(u,u+s.length).set(s),y=s.length,u}let _=r.length,e=t(_),n=G(),a=0;for(;a<_;a++){let s=r.charCodeAt(a);if(s>127)break;n[e+a]=s}if(a!==_){a!==0&&(r=r.slice(a)),e=i(e,_,_=a+r.length*3);let s=G().subarray(e+a,e+_);a+=xt(r,s).written}return y=a,e}var ee=null;function b(){return(ee===null||ee.buffer!==d.memory.buffer)&&(ee=new Int32Array(d.memory.buffer)),ee}function Dt(r){r<36||(S[r]=X,X=r)}function p(r){let t=o(r);return Dt(r),t}function w(r){return r==null}var te=null;function Et(){return(te===null||te.buffer!==d.memory.buffer)&&(te=new Float64Array(d.memory.buffer)),te}function ne(r,t,i,_){let e={a:r,b:t,cnt:1,dtor:i},n=(...a)=>{e.cnt++;try{return _(e.a,e.b,...a)}finally{--e.cnt==0&&(d.__wbindgen_export_2.get(e.dtor)(e.a,e.b),e.a=0)}};return n.original=e,n}function Ot(r,t,i){var _=d.__wbindgen_export_3(r,t,c(i));return p(_)}function St(r,t,i){d.__wbindgen_export_4(r,t,c(i))}function R(r,t,i,_){let e={a:r,b:t,cnt:1,dtor:i},n=(...a)=>{e.cnt++;let s=e.a;e.a=0;try{return _(s,e.b,...a)}finally{--e.cnt==0?d.__wbindgen_export_2.get(e.dtor)(s,e.b):e.a=s}};return n.original=e,n}function kt(r,t,i){d.__wbindgen_export_5(r,t,c(i))}function jt(r,t,i){d.__wbindgen_export_6(r,t,c(i))}function It(r,t,i){d.__wbindgen_export_7(r,t,c(i))}function Ct(r,t,i,_,e){var n=d.__wbindgen_export_8(r,t,c(i),c(_),c(e));return p(n)}function At(r,t){d.__wbindgen_export_9(r,t)}function Lt(r,t,i){var _=d.__wbindgen_export_10(r,t,c(i));return p(_)}var re=32;function Pt(r){if(re==1)throw new Error("out of js stack");return S[--re]=r,re}function Ht(r,t,i){try{d.__wbindgen_export_11(r,t,Pt(i))}finally{S[re++]=void 0}}function Nt(r,t){d.__wbindgen_export_12(r,t)}function Mt(r,t,i){d.__wbindgen_export_13(r,t,c(i))}function g(r,t){try{return r.apply(this,t)}catch(i){d.__wbindgen_export_14(c(i))}}function Rt(r){var t=T(r,d.__wbindgen_export_0,d.__wbindgen_export_1),i=y;d.register_plugin(t,i)}function Ut(r,t,i,_){d.__wbindgen_export_16(r,t,c(i),c(_))}var pe=class{static __wrap(r){let t=Object.create(pe.prototype);return t.ptr=r,t}__destroy_into_raw(){let r=this.ptr;return this.ptr=0,r}free(){let r=this.__destroy_into_raw();d.__wbg_perspectivenumbercolumnstyleelement_free(r)}constructor(r,t,i){var _=d.perspectivenumbercolumnstyleelement_new(c(r),c(t),c(i));return pe.__wrap(_)}reset(r,t){d.perspectivenumbercolumnstyleelement_reset(this.ptr,c(r),c(t))}open(r){d.perspectivenumbercolumnstyleelement_open(this.ptr,c(r))}close(){d.perspectivenumbercolumnstyleelement_close(this.ptr)}destroy(){let r=this.__destroy_into_raw();d.perspectivenumbercolumnstyleelement_destroy(r)}connected_callback(){d.perspectivenumbercolumnstyleelement_connected_callback(this.ptr)}},he=class{static __wrap(r){let t=Object.create(he.prototype);return t.ptr=r,t}__destroy_into_raw(){let r=this.ptr;return this.ptr=0,r}free(){let r=this.__destroy_into_raw();d.__wbg_perspectivestringcolumnstyleelement_free(r)}constructor(r,t,i){var _=d.perspectivestringcolumnstyleelement_new(c(r),c(t),c(i));return he.__wrap(_)}reset(r){d.perspectivestringcolumnstyleelement_reset(this.ptr,c(r))}open(r){d.perspectivestringcolumnstyleelement_open(this.ptr,c(r))}close(){d.perspectivestringcolumnstyleelement_close(this.ptr)}destroy(){let r=this.__destroy_into_raw();d.perspectivestringcolumnstyleelement_destroy(r)}connected_callback(){d.perspectivestringcolumnstyleelement_connected_callback(this.ptr)}},ve=class{static __wrap(r){let t=Object.create(ve.prototype);return t.ptr=r,t}__destroy_into_raw(){let r=this.ptr;return this.ptr=0,r}free(){let r=this.__destroy_into_raw();d.__wbg_perspectiveviewerelement_free(r)}constructor(r){var t=d.perspectiveviewerelement_new(c(r));return ve.__wrap(t)}connected_callback(){d.perspectiveviewerelement_connected_callback(this.ptr)}js_load(r){var t=d.perspectiveviewerelement_js_load(this.ptr,c(r));return p(t)}js_delete(){var r=d.perspectiveviewerelement_js_delete(this.ptr);return p(r)}js_get_view(){var r=d.perspectiveviewerelement_js_get_view(this.ptr);return p(r)}js_get_table(r){var t=d.perspectiveviewerelement_js_get_table(this.ptr,r);return p(t)}js_flush(){var r=d.perspectiveviewerelement_js_flush(this.ptr);return p(r)}js_restore(r){var t=d.perspectiveviewerelement_js_restore(this.ptr,c(r));return p(t)}js_save(r){var t=d.perspectiveviewerelement_js_save(this.ptr,c(r));return p(t)}js_download(r){var t=d.perspectiveviewerelement_js_download(this.ptr,r);return p(t)}js_copy(r){var t=d.perspectiveviewerelement_js_copy(this.ptr,r);return p(t)}js_reset(r){var t=d.perspectiveviewerelement_js_reset(this.ptr,c(r));return p(t)}js_resize(r){var t=d.perspectiveviewerelement_js_resize(this.ptr,r);return p(t)}js_set_auto_size(r){d.perspectiveviewerelement_js_set_auto_size(this.ptr,r)}js_get_edit_port(){var r=d.perspectiveviewerelement_js_get_edit_port(this.ptr);return r}js_restyle_element(){var r=d.perspectiveviewerelement_js_restyle_element(this.ptr);return p(r)}js_reset_themes(r){var t=d.perspectiveviewerelement_js_reset_themes(this.ptr,c(r));return p(t)}js_set_throttle(r){d.perspectiveviewerelement_js_set_throttle(this.ptr,!w(r),w(r)?0:r)}js_toggle_config(r){var t=d.perspectiveviewerelement_js_toggle_config(this.ptr,w(r)?16777215:r?1:0);return p(t)}js_get_all_plugins(){var r=d.perspectiveviewerelement_js_get_all_plugins(this.ptr);return p(r)}js_get_plugin(r){var t=w(r)?0:T(r,d.__wbindgen_export_0,d.__wbindgen_export_1),i=y,_=d.perspectiveviewerelement_js_get_plugin(this.ptr,t,i);return p(_)}};async function Yt(r,t){if(typeof Response=="function"&&r instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(r,t)}catch(_){if(r.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",_);else throw _}let i=await r.arrayBuffer();return await WebAssembly.instantiate(i,t)}else{let i=await WebAssembly.instantiate(r,t);return i instanceof WebAssembly.Instance?{instance:i,module:r}:i}}async function Be(r){typeof r=="undefined"&&(r=new URL("perspective_viewer_bg.wasm",import.meta.url));let t={};t.wbg={},t.wbg.__wbindgen_json_parse=function(e,n){var a=JSON.parse(l(e,n));return c(a)},t.wbg.__wbindgen_json_serialize=function(e,n){let a=o(n);var s=JSON.stringify(a===void 0?null:a),u=T(s,d.__wbindgen_export_0,d.__wbindgen_export_1),f=y;b()[e/4+1]=f,b()[e/4+0]=u},t.wbg.__wbindgen_object_clone_ref=function(e){var n=o(e);return c(n)},t.wbg.__wbindgen_object_drop_ref=function(e){p(e)},t.wbg.__wbindgen_number_new=function(e){var n=e;return c(n)},t.wbg.__wbindgen_jsval_eq=function(e,n){var a=o(e)===o(n);return a},t.wbg.__wbindgen_cb_drop=function(e){let n=p(e).original;if(n.cnt--==1)return n.a=0,!0;var a=!1;return a},t.wbg.__wbindgen_string_new=function(e,n){var a=l(e,n);return c(a)},t.wbg.__wbg_schema_ad095ebcdb4dd76f=function(){return g(function(e){var n=o(e).schema();return c(n)},arguments)},t.wbg.__wbg_numrows_dfd6ed430e0147ff=function(){return g(function(e){var n=o(e).num_rows();return c(n)},arguments)},t.wbg.__wbg_view_e3b1f5dab63015c7=function(){return g(function(e,n){var a=o(e).view(o(n));return c(a)},arguments)},t.wbg.__wbg_validateexpressions_eca5656ca2844419=function(){return g(function(e,n){var a=o(e).validate_expressions(p(n));return c(a)},arguments)},t.wbg.__wbg_toarrow_e23fb00f4ad5e9f8=function(){return g(function(e){var n=o(e).to_arrow();return c(n)},arguments)},t.wbg.__wbg_restore_f1fbc066c9637e24=function(e,n){o(e).restore(o(n))},t.wbg.__wbg_resize_8a11e82f499e6d89=function(){return g(function(e){var n=o(e).resize();return c(n)},arguments)},t.wbg.__wbg_size_ea3857b7b9c01a01=function(){return g(function(e){var n=o(e).size();return c(n)},arguments)},t.wbg.__wbg_monacomodule_9d24db234e2e1549=function(){var e=yt();return c(e)},t.wbg.__wbg_schema_b1cd087318fe451d=function(){return g(function(e){var n=o(e).schema();return c(n)},arguments)},t.wbg.__wbg_draw_f7001e36a5451367=function(){return g(function(e,n,a,s,u,f,m){var x=o(e).draw(o(n),a===0?void 0:s>>>0,u===0?void 0:f>>>0,m!==0);return c(x)},arguments)},t.wbg.__wbg_delete_cd3c8d59be8fee68=function(){return g(function(e){var n=o(e).delete();return c(n)},arguments)},t.wbg.__wbg_update_b0b2df3342b63ce2=function(){return g(function(e,n,a,s,u,f,m){var x=o(e).update(o(n),a===0?void 0:s>>>0,u===0?void 0:f>>>0,m!==0);return c(x)},arguments)},t.wbg.__wbg_restyle_d98bfa634bd438a3=function(){return g(function(e,n){var a=o(e).restyle(o(n));return c(a)},arguments)},t.wbg.__wbg_numcolumns_6a8d86bb12e88692=function(){return g(function(e){var n=o(e).num_columns();return c(n)},arguments)},t.wbg.__wbg_default_3edfeada4cfc405b=function(){var e=mt();return c(e)},t.wbg.__wbg_tocolumns_d45b3454003d346b=function(){return g(function(e){var n=o(e).to_columns();return c(n)},arguments)},t.wbg.__wbg_makeport_8c752476acd3fe27=function(){return g(function(e){var n=o(e).make_port();return c(n)},arguments)},t.wbg.__wbg_register_1a0bbab9f7619662=function(e,n){o(e).register(p(n))},t.wbg.__wbg_setMonarchTokensProvider_1fa51a80d68f1ac1=function(e,n,a,s){o(e).setMonarchTokensProvider(l(n,a),p(s))},t.wbg.__wbg_setLanguageConfiguration_d6c86e31029d9ef5=function(e,n,a,s){o(e).setLanguageConfiguration(l(n,a),p(s))},t.wbg.__wbg_registerCompletionItemProvider_61ecf83f366d2e16=function(e,n,a,s){o(e).registerCompletionItemProvider(l(n,a),p(s))},t.wbg.__wbg_tocsv_2ec429ab1e0bb451=function(){return g(function(e,n){var a=o(e).to_csv(p(n));return c(a)},arguments)},t.wbg.__wbg_columns_b15d8d6c4a353055=function(){return g(function(e){var n=o(e).columns();return c(n)},arguments)},t.wbg.__wbindgen_is_null=function(e){var n=o(e)===null;return n},t.wbg.__wbg_lineNumber_6b2a1c0159871238=function(e){var n=o(e).lineNumber;return n},t.wbg.__wbg_column_885264f87b0a4a0b=function(e){var n=o(e).column;return n},t.wbg.__wbg_findTokenIndexAtOffset_847b202bf8c16c65=function(e,n){var a=o(e).findTokenIndexAtOffset(n>>>0);return a},t.wbg.__wbg_getClassName_5bc865fe97705383=function(e,n){var a=o(e).getClassName(n>>>0);return c(a)},t.wbg.__wbg_triggerKind_9e780becc9ed4ce7=function(e){var n=o(e).triggerKind;return n},t.wbg.__wbg_delete_55c2b041a4419d5d=function(e){o(e).delete()},t.wbg.__wbg_setrenderwarning_2b6ccbc5a0b49b4f=function(e,n){o(e).render_warning=n!==0},t.wbg.__wbindgen_is_undefined=function(e){var n=o(e)===void 0;return n},t.wbg.__wbg_new_fa9aa30b261aba73=function(e){var n=new bt(o(e));return c(n)},t.wbg.__wbg_editor_91084c85a69a3fde=function(e){var n=o(e).editor;return c(n)},t.wbg.__wbg_languages_aca44d3eda97078c=function(e){var n=o(e).languages;return c(n)},t.wbg.__wbg_create_806f286d290f99c8=function(e,n,a){var s=o(e).create(p(n),p(a));return c(s)},t.wbg.__wbg_defineTheme_c4f18cdd46a4014d=function(e,n,a,s){o(e).defineTheme(l(n,a),p(s))},t.wbg.__wbg_setTheme_7cb365ba1d2ad549=function(e,n,a){o(e).setTheme(l(n,a))},t.wbg.__wbg_setModelMarkers_f49dfc56a0816242=function(e,n,a,s,u){o(e).setModelMarkers(o(n),l(a,s),o(u))},t.wbg.__wbg_layout_901473f7828d2488=function(e,n){o(e).layout(o(n))},t.wbg.__wbg_getModel_4ba1a741bc1eaaff=function(e){var n=o(e).getModel();return c(n)},t.wbg.__wbg_getValue_e8d4002de327ab32=function(e){var n=o(e).getValue();return c(n)},t.wbg.__wbg_setValue_464f1cd5da0d99d4=function(e,n,a){o(e).setValue(l(n,a))},t.wbg.__wbg_setPosition_53889da2861e22f4=function(e,n){o(e).setPosition(o(n))},t.wbg.__wbg_addCommand_0087418877d24153=function(e,n,a){o(e).addCommand(n>>>0,o(a))},t.wbg.__wbg_focus_d1521065885d8ced=function(e){o(e).focus()},t.wbg.__wbg_onDidChangeContent_333bdbf90ce64b26=function(e,n){o(e).onDidChangeContent(o(n))},t.wbg.__wbg_getLineTokens_6c81bc0a3f533604=function(e,n){var a=o(e).getLineTokens(n>>>0);return c(a)},t.wbg.__wbg_onupdate_b8cf42908fc20235=function(e,n){o(e).on_update(o(n))},t.wbg.__wbg_removeupdate_77fe2a7740d00e48=function(e,n){o(e).remove_update(o(n))},t.wbg.__wbg_errors_20c512f8dca36c8d=function(e){var n=o(e).errors;return c(n)},t.wbg.__wbg_expressionschema_7a07dfdf1c19fa1f=function(e){var n=o(e).expression_schema;return c(n)},t.wbg.__wbg_expressionalias_c0691678ddeeed2e=function(e){var n=o(e).expression_alias;return c(n)},t.wbg.__wbg_name_4e59ce156796a1db=function(e,n){var a=o(n).name,s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_maxcolumns_41c0acb329b63f5a=function(e,n){var a=o(n).max_columns;b()[e/4+1]=w(a)?0:a,b()[e/4+0]=!w(a)},t.wbg.__wbg_maxcells_240ed21a2cc23a45=function(e,n){var a=o(n).max_cells;b()[e/4+1]=w(a)?0:a,b()[e/4+0]=!w(a)},t.wbg.__wbg_renderwarning_28b6ae4b73e78f68=function(e){var n=o(e).render_warning;return w(n)?16777215:n?1:0},t.wbg.__wbg_selectmode_2d072add5bfb5e92=function(e){var n=o(e).select_mode;return c(n)},t.wbg.__wbg_minconfigcolumns_fc8660538ce7232d=function(e,n){var a=o(n).min_config_columns;b()[e/4+1]=w(a)?0:a,b()[e/4+0]=!w(a)},t.wbg.__wbg_configcolumnnames_1a26628997420d20=function(e){var n=o(e).config_column_names;return w(n)?0:c(n)},t.wbg.__wbg_save_5742b4ec09ae0d34=function(e){var n=o(e).save();return c(n)},t.wbg.__wbg_new_fcda59553629199d=function(e){var n=new Tt(o(e));return c(n)},t.wbg.__wbg_observe_86c9286ddb2080e3=function(e,n){o(e).observe(o(n))},t.wbg.__wbg_unobserve_6d276eada6182ea1=function(e,n){o(e).unobserve(o(n))},t.wbg.__wbg_contentRect_3f8cd97f6e2969a6=function(e){var n=o(e).contentRect;return c(n)},t.wbg.__wbg_new_693216e109162396=function(){var e=new Error;return c(e)},t.wbg.__wbg_stack_0ddaca5d1abfb52f=function(e,n){var a=o(n).stack,s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_error_09919627ac0992f5=function(e,n){try{console.error(l(e,n))}finally{d.__wbindgen_export_15(e,n)}},t.wbg.__wbg_newwithu8arraysequence_fdc7895dacd60d21=function(){return g(function(e){var n=new Blob(o(e));return c(n)},arguments)},t.wbg.__wbg_newwithu8arraysequenceandoptions_9700a6fba963cc66=function(){return g(function(e,n){var a=new Blob(o(e),o(n));return c(a)},arguments)},t.wbg.__wbg_newwithstrsequenceandoptions_becd1cf522768c06=function(){return g(function(e,n){var a=new Blob(o(e),o(n));return c(a)},arguments)},t.wbg.__wbg_write_10adfe8afa301d18=function(e,n){var a=o(e).write(o(n));return c(a)},t.wbg.__wbg_length_294c22a18ede524b=function(e){var n=o(e).length;return n},t.wbg.__wbg_item_8eca8b8cdf63f525=function(e,n){var a=o(e).item(n>>>0);return w(a)?0:c(a)},t.wbg.__wbg_length_d2057dfdd5fdecf4=function(e){var n=o(e).length;return n},t.wbg.__wbg_getPropertyValue_937a708feb88202f=function(){return g(function(e,n,a,s){var u=o(n).getPropertyValue(l(a,s)),f=T(u,d.__wbindgen_export_0,d.__wbindgen_export_1),m=y;b()[e/4+1]=m,b()[e/4+0]=f},arguments)},t.wbg.__wbg_item_dfcc92ceae8b4304=function(e,n,a){var s=o(n).item(a>>>0),u=T(s,d.__wbindgen_export_0,d.__wbindgen_export_1),f=y;b()[e/4+1]=f,b()[e/4+0]=u},t.wbg.__wbg_setProperty_dccccce3a52c26db=function(){return g(function(e,n,a,s,u){o(e).setProperty(l(n,a),l(s,u))},arguments)},t.wbg.__wbg_instanceof_CssStyleRule_e93e1152e50f8d9b=function(e){var n=o(e)instanceof CSSStyleRule;return n},t.wbg.__wbg_selectorText_56b42d9cf7c91aa1=function(e,n){var a=o(n).selectorText,s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_style_dbd768c92c03ab2c=function(e){var n=o(e).style;return c(n)},t.wbg.__wbg_cssRules_b1206f989651c44d=function(){return g(function(e){var n=o(e).cssRules;return c(n)},arguments)},t.wbg.__wbg_new_3af016a292a0ea38=function(){return g(function(e,n){var a=new CustomEvent(l(e,n));return c(a)},arguments)},t.wbg.__wbg_newwitheventinitdict_183544aa2c542424=function(){return g(function(e,n,a){var s=new CustomEvent(l(e,n),o(a));return c(s)},arguments)},t.wbg.__wbg_setDragImage_97e7f5b52f6e9f92=function(e,n,a,s){o(e).setDragImage(o(n),a,s)},t.wbg.__wbg_readyState_be8f2b804adc7ff6=function(e,n){var a=o(n).readyState,s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_body_525168d9e773c3f8=function(e){var n=o(e).body;return w(n)?0:c(n)},t.wbg.__wbg_styleSheets_a23fea89b8b91939=function(e){var n=o(e).styleSheets;return c(n)},t.wbg.__wbg_fonts_62f407546d8daeb4=function(e){var n=o(e).fonts;return c(n)},t.wbg.__wbg_createElement_ac65a6ce60c4812c=function(){return g(function(e,n,a){var s=o(e).createElement(l(n,a));return c(s)},arguments)},t.wbg.__wbg_createElementNS_267edeea0c97331c=function(){return g(function(e,n,a,s,u){var f=o(e).createElementNS(n===0?void 0:l(n,a),l(s,u));return c(f)},arguments)},t.wbg.__wbg_createTextNode_442392ad92e75695=function(e,n,a){var s=o(e).createTextNode(l(n,a));return c(s)},t.wbg.__wbg_width_a04d387a0e0ffe94=function(e){var n=o(e).width;return n},t.wbg.__wbg_height_f7c5c956730ab37a=function(e){var n=o(e).height;return n},t.wbg.__wbg_width_4a83a800a544b73a=function(e){var n=o(e).width;return n},t.wbg.__wbg_height_76d64c7ff32eb400=function(e){var n=o(e).height;return n},t.wbg.__wbg_top_22e7024d271b5677=function(e){var n=o(e).top;return n},t.wbg.__wbg_left_f2f24ba3851b8295=function(e){var n=o(e).left;return n},t.wbg.__wbg_get_dc5a3f4246f4363e=function(e,n,a,s){var u=o(n)[l(a,s)],f=w(u)?0:T(u,d.__wbindgen_export_0,d.__wbindgen_export_1),m=y;b()[e/4+1]=m,b()[e/4+0]=f},t.wbg.__wbg_set_6bc5ebabff049b08=function(){return g(function(e,n,a,s,u){o(e)[l(n,a)]=l(s,u)},arguments)},t.wbg.__wbg_delete_bdb7962606ab7ffc=function(e,n,a){delete o(e)[l(n,a)]},t.wbg.__wbg_add_3b4cecc512643e9f=function(){return g(function(e,n,a){o(e).add(l(n,a))},arguments)},t.wbg.__wbg_remove_c15603553c81dc31=function(){return g(function(e,n,a){o(e).remove(l(n,a))},arguments)},t.wbg.__wbg_dataTransfer_7916d51ea966dcb4=function(e){var n=o(e).dataTransfer;return w(n)?0:c(n)},t.wbg.__wbg_instanceof_Element_8143882371652178=function(e){var n=o(e)instanceof Element;return n},t.wbg.__wbg_namespaceURI_f65a7a956acf4bc5=function(e,n){var a=o(n).namespaceURI,s=w(a)?0:T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_classList_bbb57a7d3cc23c85=function(e){var n=o(e).classList;return c(n)},t.wbg.__wbg_scrollTop_03d79a099b9a21e7=function(e){var n=o(e).scrollTop;return n},t.wbg.__wbg_setscrollTop_b9abc042a6938811=function(e,n){o(e).scrollTop=n},t.wbg.__wbg_clientWidth_acc83939b1545b91=function(e){var n=o(e).clientWidth;return n},t.wbg.__wbg_clientHeight_95c707ac8248c652=function(e){var n=o(e).clientHeight;return n},t.wbg.__wbg_children_283b5c3c4312d771=function(e){var n=o(e).children;return c(n)},t.wbg.__wbg_attachShadow_f0d8083616f120aa=function(){return g(function(e,n){var a=o(e).attachShadow(o(n));return c(a)},arguments)},t.wbg.__wbg_getAttribute_0754c52f6bcda842=function(e,n,a,s){var u=o(n).getAttribute(l(a,s)),f=w(u)?0:T(u,d.__wbindgen_export_0,d.__wbindgen_export_1),m=y;b()[e/4+1]=m,b()[e/4+0]=f},t.wbg.__wbg_getBoundingClientRect_dbd899b7c945c55d=function(e){var n=o(e).getBoundingClientRect();return c(n)},t.wbg.__wbg_hasAttribute_4c5fc91198e862c3=function(e,n,a){var s=o(e).hasAttribute(l(n,a));return s},t.wbg.__wbg_matches_7e22d2c3664b9d8d=function(){return g(function(e,n,a){var s=o(e).matches(l(n,a));return s},arguments)},t.wbg.__wbg_removeAttribute_16e5bf3866aa53e8=function(){return g(function(e,n,a){o(e).removeAttribute(l(n,a))},arguments)},t.wbg.__wbg_setAttribute_27ca65e30a1c3c4a=function(){return g(function(e,n,a,s,u){o(e).setAttribute(l(n,a),l(s,u))},arguments)},t.wbg.__wbg_toggleAttribute_8cf952af952c2cc5=function(){return g(function(e,n,a,s){var u=o(e).toggleAttribute(l(n,a),s!==0);return u},arguments)},t.wbg.__wbg_target_2dfa485f32a6d005=function(e){var n=o(e).target;return w(n)?0:c(n)},t.wbg.__wbg_currentTarget_6b97d12fe7054dd4=function(e){var n=o(e).currentTarget;return w(n)?0:c(n)},t.wbg.__wbg_preventDefault_7c4d18eb2bb1a26a=function(e){o(e).preventDefault()},t.wbg.__wbg_stopPropagation_11ccdc30c46ad19a=function(e){o(e).stopPropagation()},t.wbg.__wbg_addEventListener_936431894dca4639=function(){return g(function(e,n,a,s){o(e).addEventListener(l(n,a),o(s))},arguments)},t.wbg.__wbg_addEventListener_6d9a78a5d277bdaf=function(){return g(function(e,n,a,s,u){o(e).addEventListener(l(n,a),o(s),o(u))},arguments)},t.wbg.__wbg_dispatchEvent_bacbc3eeb0d17fcd=function(){return g(function(e,n){var a=o(e).dispatchEvent(o(n));return a},arguments)},t.wbg.__wbg_removeEventListener_6e1e9e37bdc74923=function(){return g(function(e,n,a,s){o(e).removeEventListener(l(n,a),o(s))},arguments)},t.wbg.__wbg_removeEventListener_09c628abeb1c283b=function(){return g(function(e,n,a,s,u){o(e).removeEventListener(l(n,a),o(s),u!==0)},arguments)},t.wbg.__wbg_instanceof_FontFace_095633da5a60e4d1=function(e){var n=o(e)instanceof FontFace;return n},t.wbg.__wbg_family_8b33871beb47388b=function(e,n){var a=o(n).family,s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_weight_cb1f0ded9c3fcd29=function(e,n){var a=o(n).weight,s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_loaded_b07b4ee5c31f9abc=function(){return g(function(e){var n=o(e).loaded;return c(n)},arguments)},t.wbg.__wbg_values_705706cce046e96c=function(e){var n=o(e).values();return c(n)},t.wbg.__wbg_next_c7f69285044a0543=function(){return g(function(e){var n=o(e).next();return c(n)},arguments)},t.wbg.__wbg_item_5a5f92bba46832d3=function(e,n){var a=o(e).item(n>>>0);return w(a)?0:c(a)},t.wbg.__wbg_dataset_7f3bc0a0cd4f7382=function(e){var n=o(e).dataset;return c(n)},t.wbg.__wbg_style_25309daade79abb3=function(e){var n=o(e).style;return c(n)},t.wbg.__wbg_offsetParent_21a2a48c194cfe05=function(e){var n=o(e).offsetParent;return w(n)?0:c(n)},t.wbg.__wbg_offsetWidth_7dd96a3df070d552=function(e){var n=o(e).offsetWidth;return n},t.wbg.__wbg_offsetHeight_fe07e4498698e768=function(e){var n=o(e).offsetHeight;return n},t.wbg.__wbg_blur_b336d41728268f5a=function(){return g(function(e){o(e).blur()},arguments)},t.wbg.__wbg_click_a22518ab89bfd9b8=function(e){o(e).click()},t.wbg.__wbg_focus_2fac919cca20d33b=function(){return g(function(e){o(e).focus()},arguments)},t.wbg.__wbg_checked_dc000202a8fa9328=function(e){var n=o(e).checked;return n},t.wbg.__wbg_setchecked_dc7daac77dc0e73e=function(e,n){o(e).checked=n!==0},t.wbg.__wbg_value_f4c762446c572119=function(e,n){var a=o(n).value,s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_setvalue_65a652cfd99c8a4a=function(e,n,a){o(e).value=l(n,a)},t.wbg.__wbg_value_265001c20fda4531=function(e,n){var a=o(n).value,s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_setvalue_a46eeb72562081c1=function(e,n,a){o(e).value=l(n,a)},t.wbg.__wbg_value_d8dfe9a459c6ea2a=function(e,n){var a=o(n).value,s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},t.wbg.__wbg_setvalue_b1b2f2945b1cb6ef=function(e,n,a){o(e).value=l(n,a)},t.wbg.__wbg_keyCode_218ac9c01e06b3d5=function(e){var n=o(e).keyCode;return n},t.wbg.__wbg_clientX_5bbce6c078e1510e=function(e){var n=o(e).clientX;return n},t.wbg.__wbg_clientY_af6c4369507b54f0=function(e){var n=o(e).clientY;return n},t.wbg.__wbg_shiftKey_257c3f6b1ca35555=function(e){var n=o(e).shiftKey;return n},t.wbg.__wbg_relatedTarget_c63203073e65b8de=function(e){var n=o(e).relatedTarget;return w(n)?0:c(n)},t.wbg.__wbg_clipboard_a304e2b83d0400c6=function(e){var n=o(e).clipboard;return c(n)},t.wbg.__wbg_isConnected_021a4fb42a3d7537=function(e){var n=o(e).isConnected;return n},t.wbg.__wbg_parentNode_e1dd029be06cee39=function(e){var n=o(e).parentNode;return w(n)?0:c(n)},t.wbg.__wbg_lastChild_60bd092ff114802e=function(e){var n=o(e).lastChild;return w(n)?0:c(n)},t.wbg.__wbg_setnodeValue_ef88f21c4f2101f5=function(e,n,a){o(e).nodeValue=n===0?void 0:l(n,a)},t.wbg.__wbg_appendChild_6ed236bb79c198df=function(){return g(function(e,n){var a=o(e).appendChild(o(n));return c(a)},arguments)},t.wbg.__wbg_contains_11705db278357c60=function(e,n){var a=o(e).contains(o(n));return a},t.wbg.__wbg_insertBefore_7159f24556965e30=function(){return g(function(e,n,a){var s=o(e).insertBefore(o(n),o(a));return c(s)},arguments)},t.wbg.__wbg_removeChild_f633f19eb895b696=function(){return g(function(e,n){var a=o(e).removeChild(o(n));return c(a)},arguments)},t.wbg.__wbg_now_44a034aa2e1d73dd=function(e){var n=o(e).now();return n},t.wbg.__wbg_instanceof_ShadowRoot_17fc69013b5c44c6=function(e){var n=o(e)instanceof ShadowRoot;return n},t.wbg.__wbg_host_786667ae381479f7=function(e){var n=o(e).host;return c(n)},t.wbg.__wbg_length_568451d1cca15a65=function(e){var n=o(e).length;return n},t.wbg.__wbg_item_48316bfa2c39d796=function(e,n){var a=o(e).item(n>>>0);return w(a)?0:c(a)},t.wbg.__wbg_createObjectURL_a97d76bcc0a4968c=function(){return g(function(e,n){var a=URL.createObjectURL(o(n)),s=T(a,d.__wbindgen_export_0,d.__wbindgen_export_1),u=y;b()[e/4+1]=u,b()[e/4+0]=s},arguments)},t.wbg.__wbg_instanceof_Window_11e25482011fc506=function(e){var n=o(e)instanceof Window;return n},t.wbg.__wbg_document_5aff8cd83ef968f5=function(e){var n=o(e).document;return w(n)?0:c(n)},t.wbg.__wbg_navigator_5c90643c2a2b6cda=function(e){var n=o(e).navigator;return c(n)},t.wbg.__wbg_innerWidth_8c5001da2fdd6a9e=function(){return g(function(e){var n=o(e).innerWidth;return c(n)},arguments)},t.wbg.__wbg_innerHeight_03d3f1d9eb5f7034=function(){return g(function(e){var n=o(e).innerHeight;return c(n)},arguments)},t.wbg.__wbg_performance_9d1ecf711183e1d5=function(e){var n=o(e).performance;return w(n)?0:c(n)},t.wbg.__wbg_getComputedStyle_344a4d9212ebf966=function(){return g(function(e,n){var a=o(e).getComputedStyle(o(n));return w(a)?0:c(a)},arguments)},t.wbg.__wbg_requestAnimationFrame_1fb079d39e1b8a26=function(){return g(function(e,n){var a=o(e).requestAnimationFrame(o(n));return a},arguments)},t.wbg.__wbg_setTimeout_ce28a603906ebcbb=function(){return g(function(e,n,a){var s=o(e).setTimeout(o(n),a);return s},arguments)},t.wbg.__wbg_error_d95afd6217cfd219=function(e){console.error(o(e))},t.wbg.__wbg_error_0147c5cf9d9745cf=function(e,n,a){console.error(o(e),o(n),o(a))},t.wbg.__wbg_warn_b39e749f1dc02058=function(e){console.warn(o(e))},t.wbg.__wbg_self_bb69a836a72ec6e9=function(){return g(function(){var e=self.self;return c(e)},arguments)},t.wbg.__wbg_window_3304fc4b414c9693=function(){return g(function(){var e=window.window;return c(e)},arguments)},t.wbg.__wbg_globalThis_e0d21cabc6630763=function(){return g(function(){var e=globalThis.globalThis;return c(e)},arguments)},t.wbg.__wbg_global_8463719227271676=function(){return g(function(){var e=global.global;return c(e)},arguments)},t.wbg.__wbg_newnoargs_9fdd8f3961dd1bee=function(e,n){var a=new Function(l(e,n));return c(a)},t.wbg.__wbg_new_515b65a8e7699d00=function(){var e=new Array;return c(e)},t.wbg.__wbg_get_b7bbf50adcc94294=function(e,n){var a=o(e)[n>>>0];return c(a)},t.wbg.__wbg_length_555f836564bf148d=function(e){var n=o(e).length;return n},t.wbg.__wbg_push_b7f68478f81d358b=function(e,n){var a=o(e).push(o(n));return a},t.wbg.__wbg_instanceof_ArrayBuffer_1ae2a91a8421001f=function(e){var n=o(e)instanceof ArrayBuffer;return n},t.wbg.__wbg_slice_3563f88f39165260=function(e,n,a){var s=o(e).slice(n>>>0,a>>>0);return c(s)},t.wbg.__wbg_instanceof_Error_2ef86611e2afab04=function(e){var n=o(e)instanceof Error;return n},t.wbg.__wbg_message_e440fbd911a845a2=function(e){var n=o(e).message;return c(n)},t.wbg.__wbg_call_ba36642bd901572b=function(){return g(function(e,n){var a=o(e).call(o(n));return c(a)},arguments)},t.wbg.__wbg_call_3fc07b7d5fc9022d=function(){return g(function(e,n,a){var s=o(e).call(o(n),o(a));return c(s)},arguments)},t.wbg.__wbg_getTimezoneOffset_baab8599eeb15f06=function(e){var n=o(e).getTimezoneOffset();return n},t.wbg.__wbg_new_f994c74215dcdb52=function(e){var n=new Date(o(e));return c(n)},t.wbg.__wbg_is_a973b4c0e9019083=function(e,n){var a=Object.is(o(e),o(n));return a},t.wbg.__wbg_keys_a56f3f1587eb77e9=function(e){var n=Object.keys(o(e));return c(n)},t.wbg.__wbg_new_edbe38a4e21329dd=function(){var e=new Object;return c(e)},t.wbg.__wbg_get_800098c980b31ea2=function(){return g(function(e,n){var a=Reflect.get(o(e),o(n));return c(a)},arguments)},t.wbg.__wbg_has_9fa0c068863afd36=function(){return g(function(e,n){var a=Reflect.has(o(e),o(n));return a},arguments)},t.wbg.__wbg_set_73349fc4814e0fc6=function(){return g(function(e,n,a){var s=Reflect.set(o(e),o(n),o(a));return s},arguments)},t.wbg.__wbg_buffer_9e184d6f785de5ed=function(e){var n=o(e).buffer;return c(n)},t.wbg.__wbg_stringify_08a99e601b91c4a7=function(){return g(function(e){var n=JSON.stringify(o(e));return c(n)},arguments)},t.wbg.__wbg_instanceof_Promise_b2dc9a259c6bc079=function(e){var n=o(e)instanceof Promise;return n},t.wbg.__wbg_new_c143a4f563f78c4e=function(e,n){try{var a={a:e,b:n},s=(f,m)=>{let x=a.a;a.a=0;try{return Ut(x,a.b,f,m)}finally{a.a=x}},u=new Promise(s);return c(u)}finally{a.a=a.b=0}},t.wbg.__wbg_resolve_cae3d8f752f5db88=function(e){var n=Promise.resolve(o(e));return c(n)},t.wbg.__wbg_then_c2361a9d5c9a4fcb=function(e,n){var a=o(e).then(o(n));return c(a)},t.wbg.__wbg_then_6c9a4bf55755f9b8=function(e,n,a){var s=o(e).then(o(n),o(a));return c(s)},t.wbg.__wbg_newwithbyteoffsetandlength_e57ad1f2ce812c03=function(e,n,a){var s=new Uint8Array(o(e),n>>>0,a>>>0);return c(s)},t.wbg.__wbg_new_e8101319e4cf95fc=function(e){var n=new Uint8Array(o(e));return c(n)},t.wbg.__wbg_buffer_1c5918a4ab656ff7=function(e){var n=o(e).buffer;return c(n)},t.wbg.__wbg_length_2d56cb37075fcfb1=function(e){var n=o(e).length;return n},t.wbg.__wbg_byteLength_e0515bc94cfc5dee=function(e){var n=o(e).byteLength;return n},t.wbg.__wbg_byteOffset_77eec84716a2e737=function(e){var n=o(e).byteOffset;return n},t.wbg.__wbg_set_e8ae7b27314e8b98=function(e,n,a){o(e).set(o(n),a>>>0)},t.wbg.__wbindgen_number_get=function(e,n){let a=o(n);var s=typeof a=="number"?a:void 0;Et()[e/8+1]=w(s)?0:s,b()[e/4+0]=!w(s)},t.wbg.__wbindgen_is_string=function(e){var n=typeof o(e)=="string";return n},t.wbg.__wbindgen_string_get=function(e,n){let a=o(n);var s=typeof a=="string"?a:void 0,u=w(s)?0:T(s,d.__wbindgen_export_0,d.__wbindgen_export_1),f=y;b()[e/4+1]=f,b()[e/4+0]=u},t.wbg.__wbindgen_boolean_get=function(e){let n=o(e);var a=typeof n=="boolean"?n?1:0:2;return a},t.wbg.__wbindgen_throw=function(e,n){throw new Error(l(e,n))},t.wbg.__wbindgen_rethrow=function(e){throw p(e)},t.wbg.__wbindgen_memory=function(){var e=d.memory;return c(e)},t.wbg.__wbindgen_closure_wrapper3036=function(e,n,a){var s=ne(e,n,34,Ot);return c(s)},t.wbg.__wbindgen_closure_wrapper3038=function(e,n,a){var s=ne(e,n,30,St);return c(s)},t.wbg.__wbindgen_closure_wrapper3040=function(e,n,a){var s=R(e,n,38,kt);return c(s)},t.wbg.__wbindgen_closure_wrapper3042=function(e,n,a){var s=ne(e,n,44,jt);return c(s)},t.wbg.__wbindgen_closure_wrapper3044=function(e,n,a){var s=R(e,n,36,It);return c(s)},t.wbg.__wbindgen_closure_wrapper3046=function(e,n,a){var s=ne(e,n,42,Ct);return c(s)},t.wbg.__wbindgen_closure_wrapper3048=function(e,n,a){var s=R(e,n,40,At);return c(s)},t.wbg.__wbindgen_closure_wrapper3050=function(e,n,a){var s=R(e,n,32,Lt);return c(s)},t.wbg.__wbindgen_closure_wrapper9351=function(e,n,a){var s=R(e,n,1687,Ht);return c(s)},t.wbg.__wbindgen_closure_wrapper9927=function(e,n,a){var s=R(e,n,1755,Nt);return c(s)},t.wbg.__wbindgen_closure_wrapper12625=function(e,n,a){var s=R(e,n,1767,Mt);return c(s)},(typeof r=="string"||typeof Request=="function"&&r instanceof Request||typeof URL=="function"&&r instanceof URL)&&(r=fetch(r));let{instance:i,module:_}=await Yt(await r,t);return d=i.exports,Be.__wbindgen_wasm_module=_,d}var zt=Be,D=Uint8Array,L=Uint16Array,me=Uint32Array,Xe=new D([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),$e=new D([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ft=new D([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),qe=function(r,t){for(var i=new L(31),_=0;_<31;++_)i[_]=t+=1<<r[_-1];for(var e=new me(i[30]),_=1;_<30;++_)for(var n=i[_];n<i[_+1];++n)e[n]=n-i[_]<<5|_;return[i,e]},Ve=qe(Xe,2),Je=Ve[0],Wt=Ve[1];Je[28]=258,Wt[258]=28;var Ke=qe($e,0),Bt=Ke[0],$n=Ke[1],ye=new L(32768);for(h=0;h<32768;++h)I=(h&43690)>>>1|(h&21845)<<1,I=(I&52428)>>>2|(I&13107)<<2,I=(I&61680)>>>4|(I&3855)<<4,ye[h]=((I&65280)>>>8|(I&255)<<8)>>>1;var I,h,$=function(r,t,i){for(var _=r.length,e=0,n=new L(t);e<_;++e)r[e]&&++n[r[e]-1];var a=new L(t);for(e=0;e<t;++e)a[e]=a[e-1]+n[e-1]<<1;var s;if(i){s=new L(1<<t);var u=15-t;for(e=0;e<_;++e)if(r[e])for(var f=e<<4|r[e],m=t-r[e],x=a[r[e]-1]++<<m,N=x|(1<<m)-1;x<=N;++x)s[ye[x]>>>u]=f}else for(s=new L(_),e=0;e<_;++e)r[e]&&(s[e]=ye[a[r[e]-1]++]>>>15-r[e]);return s},q=new D(288);for(h=0;h<144;++h)q[h]=8;var h;for(h=144;h<256;++h)q[h]=9;var h;for(h=256;h<280;++h)q[h]=7;var h;for(h=280;h<288;++h)q[h]=8;var h,Ze=new D(32);for(h=0;h<32;++h)Ze[h]=5;var h,Xt=$(q,9,1),$t=$(Ze,5,1),Te=function(r){for(var t=r[0],i=1;i<r.length;++i)r[i]>t&&(t=r[i]);return t},k=function(r,t,i){var _=t/8|0;return(r[_]|r[_+1]<<8)>>(t&7)&i},xe=function(r,t){var i=t/8|0;return(r[i]|r[i+1]<<8|r[i+2]<<16)>>(t&7)},qt=function(r){return(r+7)/8|0},ae=function(r,t,i){(t==null||t<0)&&(t=0),(i==null||i>r.length)&&(i=r.length);var _=new(r instanceof L?L:r instanceof me?me:D)(i-t);return _.set(r.subarray(t,i)),_},Vt=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(r,t,i){var _=new Error(t||Vt[r]);if(_.code=r,Error.captureStackTrace&&Error.captureStackTrace(_,E),!i)throw _;return _},Jt=function(r,t,i){var _=r.length;if(!_||i&&i.f&&!i.l)return t||new D(0);var e=!t||i,n=!i||i.i;i||(i={}),t||(t=new D(_*3));var a=function(Me){var Re=t.length;if(Me>Re){var Ue=new D(Math.max(Re*2,Me));Ue.set(t),t=Ue}},s=i.f||0,u=i.p||0,f=i.b||0,m=i.l,x=i.d,N=i.m,F=i.n,se=_*8;do{if(!m){s=k(r,u,1);var ce=k(r,u+1,3);if(u+=3,ce)if(ce==1)m=Xt,x=$t,N=9,F=5;else if(ce==2){var ue=k(r,u,31)+257,Ie=k(r,u+10,15)+4,Ce=ue+k(r,u+5,31)+1;u+=14;for(var W=new D(Ce),de=new D(19),O=0;O<Ie;++O)de[Ft[O]]=k(r,u+O*3,7);u+=Ie*3;for(var Ae=Te(de),dt=(1<<Ae)-1,gt=$(de,Ae,1),O=0;O<Ce;){var Le=gt[k(r,u,dt)];u+=Le&15;var j=Le>>>4;if(j<16)W[O++]=j;else{var Y=0,K=0;for(j==16?(K=3+k(r,u,3),u+=2,Y=W[O-1]):j==17?(K=3+k(r,u,7),u+=3):j==18&&(K=11+k(r,u,127),u+=7);K--;)W[O++]=Y}}var Pe=W.subarray(0,ue),A=W.subarray(ue);N=Te(Pe),F=Te(A),m=$(Pe,N,1),x=$(A,F,1)}else E(1);else{var j=qt(u)+4,ge=r[j-4]|r[j-3]<<8,fe=j+ge;if(fe>_){n&&E(0);break}e&&a(f+ge),t.set(r.subarray(j,fe),f),i.b=f+=ge,i.p=u=fe*8,i.f=s;continue}if(u>se){n&&E(0);break}}e&&a(f+131072);for(var ft=(1<<N)-1,lt=(1<<F)-1,le=u;;le=u){var Y=m[xe(r,u)&ft],z=Y>>>4;if(u+=Y&15,u>se){n&&E(0);break}if(Y||E(2),z<256)t[f++]=z;else if(z==256){le=u,m=null;break}else{var He=z-254;if(z>264){var O=z-257,B=Xe[O];He=k(r,u,(1<<B)-1)+Je[O],u+=B}var be=x[xe(r,u)&lt],we=be>>>4;be||E(3),u+=be&15;var A=Bt[we];if(we>3){var B=$e[we];A+=xe(r,u)&(1<<B)-1,u+=B}if(u>se){n&&E(0);break}e&&a(f+131072);for(var Ne=f+He;f<Ne;f+=4)t[f]=t[f-A],t[f+1]=t[f+1-A],t[f+2]=t[f+2-A],t[f+3]=t[f+3-A];f=Ne}}i.l=m,i.p=le,i.b=f,i.f=s,m&&(s=1,i.m=N,i.d=x,i.n=F)}while(!s);return f==t.length?t:ae(t,0,f)},Kt=new D(0),Zt=function(r){(r[0]!=31||r[1]!=139||r[2]!=8)&&E(6,"invalid gzip data");var t=r[3],i=10;t&4&&(i+=r[10]|(r[11]<<8)+2);for(var _=(t>>3&1)+(t>>4&1);_>0;_-=!r[i++]);return i+(t&2)},U=function(){function r(t){this.s={},this.p=new D(0),this.ondata=t}return r.prototype.e=function(t){this.ondata||E(5),this.d&&E(4);var i=this.p.length,_=new D(i+t.length);_.set(this.p),_.set(t,i),this.p=_},r.prototype.c=function(t){this.d=this.s.i=t||!1;var i=this.s.b,_=Jt(this.p,this.o,this.s);this.ondata(ae(_,i,this.s.b),this.d),this.o=ae(_,this.s.b-32768),this.s.b=this.o.length,this.p=ae(this.p,this.s.p/8|0),this.s.p&=7},r.prototype.push=function(t,i){this.e(t),this.c(i)},r}(),Gt=function(){function r(t){this.v=1,U.call(this,t)}return r.prototype.push=function(t,i){if(U.prototype.e.call(this,t),this.v){var _=this.p.length>3?Zt(this.p):4;if(_>=this.p.length&&!i)return;this.p=this.p.subarray(_),this.v=0}i&&(this.p.length<8&&E(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),U.prototype.c.call(this,i)},r}(),Qt=function(){function r(t){this.v=1,U.call(this,t)}return r.prototype.push=function(t,i){if(U.prototype.e.call(this,t),this.v){if(this.p.length<2&&!i)return;this.p=this.p.subarray(2),this.v=0}i&&(this.p.length<4&&E(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),U.prototype.c.call(this,i)},r}(),en=function(){function r(t){this.G=Gt,this.I=U,this.Z=Qt,this.ondata=t}return r.prototype.push=function(t,i){if(this.ondata||E(5),this.s)this.s.push(t,i);else{if(this.p&&this.p.length){var _=new D(this.p.length+t.length);_.set(this.p),_.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var e=this,n=function(){e.ondata.apply(e,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(n):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(n):new this.Z(n),this.s.push(this.p,i),this.p=null}}},r}(),tn=typeof TextDecoder!="undefined"&&new TextDecoder,nn=0;try{tn.decode(Kt,{stream:!0}),nn=1}catch{}var rn="./perspective_viewer_bg.wasm";async function an(){return new URL(rn,import.meta.url)}var on=an();window.addEventListener("unhandledrejection",r=>{r.reason?.message==="View method cancelled"&&r.preventDefault()});function De(r){return new Uint32Array(r.slice(0,4))[0]==559903}async function _n(){let r=await on,t=[],i=0,_=new en(a=>{a&&(i+=a.byteLength,t.push(a))});if(r instanceof URL||typeof r=="string"){let a=(await fetch(r.toString())).body.getReader(),s=0;for(;;){let{value:u,done:f}=await a.read();if(f)break;s===0&&De(u.buffer)||s===1?(s=1,_.push(u,f)):(s=2,i+=u.byteLength,t.push(u))}}else if(r instanceof Uint8Array)De(r.buffer)?_.push(r,!0):(i=r.byteLength,t=[r]);else{let a=new Uint8Array(r);De(r)?_.push(a,!0):(i=a.byteLength,t=[a])}let e=0,n=new Uint8Array(i);for(let a of t)n.set(a,e),e+=a.byteLength;return await zt(n)}var Ge=_n(),Qe=class extends HTMLElement{constructor(){super();this.load_wasm()}async load_wasm(){await Ge,this.instance||(this.instance=new ve(this))}async connectedCallback(){await this.load_wasm(),this.instance.connected_callback()}static async registerPlugin(r){await Ge,Rt(r)}async load(r){await this.load_wasm(),await this.instance.js_load(r)}async notifyResize(r=!1){await this.load_wasm(),await this.instance.js_resize(r)}async setAutoSize(r=!0){await this.load_wasm(),await this.instance.js_set_auto_size(r)}async getTable(r){return await this.load_wasm(),await this.instance.js_get_table(!!r)}async getView(){return await this.load_wasm(),await this.instance.js_get_view()}async restore(r){await this.load_wasm(),await this.instance.js_restore(r)}async save(r){return await this.load_wasm(),await this.instance.js_save(r)}async flush(){await this.load_wasm(),await this.instance.js_flush()}async reset(r=!1){await this.load_wasm(),await this.instance.js_reset(r)}async delete(){await this.load_wasm(),await this.instance.js_delete()}async download(r){await this.load_wasm(),await this.instance.js_download(r)}async copy(r){await this.load_wasm(),await this.instance.js_copy(r)}async restyleElement(){await this.load_wasm(),await this.instance.js_restyle_element()}async resetThemes(r){await this.load_wasm(),await this.instance.js_reset_themes(r)}async getEditPort(){return await this.load_wasm(),await this.instance.js_get_edit_port()}async setThrottle(r){await this.load_wasm(),await this.instance.js_set_throttle(r)}async toggleConfig(r){await this.load_wasm(),await this.instance.js_toggle_config(r)}async getPlugin(r){return await this.load_wasm(),await this.instance.js_get_plugin(r)}async getAllPlugins(){return await this.load_wasm(),await this.instance.js_get_all_plugins()}};document.createElement("perspective-viewer").constructor===HTMLElement&&window.customElements.define("perspective-viewer",Qe);function qn(r,{warn:t=!0,replace_defaults:i=!1}={}){if(typeof r=="object"&&!(r instanceof ArrayBuffer)){let _=JSON.parse(JSON.stringify(r));return"viewers"in _&&"detail"in _?sn(_,{warn:t,replace_defaults:i}):et(_,!1,{warn:t,replace_defaults:i})}else return r}function sn(r,t){for(let i in r.viewers)r.viewers[i]=et(r.viewers[i],!0,t),"master"in r.viewers[i]||(r.viewers[i].master=!1,t.warn&&console.warn('Deprecated perspective missing attribute "master" set to default')),"linked"in r.viewers[i]||(r.viewers[i].linked=!1,t.warn&&console.warn('Deprecated perspective missing attribute "linked" set to default'));return r}function et(r,t,i){return cn(r,[dn,gn,fn,bn,i.replace_defaults?un:!1,wn,pn,t?vn:hn].filter(_=>!!_),i)}function cn(r,t,i){for(let _ of t)r=_(r,i);return r}function un(r,t){for(let i of["group_by","split_by","filter","sort"])r[i]===null&&(r[i]=[],t.warn&&console.warn(`Deprecated perspective missing attribute "${i}" set to default"`)),"aggregates"in r&&r.aggregates===null&&(r.aggregates={},t.warn&&console.warn('Deprecated perspective missing attribute "aggregates" set to default"'));return r}function Ee(r,t){return function(i,_){let e=0;for(let n of t)if(n in i){if(e++>0)throw new Error(`Duplicate "${r}" fields`);i[r]=i[n],n!==r&&(delete i[n],_.warn&&console.warn(`Deprecated perspective attribute "${n}" renamed "${r}"`))}return i}}var dn=Ee("group_by",["group_by","row_pivots","row-pivot","row-pivots","row_pivot"]),gn=Ee("split_by",["split_by","column_pivots","column-pivot","column-pivots","column_pivot","col_pivots","col-pivot","col-pivots","col_pivot"]),fn=Ee("filter",["filter","filters"]);function ln(r,t,i,_,e){if(r.test(i)){let n=i.replace(r,t);e.warn&&console.warn(`Deprecated perspective "expression" attribute value "${i}" updated to "${n}"`);for(let a of["group_by","split_by"])if(a in _)for(let s in _[a])_[a][s]===i.replace(/"/g,"")&&(_[a][s]=n,e.warn&&console.warn(`Deprecated perspective expression in "${a}" attribute "${i}" replaced with "${n}"`));for(let a of _.filter||[])a[0]===i.replace(/"/g,"")&&(a[0]=n,e.warn&&console.warn(`Deprecated perspective expression in "filter" attribute "${i}" replaced with "${n}"`));for(let a of _.sort||[])a[0]===i.replace(/"/g,"")&&(a[0]=n,e.warn&&console.warn(`Deprecated perspective expression in "sort" attribute "${i}" replaced with "${n}"`));return n}else return i}function bn(r,t){if(r["computed-columns"]){if("expressions"in r)throw new Error('Duplicate "expressions" and "computed-columns');r.expressions=r["computed-columns"],delete r["computed-columns"],t.warn&&console.warn('Deprecated perspective attribute "computed-columns" renamed "expressions"');let i=[[/^year_bucket\("(.+?)"\)/,`bucket("$1", 'y')`],[/^month_bucket\("(.+?)"\)/,`bucket("$1", 'M')`],[/^day_bucket\("(.+?)"\)/,`bucket("$1", 'd')`],[/^hour_bucket\("(.+?)"\)/,`bucket("$1", 'h')`],[/^minute_bucket\("(.+?)"\)/,`bucket("$1", 'm')`],[/^second_bucket\("(.+?)"\)/,`bucket("$1", 's')`]];for(let _ in r.expressions){let e=r.expressions[_];for(let[n,a]of i)e=ln(n,a,e,r,t);r.expressions[_]=e}}return r}function wn(r,t){let i={datagrid:"Datagrid",Datagrid:"Datagrid",d3_y_area:"Y Area","Y Area":"Y Area",d3_y_line:"Y Line","Y Line":"Y Line",d3_xy_line:"X/Y Line","X/Y Line":"X/Y Line",d3_y_scatter:"Y Scatter","Y Scatter":"Y Scatter",d3_xy_scatter:"X/Y Scatter","X/Y Scatter":"X/Y Scatter",d3_x_bar:"X Bar","X Bar":"X Bar",d3_y_bar:"Y Bar","Y Bar":"Y Bar",d3_heatmap:"Heatmap",Heatmap:"Heatmap",d3_treemap:"Treemap",Treemap:"Treemap",d3_sunburst:"Sunburst",Sunburst:"Sunburst"};return"plugin"in r&&r.plugin!==i[r.plugin]&&(r.plugin=i[r.plugin],t.warn&&console.warn(`Deprecated perspective "plugin" attribute value "${r.plugin}" updated to "${i[r.plugin]}"`)),r}function pn(r,t){if(r.plugin==="Datagrid"&&!!r.plugin_config&&!r.plugin_config.columns){t.warn&&console.warn('Deprecated perspective attribute "plugin_config" moved to "plugin_config.columns"');let i={};for(let _ of Object.keys(r.plugin_config)){let e=r.plugin_config[_];delete r.plugin_config[_],typeof e.color_mode=="string"&&(e.number_color_mode=e.color_mode,delete e.color_mode,t.warn&&console.warn('Deprecated perspective attribute "color_mode" renamed "number_color_mode"')),i[_]=e}r.plugin_config.columns=i,t.replace_defaults&&(r.plugin_config.editable=!1,r.plugin_config.scroll_lock=!0)}return r}function hn(r,t){let i=["editable","selectable","name","table","master","linked"];for(let _ of i)_ in r&&(delete r[_],t.warn&&console.warn(`Deprecated perspective attribute "${_}" removed`));return r}function vn(r,t){let i=["editable","selectable","name","table","master","linked"];for(let _ of i)_ in r&&r[_]===null&&(delete r[_],t.warn&&console.warn(`Deprecated perspective attribute "${_}" removed`));return r}var mn=class extends HTMLElement{constructor(){super()}async open(r,t,i){this.instance?this.instance.reset(t,i):this.instance=new pe(this,t,i),this.instance.open(r)}destroy(){this.instance.destroy()}};document.createElement("perspective-number-column-style").constructor===HTMLElement&&window.customElements.define("perspective-number-column-style",mn);var yn=class extends HTMLElement{constructor(){super()}async open(r,t,i){this.instance?this.instance.reset(t):this.instance=new he(this,t,i),this.instance.open(r)}destroy(){this.instance.destroy()}};document.createElement("perspective-string-column-style").constructor===HTMLElement&&window.customElements.define("perspective-string-column-style",yn);var Tn=` .dnd-poly-drag-image { opacity: .5 !important; } .dnd-poly-drag-image.dnd-poly-snapback { transition-property: transform, -webkit-transform !important; transition-duration: 250ms !important; transition-timing-function: ease-out !important; } `,tt=document.createElement("style");tt.textContent=Tn;document.head.appendChild(tt);var V="dnd-poly-",xn=V+"drag-image",Dn=V+"snapback",En=V+"icon",nt="dnd-poly-",On=nt+"dragstart-pending",Sn=nt+"dragstart-cancel",P=["none","copy","copyLink","copyMove","link","linkMove","move","all"],v=["none","copy","move","link"];function kn(){let r={dragEvents:"ondragstart"in document.documentElement,draggable:"draggable"in document.documentElement,userAgentSupportingNativeDnD:void 0},t=!!window.chrome||/chrome/i.test(navigator.userAgent);return r.userAgentSupportingNativeDnD=!(/iPad|iPhone|iPod|Android/.test(navigator.userAgent)||t&&"ontouchstart"in document.documentElement),r}function jn(){let r=!1;try{let t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("test",null,t)}catch{}return r}var rt=jn();function ie(r){return r&&r.tagName}function J(r,t,i){i===void 0&&(i=!0),document.addEventListener(r,t,rt?{passive:i}:!1)}function Oe(r,t){document.removeEventListener(r,t)}function oe(r,t,i,_){_===void 0&&(_=!1);let e=rt?{passive:!0,capture:_}:_;return r.addEventListener(t,i,e),{off:function(){r.removeEventListener(t,i,e)}}}function at(r,t){if(r.nodeType===1){let i=getComputedStyle(r);for(let _=0;_<i.length;_++){let e=i[_];t.style.setProperty(e,i.getPropertyValue(e),i.getPropertyPriority(e))}if(t.style.pointerEvents="none",t.removeAttribute("id"),t.removeAttribute("class"),t.removeAttribute("draggable"),t.nodeName==="CANVAS"){let _=r,e=t,n=_.getContext("2d").getImageData(0,0,_.width,_.height);e.getContext("2d").putImageData(n,0,0)}}if(r.hasChildNodes())for(let i=0;i<r.childNodes.length;i++)at(r.childNodes[i],t.childNodes[i])}function In(r){let t=r.clone